Skip to content

feat: review conversation parity (crit/#374, crit#405)#148

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

feat: review conversation parity (crit/#374, crit#405)#148
tomasz-tomczyk merged 1 commit intomainfrom
feat/review-conversation

Conversation

@tomasz-tomczyk
Copy link
Copy Markdown
Owner

Summary

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) — matches other view prefs in crit-web.
  • 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 the add_comment / edit_comment / delete_comment / resolve / reply LiveView events — no schema or context changes needed.

Naming adapted to crit-web conventions

  • --crit-content-width (not --content-width)
  • --crit-editor-bg-elevated (no --crit-editor-bg-hover exists in crit-web)
  • localStorage (not cookies — matches crit-web's other prefs)
  • .comment-flash (not .comment-card-highlight)

Test plan

  • Shift+G opens the inline form with focus
  • Esc cancels, Ctrl+Enter submits
  • Submitting a review comment renders it in the inline section, the file-tree row badge, and the comments panel
  • Clicking a review card in the comments panel scrolls to and flashes the inline card
  • ] / [ navigation cycles through review-conversation cards alongside line/file cards
  • Resolve/Unresolve/Edit/Delete buttons work on own review comments
  • Replies on review comments save and render
  • Section collapse persists across reload
  • Empty review form auto-closes when the user starts a line or file comment, and vice-versa
  • Multi-file review (left-anchored) and single-doc review (centered) both render correctly
  • Light theme + dark theme + system theme all show the dashed-→-solid plus chip correctly
  • mix precommit passes (verified locally)

🤖 Generated with Claude Code

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>
@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 77.37%. Comparing base (78267d9) to head (8a68f75).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #148   +/-   ##
=======================================
  Coverage   77.37%   77.37%           
=======================================
  Files          55       55           
  Lines        1653     1653           
=======================================
  Hits         1279     1279           
  Misses        374      374           
Flag Coverage Δ
unit 77.37% <ø> (ø)

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 merged commit 570475a into main Apr 30, 2026
4 checks passed
@tomasz-tomczyk tomasz-tomczyk deleted the feat/review-conversation branch April 30, 2026 20:42
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