Skip to content

(Claude) Minimal theme: hoverable role labels, matching expand-all controls, bounded images - #349

Merged
cboos merged 6 commits into
mainfrom
dev/minimal-fixes
Oct 7, 2026
Merged

cboos merged 6 commits into
mainfrom
dev/minimal-fixes

Conversation

@cboos

@cboos cboos commented Oct 7, 2026 •

Copy link
Copy Markdown
Collaborator

Small visual fixes to the minimal theme, 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:

  • The tooltip sat on a hidden element. When a tool's title is only its name (common for MCP tools), the title line is hidden (.mn-title.mn-generic), and that hidden span carried the only title. call_title now also returns role_tooltip, which the role label carries in that case (full name plus ID: toolu_…). Titles that are just a role (Thinking, Assistant, User) add none.
  • The label could be covered. A pair's first card is often shorter than its role line, which then overflows into the next card; that card, later in the DOM, sat on top and swallowed the hover. .mn-role gets z-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.js gives a truncated .mn-role its full text as title on 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 to 0.72em on #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 gets max-width: 100%; height: auto, at zero specificity (:where), so rules that size an image on purpose (the inline favicon's 1em) still win.

Tests

  • test_minimal_theme.py: role_tooltip is set only when a hidden title said more than a bare role.

  • test_minimal_components_browser.py, on a small synthetic transcript:

    • a name-only title moves its tooltip to the role label;
    • every role label is hoverable (elementFromPoint at its centre), at 1400px and 420px;
    • a truncated label gets its full text on hover, a short one stays bare;
    • every expand-all control, in a table and at a result's top level, computes to one font;
    • a Markdown image from a 3000px-wide file fits its message.

    Each new test fails with its fix reverted.

  • Snapshots: only the three minimal blocks 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

  • New Features
    • Truncated role labels reveal their full text on hover, while existing tooltips remain unchanged.
    • When a title is hidden, its additional information is available through the role label’s tooltip.
  • Style
    • Transcript images stay within their message column while preserving their proportions.
    • Tool-parameter expand and row-toggle controls share consistent italic monospace styling.
    • Role labels remain accessible to hover when transcript cards overlap.

@coderabbitai

coderabbitai Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: e53ea87a-49cb-4fe3-a23f-2b988960550f
📥 Commits

Reviewing files that changed from the base of the PR and between 8695638 and 19aaf8a.

📒 Files selected for processing (4)
  • claude_code_log/html/templates/transcript.html
  • test/__snapshots__/test_snapshot_html.ambr
  • test/test_minimal_components_browser.py
  • test/test_minimal_theme.py

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review.


📝 Walkthrough

Walkthrough

The 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.

Changes

Minimal Theme Transcript Updates

Layer / File(s) Summary
Role-label tooltips
claude_code_log/html/minimal_theme.py, claude_code_log/html/templates/transcript.html, claude_code_log/html/templates/components/minimal/minimal.js, claude_code_log/html/templates/components/minimal/layout.css, test/test_minimal_theme.py, test/test_minimal_components_browser.py, test/test_data/minimal_showcase/*, dev-docs/css-classes.md, test/__snapshots__/test_snapshot_html.ambr
call_title returns a role_tooltip for qualifying hidden titles. The transcript renders it on .mn-role. On hover, browser code adds the trimmed label as a tooltip only when the label is truncated and has no existing title.
Transcript image sizing
claude_code_log/html/templates/components/minimal/components.css, test/test_minimal_components_browser.py, test/__snapshots__/test_snapshot_html.ambr
Images fit within their message column and preserve their aspect ratio. Browser tests check that a wide image stays within the message boundary.
Tool-control styling
claude_code_log/html/templates/components/minimal/components.css, test/test_minimal_components_browser.py, test/__snapshots__/test_snapshot_html.ambr
Expand-all and row-toggle controls share italic monospace styling with a size set through the inherited --mn-ctl property.

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
Loading

Suggested reviewers: daaain

Merge Risk: ⚪ Minimal · up to 19aaf

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)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning 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: … Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely summarizes the three main visual changes: hoverable role labels, consistent expand-all controls, and bounded images.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

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.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@daaain

daaain commented Oct 7, 2026

Copy link
Copy Markdown
Owner

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

@cboos

cboos commented Oct 7, 2026

Copy link
Copy Markdown
Collaborator Author

(Claude) To see these fixes visually, this PR now carries a small synthetic fixture, test/test_data/minimal_showcase/. Render it with:

uv run claude-code-log test/test_data/minimal_showcase --theme minimal --no-cache -o showcase.html

Then open showcase.html. Use the Interleaved and Columns views; in Main only the agents are folded.

  • Truncated role labels show their full text on hover.
    • The first tool's gutter label is cut off as mcp__plugin…. Its title is only its name, so that line is hidden, and the label now carries the tooltip: the full name plus ID: ….
    • ScheduleWak… has a visible title of its own, and gets its full label on hover.
  • The label isn't covered by the next card. The second mcp__plugin… row is a bare call with a short result. Its role line overflows into the result card, and hovering it still works.
  • "expand all" controls look alike. The first tool's JSON result folds at the result's top level. Its "expand all" and the nested "expand all properties" / "expand all rows" are now the same italic mono at the same size, wherever they sit.
  • Images stay in their frame. The first agent ("Survey the web module") answers with a 1600 px wide Markdown image. In Columns it scales down to fit its column instead of spilling across the next one.

TestShowcaseFixture in test/test_minimal_theme.py pins that each of these elements stays in the fixture.

@cboos

cboos commented Oct 7, 2026

Copy link
Copy Markdown
Collaborator Author

Images stay in their frame

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.

cboos and others added 6 commits October 7, 2026 20:55
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>
@cboos
cboos force-pushed the dev/minimal-fixes branch from 8695638 to 19aaf8a Compare October 7, 2026 19:00
@cboos
cboos merged commit b079f75 into main Oct 7, 2026
17 checks passed
@cboos
cboos deleted the dev/minimal-fixes branch October 7, 2026 20:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants