fix(cli): 'later' on provider update persists a cooldown instead of re-prompting every launch - #8829
Conversation
…e-prompting every launch Choosing "Remind me later" (or pressing Esc, which maps to 'later') previously persisted nothing, so the Built-in Provider Update prompt reappeared on every startup whenever the built-in model list version differed from the stored metadata version. Users upgrading to a release that changes the Token Plan model list were nagged each launch. Now 'later' persists postponedVersion + postponedAt. findAllPendingUpdates skips re-prompting while the 24h cooldown is active for the same version. A new model-list version (postponedVersion mismatch) still re-prompts immediately, preserving the "remind me later" meaning. 'skip' (per-version ignore) and 'update' behavior are unchanged.
qwen-code-ci-bot
left a comment
There was a problem hiding this comment.
@qwen-code-dev-bot Stopping at the template gate before code review: the PR body is missing two headings required by the PR template:
### Evidence (Before & After)— this change is user-visible (the startup update prompt), so the template asks for before/after evidence: a tmux capture, screenshot, or short recording. "How to verify" describes the manual recipe and the Tested-on table marks Linux ✅, but the body carries no trace that it was actually run — paste the terminal evidence there.## Linked Issues— the body quotes a user complaint ("升级到 v0.21.8 之后每次启动都提醒更新 Token Plan") but links nothing. Link the issue if one exists, or state the provenance explicitly (e.g. "None — reported in …") so reviewers know this is observed, not inferred.
Once the body carries both sections, re-run with @qwen-code /triage and this picks up at code review.
中文说明
@qwen-code-dev-bot 在进入代码审查前,先停在模板门禁:PR 正文缺少 PR 模板 要求的两个小节:
### Evidence (Before & After)—— 这是用户可见的改动(启动时的更新提示),模板要求提供 before/after 证据:tmux 终端截图、截图或短录屏。"How to verify" 写了手动步骤,Tested-on 表也标了 Linux ✅,但正文里没有任何实际执行过的痕迹——请把终端证据贴在这里。## Linked Issues—— 正文引用了用户反馈("升级到 v0.21.8 之后每次启动都提醒更新 Token Plan"),但没有关联任何 issue。如果有对应 issue 请链接;如果没有,请明确说明来源(例如 "None — reported in …"),让审查者确认这是观测到的问题而非推测。
补齐这两个小节后,用 @qwen-code /triage 重跑,即可进入代码审查。
— Qwen Code · qwen3.8-max
Code Coverage Summary
CLI Package - Full Text ReportCore Package - Full Text ReportFor detailed HTML reports, please see the 'coverage-reports-22.x-ubuntu-latest' artifact from the main CI run. |
|
🤖 AutoFix updated a stale base — the fix did not pass verification, but this PR was behind What I found before stopping: See the Qwen Autofix agent step logs for model/tool output. Run log: https://github.com/QwenLM/qwen-code/actions/runs/31357002226 🧠 Handled by Qwen Code · model/模型 |
|
🤖 AutoFix updated a stale base — the fix did not pass verification, but this PR was behind What I found before stopping: Template gate needs a PR-body edit — prepared here, cannot be applied from this flowFeedback (triage template gate, CHANGES_REQUESTED): the PR body must carry DONE THIS ROUND (all artifacts in this run's upload):
BLOCKER: this flow has no PR-body edit capability (no GitHub write access; the MAINTAINER NEXT STEP:
Run log: https://github.com/QwenLM/qwen-code/actions/runs/31360375385 🧠 Handled by Qwen Code · model/模型 |
qwen-code-ci-bot
left a comment
There was a problem hiding this comment.
Reviewed. Suggestions are inline. Unresolved, please confirm: [Critical] Triage template gate (CHANGES_REQUESTED review 4893640305 + autofix comment 5236803982): the PR body still lacks the required ### Evidence (Before & After) and ## Linked Issues sections — a body/process requirement no code change can satisfy; cannot be ruled from code. Not explored to full depth (tool budget reached): PR #8829 makes "Remind me later" (and Esc) on the built-i...: run useProviderUpdates.test.ts to confirm the PR's claimed 17/17 green (worktree has no node_modules ; install skipped to stay within budget)..
中文说明
已审查。 建议见行内评论。 未决,请确认:[Critical] Triage template gate (CHANGES_REQUESTED review 4893640305 + autofix comment 5236803982): the PR body still lacks the required ### Evidence (Before & After) and ## Linked Issues sections — a body/process requirement no code change can satisfy; cannot be ruled from code. 未探索到全部深度(达到工具调用预算):PR #8829 makes "Remind me later" (and Esc) on the built-i...:run useProviderUpdates.test.ts to confirm the PR's claimed 17/17 green (worktree has no node_modules ; install skipped to stay within budget).。
— qwen3.8-max via Qwen Code /review (v0.21.8)
|
🤖 AutoFix updated a stale base — the fix did not pass verification, but this PR was behind What I found before stopping: See the Qwen Autofix agent step logs for model/tool output. Run log: https://github.com/QwenLM/qwen-code/actions/runs/31367265750 🧠 Handled by Qwen Code · model/模型 |
|
🤖 Addressed the latest review feedback (round 4/10). What changed, and what I pushed back on: · 已处理最新评审反馈(第 4/10 轮)。改动内容与我反驳保留之处如下: Autofix review round — PR #8829All four inline findings are resolved in code (commit Inline findings
Review-level findings
Conflict notesNone ( VerificationCommands actually run in this checkout (working tree at commit
中文说明Autofix 审查轮次 — PR #8829四条行内发现均已在代码中解决(提交 行内发现
审查级别发现
冲突说明无( 验证(Verification)在本检出中实际执行的命令(工作树位于提交
Base-conflict check · 基分支冲突检查: no conflict with main. · 与 main 无冲突。 Re-review when you have a moment. After round 10 this bot stops and leaves the PR for a human. · 有空请复审;第 10 轮后本 bot 停止并将 PR 交给人工。 🧠 Handled by Qwen Code · model/模型 |
qwen-code-ci-bot
left a comment
There was a problem hiding this comment.
Reviewed. Suggestions are inline. Unresolved, please confirm: [Critical] Triage template gate (CHANGES_REQUESTED review 4893640305 + autofix comment 5236803982, re-asserted as Critical in review 4894648325): the PR body still lacks the required ### Evidence (Before & After) and ## Linked Issues sections — a body/process requirement no code change can satisfy; verified against the live body at HEAD 7cb8fc3 that both sections are still absent; cannot be ruled on from code.
中文说明
已审查。 建议见行内评论。 未决,请确认:[Critical] Triage template gate (CHANGES_REQUESTED review 4893640305 + autofix comment 5236803982, re-asserted as Critical in review 4894648325): the PR body still lacks the required ### Evidence (Before & After) and ## Linked Issues sections — a body/process requirement no code change can satisfy; verified against the live body at HEAD 7cb8fc3 that both sections are still absent; cannot be ruled on from code.
— qwen3.8-max via Qwen Code /review (v0.21.8)
|
🤖 Addressed the latest review feedback (round 5/10). What changed, and what I pushed back on: · 已处理最新评审反馈(第 5/10 轮)。改动内容与我反驳保留之处如下: Address-review summary — PR #8829 (round: feedback of 2026-08-10)Commit pushed this round: DispositionsAll five inline [Suggestion] findings were verified against the code at HEAD and resolved in code:
Escalated — needs a maintainer / the workflow, not solvable in code: the review-level [Critical] triage template gate (review 4893640305 / comment 5236803982 / review 4894648325) reports the PR body still lacks the required Nothing was declined. VerificationCommands actually run (from the repo root unless noted), all on the final committed tree:
中文说明评审处理总结 — PR #8829(轮次:2026-08-10 的反馈)本轮推送的提交: 处理结果全部五条行内 [Suggestion] 反馈均已在 HEAD 代码上核实,并在代码中解决:
升级给维护者 / 工作流,代码无法解决: 评审级的 [Critical] Triage 模板关卡(review 4893640305 / comment 5236803982 / review 4894648325)指出 PR 正文仍缺少必需的 没有拒绝任何反馈。 验证实际执行的命令(除特别说明外均在仓库根目录),全部在最终提交的代码树上运行:
Base-conflict check · 基分支冲突检查: no conflict with main. · 与 main 无冲突。 Re-review when you have a moment. After round 10 this bot stops and leaves the PR for a human. · 有空请复审;第 10 轮后本 bot 停止并将 PR 交给人工。 🧠 Handled by Qwen Code · model/模型 |
|
🔀 Base updated: red check(s) [Test (ubuntu-latest, Node 22.x)] pass on current main — merged current main via update-branch; CI will re-run. 中文说明🔀 已更新 base:红色检查 [Test (ubuntu-latest, Node 22.x)] 在当前 main 上通过 —— 已通过 update-branch 合入当前 main,CI 将重新运行。 |
qwen-code-ci-bot
left a comment
There was a problem hiding this comment.
[Critical] Triage template gate (re-checked at HEAD 2115a36, still stands): the PR body still lacks the required ### Evidence (Before & After) and ## Linked Issues sections — verified against the live body at the reviewed commit: both sections are absent. This is a body/process requirement no code change can satisfy; a maintainer must edit the PR body (e.g. gh pr edit 8829), then re-run @qwen-code /triage. Re-asserted from prior rounds (reviews 4893640305, 4894648325, 4895372388).
— qwen3.8-max via Qwen Code /review (v0.21.8)
|
🤖 AutoFix ran out of time before finishing (idle-timeout (no output for 1200000ms — the sandbox likely hung at startup)) (attempt 6/10) — it will retry on the next scan.
See the Qwen Autofix agent step logs for model/tool output. Run log: https://github.com/QwenLM/qwen-code/actions/runs/31387302829 🧠 Handled by Qwen Code · model/模型 |
|
🤖 AutoFix ran out of time before finishing (idle-timeout (no output for 1200000ms — the sandbox likely hung at startup)) (attempt 7/10) — it will retry on the next scan. What I found before stopping: See the Qwen Autofix agent step logs for model/tool output. Run log: https://github.com/QwenLM/qwen-code/actions/runs/31389561905 🧠 Handled by Qwen Code · model/模型 |
|
🤖 AutoFix updated a stale base — the fix did not pass verification, but this PR was behind What I found before stopping: See the Qwen Autofix agent step logs for model/tool output. Run log: https://github.com/QwenLM/qwen-code/actions/runs/31394772225 🧠 Handled by Qwen Code · model/模型 |
yiliang114
left a comment
There was a problem hiding this comment.
Code-wise looks solid. The fix is clean, the cooldown logic is self-documenting, and the test coverage is thorough — 7 new test cases covering: single-provider persistence, multi-provider batched write, persistence failure, active cooldown suppression, 24h expiry, backward clock, and newer-version bypass. All previously flagged code findings (R1-1 through R2-5) have been addressed.
Two minor notes and one outstanding blocker:
P2 — Inconsistent spy restore at L676, L708
The new tests "shows prompt again after the 'later' cooldown expires" and "shows prompt when the clock stepped backward after postponement" call dateNowSpy.mockRestore() without try/finally, while the sibling "does not show prompt while the 'later' cooldown is active" test wraps in try/finally. If renderHook throws, global Date.now mock leaks. Low risk in practice (renderHook setup is trivial), but worth aligning for consistency.
P2 — 'skip' path lacks error guard (pre-existing, asymmetry introduced by this diff)
The new 'later' branch wraps its persist in try/catch, but its twin 'skip' branch (L406-413) has no guard. Both write to the same settings file. Pre-existing, but the asymmetry is now visible. Worth a follow-up.
Critical — Template gate (flagged 4x by CI bot, still unresolved)
The PR body still lacks ### Evidence (Before & After) and ## Linked Issues. This has been CHANGES_REQUESTED in rounds 1 and 4 of the CI bot review. Deferring to those reviews — I won't re-assert the block, but it should be resolved before merge.
Otherwise LGTM. The read-side cooldown guard correctly handles backward clock jumps via >= 0, the setValues batching keeps version/timestamp atomic, getErrorMessage is used consistently, and the addItem dependency is in the hook's deps array.
yiliang114
left a comment
There was a problem hiding this comment.
Code LGTM. The fix is clean, well-tested (7 new cases), and addresses all prior code findings across the 4 review rounds. Minor P2 notes (spy restore consistency, pre-existing skip error guard) are follow-up material. The outstanding template gate (Evidence / Linked Issues) should be resolved before merge.
|
Released in v0.21.9. |
What this PR does
Makes "Remind me later" (and Esc, which maps to
later) on the Built-in Provider Update prompt persist a 24h postponement cooldown, so the prompt no longer reappears on every startup.Why it's needed
After upgrading to a release that changes a built-in provider's model list (e.g. v0.21.8 changed Token Plan), the stored
providerMetadata.<plan>.versiondiffers from the newly computed version, so a pending update is detected at every startup. Previously:update→ applies the update and bumps the stored versionskip→ persistsignoredVersion(suppresses for this version)later/ Esc → only closed the dialog, persisted nothingSo users who chose "later" were re-prompted on every launch. This matches the reported annoyance: "升级到 v0.21.8 之后每次启动都提醒更新 Token Plan".
How it works
laternow persistspostponedVersion+postponedAtunderproviderMetadata.<plan>.findAllPendingUpdatesskips re-prompting whilepostponedVersion === currentVersionandDate.now() - postponedAt < 24h.skipandupdatebehavior unchanged.Files changed
packages/cli/src/ui/hooks/useProviderUpdates.ts— cooldown persistence + gatepackages/cli/src/ui/hooks/useProviderUpdates.test.ts— updated the "later" test to assert cooldown persistenceReviewer Test Plan
How to verify
npx vitest run packages/cli/src/ui/hooks/useProviderUpdates.test.ts— 17/17 pass.Tested on
Risk & Scope
中文说明
修复"稍后提醒"不持久化导致每次启动都弹 Token Plan 更新提示的问题。later/Esc 现在写入 postponedVersion + postponedAt,24 小时冷却期内同版本不再弹;版本再变(新更新)会立即重新提醒。skip 和 update 行为不变。