fix(screentracker): prevent Send() from blocking when ReadyForInitialPrompt stays false#215
Draft
johnstcn wants to merge 3 commits intofix/write-stabilize-non-fatal-phase1from
Draft
Conversation
…hed line Claude Code v2.1.87 decided to get fancy with its onboarding screen, using ╌ (BOX DRAWINGS LIGHT DOUBLE DASH HORIZONTAL) instead of the classic ─ (BOX DRAWINGS LIGHT HORIZONTAL). Our detector stared at this new character like a cat seeing a cucumber. Add ╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌ as an alternative pattern in both findGreaterThanMessageBox and findGenericSlimMessageBox. Refs: #209
statusLocked() used to report 'stable' when the screen was calm, blissfully unaware that initialPromptReady was false. Send() would trust this optimistic status, enqueue a message, and then wait forever for a stableSignal that would never arrive — like waiting for a bus that got cancelled. Return 'changing' when initialPromptReady is false so Send() rejects immediately with ErrMessageValidationChanging instead of ghosting the caller. Fixes: #209
|
✅ Preview binaries are ready! To test with modules: |
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.
Fixes #209. Stacked on #208.
Changes
statusLocked()return"changing"wheninitialPromptReadyis false, soSend()rejects withErrMessageValidationChanginginstead of blocking forever╌(U+254C) as alternative to─(U+2500) infindGreaterThanMessageBox/findGenericSlimMessageBoxfor Claude Code v2.1.87 onboarding screensTestSendRejectsWhenInitialPromptNotReadyregression teststablewheninitialPromptReadywas falseImplementation plan and decision log
Root cause
statusLocked()didn't checkinitialPromptReady. It returned"stable"when the screen was calm, but thestableSignal(which the send loop waits on) requiredinitialPromptReady == true. If readiness never arrived,Send()blocked forever.Key decisions
"changing"(not"initializing")"changing"matchesErrMessageValidationChanging.stableSignalgates ALL outbound messages oninitialPromptReady, not just initial prompts. Status must reflect actual send capability.changing.