Repository navigation
fix(attention): count both terminal and chat siblings when clearing workspace unread - #21274
Conversation
…orkspace unread A workspace holding a terminal pane and a structured chat tab built its "anything still unread here?" inventory from the terminal tab list alone, so acknowledging the visible terminal cleared the workspace's unread flag while the chat's completion marker was still outstanding. The chat's unread was lost with nothing left to relight it. Structured chats now have their own attention-surface adapter, addressed by the pane key the status producer already publishes — `<unifiedTabId>:<sessionLeaf>` — with the unified tab id as its container id. Acknowledgement unions both surface kinds' remainders, so either kind's hidden sibling holds the workspace lit.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan provides up to 10 included reviews per hour; 2 remain after this review. 📝 WalkthroughWalkthroughThe change adds structured chat tabs as an agent attention surface. It validates live sessions, viewed state, and unread markers. Auto-acknowledgement now selects terminal or structured targets and combines their workspace attention remainders. Unified structured tabs can receive terminal unread markers. Tests cover structured surfaces, mixed workspaces, focus changes, target resolution, acknowledgement, and unread-state behavior. Priority: ⬇️ Low Merge Risk: 🔵 Low · up to Viewing a structured chat can leave its completion unread indicator active when no pane-level unread record exists. This is a bounded UI-state regression that should be addressed before relying on the new acknowledgement flow. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Advanced
Run ID: f2b8d293-0fc9-4e3e-905c-3a4ded1aaf50
📒 Files selected for processing (11)
src/renderer/src/attention/agent-attention-acknowledgement.tssrc/renderer/src/components/native-chat/StructuredAgentSessionStatusBridge.tsxsrc/renderer/src/components/native-chat/structured-agent-session-tabs.tssrc/renderer/src/components/native-chat/structured-attention-surface.test.tssrc/renderer/src/components/native-chat/structured-attention-surface.tssrc/renderer/src/hooks/agent-auto-ack-surfaces.tssrc/renderer/src/hooks/agent-auto-ack-targets.tssrc/renderer/src/hooks/useAutoAckViewedAgent.mixed-workspace.test.tssrc/renderer/src/hooks/useAutoAckViewedAgent.test.tssrc/renderer/src/hooks/useAutoAckViewedAgent.tssrc/renderer/src/store/terminals/terminal-tab-attention.ts
Included review availability: Your plan provides up to 10 included reviews per hour; 7 remain after this review.
| if (toAck.length === 0 && !viewedUnreadSubjectKey) { | ||
| return |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
🔎 Supported by static analysis
🏁 Script executed:
sed -n '1,180p' src/renderer/src/hooks/agent-auto-ack-surfaces.ts
sed -n '1,190p' src/renderer/src/hooks/useAutoAckViewedAgent.ts
sed -n '1,130p' src/renderer/src/store/terminals/terminal-tab-attention.ts
rg -n 'markTerminalTabUnread|unreadTerminalTabs|applyAgentAttentionAcknowledgement|clear.*Terminal.*Unread|unreadGroupIds|shouldClearWorkspaceAttention' src/renderer/srcRepository: stablyai/orca
Length of output: 50369
🏁 Script executed:
set -o pipefail
printf '%s\n' '--- attention acknowledgement ---'
sed -n '1,230p' src/renderer/src/attention/agent-attention-acknowledgement.ts
printf '%s\n' '--- structured attention surface ---'
sed -n '1,180p' src/renderer/src/components/native-chat/structured-attention-surface.ts
printf '%s\n' '--- terminal attention surface ---'
sed -n '1,130p' src/renderer/src/components/terminal-pane/terminal-attention-surface.ts
printf '%s\n' '--- auto-ack target resolver ---'
sed -n '1,220p' src/renderer/src/hooks/agent-auto-ack-targets.ts
printf '%s\n' '--- structured/tab focus mutations ---'
sed -n '1,140p' src/renderer/src/store/slices/tabs/tabs-focus-actions.ts
sed -n '1,130p' src/renderer/src/store/slices/tabs/tabs-group-actions.ts
sed -n '1,115p' src/renderer/src/store/terminals/terminal-tab-navigation.ts
printf '%s\n' '--- agent-completion tab marking callers ---'
rg -n -C 5 "markTerminalTabUnread\\([^\\n]*agent-completion|markTerminalTabUnread" src/renderer/src/components src/renderer/src/hooks src/renderer/src/store | grep -B5 -A8 "agent-completion"
printf '%s\n' '--- focused tests for group-only auto-ack ---'
rg -n -C 8 "unreadTerminalTabs|group-only|group unread|agent-completion" src/renderer/src/hooks/useAutoAckViewedAgent*.test.ts src/renderer/src/components/native-chat/structured-attention-surface.test.tsRepository: stablyai/orca
Length of output: 50370
🏁 Script executed:
set -o pipefail
printf '%s\n' '--- attention acknowledgement ---'
sed -n '1,230p' src/renderer/src/attention/agent-attention-acknowledgement.ts
printf '%s\n' '--- structured attention surface ---'
sed -n '1,180p' src/renderer/src/components/native-chat/structured-attention-surface.ts
printf '%s\n' '--- terminal attention surface ---'
sed -n '1,130p' src/renderer/src/components/terminal-pane/terminal-attention-surface.ts
printf '%s\n' '--- auto-ack target resolver ---'
sed -n '1,220p' src/renderer/src/hooks/agent-auto-ack-targets.ts
printf '%s\n' '--- structured/tab focus mutations ---'
sed -n '1,140p' src/renderer/src/store/slices/tabs/tabs-focus-actions.ts
sed -n '1,130p' src/renderer/src/store/slices/tabs/tabs-group-actions.ts
sed -n '1,115p' src/renderer/src/store/terminals/terminal-tab-navigation.ts
printf '%s\n' '--- agent-completion tab marking callers ---'
rg -n -C 5 "markTerminalTabUnread" src/renderer/src/components src/renderer/src/hooks src/renderer/src/store | grep -B5 -A8 "agent-completion"
printf '%s\n' '--- focused tests for group-only auto-ack ---'
rg -n -C 8 "unreadTerminalTabs|group-only|group unread|agent-completion" src/renderer/src/hooks/useAutoAckViewedAgent*.test.ts src/renderer/src/components/native-chat/structured-attention-surface.test.tsRepository: stablyai/orca
Length of output: 50370
🏁 Script executed:
set -o pipefail
printf '%s\n' '--- unread reason contract ---'
sed -n '1,150p' src/renderer/src/attention/agent-attention-contract.ts
printf '%s\n' '--- structured completion and notification producers ---'
rg -n -C 8 "markTerminalTabUnread|agent-completion|markAgentCompletionPaneUnread" src/renderer/src/components/native-chat src/renderer/src/attention src/renderer/src/hooks | head -n 240
printf '%s\n' '--- focused auto-ack tests ---'
sed -n '1,210p' src/renderer/src/hooks/useAutoAckViewedAgent.mixed-workspace.test.tsRepository: stablyai/orca
Length of output: 34590
Model structured agent-completion group unread as an auto-ack trigger.
A structured tab can store an agent-completion marker only in unreadTerminalTabs. The auto-ack guard does not watch this map, and its presence check does not detect the marker. If another update triggers a scan, acknowledgeViewedAutoAckTarget returns when no subject marker exists. The group and workspace unread markers therefore remain set. Filter this path to agent-completion; unreadTerminalTabs also stores terminal-bell, manual-mark-unread, and legacy markers that auto-ack must not clear.
- Track
s.unreadTerminalTabsin the store-change guard. - Include the viewed structured target's
agent-completiongroup marker in the presence check. - Treat that marker as an acknowledgement target so group and workspace unread can clear without a subject marker.
There was a problem hiding this comment.
Important
The reverse direction of this fix is sound, but the forward direction — "acknowledging the visible terminal keeps the hidden chat unread" — cannot fire in production: no code path writes a structured chat's unreadAgentCompletionPanes / unreadTerminalTabs marker, and shouldClearWorkspaceAttention never reads the chat's live turn. Details inline.
Reviewed changes
- Provider-neutral remainder union —
mergeAgentAttentionRemaindersunions each surface kind'shasSurfaces/unreadSubjectKeys/unreadGroupIds, and acknowledgement now asks the union before clearing workspace unread. - Structured attention surface — new
createStructuredAttentionSurfaceadapter bindsAgentAttentionSurfaceto the store, addressing a session by its publishedstructuredAgentSessionPaneKey(unifiedTabId, sessionId). - Surface-kind target resolution —
resolveAutoAckTabTargetsnow resolves the active unified tab, so a visible chat produces a structured target instead of a stale terminal one;AutoAckTabTargetcarriessurfaceKind. markTerminalTabUnreadacceptance — the write guard now also accepts a unifiedagent-sessiontab id, not only atabsByWorktreeid.- Extracted structured-tab projection —
StructuredTab/isStructuredTab/getStructuredAgentSessionTabsmoved tostructured-agent-session-tabs.ts; the bridge re-exports the getter.
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
| for (const tab of tabs) { | ||
| const subjectKey = structuredAgentSessionPaneKey(tab.id, tab.entityId) | ||
| if (state.unreadAgentCompletionPanes[subjectKey]) { | ||
| unreadSubjectKeys.push(subjectKey) | ||
| } | ||
| if (state.unreadTerminalTabs[tab.id]) { | ||
| unreadGroupIds.push(tab.id) | ||
| } |
There was a problem hiding this comment.
The structured remainder only counts markers in unreadAgentCompletionPanes / unreadTerminalTabs, but no production path writes either map for a structured chat, so this returns empty for a hidden unread chat and shouldClearWorkspaceAttention still clears the workspace. The forward direction this PR targets stays broken in production.
Technical details
# Structured remainder reads maps no structured writer populates
## Affected sites
- `src/renderer/src/components/native-chat/structured-attention-surface.ts:99` — reads `unreadAgentCompletionPanes[subjectKey]`; `:102` reads `unreadTerminalTabs[tab.id]`.
- `src/renderer/src/store/terminals/terminal-tab-attention.ts:20,51` — the only additive writers of those maps.
- `src/renderer/src/components/terminal-pane/use-notification-dispatch.ts:195-196` — the only production caller (`markSubjectUnread` / `markGroupUnread`), reached with `createTerminalAttentionSurface`, whose `admitTerminalPane` requires a `tabsByWorktree` / `ptyIdsByTabId` record a structured chat does not have.
- `src/renderer/src/store/slices/agent-status-live-actions.ts:40-86` — `setAgentStatus` writes only `agentStatusByPaneKey`, never the unread maps.
- `src/renderer/src/hooks/agent-hook-completion-notifications.ts:228-233` — `paneCanReceiveHookCompletion` rejects structured pane keys (needs a `tabsByWorktree` row or a `ptyIdsByTabId` entry).
## Required outcome
- The clear decision must also count the hidden chat's live/retained turn (`agentStatusByPaneKey` / `retainedAgentsByPaneKey`) as workspace attention, or a producer must write a structured unread marker before the union can observe it.
## Open questions for the human
- Is a structured unread-marker producer planned separately? If so, this direction is inert until it lands; the new `markTerminalTabUnread` acceptance has no production caller today either.There was a problem hiding this comment.
ℹ️ No new issues in this delta. The prior review's open thread on the structured remainder is unchanged by these commits, so this is not an approval.
Reviewed changes
Changes since the prior pullfrog review (99794fb):
- Focused-group rescan — the auto-ack ref-equality guard now compares
activeWorktreeId, the focused group id, and the active workspace's group slice (plus the floating workspace's equivalents) instead of the wholegroupsByWorktreemap, so focusing a split group onto a structured chat re-runs the scan. - Regression test —
useAutoAckViewedAgent.focus-group.test.tsmounts the hook with a hidden unread chat and asserts thatfocusGrouponto its group clears the marker.
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
Review status: reviewed, fixed, and cleanVerdict: land after fixes. The review found one concrete regression: focusing a different split group containing a structured chat could change the visible session without invalidating the auto-ack scan, leaving that session unread. Commit Judgments
Electron evidenceA dedicated Electron validation worker launched this exact worktree in the background through hidden CDP and verified the rendered mixed terminal/structured-chat surface: The screenshot is rendered-surface evidence, not full end-to-end proof of the unread transition. During that interaction Playwright switched renderer targets, so the worker could not deterministically exercise and capture the unread-to-read transition. The transition itself is covered by the focused regression tests. |
Upstream stablyai#21274 split auto-ack into per-surface adapters (terminal and structured chat). The grid target now carries surfaceKind: 'terminal', the parked-card BEL check (group-level unread) moves into acknowledgeViewedAutoAckTarget, and the sessions view branch no longer sits behind the terminal-view early return. stablyai#21659 chains .finally on ensureRemoteDetectedAgents; the launch picker test stubs it with a resolved promise like upstream's own tests.
… finishes A structured native chat had no attention producer. The PTY lane reaches the unread markers through use-notification-dispatch, whose liveness reads PTY state and whose admission requires terminal panes, so a structured session — which runs on the execution host with no renderer PTY — could finish a turn with nothing lighting anywhere. A backgrounded chat was the worst case: with no mounted pane there was no reader to notice at all. The host derives the completion, because only the host can. The journal keeps committing whether or not a renderer holds a reader, so the new feed observes each commit at StructuredAgentSessionClientDelivery.publishJournal and emits on every running -> settled transition. That edge runs after the subscriber loop and independent of it, which is exactly why a chat nobody is watching can still complete. It is a separate capability-gated stream rather than a field on the status summary: the summary carries no turn identity and no outcome, and is re-broadcast on every status change, so folding a completion into it would make every status consumer a completion consumer. ONLY `success` LIGHTS ANYTHING. Outcome is A0's provider verdict and is never inferred: a turn the host merely watched stop carries no outcome and produces no event, because absent means UNKNOWN. `completed` alone proves nothing — a provider reports its own API error as a finished turn — so the host emits nothing for it and the renderer filters again on the way in. RECOVERY IS LIVE-ONLY. Nothing is retained, queued or replayed on either side. A subscriber learns what settles while it is subscribed and nothing else; on reconnect it re-opens an empty stream and whatever landed during the gap is gone. A retained completion would be a durable "unread is owed" obligation with nothing to retire it, and a reconnect would then light the dot for work the user already read. Tests on both sides pin this so a later refactor cannot quietly turn it into catch-up. The dot itself reuses the neutral policy in attention/agent-attention-policy and #21274's structured surface adapter, so suppression, acknowledgement and addressing keep exactly one implementation and the surface key is never omitted to evade a check. No second suppression rule is introduced. OS delivery is deliberately not wired: this calls applyAgentAttentionUnread, not applyAgentAttention. Also narrows the completion feed's journal dependency to the newest-turn reader it actually uses, and adds journal.newestTurn() beside the existing activeTurnId() on the one shared by-sequence scan rather than a second scan.
… finishes (#21924) * feat(native-chat): light the unread indicators when a structured chat finishes A structured native chat had no attention producer. The PTY lane reaches the unread markers through use-notification-dispatch, whose liveness reads PTY state and whose admission requires terminal panes, so a structured session — which runs on the execution host with no renderer PTY — could finish a turn with nothing lighting anywhere. A backgrounded chat was the worst case: with no mounted pane there was no reader to notice at all. The host derives the completion, because only the host can. The journal keeps committing whether or not a renderer holds a reader, so the new feed observes each commit at StructuredAgentSessionClientDelivery.publishJournal and emits on every running -> settled transition. That edge runs after the subscriber loop and independent of it, which is exactly why a chat nobody is watching can still complete. It is a separate capability-gated stream rather than a field on the status summary: the summary carries no turn identity and no outcome, and is re-broadcast on every status change, so folding a completion into it would make every status consumer a completion consumer. ONLY `success` LIGHTS ANYTHING. Outcome is A0's provider verdict and is never inferred: a turn the host merely watched stop carries no outcome and produces no event, because absent means UNKNOWN. `completed` alone proves nothing — a provider reports its own API error as a finished turn — so the host emits nothing for it and the renderer filters again on the way in. RECOVERY IS LIVE-ONLY. Nothing is retained, queued or replayed on either side. A subscriber learns what settles while it is subscribed and nothing else; on reconnect it re-opens an empty stream and whatever landed during the gap is gone. A retained completion would be a durable "unread is owed" obligation with nothing to retire it, and a reconnect would then light the dot for work the user already read. Tests on both sides pin this so a later refactor cannot quietly turn it into catch-up. The dot itself reuses the neutral policy in attention/agent-attention-policy and #21274's structured surface adapter, so suppression, acknowledgement and addressing keep exactly one implementation and the surface key is never omitted to evade a check. No second suppression rule is introduced. OS delivery is deliberately not wired: this calls applyAgentAttentionUnread, not applyAgentAttention. Also narrows the completion feed's journal dependency to the newest-turn reader it actually uses, and adds journal.newestTurn() beside the existing activeTurnId() on the one shared by-sequence scan rather than a second scan. * test(cross-version): register the turn-completion subscribe on the wire manifest The cross-version gate asserts the structured surface's method list by name and count, so an additive method has to be declared there deliberately. Adding the entry makes the suite call it in both skew directions and stubs the host side, which is the statement the gate exists to force. * fix(native-chat): rebaseline completion feed after rewinds


ELI5
A project shows one "there's something new here" dot, and looking at the thing
that raised it turns the dot off. The code deciding "is anything else here still
waiting?" only ever counted terminals. It had no idea an AI chat tab could be
waiting too.
Two consequences. Today, opening a chat tab makes the app think you looked at a
terminal you cannot even see, and it clears that terminal's dot. And once chats
can raise the dot themselves, looking at the terminal would wipe the chat's mark
with nothing left to bring it back.
Now the question is asked of both kinds, so the dot only goes off when nothing
in that project is still waiting for you — and looking at a chat counts as
looking at the chat, not at some terminal behind it.
What the dot means is unchanged. Nothing about what raises it moved; only
the check that decides when it is safe to turn off, and that check can now only
ever keep it lit longer, never light it when it wasn't.
What Changed
Before: in a workspace holding both a terminal pane and a structured chat
tab, acknowledging the visible terminal cleared the workspace's unread flag even
while the chat still had an unread completion marker. The workspace dot went
dark and the chat's unread was silently lost. The reverse case was worse still:
with a chat tab on screen, nothing acknowledged it at all, and the workspace
instead acknowledged whichever terminal happened to have been visible last —
clearing a hidden terminal's unread.
After: acknowledging either kind of surface keeps the workspace lit while the
other kind still owns attention, and a visible chat is acknowledged as itself.
What is live on main today, and what is pre-positioning. Worth knowing before
you look for a repro. The second half above is reachable right now: with a chat
tab on screen, auto-ack really does acknowledge a hidden terminal today, and this
PR stops it. The first half is not yet reachable — nothing can currently write a
chat completion marker at all, because the only writer is
dispatchTerminalNotification, which asks the terminal surface, and a structuredchat tab has no
tabsByWorktreerow, so admission rejects it assuperseded-surface. So a chat can neither light the workspace dot nor hold itlit today. That half lands the inventory the structured completion producer needs
before it can activate, which is why this has to go in ahead of it.
Likewise, widening
markTerminalTabUnreadto accept a structured chat's unifiedtab id is capability, not behaviour: no caller writes a container marker for a
chat today, so no new dot appears anywhere.
The mechanism. Acknowledgement asks a surface adapter "what else in this
workspace still wants attention?" and clears the workspace flag only if the
answer is empty. The only adapter was the terminal one, and it builds that
remainder exclusively from
tabsByWorktree. A chat tab lives inunifiedTabsByWorktree, so it was invisible to the question being asked — theinventory was the bug, not the decision made from it.
Three pieces, all reusing the provider-neutral attention abstraction rather than
adding a second one:
structured-attention-surface.tsimplements the existingAgentAttentionSurfacecontract for structured chats.mergeAgentAttentionRemaindersunions every surface kind's remainder, andacknowledgement now asks the union. Workspace unread belongs to the workspace,
not to one surface kind.
resolveAutoAckTabTargetsresolves what is actually on screen through theunified tab model, so a visible chat produces a structured target instead of a
stale terminal one, and each target is handed to the adapter that owns its
address.
The addressing decision, and why. A structured session's subject key is
structuredAgentSessionPaneKey(unifiedTabId, sessionId)— the pane key thestructured status producer already publishes into the agent-status store, and
which
worktree ps, the hook server and the sidebar all key on. Reusing it wasthe only choice that keeps one session named one way across the process
boundary. Its container id (
groupIdin the neutral contract) is therefore theunified tab id that prefixes that key — not the split-layout group the tab sits
in. Two existing readers already resolve a structured tab exactly this way:
SortableTabreadsunreadTerminalTabs[<unified tab id>]for an agent-sessiontab, and
hasUnreadAgentCompletionForTerminalTabmaps a pane key's prefix tothat same id.
That made
markTerminalTabUnreadan asymmetry worth removing rather thanworking around: the readers accept a structured tab's unified id, but the writer
rejected any id absent from
tabsByWorktree, silently dropping the write. Itsexistence check now consults both indexes — the same pair
findRenamableUnifiedTabalready resolves for rename and colour.
One staleness note: the structured remainder is read per live tab rather than by
scanning the marker maps, so a marker left behind by a closed tab or a superseded
session cannot hold workspace unread lit with nothing able to clear it. This
mirrors the terminal adapter, where the
tabsByWorktreemembership filter servesthe same purpose.
Why
The alternative was to fix "which subject is viewed" and leave the inventory
alone. That does not fix this: the clear is permitted because the sibling was
never counted, so any correct viewed-subject would still clear a workspace whose
chat was unread.
The other alternative was a second suppression path for structured surfaces. The
provider-neutral boundary in
src/renderer/src/attention/exists precisely so anon-terminal surface can supply an adapter without touching the policy, and it
already had every seam needed. The decision policy
(
agent-attention-policy.ts) and the terminal evidence arbitration inuse-notification-dispatch.tsare unchanged, and no new workspace-clear callwas added.
Linked Issue
Fixes #
Visual Proof
N/A— no rendered change. The change is in which unread markers survive anacknowledgement; the marker's own presentation (the workspace dot, the tab dot)
is untouched. The observable difference is a dot that stays lit where it
previously went dark, covered by the tests below.
Testing
Both directions are covered, and each was verified to fail when the
corresponding production change is reverted (ablated one at a time, re-proven at
the final rebased head):
useAutoAckViewedAgent.mixed-workspace.test.ts— one workspace holding aterminal pane and a chat tab in the same layout group:
directions), so the tests are not passing by never clearing
markTerminalTabUnreadaccepts a structured chat's unified tab id, andstill refuses an id no open tab owns
structured-attention-surface.test.ts— the adapter: addressing, supersededsessions, foreign surface keys, viewed resolution, and workspace scoping.
Existing suites:
src/renderer/src/hooks,src/renderer/src/attention,src/renderer/src/components/native-chat,src/renderer/src/store/terminals,src/renderer/src/components/tab-bar,src/renderer/src/store/slices/tabs—411 files / 3394 tests green.
use-notification-dispatch.test.ts's distinctionbetween a viewed surface suppressing unread while still requesting delivery is
unchanged and still passes.
pnpm tcclean.pnpm run check:code-quality:changedclean (0 new findingsacross 11 files).
oxfmt --checkclean.Platforms: macOS. No platform-dependent code paths are touched — this is
renderer store logic with no shell, path, or keyboard handling. SSH/remote:
unaffected; the structured session's execution host is not consulted, and the
adapter reads only renderer tab state. Mobile: unaffected; the unread maps it
reads are unchanged.
Pre-existing failure, not from this PR:
terminal-pane-hook-order-parity.test.tsfails (expects 209 flattened hooks,finds 211). Its inputs are the 20
TerminalPane/use-terminal-pane-*sources,none of which this PR touches, and all 20 are byte-identical between this branch
and
origin/main. #9035 added two hooks inuse-terminal-pane-foundation.tsanduse-terminal-pane-global-listeners.tswithout bumping the baseline. Left alone.AI Disclosure
Review
Agent skill upstream boundary
docs/reference/agent-skill-sharing-upstream-boundary.mdand copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.Notes
Ensure no issues in: Security, Cross-platoform support (Linux, Windows, Mac), Remote SSH, Mobile, general backwards compatibility, performance
conservative — it withholds a clear it previously allowed. Terminal-only
workspaces have an empty structured remainder and behave exactly as before.
workspace) with a direct map lookup per tab, not a scan of the marker maps. It
runs inside the auto-ack target loop, which is already gated by the hook's
reference-equality guard. That guard gained
groupsByWorktree, needed becauseactivating a chat tab moves only its layout group's
activeTabIdand touchesno terminal slice — without it the scan that clears the chat's attention would
be skipped.
reads
unifiedTabsByWorktree, which folder workspaces populate the same way;nothing assumes a git worktree.
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)