Skip to content

fix(star-prompt): remember any explicit answer, stop re-asking on every self-update#178

Merged
madarco merged 1 commit into
nightlyfrom
fix/star-prompt-remember-answer
Jul 8, 2026
Merged

fix(star-prompt): remember any explicit answer, stop re-asking on every self-update#178
madarco merged 1 commit into
nightlyfrom
fix/star-prompt-remember-answer

Conversation

@madarco

@madarco madarco commented Jul 8, 2026

Copy link
Copy Markdown
Owner

Problem

The star prompt at the end of agentbox self-update asked on every run, even when the user had already answered. Only a confirmed gh api PUT star was persisted (starred: true) — answering N, or Y without an authenticated gh (browser fallback), left the state file untouched, so the next self-update asked again.

Fix

  • Add an answered field 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).
  • maybePromptStar now bails on starred || answered for both triggers (install and self-update), including the Y-via-browser path where the star can't be confirmed.
  • Consequence for the install cadence: the 4th-install ask window now only fires if the 3rd went unanswered, since an answered 3rd is remembered.

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-update when the user had already said yes or no but only a successful gh star was persisted before.

Adds answered to ~/.agentbox/star-prompt.json and writes it as soon as the user completes the confirm dialog (Y or N). maybePromptStar skips further prompts when starred || answered. Browser fallback after yes without gh still sets answered so 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.

…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
@vercel

vercel Bot commented Jul 8, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
agentbox-web Skipped Skipped Jul 8, 2026 4:40pm

Request Review

@madarco madarco merged commit 7e8658a into nightly Jul 8, 2026
4 checks passed
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