Skip to content

feat: give review-level comments a real conceptual home#405

Merged
tomasz-tomczyk merged 1 commit intomainfrom
feat/review-conversation
Apr 30, 2026
Merged

feat: give review-level comments a real conceptual home#405
tomasz-tomczyk merged 1 commit intomainfrom
feat/review-conversation

Conversation

@tomasz-tomczyk
Copy link
Copy Markdown
Owner

Summary

  • Replaces the hidden "+ Add" button in the comments-panel header with a top-of-document Review conversation section and a sibling tree-section above FILES in the sidebar.
  • Linear-inspired visual treatment: no card chrome, no rails — typography and rhythm carry the hierarchy. Shared ghost "Add comment" button across empty and populated states; auto-closes when an empty review form loses to another comment/reply form.
  • Doc-anchored threads behave like line threads: replies, edit/delete, resolve, panel-card click navigates and flashes.
  • Section is collapsible (cookie-backed). File mode centers the block; git mode left-anchors at the document edge.
  • ] / [ navigation now picks up review-level cards too (was previously skipping them).
  • Test fixtures (test/test-diff.sh) seed review-level comments in both file-mode and git-mode carry-forward instances; one carry-forward thread is pre-resolved.

Closes #374

Review

  • Code review: passed (3 findings addressed: ]/[ nav scope, editReply/deleteReply response.ok checks, system-light theme variant for the + icon)
  • Parity audit: crit-web port to follow in a separate PR

Test plan

  • 20 review-comments e2e tests (git + file mode)
  • Adjacent regression suites: comments, multi-form, threading, comment-nav (72 tests pass)
  • gofmt clean, golangci-lint clean, go test -race clean
  • check-css-vars.sh clean (all 4 theme blocks covered)
  • Manual: light + dark + system themes, collapse/expand, panel navigation flash, reply auto-close

🤖 Generated with Claude Code

Replaces the hidden "+ Add" button in the comments panel with a
top-of-document "Review conversation" section and a sibling tree-section
above FILES in the sidebar. Both surfaces use a typography-driven Linear
treatment — no card chrome, no rails — and a shared ghost "Add comment"
button that auto-closes when the user starts another comment.

Closes #374

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@tomasz-tomczyk tomasz-tomczyk merged commit 453d259 into main Apr 30, 2026
6 checks passed
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 30, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 67.09%. Comparing base (ea35b52) to head (52ebfde).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #405      +/-   ##
==========================================
- Coverage   67.13%   67.09%   -0.04%     
==========================================
  Files          19       19              
  Lines        8221     8221              
==========================================
- Hits         5519     5516       -3     
- Misses       2274     2276       +2     
- Partials      428      429       +1     
Flag Coverage Δ
e2e 34.35% <ø> (+0.17%) ⬆️
unit 63.13% <ø> (-0.04%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@tomasz-tomczyk tomasz-tomczyk deleted the feat/review-conversation branch April 30, 2026 20:28
tomasz-tomczyk added a commit to tomasz-tomczyk/crit-web that referenced this pull request Apr 30, 2026
Ports the Review Conversation feature from crit/ (PR #405) to crit-web/.

Replaces the hidden "+ Add" button in the comments panel with a
top-of-document Review Conversation section and a sibling tree-section
above FILES in the sidebar. Both surfaces use the typography-driven
Linear treatment from crit/ — no card chrome, no rails — and a shared
ghost "Add comment" button that auto-closes when the user starts
another comment form.

Changes:
- New #reviewConversation section above #document-renderer; threads
  + compose/edit form render inline. data-doc-layout="centered" in
  single-doc mode, left-anchored in multi-file (git-style) view.
- New #treeConversationSection row above the file tree FILES header,
  with a tabular-nums unresolved badge.
- Shift+G opens the inline form (no longer the panel form). Esc
  cancels, Ctrl+Enter submits. Editing review comments now happens
  inline — the panel cards are read-only mirrors that scroll back to
  the inline section and flash via .comment-flash.
- ] / [ comment navigation now picks up inline review-conversation
  cards (was scoped to #document-renderer only).
- Auto-close: opening another comment/reply form closes an empty
  review form, and vice-versa.
- Section is collapsible, persisted via localStorage
  ('crit-review-conversation-collapsed') matching other view prefs.
- Removed the .comments-panel-add-btn (and its CSS) — its function
  moved to the inline ghost button.

Backend: Comment.scope == "review" was already supported by the
schema and add_comment / edit_comment / delete_comment / resolve /
reply LiveView events — no schema or context changes needed.

Naming differences from crit/:
- --crit-content-width instead of --content-width
- --crit-editor-bg-elevated instead of --crit-editor-bg-hover
- localStorage instead of cookies (matches crit-web's other prefs)
- .comment-flash instead of .comment-card-highlight

Closes the parity gap with crit/ PR
tomasz-tomczyk/crit#405 (closes crit/#374).

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.

Missing "review level text" that is not specific to individual lines in the reviewed files.

1 participant