You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maka.apache.org by "Astro-Han (via GitHub)" <gi...@apache.org> on 2026/09/24 07:42:47 UTC
[PR] fix(desktop): notify and bounce the dock when a turn waits on the user [maka]
Astro-Han opened a new pull request, #5682:
URL: https://github.com/apache/maka/pull/5682
## Summary
A turn parked on AskUserQuestion (or a form, sandbox boundary, or client capability request) made no noise: system notifications only fired when a turn completed or errored, and nothing bounced the dock. Users who switched to another app did not know the task was blocked on them.
- **Desktop:** interaction requests now raise the same gated notification with a new `waiting` kind. The body is the question text (form message / boundary justification for the other kinds). On macOS the dock bounces once (`informational`) for `waiting` only: a finished turn needs no action, a parked one does. The existing `notifications.runComplete` toggle, window-focus, incognito and E2E gates apply unchanged, so there is no new setting; the toggle copy now names the waiting case. The IPC is renamed `notifications:runEnded` → `notifications:notify` because it no longer only reports ended runs.
- **Runtime Host:** the root turn loop re-projected the canonical Session after a question or form request, but not after a sandbox boundary request, so the last `session.catalog.changed` frame for a parked boundary landed before the header moved to `waiting_for_user`. Clients that re-read the catalog on change frames kept showing the Session as running until the user answered. It now uses the existing `isHostedInteractionRequestEvent` predicate for every hosted interaction request. Desktop re-reads on every projection frame, so this gap only affected other catalog clients.
Scope boundary, same as the existing completion notification: the renderer subscribes to the active Session's events, so the notification covers the active Session while the window is unfocused. A background Session waiting on the user is signalled by its sidebar row (verified to show the "等你确认" dot within ~280 ms of the request).
## Verification
- New Host test `a pending {question, sandbox boundary} reaches catalog subscribers as waiting_for_user` (`execution-host-message.test.ts`): sandbox case fails 3/3 on `main`, passes 3/3 with the fix; question case passes on both.
- New desktop test: a `user_question_request` calls `notifyTurn({ kind: 'waiting', body: <question> })`.
- `runtime-host`: `execution-host-message` + `root-turn-coordinator` test files, 88/88 pass. Desktop: `notifications-policy` + `message-queue-ui-state`, 8/8 pass. `npm run typecheck` (desktop, incl. stories), `npm run format`, `npm run lint`, `check:renderer-architecture` pass.
- Real app, non-E2E path (real Host entry, ai-sdk, real AskUserQuestion tool against a local mock Anthropic SSE server), with `Notification.prototype.show` / `app.dock.bounce` recorded in the main process:
- window unfocused + question → one notification (title = session name, body = question text) and one `dock.bounce('informational')`; `main` records nothing here;
- window focused → no notification, no bounce;
- window unfocused + normal completion → one completion notification, no bounce.
- Not run locally: E2E suite (CI), form / sandbox / client-capability requests in the real app (they share the same renderer branch).
Settings → General toggle copy, BEFORE `main` storybook-static vs AFTER this branch:


## AI use
Select exactly one:
- [ ] No generative tool made a substantive contribution
- [x] Generative tooling made a substantive contribution
Tool(s) and scope: Claude Code (Opus 5.5) — diagnosis, implementation, tests, and real-app verification.
## Checklist
- [x] Tests cover the change and fail without it
- [x] Lint, format, typecheck and the affected suites pass locally
Does this PR entail a change in behavior?
- [x] Yes — described under Summary above
- [ ] No
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For additional commands, e-mail: commits-help@maka.apache.org
Re: [PR] fix(desktop): notify and bounce the dock when a turn waits on the user [maka]
Posted by "Astro-Han (via GitHub)" <gi...@apache.org>.
Astro-Han merged PR #5682:
URL: https://github.com/apache/maka/pull/5682
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For additional commands, e-mail: commits-help@maka.apache.org