fix(control): the second wording of "no zellij", and a remedy nothing rendered - #477
Merged
Merged
Conversation
… 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 foundfell 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 thetab 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_TERMINALhad zero consumers inAttentionBar.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.tspairs the producer with the matcher: it reads the literalspoller.tsactually throws, asserts each is recognised by a named phrase, then asserts every remedy the classifier can return is rendered byAttentionBar.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
NO_TERMINAL_DESKTOPmatcher✗ no zellij at all offers Open Terminal, never Retry— 14 passed, 1 failedSTART_TERMINALrender branch✗ AttentionBar renders something for FAILURE_REMEDY.START_TERMINAL— 14 passed, 1 failedEach mutation is caught by exactly the assertion that covers it, so the gate is not passing by coincidence.
Verification
npm run verify— exit 0test:unitby directory glob, so it is live in CI with no wiring🤖 Generated with Claude Code
https://claude.ai/code/session_01UvjGNAS9CMfEGNW26tUR4P