Repository navigation
Context breakdown panel: redesign the Developer Mode layout and bound the usage fold state #24030
Copy link
Copy link
Closed
Labels
area: dashboardDashboard UI and its backend handlersDashboard UI and its backend handlersenhancementNew feature or requestNew feature or requesttier:T3Changes an existing user experience; needs a one-pagerChanges an existing user experience; needs a one-pagertriagedA person has read this issue and accepted its tierA person has read this issue and accepted its tier
Description
What
Follow-up to #23648 (which records the KAS per-turn context breakdown in the crew log, for #21277). Redesign the Context breakdown panel in Developer Mode and make the backend state behind it fixed-size.
Panel:
- Kiro Crew's own blocks (rules, memory, skills, other) are the first top-level row.
- Below it, the KAS categories sorted by size: Built-in tool definitions, MCP tools, Kiro instructions, Steering and agent resources (lists with counts), Workspace, Tool calls and results (with Calls and Results), Messages (the KAS history minus the Kiro Crew blocks), Other. Rows with zero size are hidden.
- A colored stacked bar shows each row's share of totalChars. A thin window bar below it shows the share of the model window, for example "4% of the 1M-token window".
- For turns that are not KAS (Kiro CLI and others), the rows are in tokens, with Kiro Crew's blocks estimated as chars/4. A "Rest of the context" remainder row has an info tooltip that tells the user to pick Kiro Agent in Settings > Agent Harness to see the full breakdown.
Backend:
- The usage fold state becomes fixed-size: a ring of the newest 30 turns x 6 integers, a counter, and a session-start row. The KAS breakdown is last-wins. No per-turn block-name history is kept.
- Measured on a 1,000-turn session: state 111 KB -> 2.8 KB, push 196 KB -> 5.7 KB, on-loop json.dumps 798 us -> 32 us.
- Opt in to
contextBreakdownonsession/newandsession/load. - Keep the summary fields that
parse_breakdowndrops today.
i18n: every string added or changed is translated in all shipped locales.
Why
A user debugging a large context needs one view that shows where the window goes: Kiro Crew's own blocks and the engine's categories together, sorted by size, with the window share visible. The fold state behind the panel also grows with every turn (111 KB at 1,000 turns), and that state is pushed to the dashboard. A fixed-size state removes that growth.
Additional Context
- Scope: the Context breakdown panel in Developer Mode and the usage fold behind it. No other page changes.
- The design follows the review comments on feat(usage): record the engine's per-turn context breakdown and TTFT #23648 from the KAS side.
- This changes behaviour users already rely on, so it needs a design sign-off from a maintainer before it can merge.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area: dashboardDashboard UI and its backend handlersDashboard UI and its backend handlersenhancementNew feature or requestNew feature or requesttier:T3Changes an existing user experience; needs a one-pagerChanges an existing user experience; needs a one-pagertriagedA person has read this issue and accepted its tierA person has read this issue and accepted its tier
Activity
fix(context): keep each trend row's own ordinal and declare KAS profi…
fix(context): keep each trend row's own ordinal and declare KAS profi…
fix(context): keep each trend row's own ordinal and declare KAS profi…
fix(context): keep each trend row's own ordinal and declare KAS profi…
fix(context): keep each trend row's own ordinal and declare KAS profi…
fix(context): keep each trend row's own ordinal and declare KAS profi…
20 remaining items
feat(context): one window-style breakdown with Kiro Crew first (#24030)
feat(context): keep every chart turn whole and let a past turn be picked
feat(context): keep every chart turn whole and let a past turn be picked
feat(context): one window-style breakdown with Kiro Crew first (#24030)
feat(context): keep every chart turn whole and let a past turn be picked
feat(context): one window-style breakdown with Kiro Crew first (#24030)
feat(context): keep every chart turn whole and let a past turn be picked
feat(context): one window-style breakdown with Kiro Crew first (#24030)
feat(context): keep every chart turn whole and let a past turn be picked
feat(context): keep every chart turn whole and let a past turn be picked
feat(context): keep every chart turn whole and let a past turn be picked
feat(context): one window-style breakdown with Kiro Crew first (#24030)
feat(context): keep every chart turn whole and let a past turn be picked
feat(context): one window-style breakdown with Kiro Crew first (#24038)