* refactor(notifications): one host read of Notify About Hidden Workspaces, used by phone pushes and the host unread flag
* fix(notifications): folder chat phone pushes read the folder's name; skip the hidden check with no Filters switch on
* refactor(sidebar): one Filters-switch predicate, kind predicates in shared
The sidebar's Filters switches were applied as five separate filters plus a
sleeping sweep inside computeVisibleWorktrees. They now go through one
isHiddenBySidebarSwitch predicate, and the workspace-kind predicates
(default branch, automation, CLI, detached HEAD) move to
shared/worktree/workspace-kinds so main can apply the same rules. The git
identity display moves to shared with them. No behaviour change.
* feat(notifications): hidden workspaces send no notifications unless opted in
A workspace hidden by a switch in the sidebar's Filters menu (sleeping,
default branch, automation, CLI, other-client, detached HEAD) now raises
no unread marker, banner, sound, tray dot or phone push. A new setting,
Settings > Notifications > "Notify about hidden workspaces", defaults off
and restores today's behaviour when on.
The renderer gate sits first in resolveAgentAttention, which every
terminal completion, bell and structured-chat edge passes through before
the unread write and the notification request; the bell's own early
marker write checks the same predicate. For local structured chat, main
pushes phones itself, so that push applies the kind switches main can
evaluate from persisted UI and workspace records. Anything unknown,
unhydrated, or a hidden parent the sidebar still shows notifies.
* fix(notifications): hidden-workspace review fixes
- Main's phone push now honours "Hide other-client workspaces" for this
host's worktrees and folder workspaces, through a shared
isCreatedByAnotherClient that the sidebar's no-environment branch uses too.
- The renderer mute fails open until terminals reconnect: before then Hide
sleeping reads every restored workspace as asleep.
- The settings row stays usable when notifications are off (it also governs
unread dots), uses Title Case, and its copy names the Hide switches.
- The mute check moves to attention/, and the switch list behind its fast
path is a full Record so a new switch cannot be skipped.
- A notification field the settings file predates is no longer a repair,
so upgrades do not rewrite every profile.
* refactor(notifications): simplify missing-field repair check
* refactor(notifications): ask the sidebar pipeline whether a workspace is hidden
- The renderer mute check now runs computeVisibleWorktreeIds with the
project and host filters lifted instead of re-walking lineage by hand,
so lineage parents and same-id rows on other hosts follow the sidebar
exactly. The pure pipeline moves to compute-visible-worktrees.ts so the
store's attention slice can call it without an import cycle.
- Drops the switch-list shortcuts in favour of sidebarHasActiveFilters
(renderer) and none (main), and the folder one-caller wrapper.
- Main reads notifyHiddenWorkspaces once, in deliver, next to its other
eligibility checks; isStructuredAttentionWorkspaceHidden only answers
whether Filters hide the workspace, and isWorkspaceHidden is required.
- Reverts the settings-repair generalisation; a one-time rewrite on
upgrade is fine.
* test(notifications): wire the hidden-workspace check into e2e fixtures, and an e2e for the flow
The structured-attention e2e unit fixtures built the main phone-push
delivery without the now-required isWorkspaceHidden, so deliver threw and
no prompt reached the relay; they now pass () => false and carry the
notifyHiddenWorkspaces field. A new Playwright spec rings a real BEL in the
seeded primary checkout with Settings open and checks the unread dot and
the main-process notification request: present while visible, absent under
Hide default branch, and back with Notify About Hidden Workspaces on.
* test(e2e): type the hidden-workspace dispatch log as a declared global
* fix(notifications): exempt a hidden lineage parent only while a child is shown
* perf(notifications): answer the mute check per row before the full sidebar pass
A row the Filters switches show is visible, and a hidden row that no
lineage record names as a parent cannot be shown above a child, so only a
hidden lineage parent needs computeVisibleWorktreeIds. At 1,000 workspaces
a mute check drops from ~0.2-0.3 ms to ~6 us.
* Revert "perf(notifications): answer the mute check per row before the full sidebar pass"
This reverts commit 889eced7ff.
* docs(notifications): note the measured cost of the mute check's sidebar pass
Extract subprocess execution and process contracts into @orca/process-host with explicit public entry points, independent checks, and one Node 18 compatible CommonJS runtime. Migrate application consumers and integrate package builds, dependency selection, import enforcement, and runtime resource staging.
Preserve daemon startup ownership and profile isolation, and qualify development rebuild recovery and concurrent output publication. Remove unnecessary aliases, test forwarding exports, and a duplicate output scan.
Validation: full typechecks, changed-code quality, package and artifact checks, native Windows builds/types plus 306 runtime tests, and independent native reviews.
Matched full E2E controls on original main and unchanged reviewed head both pass all 17 applicable tests (nine skips). Earlier intermittent E2E failures are documented in the PR; no assertions were weakened. The final combined-tree audit preserves both branches with no import-boundary violations.
* fix(native-chat): alert when a structured chat asks for approval or input mid-turn
A structured Claude or Codex chat that stopped mid-turn to ask for approval or a
question raised no OS notification, no phone push and no unread dot: the host's
attention feed only fired when a turn settled. The host now announces each newly
pending prompt once, from the same feed, and owns the phone push for its own
structured sessions; desktops keep presentation only.
- host feed: a `prompt` edge per pending approval/question, opt-in on the
existing stream; a clean settle that only restates an announced prompt is not
re-announced to prompt-aware clients; failures always are
- host push: an in-process subscriber pushes the host's paired phones with
labels from in-memory metadata, and withdraws a prompt's alert once answered
- one attention identity for desktop banner, phone push, dedupe and retirement;
delivery dedupes on it instead of the per-workspace burst window
- agentSession.acknowledgeAttention routes reading a chat to its owning host,
which retires what it pushed for that session via its dismissal record
* fix(native-chat): keep prompt alerts under their retirement identity
* Fix structured attention read and delivery lifecycle
* Allow later reads to retry failed attention retirement
* Prevent delayed prompt alerts after accepted reads
* Keep attention integration tests across process boundaries
* Check structured capability before cursorless attention reads
* Keep host retirement fixture in the Node typecheck boundary
* Keep attention test seams in the mock boundary
* Keep host notification formatting usable without Electron
* Declare agents in restored-host attention fixture
* Group session attention capability declarations
* Retire structured alerts on every read and when a remote prompt ends
- Mark read and Mark all read on a chat that was never opened, or is hidden,
now cover what lit its row: the read boundary is the later of the transcript
cursor and the newest edge the tab was handed, captured at the click. The
one boundary closes the banners, retires relayed phone alerts and drives the
host acknowledgement; an edge after the click stays live.
- An alert from a host older than journal cursors has no position, so a pane
read retires it again, banner and relayed phone push, as before this change.
- A desktop-relayed prompt alert for a remote chat is withdrawn once that
host's live status stops reporting attention (answered elsewhere, cancelled,
host restart); cached status after loss of contact never settles it.
- The attention acknowledgement is agent-session.attention-ack.v1 with a
required journal cursor and strict params; the cursorless no-op is gone.
- The dismissal store keeps a record whose origin a newer build wrote,
dropping only that origin.
- Host reconciliation runs on restore and when a prompt leaves the pending
set, not on every journal commit.
- Remove unused session-wide retirement (retire, retireMatching,
retireMobileNotificationsMatching) and test-only store lookups.
* Settle relayed prompts only from host-dated status; reads default to view
- A remote chat's status and its prompt edges arrive on separate sockets, so a
status row queued before the prompt could land after it and withdraw a
relayed alert that was still pending. Settlement now needs a live,
non-attention row whose host updatedAt (the journal's latest row time, never
decreasing) is later than the prompt's host raisedAt. The owed prompt is
cleared only once the settle call succeeds, so a failed call retries on the
next qualifying row.
- An acknowledgement without captured reads now reads as a view. Mark read,
Mark all read, the hover-card jump and both dashboard acks pass 'explicit';
Activity's automatic per-turn read stays a view.
* Re-judge relayed prompt settlement after each call; dashboard watching is a view
- Settlement is one check of the current mirror, run on each status row, after
each settle call returns, and when a prompt edge arrives. A row that lands
while a call is out is no longer dropped, and an edge that arrives after its
own resolution settles at once. A rejected call is retried only once the
mirror holds a different row, so a failing call cannot loop.
- The Agent Dashboard's card click acknowledges as explicit; watching the open
dialog acknowledges as a view, through both the in-window drawer and the
pop-out relay, and no longer re-acks the state the click just read.
* Keep a reused read owner findable after its holders release it
A chat pane memoizes its read owner. When every holder let go in one commit and
the same owner was picked up again (React StrictMode's effect re-run in
development, or a pane remounted in one commit, as on a tab move), the release
dropped it from the registry and nothing put it back. The attention bridge then
found no owner, so a view read carried no cursor: the unread dot cleared but
the banner and phone alerts stayed. An owner now names its key again whenever
it gains an activation or a subscriber and the key is free, never over a
different live owner.
* Type the ack test's execution host ids
* Keep the turn-completion types in main's turn-completion wire module
Main moved these types into agent-session-turn-completion-wire.ts while this branch moved them into agent-session-attention-wire.ts. They now live at main's path with this branch's additions (journal cursor, prompt attention, prompt arm); the unused completion key is dropped.