Skip to content

chore: address review follow-ups from #73 / #74 / #8 - #75

Merged
Juliusolsson05 merged 2 commits into
mainfrom
chore/review-followups
May 11, 2026
Merged

Juliusolsson05 merged 2 commits into
mainfrom
chore/review-followups

Conversation

@Juliusolsson05

Copy link
Copy Markdown
Owner

Summary

Five small follow-ups from the post-merge reviews of #73 (pin agents), #74 (compaction placeholder), and headless #8 (compaction-synthesis tag). All non-critical; nothing here changes shipped behavior in the feed — this is closing nits and one on-disk leak.

What's in this PR

useKeybinds — modal bailout for Reorder Tabs + Pin Agents (#73)

Both modals already own their internal keys via their own onKeyDown (Enter / Space / Arrow / j / k / Escape), but if the modal's inner div loses focus, the capture-phase global handler in useKeybinds still fires cmd+1..9 / cmd+t / alt+d / cmd+W underneath. Mirror the existing newAgentPlacementOpen bailout: consume Escape, swallow everything else.

CommandPalette — missing dep in commandContext useMemo (#73)

openDispatchAttach is referenced in the ctx object but was missing from the dep array. Aligns deps with what the ctx actually closes over. No runtime effect today (parent re-renders re-create the closure), but ESLint and future refactors care.

ghostsFromSemanticTurn — compaction synthesis short-circuit (#74)

PR #74 hid the compaction synthesis turn in the streaming feed (StreamingTurn + foldEvent + workspaceState), but ghosts are written through a separate durable JSONL under <userData>/ghost-logs/. That path bypassed the placeholder: every /compact run was still leaking raw <analysis>...</analysis><summary>...</summary> XML to disk, invisible in the UI but bloating the file and polluting debug bundles. Closes the gap with a === true fail-closed guard at the top of the function.

.gitignore — temp/ and vendor/in_progress/

Both have been showing up in git status for weeks. temp/ is forensic scratch (e.g. session-respawn-oom-root-cause.md); vendor/in_progress/ holds reproduction harnesses (paste-submit-repro, dictation-repro, opencode) that sit next to vendor/claude-code-src/ and are emphatically not part of cc-shell.

docs/superpowers/plans/2026-05-11-dispatch-pin-agents.md

Plan doc that drove the 12-task implementation in PR #73. Matches the precedent set by docs/superpowers/plans/2026-04-29-dispatch-detached-sessions.md committed alongside #37 — agentic decision-making is transparent in the repo, not in a separate doc that drifts.

Test plan

  • npm run build:app — passes clean (11.7s, no TS errors in touched files)
  • Manual: open Pin Agents modal, press cmd+1 / cmd+t / alt+d — should be swallowed, modal stays focused
  • Manual: same test for Reorder Tabs modal
  • Manual: run /compact in a real Claude session — confirm <userData>/ghost-logs/<session>.jsonl does NOT contain any <analysis> or <summary> XML after compaction completes

🤖 Generated with Claude Code

Juliusolsson05 and others added 2 commits May 11, 2026 19:41
- useKeybinds: add Reorder Tabs and Pin Agents modals to the
  capture-phase bailout block so global keybinds (cmd+1..9,
  cmd+t, alt+d, cmd+W) stop firing while a "transient draft"
  modal is open. Mirrors the existing newAgentPlacement bailout.
- CommandPalette: openDispatchAttach was referenced in
  commandContext but missing from the useMemo dep array; align
  the deps with the ctx object to match openPinAgents et al.
- ghosts: ghostsFromSemanticTurn now short-circuits when
  turn.isCompactionSynthesis === true, so the durable on-disk
  ghost JSONL stops accumulating raw <analysis>/<summary> XML
  for /compact synthesis turns. PR #74 hid these turns in the
  feed (StreamingTurn + foldEvent + workspaceState), but ghosts
  are written through a separate path that bypassed that fix.
- .gitignore: scope-creep that's been showing in git status —
  temp/ (forensic scratch dumps) and vendor/in_progress/
  (reproduction harnesses next to vendor/claude-code-src/).
- docs: commit the dispatch-pin-agents plan that drove #73, in
  the same paper-trail style as docs/superpowers/plans/
  2026-04-29-dispatch-detached-sessions.md alongside #37.

No behavior change for compaction turns in the feed — that
already shipped in #74. This is purely about closing the
on-disk leak and the small UX gaps the review surfaced.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- useKeybinds: extend the modal bailout to attach-detached-to-grid.
  Previously only newAgentPlacementOpen was checked, but the same
  NewAgentPlacementOverlay is opened by dispatchAttachIntent (see
  App.tsx:112 placementOverlayOpen). Subscribe to both store
  flags and route Escape to the matching close action.
- useKeybinds: preventDefault on shortcut chords (cmd / alt) under
  all three modal bailouts. Without it, returning early from the
  global capture handler stops cc-shell's listener but leaves the
  Electron / macOS defaults intact — cmd+W would still close the
  window, cmd+T would still open a tab, alt+digit would shift
  focus. Now those chords are swallowed while non-chord keys
  (j/k/Space/Enter/Arrows) continue to bubble to the modal's
  own onKeyDown.
- .gitignore: anchor /temp/ with a leading slash so we only catch
  the repo-root scratch dir, not any nested directory named
  "temp". vendor/in_progress/ was already path-scoped.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@Juliusolsson05

Copy link
Copy Markdown
Owner Author

Pushed f7b1137 to address review findings:

Finding 1 (MEDIUM) — placement overlay under attach mode
Subscribed to dispatchAttachIntent + closeDispatchAttach and unified the placement bailout to placementOverlayOpen = newAgentPlacementOpen || dispatchAttachIntent !== null, mirroring App.tsx:112. Escape now routes through whichever close action(s) apply.

Finding 2 (LOW) — chord defaults leaking past return
Added if (cmd || alt) e.preventDefault() under all three modal bailouts (placement, reorder, pin). Non-chord keys still bubble naturally to the modal's React onKeyDown for j/k/Space/Enter/Arrows navigation; Electron/macOS defaults (cmd+W, cmd+T, alt+digit) are now blocked.

Cross-cutting note — unanchored temp/
Changed to /temp/ so only the repo-root scratch dir is ignored.

Build clean (npm run build:app 15.0s).

The four manual smokes from the review verdict are still outstanding — leaving the test plan checkboxes for whoever runs the app.

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.

1 participant