Repository navigation
fix(launch): drop the interactive upgrade prompt from the provider banner - #19
Merged
Merged
Conversation
…nner
Launching codex/gemini/kimi/opencode printed "⬆ N updates available.
Upgrade now? [y/N]" and blocked the TUI start for up to 10s waiting on
/dev/tty. A launch wrapper is the wrong place to ask for consent: the
user typed `codex`, not `tokenwar upgrade`, and an auto-skip timer that
silently answers "no" is not consent either.
The banner now only prints the stack bar, which already carries the
informational "⬆ N updates · /tokenwar upgrade" hint from the statusline
renderer. Upgrades run only when the user calls `tokenwar upgrade`
explicitly (that path keeps its own [y/N] confirm in upgrade.sh).
Test verification (RED → GREEN)
RED — upstream launcher + the new test only:
not ok 8 interactive launch with pending tool update shows status
hint without upgrade prompt
# `[[ "$output" != *"Upgrade now?"* ]]' failed
GREEN — with the fix:
ok 8 interactive launch with pending tool update shows status hint
without upgrade prompt
121/121 bats tests pass, shellcheck -S warning clean.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NXot81hzCH5ViVyXJDwX4W
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
Launching a wrapped provider (
codex,gemini,kimi,opencode) printed:and blocked the TUI start for up to 10 seconds waiting on
/dev/tty.A launch wrapper is the wrong place to ask for consent — the user typed
codex, nottokenwar upgrade— and an auto-skip timer that silently answers "no" is not consent either. It also made every provider launch feel like a nag loop.Change
scripts/tokenwar-launch.shnow only prints the stack bar plus the discoverability reminder. The bar already carries the informational hint rendered bytokenwar-statusline.sh:Upgrades run only when the user calls
tokenwar upgradethemselves. That path keeps its own[y/N]confirmation inscripts/upgrade.sh— untouched here.Docs updated in the same PR (
README.md,SKILL.md): every "inline upgrade prompt" row in the per-CLI tables now reads "update status hint".Test verification (RED → GREEN)
New regression test
tests/launch.bats:64drives the launcher under a real pty (script -qfec) with a cache that has one pending tool update, and asserts the hint is present whileUpgrade now?is not.RED — upstream
scripts/tokenwar-launch.sh(stashed fix), new test applied:GREEN — with the fix:
Full suite + linter on this branch:
🤖 Generated with Claude Code
https://claude.ai/code/session_01NXot81hzCH5ViVyXJDwX4W