fix(star-prompt): remember any explicit answer, stop re-asking on every self-update#178
Merged
Merged
Conversation
…ry self-update Previously only a confirmed gh-api star was persisted; answering N, or Y without an authenticated gh (browser fallback), left the state untouched so every self-update asked again. Any explicit Y/N now records answered:true and permanently suppresses the prompt for both triggers. Claude-Session: https://claude.ai/code/session_01TGoDQvktdXD5rqJuJm9Uyk
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
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
The star prompt at the end of
agentbox self-updateasked on every run, even when the user had already answered. Only a confirmedgh api PUTstar was persisted (starred: true) — answering N, or Y without an authenticatedgh(browser fallback), left the state file untouched, so the next self-update asked again.Fix
answeredfield to~/.agentbox/star-prompt.json; any explicit Y/N from the confirm prompt is persisted immediately (Ctrl+C aborts before recording, so an unanswered prompt can still re-ask).maybePromptStarnow bails onstarred || answeredfor both triggers (installandself-update), including the Y-via-browser path where the star can't be confirmed.Testing
vitest run test/star-prompt.test.ts— 11/11 green, with new coverage for remembered-N, remembered-browser-Y, and the answered guard across both triggers.https://claude.ai/code/session_01TGoDQvktdXD5rqJuJm9Uyk
Note
Low Risk
CLI-only UX and local state file behavior; no auth, network API, or shared infrastructure changes beyond existing
gh/browser star flow.Overview
Fixes the GitHub star prompt repeating on every
agentbox self-updatewhen the user had already said yes or no but only a successfulghstar was persisted before.Adds
answeredto~/.agentbox/star-prompt.jsonand writes it as soon as the user completes the confirm dialog (Y or N).maybePromptStarskips further prompts whenstarred || answered. Browser fallback after yes withoutghstill setsansweredso it does not nag forever.Install cadence is unchanged for runs 1–2 and the 3rd ask window; the 4th-install prompt only happens if the 3rd never recorded an answer (e.g. process died mid-prompt). Tests cover remembered no, browser-yes, and the answered guard on both triggers.
Reviewed by Cursor Bugbot for commit 155f1c9. Configure here.