Skip to content

watch: pastes are inert, empty filters say so, the table outranks the wordmark - #16

Merged
yrstm merged 1 commit into
mainfrom
fix/watch-fit
Jul 21, 2026
Merged

watch: pastes are inert, empty filters say so, the table outranks the wordmark#16
yrstm merged 1 commit into
mainfrom
fix/watch-fit

Conversation

@yrstm

@yrstm yrstm commented Jul 16, 2026

Copy link
Copy Markdown
Owner

The incident (from the devbox screenshots)

A file path dropped onto the watch pane typed itself in as keystrokes: the leading / opened the filter, the rest of the path became the query, zero rows matched — and the frame showed "No agents running" directly under a summary line counting 2 working · 5 idle. The bottom line of the screenshot is the filter input still holding the dropped path. Separately, in panes too short for the wordmark banner plus the windowed frame, the emitted frame exceeded the pane height and the terminal pushed the summary + agent table off the top.

Fixes (three legs, one incident)

  1. Bracketed paste (?2004h, unwound on exit): the key decoder recognizes the CSI 200~/201~ markers and stamps everything between them; handleKey drops pasted keys outside the filter/label inputs, and inside them accepts printables only (a pasted newline must not submit). A dropped file can no longer press keys. Terminals without paste support degrade to current behavior.
  2. Honest empty state: an active filter that matches nothing renders 0 of N agents match "…" — esc clears the filter instead of "No agents running", which read as the board contradicting its own summary.
  3. The table outranks decoration: the frame snaps back to the top whenever the cursor fits below the header (scroll could previously stick), and the wordmark banner yields entirely when the pane is too short for both — a frame is never taller than the pane.

Evidence

  • TestDecodeKeysMarksBracketedPaste, TestHandleKeyIgnoresPasteOutsideInputs (replays the drop byte-for-byte), TestViewNamesTheFilterWhenItEmptiesTheTable, TestViewSnapsBackToTop.
  • All local gates green: go test ./... -race, vet, golangci-lint 0 issues, tools/parity.sh, bats tests/, darwin build.
  • README documents the paste behavior under Watch mode keys.

🤖 Generated with Claude Code

… wordmark

Three legs of one field incident: a file path dropped onto the watch
pane typed itself in — its leading slash opened the filter, the rest
became the query, zero rows matched, and the frame said 'No agents
running' directly under a summary counting seven. In short panes the
banner + floor-height window also emitted frames taller than the pane,
scrolling the summary and table off the top.

- Enable bracketed paste; the key decoder stamps keys between the
  CSI 200~/201~ markers and handleKey drops them outside the filter
  and label inputs (inside them, printables only — a pasted newline
  must not submit). A drop can no longer press keys.
- A filter that matches nothing now renders '0 of N agents match …
  — esc clears the filter' instead of claiming no agents are running.
- The frame pins back to the top whenever the cursor fits below the
  header, and the wordmark banner yields to the agent table when the
  pane is too short for both — a frame is never taller than the pane.

README documents the paste behavior.

Co-Authored-By: Claude Fable 5 <[email protected]>
@yrstm
yrstm merged commit d8df451 into main Jul 21, 2026
16 checks passed
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