Skip to content

fix(control): the second wording of "no zellij", and a remedy nothing rendered - #477

Merged
github-actions[bot] merged 1 commit into
mainfrom
fix/no-terminal-remedy
Sep 4, 2026
Merged

fix(control): the second wording of "no zellij", and a remedy nothing rendered#477
github-actions[bot] merged 1 commit into
mainfrom
fix/no-terminal-remedy

Conversation

@catomean

@catomean catomean commented Sep 4, 2026

Copy link
Copy Markdown
Collaborator

Follow-up to #476, from sweeping for that bug's neighbours rather than treating it as a one-off.

Two defects, one class

1. no zellij session found fell through to RETRY.
This is how the Fleet Runner desktop app words the condition the cloud words as "no zellij session is running on the connected computer"desktop/src/main/poller.ts:881, three lines from the tab not found: string fixed in #476. Only one of the pair had been taught to the classifier, so fixing that one left this one still drawing a Retry button that can never succeed.

2. FAILURE_REMEDY.START_TERMINAL had zero consumers in AttentionBar.
So fixing (1) alone would have made things worse: a correctly-classified failure would render no action at all, leaving the row with nothing but Dismiss. A remedy nothing renders is a classification that silently does nothing. This PR adds the "Open Terminal" branch — starting a session cannot help when there is no terminal for a session to live in.

Also names FOCUS_TIMED_OUT_DESKTOP (did not gain focus). That one already reached the right answer — a focus race genuinely is retryable — but by accident, via a default that happened to suit it. An accidental right answer is indistinguishable from a wrong one until the default changes, and then it becomes a bug nobody edited.

The gate is the point

scripts/test/failure-message-pairing.ts pairs the producer with the matcher: it reads the literals poller.ts actually throws, asserts each is recognised by a named phrase, then asserts every remedy the classifier can return is rendered by AttentionBar.

These are two definitions of the same sentence in two independently-released codebases, so they drift — and the drift is silent, because an unclassified failure still renders a plausible button. Counting instances was never going to close this. Reword either side, or add a remedy with no UI, and this fails before anyone sees a button that cannot work.

Proven by mutation, both halves

Mutation Result
drop the NO_TERMINAL_DESKTOP matcher ✗ no zellij at all offers Open Terminal, never Retry — 14 passed, 1 failed
drop the START_TERMINAL render branch ✗ AttentionBar renders something for FAILURE_REMEDY.START_TERMINAL — 14 passed, 1 failed

Each mutation is caught by exactly the assertion that covers it, so the gate is not passing by coincidence.

Verification

  • npm run verify — exit 0
  • The test runs inside test:unit by directory glob, so it is live in CI with no wiring
  • A focus race is explicitly asserted to stay retryable, so the "don't offer Retry" rule cannot be over-applied into stranding transient failures

🤖 Generated with Claude Code

https://claude.ai/code/session_01UvjGNAS9CMfEGNW26tUR4P

… rendered

Two defects, one class, found by sweeping for the neighbours of #476.

1. `no zellij session found` fell through to RETRY. This is how the Fleet
   Runner desktop app words the condition that the cloud words as "no zellij
   session is running on the connected computer" — poller.ts:881, three lines
   from the `tab not found:` string fixed in #476. Only one of the pair had
   been taught to the classifier, so fixing that one left this one shipping a
   Retry that can never succeed.

2. FAILURE_REMEDY.START_TERMINAL had ZERO consumers in AttentionBar. So
   fixing (1) alone would have made things worse, not better: a correctly
   classified failure would render no action at all, leaving the row with
   nothing but Dismiss. A remedy nothing renders is a classification that
   silently does nothing.

Also names FOCUS_TIMED_OUT_DESKTOP (`did not gain focus`). That one already
reached the right answer — a focus race IS retryable — but by accident, via a
default that happened to suit it. An accidental right answer is
indistinguishable from a wrong one until the default changes.

The gate is the point. scripts/test/failure-message-pairing.ts reads the
literals poller.ts actually throws and asserts each is recognised by a NAMED
phrase, then asserts every remedy the classifier can return is rendered by
AttentionBar. Producer and matcher are two definitions of the same sentence in
two independently-released codebases; counting instances was never going to
work. Reword either side, or add a remedy with no UI, and this fails first.

Proven by mutation, both halves:
  - drop the NO_TERMINAL_DESKTOP matcher  -> 14 passed, 1 failed
  - drop the START_TERMINAL render branch -> 14 passed, 1 failed

npm run verify passes; the test runs inside test:unit by directory glob, so
it is live in CI without wiring.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UvjGNAS9CMfEGNW26tUR4P
@github-actions
github-actions Bot merged commit 1572e99 into main Sep 4, 2026
3 checks passed
@github-actions
github-actions Bot deleted the fix/no-terminal-remedy branch September 4, 2026 09:45
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