Repository navigation
(Claude) Minimal theme: hoverable role labels, matching expand-all controls, bounded images - #349
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (4)
Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review. 📝 WalkthroughWalkthroughThe minimal theme now provides tooltips for qualifying role labels, constrains message images to their columns, and applies consistent styling to tool-parameter controls. Tests, snapshots, documentation, and showcase fixtures cover these changes. ChangesMinimal Theme Transcript Updates
Priority: ⬇️ Low Estimated code review effort: 3 (Moderate) | ~20 minutes Change: Bug fix Sequence Diagram(s)sequenceDiagram
participant call_title
participant transcript_template
participant minimal_js
call_title->>transcript_template: provide role_tooltip for qualifying hidden titles
transcript_template->>minimal_js: render role label with title when provided
minimal_js->>minimal_js: on hover, set trimmed text when truncated and title is absent
Suggested reviewers: Merge Risk: ⚪ Minimal · up to This change adds hover tooltips for role labels, matching expand-all control styling, and bounded image widths in the minimal theme. It poses no identified production risk and is ready to merge after normal checks. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 55.56% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 18 functions across 4 files. (2 skipped: 2 unsupported.)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
These sound great! Should we also add some (synthetic) transcript examples that reproduce the issue? It's always tricky to visually test when my own transcripts don't have the full diversity |
|
(Claude) To see these fixes visually, this PR now carries a small synthetic fixture, uv run claude-code-log test/test_data/minimal_showcase --theme minimal --no-cache -o showcase.htmlThen open
|
Of course, a follow-up could be to enlarge it on click, using one of the many usual ways to have an image zoom pop-up. |
A tool whose title is only its name (e.g. a long `mcp__…` tool) has its title line hidden, and the title span carried the only tooltip, so the ellipsized name in the gutter showed nothing on hover. `call_title` now returns `role_tooltip` for that case, and the role label carries it. Bare-role titles (Thinking, Assistant, User) add none. The label was also unreachable on any pair whose first card is shorter than its role line: the line overflows into the next card, which sits on top and swallows the hover. `.mn-role` gets `z-index: 1`, above the cards and below every sticky bar. The nested "expand all <kind>" toggle now matches the table's own "expand all": italic mono, and the same rendered size. It sits inside the table's 0.8em (nested tables don't compound it), hence 0.9em. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A fold's "expand all rows/properties" button also sits at a result's top level (e.g. a ToolSearch list of tool references), not only inside the 0.8em params table, so the 0.9em ratio made it 12.6px there. Both expand-all buttons now take one registered length, `--mn-ctl`, resolved to 0.72em on #transcript: a registered <length> computes where it is declared and inherits as that value. A gutter label whose title line stays visible (e.g. a plugin's own title) had no tooltip, yet is ellipsized when the tool name is long. Only the rendered width tells, so minimal.js gives an ellipsized `.mn-role` its full text as `title` on first hover; a label that already has the server's role_tooltip keeps it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
An <img> from rendered Markdown (e.g. a diagram in a file a Read tool returned) has no class of its own, and nothing bounded it: it spilled out of the message and across the neighbouring column. Every image in a message now gets max-width: 100% and height: auto, at zero specificity (:where), so a rule that sizes an image on purpose, like the inline favicon's 1em, still wins. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
test/test_data/minimal_showcase/ is one synthetic session with two
sub-agents, built to show the minimal theme's gutter labels, expand-all
controls and image sizing in one page:
- An MCP tool with a long name and a short input: its title has nothing
left to show, so the ellipsized role label carries the tooltip. Its
result is a JSON object (scalars, a Markdown string and a list of six
records), so the table's own "expand all" appears together with the
folds' "expand all properties" and "expand all rows".
- A bare MCP call whose result is "done": a pair whose first card is
shorter than its role label, which overflows into the next card.
- ScheduleWakeup, whose title stays visible while its label is cut off,
so the label gets its full text as a tooltip on hover.
- An assistant spawning two agents: the first answers in Markdown with a
1600px-wide image, the second runs a Grep, so the Columns view has two
columns to compare.
Render it with:
claude-code-log test/test_data/minimal_showcase --theme minimal
A unit test renders the fixture and checks that each case is still
present, so it can't silently rot. No snapshot is added.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The short-first-card hover and ScheduleWakeup's truncation tooltip only show in a browser; assert their rows are still rendered, so trimming the fixture can't drop them silently. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
8695638 to
19aaf8a
Compare
Small visual fixes to the
minimaltheme, found while viewing real transcripts with workflows, teammates and long MCP tool names.Role labels show their full text on hover
A long tool name is ellipsized in the gutter, and hovering it showed nothing, for two reasons:
.mn-title.mn-generic), and that hidden span carried the onlytitle.call_titlenow also returnsrole_tooltip, which the role label carries in that case (full name plusID: toolu_…). Titles that are just a role (Thinking, Assistant, User) add none..mn-rolegetsz-index: 1, above the cards and below every sticky bar.When the row's own title stays visible (e.g. a plugin-provided title), the label can still be ellipsized; only the rendered width tells, so
minimal.jsgives a truncated.mn-roleits full text astitleon first hover. Nothing is added to the HTML for labels that fit."expand all" controls look alike
The table's own "expand all" and a fold's "expand all rows/properties" are now both italic mono at the same size. A fold's button sits either inside the params table (0.8em) or at a result's top level (e.g. a list of tool references), so a fixed ratio could not match both. The size is one registered length,
--mn-ctl(@property,<length>), set to0.72emon#transcript: a registered length computes where it is declared and inherits as that value.Images stay inside their message
An
<img>from rendered Markdown (e.g. a diagram in a file a Read tool returned) had no size bound and spilled across the neighbouring column. Every image in a message now getsmax-width: 100%; height: auto, at zero specificity (:where), so rules that size an image on purpose (the inline favicon's1em) still win.Tests
test_minimal_theme.py:role_tooltipis set only when a hidden title said more than a bare role.test_minimal_components_browser.py, on a small synthetic transcript:elementFromPointat its centre), at 1400px and 420px;Each new test fails with its fix reverted.
Snapshots: only the three
minimalblocks change, by the CSS/JS above plus one role label gaining its hidden title's tooltip (🚨 Error · ID: …).🤖 Generated with Claude Code
Summary by CodeRabbit