Skip to content

fix(launch): drop the interactive upgrade prompt from the provider banner - #19

Merged
ousamabenyounes merged 1 commit into
mainfrom
fix/launch-no-upgrade-prompt
Sep 4, 2026
Merged

ousamabenyounes merged 1 commit into
mainfrom
fix/launch-no-upgrade-prompt

Conversation

@ousamabenyounes

Copy link
Copy Markdown
Collaborator

Problem

Launching a wrapped provider (codex, gemini, kimi, opencode) printed:

⬆ 1 update available. Upgrade now? [y/N] (auto-skip in 10s)

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, not tokenwar 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.sh now only prints the stack bar plus the discoverability reminder. The bar already carries the informational hint rendered by tokenwar-statusline.sh:

[ctx 1.0.169] [mem 13.6.1] [rtk -] [caveman 766dce6 ⬆] [ponytail on] [pxpipe 0.10.0]  ⬆ 1 update · /tokenwar upgrade
tokenwar · codex — run tokenwar status for the full state · tokenwar gain for token savings

Upgrades run only when the user calls tokenwar upgrade themselves. That path keeps its own [y/N] confirmation in scripts/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:64 drives the launcher under a real pty (script -qfec) with a cache that has one pending tool update, and asserts the hint is present while Upgrade now? is not.

RED — upstream scripts/tokenwar-launch.sh (stashed fix), new test applied:

1..8
ok 7 provider-only update cache does not offer managed upgrade
not ok 8 interactive launch with pending tool update shows status hint without upgrade prompt
# (in test file tests/launch.bats, line 72)
#   `[[ "$output" != *"Upgrade now?"* ]]' failed

GREEN — with the fix:

1..8
ok 8 interactive launch with pending tool update shows status hint without upgrade prompt

Full suite + linter on this branch:

121/121 bats tests pass
shellcheck -S warning scripts/*.sh scripts/lib/*.sh → clean

🤖 Generated with Claude Code

https://claude.ai/code/session_01NXot81hzCH5ViVyXJDwX4W

…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
@ousamabenyounes
ousamabenyounes merged commit 753728f into main Sep 4, 2026
1 check passed
@ousamabenyounes
ousamabenyounes deleted the fix/launch-no-upgrade-prompt branch September 4, 2026 17:47
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