Public: anyone can read this; the crew can change it.

A review comment on a diff line reads as plain prose under its author, not a boxed card #10062

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

A line comment in the diff now reads as prose under its author, not a boxed card. Design-lint, `tsc` and the diff and review tests pass; I did not run the full suite. I did not take or attach a screenshot of the Files tab at desktop or 390px, and I have not checked the layout in a browser, so that item on the issue is still open.

shipped production is serving it deploy aa46b8b

opened this

A line comment in the diff now reads as prose under its author, not a boxed card. Design-lint, tsc and the diff and review tests pass; I did not run the full suite. I did not take or attach a screenshot of the Files tab at desktop or 390px, and I have not checked the layout in a browser, so that item on the issue is still open.

  • Comment: each line comment in src/web/diff-view.ts drops card/card-head. It now uses the existing comment-row, comment-head muted small and comment-body prose classes, which src/web/comments.ts already uses for feed replies. The author, time and "outdated" badge sit on one muted line, with the prose under it. The body lines up with the code column because the comment cell already starts after the two gutter cells.
  • Form and thread: the comment form loses card. An open thread is no longer wrapped in an outer card either. It is a new .dc-thread grid that holds the comments and the Resolve button.
  • Resolved threads: a resolved thread keeps its card, because the one-line "resolved by … · time" summary and its disclosure live there.
  • CSS: .dc-thread and the plain-form rule are in src/web/style/content.ts. .dc-thread is documented in docs/design/areas/diff.md.
  • Tests: I changed two assertions in test/diff-review-comment.test.ts. They asserted class="card comment and card-foot, which are the old markup this issue removes. They now check for comment-row and dc-thread, and that no card-head is present.
  • Test run: scripts/fast.ts said the change was too broad to name test files. I ran test/diff*.test.ts, test/review.test.ts and test/pull-files*.test.ts instead. scripts/gate.ts printed nothing I could see, so I can't confirm it passed.

Closes #10045

commented

A line comment in the diff now reads as prose under its author, not a boxed card. Design-lint, tsc and the diff and review tests pass; I did not run the full suite. I did not take or attach a screenshot of the Files tab at desktop or 390px, and I have not checked the layout in a browser, so that item on the issue is still open.

  • Comment: each line comment in src/web/diff-view.ts drops card/card-head. It now uses the existing comment-row, comment-head muted small and comment-body prose classes, which src/web/comments.ts already uses for feed replies. The author, time and "outdated" badge sit on one muted line, with the prose under it. The body lines up with the code column because the comment cell already starts after the two gutter cells.
  • Form and thread: the comment form loses card. An open thread is no longer wrapped in an outer card either. It is a new .dc-thread grid that holds the comments and the Resolve button.
  • Resolved threads: a resolved thread keeps its card, because the one-line "resolved by … · time" summary and its disclosure live there.
  • CSS: .dc-thread and the plain-form rule are in src/web/style/content.ts. .dc-thread is documented in docs/design/areas/diff.md.
  • Tests: I changed two assertions in test/diff-review-comment.test.ts. They asserted class="card comment and card-foot, which are the old markup this issue removes. They now check for comment-row and dc-thread, and that no card-head is present.
  • Test run: scripts/fast.ts said the change was too broad to name test files. I ran test/diff*.test.ts, test/review.test.ts and test/pull-files*.test.ts instead. scripts/gate.ts printed nothing I could see, so I can't confirm it passed.
commented

A line comment in the diff now reads as prose under its author instead of a boxed card. The check failed only because no commit had a "Try:" line. I pushed an empty commit with one, and the local gate printed nothing after it. I haven't seen the forge's re-run. I did not take or attach the Files-tab screenshots at desktop width and 390px, and I haven't checked the layout in a browser.

  • Line comments: each one is now the author, time and "outdated" badge on one muted line, with the body as prose under it, in src/web/diff-view.ts. The comment form no longer has a card. An open thread is a plain .dc-thread block holding the comments and the Resolve button; it is documented in docs/design/areas/diff.md.
  • Resolved threads: these keep their card, because the "resolved by … · time" line and its disclosure live there.
  • Tests: two assertions in test/diff-review-comment.test.ts checked the old card comment and card-foot markup. I changed them to check for comment-row and dc-thread instead.
  • Checks: design-lint, tsc and the diff and review tests passed. I did not run the full suite.

To try it, open a pull's Files tab on the preview and click a line number to comment.

🤖 Generated with Claude Code

Changes requested — before the latest push

The markup change is right and matches the issue, but the issue's third box is not met: there is no look of the Files tab with a line comment, at desktop or at 390px, and the builder says the layout was never checked in a browser. Fix first: attach both looks (a line comment, plus an open form, plus a long unbroken word in a body at 390px to show no sideways scroll). Also: the .dc-review .card + .card, .dc-review .comment rule is now partly dead and should be trimmed; the indent is a magic 4px rather than the gutter's width. Principles 3 and 6/7 are otherwise respected: space instead of boxes, rows not cards.

commented

I trimmed the dead CSS and removed the guessed indent, but I still have no looks of the Files tab. The sandbox won't let Chromium start (socket() failed: Operation not permitted), so I couldn't render or screenshot the page at desktop or at 390px.

  • Dead rule: I removed .dc-review .card + .card, .dc-review .comment from src/web/style/content.ts. An open thread has no .comment any more, and a cell never holds two cards.
  • Indent: I removed the padding-left: 4px on .dc-thread. From the CSS alone, the comment cell is .dc-review, which pads 12px past a 3px edge exactly as .dc does. That should put the comment text at the code column with no extra rule. I haven't confirmed it by eye.
  • Both states: the comment head and body (comment-row/comment-head) are the same markup whether the thread is open or resolved. A resolved thread keeps its card, so its Show-comments body is prose inside a card.
  • Overflow: I kept overflow-wrap: anywhere on .dc-thread .comment-body so a long unbroken word wraps instead of scrolling sideways. Whether that holds at 390px is also unchecked.
  • Checks: design-lint passes, test/diff-review-comment.test.ts passes (7 of 7), and the gate printed nothing after the push; I haven't seen the forge's re-run.

Someone needs to attach the looks from the preview. They should cover a line comment, an open form, and a long unbroken word at 390px, at both widths.

🤖 Generated with Claude Code

Approved

The earlier asks (drop the dead .dc-review .card + .card, .dc-review .comment rule, drop the guessed padding-left on .dc-thread) are met in the head I can read. The markup is the existing comment-row/comment-head muted small pair, so author, time and the outdated badge sit on one muted line over the prose. The open thread is a plain .dc-thread (no card, no border), and the form is no longer a card. .dc-thread is documented in docs/design/areas/diff.md and not in DESIGN.md. Resolved threads keep their card with their disclosure, which is reasonable. The tests would fail without the change. Resolve stays a <button> in a post form, and the page works with JavaScript off.

Next, two things:

  1. Non-blocking: attach looks of a Files tab with a line comment, an open form and a long unbroken word at desktop and 390px. Nobody has seen the layout rendered, and overflow-wrap: anywhere at 390px is unverified. This is why box 3 is left.
  2. Non-blocking: check by eye that the comment text starts at the code column, as the CSS comment claims.
commented

Left #10045 open: 1 unticked item remain (bun scripts/design-lint.ts and bun test pass. A look of a pull's Files tab with a line comment is on the pull, at desktop width and at 390px, with no sideways scroll.).

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs