Repository navigation
fix(dashboard): re-order the Inventory tab to the reader's five questions - #172
Conversation
…ions
The owner's verdict on this tab was "it's too loaded and users cannot
understand anything from it", against a build in which every feature they
asked for already existed. So this changes no feature: it changes the order
and the weight.
Measured before, at 1440x900 over a 30-session corpus: 8,402 px, 9.3 screens,
2,280 words, and 1,964 px of it — five of the first six blocks — carrying no
atom a reader can act on. The first name on the page was at 2,552 px. The
panel answering the most specific ask, the system prompt broken into the
regions that own it, was 254 px and rendered nothing until clicked, while the
panel that merely summarised the same prefix into five legend numbers had
1,005 px: the summary of the prompt was four times the size of the prompt.
The projection ($2.16) sat in 100 pt type in the first screen and its outcome
("what we actually saved") 155 px at 66% depth, so the reader never met the
pair. The same 39 declarations were re-answered at four granularities across
5,436 px of four tables and 31 columns.
What changed, in the reader's order:
- The decision comes second, after the headline: the named groups, each with
what it is worth across every session that carried it AND per session, in
that order, with the command that removes it. A "Do this" block leads it
with the ordered names and one combined snippet per mechanism, built by
merging the server's own removal documents rather than composing syntax
here.
- Every group card now renders its benefit, its cost and a signed net as one
component (DESIGN 3.7). The cost — one prompt-prefix rebuild at
cache-creation rates — existed only in the third paragraph of a collapsed
note, so eleven cards each led with a dollar to save and none showed the
dollar it costs to save it. On this corpus the net is negative over the
first session for every group.
- "Realized by your removals" moves next to the projection. Honesty rule 2
was right and was executed as size, which hides a claim rather than
distinguishing it; adjacency distinguishes it, and the empty state is now
one line instead of a panel.
- The composition panel is deleted and its bar moves into the prompt panel,
which now renders all 63 regions and the system prompt's 17 named parts
without a click, grouped by owner, each with its share drawn. One panel,
one denominator, the bar above the thing it summarises.
- The four re-answers (flat table, per-server rollup, skills table,
self-removals, per-token rates) fold, each stating its own row count on the
closed summary. Nothing is deleted.
The per-skill opt-out switch is rendered inert with its reason stated:
internal/skills/skills.go drops 15 of this corpus's 39 skills into the
previous surviving row, so POST /api/toolfilter would remove a run of skills
and report one. The skillOverrides snippet never touches that parser and is
the route the page leads with. SKILL_SWITCH_SAFE flips when the parser fix
lands.
After, same corpus and viewport: 7,139 px (-15%), 7.9 screens, 2,074 words,
first name at 808 px (-68%), five named things with their figures in the
first screen where there were none, 648 px of zero-atom blocks, 63 prompt
regions and 17 system-prompt parts rendered at load where there were none.
Long tasks over 50 ms: 62 ms -> 0. No horizontal body scroll at 390, contrast
0 failures over 16 pairs in both themes, no focus stop without an indicator,
touch targets under 44 px 73 -> 43. go test ./dash/ passes; every existing
data-testid is kept.
Signed-off-by: Osher-Elhadad <[email protected]>
…page at 390 Re-measured on the seeded 200-session corpus (16,444 requests, 69,062 declarations, 132 distinct MCP tools, $247.20 of never-called tokens) rather than the 30-session replay, and three things fell out of the realistic table size that the small corpus hid. The name is the row's identity. This page exists so a reader can decide whether to remove the capability a row names, so a clipped name is not cosmetic: it is two rows a reader cannot tell apart while being asked to delete one. Nine names clipped at 34ch, all of the form mcp__playwright__browser_network_requests. Fixed by dropping the mcp__<server>__ prefix wherever the row already shows its server in its own cell (the prefix is the part that distinguishes nothing, and these names differ at the END, which is exactly what an ellipsis eats), keeping the full name in title, and letting whatever is still long wrap instead of truncate. Nine clipped names becomes zero, and it stays zero with all 815 disclosures forced open. The page scrolled sideways 159 px at 390 on origin/main — the removal snippet asserts min-width 260px, and 22rem for the folded one, inside a card already nested in two levels of padding, while its own <pre> scrolls internally. Zero on narrow screens: body scrollWidth 549 -> 393 with no element in the view past the viewport edge. A long run of prompt regions folds its tail. 132 MCP tools puts 72 regions in one owner group, so the heaviest twelve stay open and the rest fold with their count and share stated — the same shape as the decision list's tail. Two honesty fixes found by rendering real mixed-pricing data: - The system-prompt tile said "System prompt" over what the server computes as the MAXIMUM across captured sessions. This panel now gives that figure more room than it had, so an unqualified label would be a redesign promoting a max as a typical value. It reads "System prompt — largest seen", "the biggest of 170 recorded, not a typical one". - A group whose sessions include an unpriced model rendered n/a with the reason "this scope has no model rates", which is false on a corpus that has a price list and 17 unpriced sessions out of 200. An n/a whose stated reason is wrong is worse than an unreasoned one. It now names the actual absence. Verified on the corpus: 20 n/a marks, every one carrying a reason in both title and aria-label; 313 unpriced pills where the bob/premium tier has no rates; and the 24 remaining $0 cells are rows whose "read for nothing" is literally 0, identical on both builds — a true zero, not an unknown. Before/after, same corpus, both proxies, one browser: 14,920 -> 8,101 px (-46%), 16.6 -> 9.0 screens, 3,653 -> 2,207 words (-40%), first named thing 2,569 -> 823 px (-68%), 0 -> 4 named things with their figures in the first screen, 0 -> 96 prompt regions rendered at load, 2,151 -> 0 elements past the 390 px viewport, 9 -> 0 clipped names, contrast 0 failures in both themes, no focus stop without an indicator. go test ./dash/ passes. Signed-off-by: Osher-Elhadad <[email protected]>
…eliberate ellipsis Three changes, one of them a revert of my own. REVERTED: the `#view-tools .comp-name.trunc` override that made long names wrap instead of ellipsis. `.trunc` is deliberate, non-lossy truncation — style.css caps it at 34ch and tools.js builds every one of those spans with `title: t.name`, so the value is reachable and nothing is unreachable. Overriding it was fixing working code and losing the ellipsis. The audit finding that sent me there was a false positive of the same shape as the visually-hidden idiom already on the harness's known-false-positive list, and my own probe reproduced it: its predicate tested `scrollWidth > clientWidth` without checking for `text-overflow: ellipsis` together with a `title`. Corrected to `textOverflow === 'ellipsis' && el.title`, the count is 0 before and 0 after — there was never a clipping defect on this tab. shortName() STAYS, on usability grounds rather than accessibility. Every tool of one MCP server shares the `mcp__<server>__` prefix, it consumes most of the 34ch budget, and these names differ at the END — so a reader comparing two rows of the same server sees two identical strings and has to hover each one to tell them apart. A title makes a value reachable; it does not make rows distinguishable at a glance, which is what a table is for. FIXED, and it closes the BRIEF's hard constraint: the page body no longer scrolls horizontally at 390. It was +159 px on origin/main and +3 px after my grid work, and the +3 px was mine. Attribution, because "no element accounts for it" is not a diagnosis: hiding each top-level panel in turn pinned it to the tile band, and a scan of scrollable overflow rather than bounding rects pinned it to `div.v` inside the Avoidable tile — the unpriced fallback renders `645,662,264 tok`, 15 unbreakable characters of 26 px mono, 175 px of content in a 143 px tile. compact() is this file's own convention for exactly these counts (see readTd) and one word fixes it: `646M tok`. The exact figure is in the tables below it. Measured: body scrollWidth 549 -> 390 at 390 px, zero elements past the viewport edge by either bounding rect or scrollable overflow, both themes. 1440 unchanged at 1440. go test ./dash/ passes. Note for reviewers of the metric: a bounding-rect scan and a scrollWidth check disagree whenever content overflows an `overflow: visible` box, because only the second sees it. That is not a harness gap; it is two different questions, and the second one is the one the constraint is about. Signed-off-by: Osher-Elhadad <[email protected]>
…n, not totals.priced `totals.priced` is false whenever ANY part of the population is unpriced, so on a corpus with 17 unpriced sessions out of 200 it is false in steady state and never flips — while `totals.unused_usd` is a correct $247.20. Two tiles gated their dollar on that flag, so the correct figure rendered as "645,662,264 tok / no dollar: some models here are unpriced", permanently. A number that is right, shown as unknown, is its own kind of dishonesty, and this change had made it worse by moving that figure into the reader's first screen. Both now gate on the priced POPULATION, which is what the dollar actually covers, and name it: coverage.sessions minus coverage.unpriced_sessions. The headline reads "$247.20 — if none of it had been carried, over the 183 of 200 sessions that ran on a priced model". Only when NOTHING is priced does the token fallback apply, because then there is no subset to report and a $0 over an empty set would be a claim. Per-row and per-group dollars are untouched: they already consult their own row's `priced`, which is the right flag at that scale, and they still render `unpriced` through money() rather than a $0 — 313 of them on this corpus. Second defect the same change fixes: the skills-listing cost tile said "unpriced" where the honest answer is "$0". unused_listing_reads is 0 here because every session carrying a listing invoked at least one skill, so the listing was never waste. It now reads $0, which agrees with the "Listing read for nothing: 0" tile beside it, instead of claiming ignorance we do not have. No new field, no client-side derivation — both figures already ship in coverage. The 390 px constraint is closed, confirmed by shots.mjs now that it has a readiness gate, on a rendered view in all four theme x viewport combinations: origin/main reports clippedOff 48, reachOver 4, bodyScrollsX YES +159px against 1,547 text nodes; this branch reports 0, 0, no. textClip is 0 on BOTH, which confirms the .trunc ellipses were never a defect. Signed-off-by: Osher-Elhadad <[email protected]>
Update — two corrections since opening, both in the honesty path1. That flag is false whenever any part of the population is unpriced, so on Both now gate on the priced population —
Per-row and per-group dollars are untouched: they consult their own row's The same change fixed a second one in the opposite direction: the skills-listing cost tile said 2. The 390 px constraint is closed — confirmed by
Provenance of the px/atom table, since the readiness bug invalidated other numbers on this sweep: it came from
|
Update 2 — a retraction, two cherry-picks, two deletionsI retract the Isolated properly (injecting each rule's pre-fix value back with What actually locks the default state at 390 is the folding — the 1,221 px flat table is no longer rendered at load — plus So: two deletions and two cherry-picks.
Final,
Two tabs still fail the constraint and are not this PR's: One residual documented rather than fixed: with all 815 disclosures forced open — a state no reader reaches by clicking — the body reads 397 px with 11 offenders rooted at px/atom table re-taken on this build and unchanged: 14,741 → 7,936 px, 3,653 → 2,219 words, 356 → 358 atoms ( |
…eir attribution
I credited 549 -> 393 px at 390 to `.inv-removal { min-width: 0 }`. That was
wrong: the two numbers came from two different builds, and I attributed the
delta to the rule I had just added rather than isolating it. Isolated properly
— injecting each rule's pre-fix value back with !important, on one page, in
both the default and the fully-expanded state — all of it is a no-op on this
branch:
default state, all three rules disabled: 390 px, 0 offenders
expanded state, all three rules disabled: 397 px, same 11 offenders as with
them enabled
What actually locks the default state at 390 is the folding (the 1,221 px flat
table is no longer rendered at load) plus compact() on the unpriced tile value.
impl-perf independently measured my min-width rule a no-op on its corpus too,
so it is a no-op on both and it goes.
The summary white-space rule goes with it as a duplicate: impl-perf's 65e7b6d
owns that fix, measured against the 414 px "Remove just
mcp__postgres__describe_table" line, and carries the comment about the
source-order trap that makes it work. One rule, one owner.
Signed-off-by: Osher-Elhadad <[email protected]>
…x constraint Correcting my own correction. I reported that impl-perf's three `minmax(0, 1fr)` tracks were a no-op on this branch, on the strength of an isolation test that injected each rule's pre-fix value back with `!important` and read `body.scrollWidth`. That test is unsound: actually removing the commits gives a different answer. Two builds, same corpus, same harness, back to back, only those two commits differing: with 9fc2835 + 65e7b6d tools @390: clippedOff 0, reachOver 0, no without them tools @390: clippedOff 48, reachOver 4, YES +159px So the tracks ARE load-bearing here, my "no-op" claim was wrong, and impl-perf's original measurement stands unamended. I do not know why the `!important` simulation reported 390 — most likely an explicit `auto` track is not equivalent to the implicit one it replaced — but the mechanism does not matter next to the result: simulating a revert is not reverting it, and I should have rebuilt. The cherry-picks are dropped anyway, because ownership is the better argument and it is impl-perf's call on its own rules: #169 is where they are measured against `main`, and one rule wants one owner. The consequence is a real dependency rather than a masked one: THIS BRANCH MUST NOT MERGE BEFORE #169. On its own it reports clippedOff 48 and bodyScrollsX +159px at 390 on the Inventory tab, which violates the BRIEF's hard constraint. With #169 in, all four theme x viewport combinations report 0 / 0 / no. My own two rules stay deleted: those really were no-ops, measured by both of us independently, and dropping them is not what broke this. No file changes. This commit exists so the dependency is in the history and not only in a PR comment. Signed-off-by: Osher-Elhadad <[email protected]>
e1c3b34 to
a8eb181
Compare
|
The owner's verdict on this tab was "it's too loaded and users cannot understand anything from it" — against a build in which every feature they asked for already existed. So this adds no feature and removes none. It changes the order and the weight.
Measured, on the seeded 200-session corpus
seed/v2: 16,444 requests, 69,062 declarations, 132 distinct MCP tools, 170/200 sessions captured, 17 unpriced, $247.20 of never-called tokens. Both sides measured by one browser against two proxies on identical copies,MODEL_PRICESset and the janitor disabled.inv0901-value.mjs)scrollWidth@390The sharpest one: the panel that merely summarised the prefix into five legend numbers had 968 px while the prefix itself had 254 px and rendered nothing until clicked. The summary was four times the size of the thing it summarised. It is deleted and its bar now lives in the panel it was summarising.
What changed, in the reader's order
removaldocuments — never by composing syntax here.The price of ask 3, stated as a price
The user asked to see their system prompt without hunting for it. That costs +193,776 bytes and one extra API call on every Inventory load, because
/api/promptis now fetched at render rather than on a click. DOM nodes 2,900 → 3,850 andwarmSwitchMs65 → 116 ms. Pulling the other way,longTasks > 50 mswent 62 ms → 0 — folding four tables removed the big synchronous render. Assets:tools.js+30.3 KB raw / +10.3 KB gzipped,tools.css+9.2 KB / +2.7 KB, mostly comments./api/promptreturns full text for every region when level 1 needs only names and weights; a?meta=1shape would remove nearly all of this, and that is a server change.Gated, deferred, and not mine
SKILL_SWITCH_SAFE = false, reason stated visibly once above the list.internal/skills/skills.gofolds name-only listing entries into the previous surviving row, soPOST /api/toolfilterwould remove a run of skills and report one. TheskillOverridessnippet never touches that parser and is the route the page leads with. Depends on fix(dash): four defects that cause a wrong action, not a wrong number #168 (fix/dash-acts-on-wrong-data-0901).listing_tokensdouble-count workaround stays. fix(dash): four defects that cause a wrong action, not a wrong number #168 is not inmainas of3697f3c—declTok/unusedTokare still double-added atdash/toolapi.go:573/598/617. I own its deletion in a follow-up once fix(dash): four defects that cause a wrong action, not a wrong number #168 merges; until then the headline tile still reads ~15 % above what the bar's segments sum to, by construction and not by accident.prompt.sessionscounts rows not sessions (toolapi.go:561) and three of Claude Code's own MCP tools are missing frombuiltinTools. impl-safety confirmed neither is in its scope. These have no owner.Verification
go test ./dash/passes;dash/uiinventory_test.go's nine static checks are green and every existingdata-testidis kept. Contrast: 0 failures over 16 pairs, both themes, 14 new pairs measured with the bundled validator (worst 3.13:1 on a non-text bar against a ≥3 gate). 20n/amarks, every one with a reason in bothtitleandaria-label; 313unpricedpills wherebob/premiumhas no rates; the 24 remaining$0cells are rows whose "read for nothing" is literally 0 — identical on both builds, a true zero. Focus: 40 stops, 0 without an indicator.Two instrument corrections that changed my own numbers.
shots.mjswaits for the nav rather than the view, so on this corpus it audits the loading skeleton — all 8 runs returned0/3/15off four grey bars, and its numbers aren/aon both sides. And itstextClipcheck cannot tell a deliberate ellipsis from a broken one; with the correct predicate (textOverflow === 'ellipsis' && el.title) the count is 0 → 0, so there was never a clipping defect here. I had "fixed" it and reverted that.shortName()— dropping the redundantmcp__<server>__prefix where the row already shows its server — stays on usability grounds: those characters are identical across every row of a server and the distinguishing part is at the end. Both reported to infra-harness.