Skip to content

docs(docs): record #1602 context menus and #1605 reaping in CLAUDE.md - #1631

Open
newhoggy wants to merge 1 commit into
mainfrom
issue-1602-claude-md
Open

newhoggy wants to merge 1 commit into
mainfrom
issue-1602-claude-md

Conversation

@newhoggy

@newhoggy newhoggy commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

#1602's Prerequisites named three docs to keep in sync — docs/worktrees-service.md, ADR-0072 §6, and CLAUDE.md's worktrees paragraph. The first two were updated across the four phases; this one was missed.

It matters more than a normal docs gap: CLAUDE.md is loaded at the start of every session in this repo, so it is where a future session looks first. Without this, menu.rs is invisible, and so are two grep guards — which is how guards get quietly deleted by someone who does not know they are load-bearing.

What it adds

Only things a reader needs and cannot infer from the code:

  • menu.rs holds per-surface menu contents as pure functions of small inputs, so per-surface behaviour is unit-testable directly. The tree menu is the deliberate exception — built from applicable_action_groups so it cannot drift from the a menu and : palette.
  • draw_menu returns the PopupRegion it just drew, so the hit map and the frame cannot disagree — the invariant GroupRegion::tab_spans already keeps for tab strips.
  • popup_mouse_enabled names the one popup kind that takes the mouse; the confirm modal stays keyboard-only because its y/n gates destructive actions.
  • Contract §6 and §7, including why §6 is a "do not add this": four terminals, four conventions, so one non-rule is correct everywhere because it does not branch.
  • Why alt-m is primary and F10 is deliberately not a ChromeKeyencode_key already sends it to a child, and Alt-chords are the only chrome keys.
  • The clipboard-read guard as the other half of Osc52::OnlyCopy: neither a child nor the UI can read the clipboard.

A correction in the same bullet

The existing §5 sentence called the host's selection escape hatch "shift-drag". The #1602 spike measured that as terminal-specific:

Terminal shift+drag ⌥+drag host hatch
Ghostty kept by host forwarded Shift
iTerm2 forwarded kept by host Option
VS Code terminal forwarded forwarded none

The mechanism stands and the "must stay an omission" instruction is unchanged — but the modifier is not ours to encode, and the sentence now says so. Same correction already applied to mouse.rs and ADR-0072 in #1608.

And the operational consequence

Records #1605's process-group reaping and the residual #1611 stall, with the part a future session actually needs: run this module's tests with --test-threads=1, and never by skipping them — skipping is how a never-run test reached CI in #1608.

Docs-only; no code, no CLI surface, no snapshots.

#1602 listed three docs to keep in sync — `docs/worktrees-service.md`,
ADR-0072 §6, and CLAUDE.md's worktrees paragraph. The first two were
updated; this one was missed across all four phases. It matters more
than a normal docs gap because CLAUDE.md is loaded at the start of every
session, so it is where a future session looks first: without this,
`menu.rs` is invisible, and so are two grep guards, which is how guards
get deleted.

Adds what a reader needs and cannot infer: `menu.rs` holds per-surface
contents as pure functions (the tree menu excepted, so it cannot drift
from the `a` menu); `draw_menu` returns the region it drew, so the hit
map and the frame cannot disagree; `popup_mouse_enabled` names the one
popup kind that takes the mouse, the confirm modal staying keyboard-only
because its `y`/`n` gates destructive actions; contract §6 and §7; why
`alt-m` is primary and `F10` is deliberately not a `ChromeKey`; and the
clipboard-read guard as the other half of `Osc52::OnlyCopy`.

Also corrects the §5 sentence in the same bullet, which called the
host's escape hatch "shift-drag". The #1602 spike measured that as
terminal-specific: Ghostty keeps shift-drag, iTerm2 keeps option-drag
and forwards shift-drag, the VS Code terminal keeps neither. The
mechanism stands; the modifier is not ours to encode.

Finally records #1605's process-group reaping and the residual #1611
stall, with the operational consequence a future session needs: run
this module's tests with `--test-threads=1`, and never by skipping them
— that is how a never-run test reached CI in #1608.
@github-actions

github-actions Bot commented Sep 7, 2026

Copy link
Copy Markdown

Coverage

Total: 97.07% ⚪ 0 pp vs main

Comparing 40240e6..ede3f2f (merge-base → PR head)

No per-file coverage changes vs main.

Patch coverage

No new executable lines added by this diff.

📦 Full per-file coverage summary · run summary

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