🤖 perf: the chat-input handoff countdown uses provider usage while Token Budget stages open on the request estimate
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 68/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- typescript
調査の方向性
Start with src/common/utils/compaction/autoCompactionCheck.ts and src/browser/components/CompactionWarning/CompactionWarning.tsx, then read tests/ipc/tokenBudgetStages.fixture.integration.test.ts and the referenced changes in #7214 and #7332. Trace how the request estimate reaches the renderer and how the countdown is shown. Done when Token Budget mode never displays a handoff countdown after the handoff row has been delivered.
索引モデルが issue の本文から書いたものです。
説明
Found by the Codex review of #7332 (thread PRRT_kwDOPxxmWM6vk5R2). The problem already exists on main. No fix is in #7332.
Problem
In Token Budget mode, the chat-input bar counts down with "Handoff target in N% usage". It computes N from provider-reported usage (checkAutoCompaction in src/common/utils/compaction/autoCompactionCheck.ts, rendered by src/browser/components/CompactionWarning/CompactionWarning.tsx). The handoff and final stages open on the request estimate instead:
- Since #7214, the turn start opens a stage when the built request's estimate reaches its point.
- #7332 makes settlement use the same next-request estimate.
The estimate runs above provider usage (OpenAI about 1.3–1.6 times, Claude about 1.04–1.36 times, see #5223). So the handoff row can already be delivered while the bar still shows "Handoff target in N% usage". At a 70% target and 1.3–1.6 times, the handoff comes at about 44–54% provider usage. The bar stays hidden until 60%.
Evidence
- On main, the fixture test "estimate-only crossing (R2a)" in
tests/ipc/tokenBudgetStages.fixture.integration.test.tsdelivers a handoff while saved usage stays far below every stage point. CompactionWarning.tsxbuilds the countdown text fromusagePercentageonly.
Options
- Show the request estimate in the bar: send the last request estimate to the renderer and count down from it.
- Drop the countdown in Token Budget mode: show only "Past the handoff target" after the handoff row exists, and no percentage before.
Acceptance
- In Token Budget mode, the bar never shows a countdown to a handoff that the window already received.
Refs #5223, #7214, #7332.
Generated with xum • Model: anthropic:claude-opus-5-5 • Thinking: high • Cost: $527.71
- 主要言語
- TypeScript
- スター
- 2.1k
- フォーク
- 140
- 平均マージ
- 3時間 23分
- マージ済み PR(30日)
- 953
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートなし
- コントリビューションガイドなし
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
coder/xum のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
メンテナーはふだん 1 日以内に返信
似ている issue
-
e2e-failure ready-to-code
難易度 2/5 1〜3時間 初心者へのやさしさ 79/100
redhat-developer/rhdh-plugin-export-overlays#4580 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
devdotfast/whiteboard#1415 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
area/sessions comp/desktop desktop/sessions P2 type/bug
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
NousResearch/hermes-agent#145383 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
メンテナーはふだん 1 日以内に返信
-
enhancement p2 setup
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
メンテナーはふだん 1 日以内に返信