Skip to content

feat(ui): lead with the meat mark and drop the tree for single-file reviews - #19

Merged
jfyne merged 1 commit into
masterfrom
feat/single-file-layout
Aug 3, 2026
Merged

feat(ui): lead with the meat mark and drop the tree for single-file reviews#19
jfyne merged 1 commit into
masterfrom
feat/single-file-layout

Conversation

@jfyne

@jfyne jfyne commented Aug 3, 2026

Copy link
Copy Markdown
Owner

What changed

Header now leads with the meat mark. ai.png (the robot sticker) is replaced by logo.png. The old .header-avatar was a 56px circle with object-fit: cover, which would have sliced off the die-cut white outline that makes the mark read as a sticker — it's now object-fit: contain in a 72px box, with a -10px block margin absorbing the artwork's transparent top and bottom bands so the header ends up 6px shorter than before rather than taller.

With that swap ai.png had no remaining reference, so its embed directive, avatarBytes, and the Avatar template field are gone and the file is deleted.

Sidebar footer removed. The .sidebar-brand block is out of the template, along with its CSS and the .brand / .logo rules that only it used.

Single-file reviews hide the left column. New (*ReviewModel).SingleFile() counts DiffFiles in diff mode and Files otherwise. At 1 the <aside> isn't rendered at all — no collapse chevron, no resize handle, no --sidebar-width style — and .workspace gets no-sidebar. The filename stays in the column header, so nothing is lost.

Markdown measure centres when the sidebar is gone. .md-block's 980px max-width is a good reading measure, but left-aligned in a full-width panel it left a growing right gutter. The padding goes on .markdown-file-preview rather than as margin-inline: auto on the blocks — list items sit inside a <ul>/<ol> wrapper, not directly in the container, so auto margins would have centred each item within its list and drifted every bullet out of step with the headings.

Two things worth a reviewer's eye

  • The max-width: 900px block needs its own .workspace.no-sidebar override. That media query sets grid-template-rows: auto 1fr for the stacked tree-above-file layout; without the override the file would be squashed into the auto row with no tree to justify it.
  • The new tests assert on markup, not layout. The CSS changes were verified in the browser instead — single file, multi-file, collapsed sidebar, 480px narrow, and markdown with a list item selected.

Testing

Three tests added in http_render_test.go: single-file, multi-file, single-file-diff. gofmt, go vet, and the full suite pass.

🤖 Generated with Claude Code

https://claude.ai/code/session_0134abbE1ZayWc3qeFMeXEZN

…eviews

Replace the robot avatar in the header with the meat logo, rendered with
object-fit: contain so the die-cut outline survives — the old circular
cover crop would have sliced it off. ai.png had no remaining reference
afterwards, so its embed and plumbing go with it.

Remove the meatcheck logo and wordmark from the foot of the sidebar,
along with the .brand and .logo rules that only it used.

Hide the sidebar entirely when the review covers one file: there is
nothing to navigate, so the aside is skipped and the workspace collapses
to a single column. The narrow-viewport rule needs its own override
because the stacked layout reserves an auto-sized row for the tree.

With no sidebar, the markdown preview's 980px measure is centred rather
than left-aligned. The padding sits on the container, not the blocks, so
list items — which live inside a <ul>/<ol> wrapper — stay in step with
the headings around them.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0134abbE1ZayWc3qeFMeXEZN
@jfyne
jfyne merged commit ebd6210 into master Aug 3, 2026
1 check passed
@jfyne
jfyne deleted the feat/single-file-layout branch August 3, 2026 09:05
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