Skip to content

fix(goal-loop): stop the status strip from claiming app interaction ownership - #1005

Merged
Juliusolsson05 merged 1 commit into
mainfrom
fix/goal-loop-strip-ownership
Sep 19, 2026
Merged

Juliusolsson05 merged 1 commit into
mainfrom
fix/goal-loop-strip-ownership

Conversation

@Juliusolsson05

Copy link
Copy Markdown
Owner

Problem

After PR #1003, every app keyboard shortcut dies while any pane shows a goal loop strip: reader mode (Alt+R), Spotlight (Alt+S), the command palette (Cmd+Shift+P), type-to-focus, paste-to-focus and dictation all stop firing — and because ended loops persist across restarts, the dead-keyboard state persists too. (#1004)

Root cause

The goal loop status strip copied TldrOverlay's data-agent-code-interaction-owner="app" marker. That contract was designed for full-screen blocking surfaces that mount the marker only while visible; hasAppInteractionOwner() is a document-wide existence query, and the keyboard router (useKeybinds.ts:477) admits only the owning surface's dismiss chord while it returns true. A thin, permanently-mounted status bar therefore claimed modal ownership of the whole app.

Fix

One line: the strip no longer stamps the marker. Its pointer stopPropagation (pane click-through protection) is unchanged. The latched overlay keeps the marker — it is a genuine blocking surface, exactly like TldrOverlay. A WHY comment at the strip records the contract so it is not re-copied.

Tests and verification

  • New regression tests pin the contract both ways: a mounted strip does NOT claim app interaction ownership; the latched overlay DOES while visible (these run against the real hasAppInteractionOwner()).
  • npx vitest run src/renderer/src/features/goal-loop — 8/8 pass (fails on the pre-fix strip).
  • npx vitest run src/renderer/src/features/tldr/tldr.renderer.test.tsx (the real keyboard-router suite) — 19/19 pass.
  • npm run typecheck — exit 0.

Fixes #1004

…wnership - Fixes #1004

The strip stamped data-agent-code-interaction-owner like TldrOverlay, but
that marker was designed for full-screen surfaces mounted only while
visible; hasAppInteractionOwner() is a document-wide existence query, so a
permanently-mounted strip made the keyboard router treat passive status
chrome as a modal and swallowed every app shortcut — for the loop's whole
life, and across restarts for persisted ended loops. Only the latched
overlay keeps the marker; the strip keeps its pointer stopPropagation.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug(goal-loop): status strip claims app interaction ownership and disables all keybinds

1 participant