Skip to content

Cockpit code-mode IDE polish + sidebar + theme-aware syntax#578

Merged
blove merged 1 commit into
mainfrom
claude/cockpit-code-polish
Jun 5, 2026
Merged

Cockpit code-mode IDE polish + sidebar + theme-aware syntax#578
blove merged 1 commit into
mainfrom
claude/cockpit-code-polish

Conversation

@blove
Copy link
Copy Markdown
Contributor

@blove blove commented Jun 5, 2026

Summary

Follow-up polish to the Code-mode file tree (#570), making Code mode read like a real editor and tightening the sidebar/docs to match the marketing website.

Code mode

  • Editor-style code pane: removed the doc-codeblock chrome (filename header, language chip, Copy button), transparent background, full-bleed under the tab strip — the Shiki body now reads like an editor, not a card.
  • Shiki dual-theme (github-light / tokyo-night): light mode was unreadable (Tokyo Night colors on a cream background); now each theme gets its own palette, swapped via --shiki-dark on [data-theme="dark"].
  • Horizontal scroll fix: the shell's outer grid lacked column constraints, so long code lines blew past the viewport. Added grid-cols-[minmax(0,1fr)] + pane overflow-x: auto so long lines scroll inside the pane.
  • Zed-style folder chevrons (SVG, rotate-on-expand) in the file tree.

Chrome + sidebar

  • Mobile header: single justify-between row — hamburger left, mode switcher top-right (was stacking vertically).
  • Left-aligned Docs/API prose (removed margin-inline: auto) to match the website docs.
  • Sidebar: removed the "cockpit" logo qualifier; bg-only active/hover (no left border); website-matched neutral hover (--ds-surface-dim = rgb(245,245,245), the exact value the website docs nav uses); group chevron now matches the file tree.

Test plan

  • nx test cockpit green (22 files / 96 tests).
  • Code mode at ≥1024px: long lines scroll horizontally inside the pane; no page overflow.
  • Toggle theme: light mode syntax is readable (github-light); dark stays tokyo-night.
  • Sidebar: hover shows neutral gray bg (matches website docs); active shows accent tint; folder/group chevrons rotate on expand.
  • Mobile (<768px): hamburger left, mode switcher top-right.
  • Docs/API left-aligned.

🤖 Generated with Claude Code

Code mode:
- Editor-style code pane: drop the doc-codeblock chrome (filename header,
  lang chip, Copy button), transparent bg, full-bleed under the tab strip
- Shiki dual-theme (github-light / tokyo-night) so light mode is readable;
  swap to --shiki-dark via CSS on [data-theme="dark"]
- Fix horizontal overflow: shell grid grid-cols-[minmax(0,1fr)] + pane
  overflow-x auto so long lines scroll inside the pane
- Zed-style folder chevrons (SVG, rotate-on-expand) in the file tree

Chrome + sidebar:
- Mobile header: single justify-between row (hamburger left, mode switcher
  top-right)
- Left-align Docs/API prose (remove margin-inline auto) to match the website
- Sidebar: remove "cockpit" logo qualifier, bg-only active/hover (no left
  border), website-matched neutral hover (--ds-surface-dim), file-tree chevron

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented Jun 5, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
threadplane Ready Ready Preview, Comment Jun 5, 2026 6:53pm

Request Review

@blove blove merged commit 45d9420 into main Jun 5, 2026
3 checks passed
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.

1 participant