cmux-next markdown: the toolbar spans the page again (layout pass)

Merged
TE
15d ago
+3-1

Layout pass: running list

Running list of defects from the layout pass, with where each one goes. āœ… = this PR, āœ” = merged.

  • āœ” #22785 Settings: the Undo bar covered the last row; group titles and density names didn't line up
  • āœ… Markdown: the toolbar shrank to its content (border stopped at ~286px, "README.mdSaved")
  • Next (this lane): chief-inspector orange latency bars, quick-surface transcript with no inset, harnesses rows without an icon, combobox gallery stretch, agent-activity broken-image glyphs, diff page's black file bars
  • Handed off: transcript-density, message-actions, prompt-queue-edit, composer-scroll, activity-indicators, context-menus, newtab lanes; Cloud (#22772) and Changelog (#22810) are being reworked in open PRs

Summary

.ui-toolbar (ui.css, display: inline-flex) and .md-toolbar (display: flex) had the same specificity, so the stylesheet that loaded last won. In the gallery bundle that was ui.css, so the toolbar shrank to fit its content: its bottom border stopped about 286px in, and the file name ran into "Saved" because .md-file's flex: 1 had no room to grow. The rule now sits under its host (.md-toolbar-host > .md-toolbar), so it wins whatever order the bundle loads the stylesheets in. [data-cmux-md-toolbar="false"] still hides the toolbar, since that rule is more specific.

Screenshots

BeforeAfter
420px
1200px

Testing

  • scripts/web-lint.sh passed.

Observed / Not run

  • Observed: before/after captures from the Linux gallery (Chromium, dark), at 420 and 1200px.
  • Not run: the Mac app. I didn't check whether the app's own bundle loads the stylesheets in the same order. The fix holds either way.

Changelog

  • Fixed: the Markdown viewer's toolbar spans the whole page again, and the file name no longer runs into "Saved".

šŸ¤– Generated with Claude Code

Agent session: huge-blue