fix(tui): release the pending ask when a screen crashes, and mask secrets - #1196
Draft
posthog[bot] wants to merge 1 commit into
Draft
fix(tui): release the pending ask when a screen crashes, and mask secrets#1196posthog[bot] wants to merge 1 commit into
posthog[bot] wants to merge 1 commit into
Conversation
…rets A render throw on the wizard_ask overlay routed the run to the outro but left the ask pending: the agent stayed parked on a promise nobody resolved, and the store rejected every later wizard_ask as a duplicate. Cancel the ask first, so the agent gets the same sentinel as an Esc and can fall back. Mask sensitive text answers with PasswordInput, so a pasted personal API key does not land in the terminal scrollback. Turn on richLinks for upload-source-maps, so the key-creation URL in its first prompt is a click target and gets copied to the clipboard. Generated-By: PostHog Desktop Task-Id: 724efebf-7b36-4d03-8841-d207f0d40fb4
🧙 Wizard CIRun the Wizard CI and test your changes against wizard-workbench example apps by replying with a GitHub comment using one of the following commands: Test all apps:
Test all apps in a directory:
Test an individual app:
Show more apps
Test against a Context Mill branch:
Add Results will be posted here when complete. |
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.
Problem
ScreenErrorBoundaryroutes a crashed screen to the outro but never releases the in-flightwizard_ask. The agent stays parked on a promise nobody resolves, andrequestQuestionrejects every later ask as a duplicate, so the run is wedged rather than finished.textbranch ofQuestionInputignoredquestion.sensitive, so a live credential went into the terminal scrollback on every prompt.richLinkswas off for this program, so the "create a key here" URL was neither a click target nor copied to the clipboard.Changes
__cancelled__sentinel it already handles as "the user declined" and falls back, instead of waiting forever. The crash also reaches analytics as a cancelled ask, so a dead run stops looking like a run with no outcome.sensitivetext question rendersPasswordInputinstead ofTextInput.upload-source-mapsopts intorichLinks, matchingposthog-integrationandself-driving.phx_LIVEKEY1234567890abcdef***************************Test plan
ink-testing-librarywith the real STEP 1 prompt and a typed key, before and after, to confirm the mask and the hyperlink.vitest run src/ui src/lib/programs src/lib/task-stream src/lib/agent: 1166 passed.Rendered overlay, after
LLM context
Written by a PostHog agent from an inbox report. The report also noted the double authentication in this flow; that is a deliberate product call and is untouched here. The crash's own trigger is not identified: the report's evidence is runs that end with neither an answered nor a cancelled ask, which is what an unreleased ask looks like. These changes make such a crash end cleanly and stop the credential leak, rather than remove a known throw.
Created with PostHog Desktop from this inbox report.