Repository navigation
feat(plugin): calm band, sectioned pane and a status line that keeps the cold cache - #694
Conversation
OsherElhadad
left a comment
There was a problem hiding this comment.
| Reviewer | Kind | Started by | Context | Review | Round | Head | Verdict |
|---|---|---|---|---|---|---|---|
| Reviewer 2 (claude, user of @OsherElhadad) | Claude Code 2.1.310 | offload-review skill, @OsherElhadad's session | fresh | 2 of 2 | 1 of 2 | ccad9f97feea |
blocking |
Verdict: blocking
Findings
-
context-guru-plugin/scripts/statusline.py:1564 — a hung proxy with an old cache-state copy now shows
cg: stats loading…, not the money and notcg? not responding- What fails: the stats cache is older than 600 s,
/api/statskeeps timing out, and a cache-state file exists (any age, becausemax_age=None)._timeout_resultreturns(None, STATS_HUNG). Line 1564 changesstatustoSTATS_TIMEOUTbut leavesstatsasNone. Line 1571 then picks"cg: stats loading…", becausestatus == STATS_TIMEOUT and stats is None.main()prints that and returns. - Result: the new rule does the opposite of its comment ("show them with ⏳"). No money, no clock, no context bar. Also the honest
cg? not respondingis replaced by "loading…", which tells the user the problem is about to go away. Before this PR the user sawcg? not responding. - Proof: trace of lines 1562-1574. No test covers it.
TestStatuslineReportsNotRespondingOnceAStaleFetchHangsTooLong(plugin_test.go:2313) usestoggleStub, which has no/api/cachestatehandler, socsisNonethere.TestStatuslineStaleCachestateDocumentStillDrawsMoneyContextAndClock(statusline_golden_test.go:1443) has a working/api/stats, so the status isSTATS_OK. - Fix: when you promote the status, also set
stats = {}(the money comes fromcs["money"], andkaalready skips an emptystats). Add a test: an old stats file,/api/statsthat hangs, and an old cache-state file. Expectsaved $… of $… session, the cache clock and⏳.
- What fails: the stats cache is older than 600 s,
-
context-guru-plugin/scripts/cg.py:1486 —
cg.py tipignoresstatusline.py --set-tips=off, so the band shows a tip the user turned off- What fails: a user ran
--set-tips=offbefore this PR. After the update, the tip moves from the status line into the band (its new default home).cg.py tipcallssl.stale_commands()only. It never callssl._tips_off(). So the band (row 3) and the pane SAVE MORE line show the tip again. - Proof:
_tips_off()is only read at statusline.py:1606 ("tip" in on and not _tips_off()).stale_commands()(statusline.py:580) has no check.docs/plugin/statusline.md:169says "The status line and the mod only read that file … Turn it off withstatusline.py --set-tips=off", so the docs promise one switch for both.TestCGTipUsesTheStatusLineRuledoes not test the off switch. - Fix: in
cg.py tip, return{"stale": []}whensl._tips_off()is true. Add a case toTestCGTipUsesTheStatusLineRulewithXDG_CONFIG_HOME/context-guru/statusline-tipsset tooff.
- What fails: a user ran
Non-blocking
- statusline.py:781 — a remembered retired layout (
spark, …) now returns"balanced", and_configlets a saved layout outrank the installed flag. So a user whose installed command says--layout=detailedand who once ran--set-layout=sparkgetsbalanced, notdetailed. ReturningNonefor a retired name falls back to the installed flag, which reads closer to "falls back, with no error". - cg.py
pane_strip/pane_heat: the pane shows$x lost todayalso on a subscription. The old status line strip hid that money on a subscription (money=not sub). The mod does not know the plan, so the pane cannot hide it. Worth a note, or pass the plan topanedata. - cg.py
pane_strip: the docstring says "the main thread", but the rows are not filtered bythread_id. Sub-agent requests are in the strip. This is the same as the old_strip_row; only the docstring is wrong. - Money format: for a small negative value the three sides differ.
usd(-0.004)is-$0.00in cg.py and model.ts, but_money(-0.004)is$0.00in statusline.py.TestMoneyFormatTablehas no negative case. - cg.py
pane_getcache tagsday,series14h,hourlyandspend-todaydo not hold the date. For up to 60 s after midnight the pane can show yesterday's "today". Small.
What I checked
- The full diff of the one commit
ccad9f97: cg.py (and that the Codex copy is byte-identical), statusline.py, model.ts, register.tsx, types/index.d.ts, plugin.json, the Go tests (cg_test.go, plugin_test.go, ping_test.go, statusline_golden_test.go), the register.test.tsx test names, the statusline skill and the docs table. I read the deleteddocs/statusline-livefiles only by name and size; nothing else references them. - statusline.py
main(),_fetch_stats,_timeout_result,_stale_stats,_gather,_fetch_jsonwith the newmax_age,_cache_view,_ctx_numbers,_cache_segmentcold branch,_save_segmentlevels against the newDEGRADEorder andminimal(level 2). - cg.py
panedata: reads go throughcgcachewith TTL, back-off and single flight; each read fails into a missing section; the session id is checked by regex; nothing writes to the proxy.tipin the Codex copy falls back to an empty list. - model.ts
view(): sub-agent window (30 min by server time),pingablefallback to the older server,signaturecovers the new fields, short reasons are at most 40 characters. - register.tsx band and pane: Ping hidden when cold or
pingable === false; hide is reversible; the agents switch is kept in$.store; the band has at most 3 rows. - Fail open: every new helper call in the mod is in
try/catchand returnsnull;panedatacatches each read. Data dependence: display only, metadata reads, no new stored data, no new component; I agree no row in docs/data-dependence.md is needed. - I did not run any test. Live tests are not approved and Go is not installed here.
OsherElhadad
left a comment
There was a problem hiding this comment.
| Reviewer | Kind | Started by | Context | Review | Round | Head | Verdict |
|---|---|---|---|---|---|---|---|
| Reviewer 1 (claude, user of @OsherElhadad) | Claude Code 2.1.310 | offload-review skill, @OsherElhadad's session | fresh | 1 of 2 | 1 of 2 | ccad9f97feea |
blocking |
Verdict: blocking
Findings
-
context-guru-plugin/scripts/statusline.py:1564 — a hung stats read with a cache-state copy prints
cg: stats loading…, not the figures- What fails: the stats copy is older than 10 minutes,
/api/statsstill times out, and a cache-state copy exists. The PR wants the money, the clock and the context bar with⏳. The line showscg: stats loading…and nothing else. Before this PR it showedcg? not responding. So the change makes the message less true, and the figures do not appear. - Proof:
_timeout_result(line 433) returns(None, STATS_HUNG), sostatsisNone.- Line 1564 changes
statustoSTATS_TIMEOUT.statsstaysNone. - Line 1571:
"cg: stats loading…" if status == STATS_TIMEOUT and stats is None. That is true, sonoticeis set. Line 1573 prints it and returns before any segment is drawn. - The same gate also hides the figures when
statswas never cached but a cache-state copy exists. The docs sayloading…shows "only when there never was a document" (docs/plugin/statusline.md,skills/statusline/SKILL.md). - No test covers this path.
TestStatuslineStaleCachestateDocumentStillDrawsMoneyContextAndClockhas a stats endpoint that answers.TestStatuslineReportsNotRespondingOnceAStaleFetchHangsTooLonghas no/api/cachestate, socsisNonethere.
- Fix: when
got["cs"][0]is notNone, skip theloading…andnot respondingnotices and setstale = True._save_segmentalready reads its money fromcs["money"]. Add a test: an old stats cache, a stalled/api/stats, a cache-state copy on disk. Expectsaved … session,cache,ctxand⏳.
- What fails: the stats copy is older than 10 minutes,
-
context-guru-plugin/scripts/cg.py:1483 —
--set-tips=offdoes not turn off the mod's weekly tip- What fails: a user runs
statusline.py --set-tips=off. The status line tip stops, but the band row 3 and the pane SAVE MORE line still showtip: /context-guru:save-more hasn't run in 7+ days. After this PR the band is the tip's default home, and the status line tip is opt-in. So the documented off switch now does nothing in the default setup. - Proof:
cg.py tipprintssl.stale_commands().stale_commands(statusline.py:580) does not call_tips_off()._tips_off()is checked only instatusline.pymain()(line 1604,if "tip" in on and not _tips_off()).docs/plugin/statusline.md:169describes the tip for "the status line and the mod", then says: "Turn it off with …--set-tips=off".skills/statusline/SKILL.md:62says the same.
- Fix: in
cg.py tip, print{"stale": []}whensl._tips_off()is true. Or check it instale_commands. Add a case to thecg.py tiptest.
- What fails: a user runs
Non-blocking
cg.pypane_stripdocstring says "the last 20 requests of the main thread". The code does not filter onthread_id, so sub-agent requests are included. Filter them, aspane_filldoes, or fix the docstring.cg_test.goTestCGPanedata:port, _ := statuslineCounting(t, cache, nil); _ = portstarts a server that the test never uses. Remove it.docs/plugin/statusline.mdstate table: "Cold | dim○ cache ○ cold 3:12" has the glyph two times. The line drawscache ○ cold 3:12.statusline.py_money(x, approx=True)for0 < x < 0.01returns<$0.01and drops the≈mark. No current caller passes a value that small withapprox, so this is only a note.- The band row 1 shows the next-message price on a subscription too. The status line hides
nextthere because "a subscription is not billed per request". This did not change in this PR, but the band is now the price's only default home.
What I checked
- Read
CLAUDE.md,docs/design.md(package map) and the commit message. - Read the full diff of
scripts/cg.py(both copies; they are identical, and the Codex copy has nostatusline.py, which thetipcommand handles with itsexcept). - Read the full diff of
scripts/statusline.py, and the code around_fetch_stats,_timeout_result,_stale_stats,_fetch_json,_gather,_cache_view,_cache_segment,_save_segment,_window_segment,main()and theDEGRADEloop. Traced the save levels (minimal = 2,DEGRADE1 → 2 → 3) and the cold segment. - Read
scripts/cgcache.pyfor the pane's cache, single flight and back-off inpane_get. - Read
hooks/model.ts,hooks/register.tsx(all of it),types/index.d.ts, and the new and changed tests inregister.test.tsx,cg_test.go,ping_test.go,plugin_test.goandstatusline_golden_test.go. - Read the
dash/cachestate.gothread fields (pingable,ping_reason,window,window_exact,next_*_usd) that the mod andpanedataread. - Read the docs diffs:
docs/plugin/statusline.md,skills/statusline/SKILL.md,skills/cache-strategy-picker/SKILL.md. Checked that no file still links to the deleteddocs/statusline-live/*files. - Fail open:
panedatacatches each read, and a missing section is left out. The mod'shelperreturnsnullon any error. The status line still catches all errors in__main__. Display only: no change to data dependence. - I did not run any test. Live tests are not approved.
ccad9f9 to
9ca31f7
Compare
|
Round 1 is fixed in Both reviewers, finding 1: hung
Both reviewers, finding 2:
Non-blocking, done
Non-blocking, not changed
Merge with #691
Tests on the final tree
|
|
Fixed in the next commit, after a live session in a real terminal.
Tests: |
OsherElhadad
left a comment
There was a problem hiding this comment.
| Reviewer | Kind | Started by | Context | Review | Round | Head | Verdict |
|---|---|---|---|---|---|---|---|
| Reviewer 2 (claude, user of @OsherElhadad) | Claude Code 2.1.310 | offload-review skill, @OsherElhadad's session | resumed | 2 of 2 | 2 of 2 | 498fa514285a |
approve |
Verdict: approve
Findings
None.
Earlier findings
- Mine 1 / reviewer 1, finding 1 (hung
/api/statsprintedcg: stats loading…): fixed. statusline.py:1564 now promotes bothSTATS_HUNGandSTATS_TIMEOUTtoSTATS_TIMEOUTand setsstats = stats or {}when a cache-state copy exists. So theloading…check on line 1571 is false, andstaleis true, which adds⏳. Withstats = {},kaskips (if stats), and_save_segmentreadscs["money"]. The new testTestStatuslineHungStatsWithACachestateCopyKeepsTheLinereaches the realSTATS_HUNGpath. Trace: run 1 has no copies, and both reads time out and record a back-off. Run 2 has a 40-minute stats file, so_fetch_statssees the back-off and_timeout_resultreturns(None, STATS_HUNG). The cache-state read is in back-off too, so it serves the 40-minute copy (max_age=None). The test expects money,cold 36:00,ctxand⏳, with no notice. - Mine 2 / reviewer 1, finding 2 (
cg.py tipignored--set-tips=off): fixed. cg.py:1508 checkssl._tips_off().TestCGTipHonoursSetTipsOffhas a control run, then runs the real--set-tips=offwith the sameXDG_CONFIG_HOME. The Codex copy is byte-identical and still falls back to an empty list. - Non-blocking, fixed: a retired remembered layout now returns
None(statusline.py:781), so the installed flag wins, and a test covers it.pane_stripfilters onthread_id == "". Negative money: all three sides usex <= -0.005. I checked-0.004→$0.00,-1.5→-$1.50,-123.4→-$123in_money,cg.usdandmodel.ts usd. Both tables cover these values. The unused server inTestCGPanedatais removed. - Non-blocking, not changed, author's reason accepted:
- Subscription money in the mod: the mod gets no
rate_limits, so it cannot know the plan. A fix needs a proxy flag, which is a separate change. - The midnight cache tag: the window is 60 s.
approxunder one cent: no caller uses it.
- Subscription money in the mod: the mod gets no
Non-blocking
context-guru-plugin/hooks/register.tsx:4: the header comment still lists "dashboard link" in band row 1. Commit498fa514removed the link from the band.TestStatuslineHungStatsWithACachestateCopyKeepsTheLine, the step "No cache-state copy at all: the notice stays", checks onlystrings.Contains(out, "cg"). A tighter check (loadingornot responding) would catch a wrong notice.
What I checked
- Last review: round 1, ccad9f9, 2026-10-25T10:50:28Z
- New commits read: 3.
bacc4048feat(plugin): calm band, sectioned pane and a status line that keeps the cold cache. This is the rebase ofccad9f97on86c118ba, which brings in #691. I read it withgit range-diff. The only changes are the #691not opted inwording, which now comes from main, the short band reasonturns on next session, and the docs typocache ○ cold 3:12.9ca31f78fix(plugin): keep the status line when stats hang, honour --set-tips=off in the mod. I read the full diff: cg.py (both copies), statusline.py, model.ts, register.test.tsx, cg_test.go and statusline_golden_test.go.498fa514fix(plugin): keep the band on one row and make the pane text wrap cleanly. I read the full diff: register.tsx, register.test.tsx, model.ts, cg.py (both copies), ping_test.go and docs/plugin/statusline.md.
- Read in full: 2 reviews, 2 comments and 0 inline comments, from the three files.
- New items since my last review:
- Reviewer 1, round 1 review (10:52:20Z). Its two findings match mine. For its non-blocking points, I checked these fixes:
pane_strip, the unused server, and the docs typo. I accepted the author's answer on the subscriptionnextprice. - Author comment 11:03:32Z (round 1 replies). I checked each claimed fix in the code. The results are listed above.
- Author comment 11:11:47Z (the live-session fixes):
- Band link removed. The Link is gone from the band, and the test asserts that no Link and no
dashboardtext is in row 1. unsupportedreworded. The words are the same in both cg.py copies, model.ts and ping_test.go. The short reasonnot on this routehas fewer than 40 characters.lost todayon its own line. The cols-based legends are in register.tsx, and the test runs at 140, 80 and 60 columns.- I found no defect.
- Band link removed. The Link is gone from the band, and the test asserts that no Link and no
- Reviewer 1, round 1 review (10:52:20Z). Its two findings match mine. For its non-blocking points, I checked these fixes:
- Fail open: no new network call. The
tipchange keeps itstry/except. The pane changes are display only. Data dependence does not change. - I did not run any test. Live tests are not approved, and Go is not installed here.
OsherElhadad
left a comment
There was a problem hiding this comment.
| Reviewer | Kind | Started by | Context | Review | Round | Head | Verdict |
|---|---|---|---|---|---|---|---|
| Reviewer 1 (claude, user of @OsherElhadad) | Claude Code 2.1.310 | offload-review skill, @OsherElhadad's session | resumed | 1 of 2 | 2 of 2 | 498fa514285a |
approve |
Verdict: approve
Findings
None.
Earlier findings
- Mine 1 and reviewer 2's 1 (the same defect): hung
/api/statsprintedcg: stats loading…. Fixed in9ca31f78.statusline.py:1564now coversSTATS_HUNGandSTATS_TIMEOUT. When a cache-state copy exists, it setsstatus = STATS_TIMEOUTandstats = stats or {}. So the line 1571 test (stats is None) is false, and no notice prints.- With
stats = {}:_save_segmentreads the money fromcs["money"].kaskips an emptystats._latency_segmentreturnsNone. An older proxy with nomoneyblock shows nosaved, not$0.00. That is correct. - A stats copy that is still fresh enough is kept, because
stats or {}keeps it. STATS_DOWNwith a copy still printscg ✕ proxy offline. That is correct: the proxy refused.- Trace of
TestStatuslineHungStatsWithACachestateCopyKeepsTheLine: in run 2 the cache-state read is in back-off, and_fetch_jsonserves the 40-minute copy (max_age=None). The stats read gets_timeout_result(cached, 2400 s), which returnsHUNG, and the new code promotes it. The test expects the figures and⏳, and no notice. The test matches the code.
- Mine 2 and reviewer 2's 2 (the same defect):
cg.py tipignored--set-tips=off. Fixed in9ca31f78.cg.py:1508checkssl._tips_off()first. The import and the call stay inside thetry, so the Codex copy (nostatusline.py) still prints{"stale": []}.TestCGTipHonoursSetTipsOffhas a control run that shows a tip, then runs--set-tips=off, then expects no tip.
- Non-blocking, from round 1:
- The
pane_stripmain-thread filter is fixed. - The unused server in
TestCGPanedatais removed. - The docs
○typo is fixed. - The negative-money rule is now the same in the three formatters. I traced
-0.004($0.00),-1.5(-$1.50) and-123.4(-$123) on each side. - The retired remembered layout is now ignored, so the installed flag wins (reviewer 2's note).
- The
- Rejected by the author, with a reason:
- The subscription price and
lost todayin the mod. The author says the mod does not getrate_limits, so the fix needs a plan flag from the proxy. I checked:register.tsxreads onlycg.py cachestate,panedataandtip, and none of them has the plan. I accept this as a separate change. - The midnight cache tags. The window is 60 s. I accept.
_money(approx=True)under a cent. No caller uses it. I accept.
- The subscription price and
Non-blocking
docs/plugin/statusline.md:231and:235: the pane example still shows· $1.40 lost todayat the end of the legend line. Since498fa514,register.tsxputs$x lost todayon its own line. Update the example.docs/plugin/statusline.md:154andskills/statusline/SKILL.md:87say that a remembered retired layout "falls back tobalanced". Since9ca31f78,_saved_layoutignores the name, and the installed--layoutflag wins. That isbalancedonly when the flag is absent or is also retired. The comment atstatusline.py:759also still says "falls back silently". Reword: "is ignored; the installed layout applies".TestStatuslineHungStatsWithACachestateCopyKeepsTheLine: the no-copy check isstrings.Contains(out, "cg"), which almost any output passes. Checking fornot respondingorloadingwould prove that the notice stays.
What I checked
- Last review: round 1,
ccad9f97feeabe3ddb8388a73d9932b0e7326fa4, 2026-10-25T10:52:20Z. - New commits read: 3 on the rebased branch.
ccad9f97is not an ancestor of HEAD (the branch was rebased on86c118ba, which has #691 and #692).bacc4048feat(plugin): calm band, sectioned pane and a status line that keeps the cold cache. This is the rebasedccad9f97. I readgit range-diff 1953b47c..ccad9f97 86c118ba..bacc4048. The only changes are the #691 merge:not opted inkeeps the #691 wording, the band short reason isturns on next session, the tests follow, and the docs○typo is fixed.9ca31f78fix(plugin): keep the status line when stats hang, honour --set-tips=off in the mod. I read the full diff.498fa514fix(plugin): keep the band on one row and make the pane text wrap cleanly. I read the full diff.
- Read in full: 2 reviews, 2 comments, 0 inline comments (from the three files).
- New items since my last review:
- Reviewer 2's round-1 review (10:50:28Z, posted before mine; I read it for the first time now). Its 2 findings are the same as mine. Its non-blocking points: I checked each one against the fixes above.
- Author comment 11:03:32Z (fix list for round 1). I checked each claim against
9ca31f78. All are true. I accepted the three rejections (see above). - Author comment 11:11:47Z (band link removed,
unsupportedreworded, pane wrapping). I checked each claim against498fa514:- The band has no
Link, and the test asserts that. - The pane link is on its own line under the title, and the test asserts the first 3 lines.
keepalive/manualhold.go:56saysunsupportedcovers "thinking enabled, an unsupported route", so the new wording is correct. Bothcg.pycopies are identical.model.tsandping_test.gofollow.$x lost todayis now its ownTextin the strip and heat sections. The legends shorten bycols. The new width test checks 140, 80 and 60 columns.
- The band has no
- Read the code around each change:
statusline.pymain(),_timeout_result,_stale_stats,_fetch_json,_save_segment,_latency_segment,_configand_saved_layout;cg.pyusd,pane_stripand thetipbranch;register.tsxband and pane. - Fail open: no new network path. The mod's
helperstill returnsnullon any error.cg.py tipstill catches everything. Display only: no change to data dependence. - I did not run any test. Live tests are not approved.
|
Round 2 notes are fixed in the next commit.
Tests: |
|
Live re-check items are fixed in the next commit.
Tests: plugin test 60 pass; full Go suite ok; unittest OK. |
|
Third live check is fixed in the next commit.
Tests: plugin test 63 pass; full Go suite ok; unittest OK. |
…the cold cache Give each fact one home. The status line keeps the money, the cache clock and the context bar. The mod keeps the next-message price, Ping, the sub-agent caches, the weekly tip and the five modes. Status line: - Draw a cold cache dim (`cache ○ cold 3:12`) and keep it on the line. - Keep the money and the context bar when a cache-state copy is old. Mark them with a hourglass. The clock is computed from the copy. - Remove `next`, `ka` and the tip from balanced. Detailed shows the keep-alive count in plain words. - Retire the layouts spark, strip, heat, fill and watch. A retired name falls back to balanced, silently. - Use one money format and `h:mm:ss` clocks from one hour. Mod: - Band: `next message $0.06 · $0.78 if cold`, Ping or `ping off: <reason>`, dashboard link, reversible hide. No clock, no saved money, no rotating tip, no `$.ui.status` copy. - Agent row: on by default, cold agents dimmed, opt-out with `a`. - Weekly tip row only when a command is stale (`cg.py tip`). - Pane: header, NEXT MESSAGE, AGENTS, SAVED LATELY, CACHE HITS, MISSES BY HOUR, CONTEXT, SAVE MORE. A section with no data is left out (`cg.py panedata`). - Reword the `not opted in` ping reason. Display only: no change to data dependence. Closes #686 Part of #687 Assisted-By: Claude Sonnet 5.5 <[email protected]> Signed-off-by: Osher Elhadad <[email protected]>
…off in the mod - Hung or slow /api/stats with a cache-state copy now shows the money, the clock and the context bar with a marker. No loading notice. - cg.py tip returns no stale command when tips are off. - A remembered retired layout is ignored, so the installed flag wins. - Pane strip counts main-thread requests only. - One negative-money rule in Python and TypeScript. - Keep the short band reason "turns on next session" beside the merged full wording of the ping header change. Assisted-By: Claude Sonnet 5.5 <[email protected]> Signed-off-by: Osher Elhadad <[email protected]>
…anly - Remove the dashboard link from the band. The terminal draws a link's address next to its label, so row 1 wrapped. The link stays in the pane, on its own line under the title. - Reword the `unsupported` ping reason. It also covers gateway routes, not only extended thinking. Band text: `not on this route`. - Pane legends depend on the width. `$x lost today` is always on its own line, and legends shorten at narrow widths. Assisted-By: Claude Sonnet 5.5 <[email protected]> Signed-off-by: Osher Elhadad <[email protected]>
… layout rules Assisted-By: Claude Sonnet 5.5 <[email protected]> Signed-off-by: Osher Elhadad <[email protected]>
…s margin, tidy pane gaps - Use one neutral text for an unpingable route: "this route cannot be pinged". - Ask for the first cache-state document every second for five seconds, after session start and after a turn, so the band shows at once. - Take the status line width from the terminal minus a 4 column margin, and from /dev/tty when no standard stream is a terminal. Claude Code cut the line at "subag…" before. - Keep short labels in the 60 column context legend (fixed, chat, free). - Give each pane section its own top gap, so a page break keeps it. Assisted-By: Claude Sonnet 5.5 <[email protected]> Signed-off-by: Osher Elhadad <[email protected]>
…MORE cleanly - Draw nothing in the ping slot for `no entry` and for unknown reasons. Right after a reply `no entry` is a timing artefact the user cannot act on. - Cut every band ping-off text to 17 characters or fewer, and use "next" and "cold" on a narrow band. A test walks every reason code. - Put each SAVE MORE description on its own dim line under 80 columns. Assisted-By: Claude Sonnet 5.5 <[email protected]> Signed-off-by: Osher Elhadad <[email protected]>
c826efc to
24f6765
Compare
…0.2.5) Both plugins changed in this release, so installed plugins must update. - Claude Code plugin: 0.6.0 was set in #694. No change here. - Codex plugin: 0.2.4 to 0.2.5. The vendored cg.py and costly.py and one skill changed in #512, #681, #683, #691, #694 and #698. Assisted-By: Claude Sonnet 5.5 <[email protected]> Signed-off-by: Osher Elhadad <[email protected]>
…0.2.5) (#701) chore(plugin): bump the plugins for v0.6.0 (Claude Code 0.6.0, Codex 0.2.5) Both plugins changed in this release, so installed plugins must update. - Claude Code plugin: 0.6.0 was set in #694. No change here. - Codex plugin: 0.2.4 to 0.2.5. The vendored cg.py and costly.py and one skill changed in #512, #681, #683, #691, #694 and #698. Assisted-By: Claude Sonnet 5.5 <[email protected]> Signed-off-by: Osher Elhadad <[email protected]>
Summary
The status line and the mod showed the same facts up to four times. This PR gives each fact one home. It also draws a cold cache instead of hiding it.
What changed
One home per fact
↻/pingStatus line
cache ○ cold 3:12.minimalshowscache ○ cold. (Cold cache hides the cache clock, next cost, agents and Ping from the status line and mod #686)⏳. The clock is computed from the copy at any age.cg.py cachestatealready returned the old copy with"stale": true; a test now pins it.next,kaand the tip are gone frombalanced.detailedshowskeep-alive 3 pings · $0.04. Nokaanywhere.--show=next|agents|ka|tipstill work.spark,strip,heat,fill,watchare retired. A flag or remembered choice that names one falls back tobalanced, with no error.$12.34,$0.06,<$0.01,$123. Clocks useh:mm:ssfrom one hour.subagentsphrase,sessionlabel, context bar. The clock shortens last.Mod band (at most 3 rows)
◆ next message $0.06 · $0.78 if cold [ Ping ] dashboard ↗ hide.◆ ○ cache cold · next message $0.78. No Ping.pingable: false: no button. A dimping off: <reason, 40 characters at most>shows instead. Nopingablefield (older server): the button stays.akey and a pane button turn it off. The choice is kept in$.store.cg.py tip, same rule as the status line). It does not rotate.hideis reversible:/context-guru:context-guruor the pane button shows the band again.$.ui.statuscopy of the clock.not opted in: "Ping is not enabled for this install: run /context-guru:install again, then start a new session". (The header self-heal is in a separate PR for Ping says "restart Claude Code" but a restart never adds the x-context-guru-ping header #685.)Pane (
/context-guru:context-guru)saved $22.80 of $81.90 this session), NEXT MESSAGE, AGENTS, SAVED LATELY, CACHE HITS, MISSES BY HOUR, CONTEXT, SAVE MORE.cg.py panedata.Other
docs/plugin/statusline.mdand the statusline skill are rewritten. The recordings indocs/statusline-liveshowed the old lines and no generator exists, so they are removed. Text renders replace them.Before and after
Status line, cold cache.
Before:
After:
Status line, warm.
Before:
After:
Band, warm, agents, stale tip.
Before:
After:
Band, cold, and ping off (short band):
The full pane and the other status line states are in
docs/plugin/statusline.md.How it was tested
claude plugin validate .: passed.claude plugin test .: 56 pass, 0 fail (33 before).$.ui.statusin the band; next cost warm and cold; ping-off reasons (40 characters at most) and no raw codes; agent chips including dim cold ones and the pinged↻; weekly tip only when stale;hidereversible; pane sections present and omitted; ping button, ping-off and last result in the pane; money format table.go test ./context-guru-plugin/...with a privateTMPDIR: ok, 337 s, run on this commit's tree before the last small edits (a test import,gofmt, one docs table). A targeted run of the status line, ping, cache-state, panedata, tip and docs tests passed after them.⏳),cachestatestale flag,panedata,tip, and the money table on both sides.python3 -m unittest test_tv test_costly: 36 and 47 OK.Test host note. On a host that exports
CLAUDE_*andANTHROPIC_*variables, 4 tests fail on unmodifiedorigin/main:TestCGGoldens,TestCostlySettingsGoldens,TestSaveMoreDefaultIncludesTheSettingsCard,TestSaveMoreWidthASCIIAndColour. They pass with those variables removed. This PR does not cause them.Technical notes
cg.pyis vendored intocodex-marketplace/plugins/context-guru/scripts/. The copy is updated, andcg.py tipreturns an empty list there (no status line in that plugin).statusline.py:stale_commands()is the one weekly-tip rule._tip_segmentandcg.py tipboth use it. The tvlib mode rows moved tocg.py panedata; the math is the same._fetch_jsontakesmax_age=Nonefor the cache state, so an old copy is served. Other reads keep the 10 minute ceiling.Textis an inline element in this engine. A Fragment inside aTextmade the band tree invalid ("Box inside an inline element"), so the band uses plain conditionalTextchildren.🤖 Generated with Claude Code