Skip to content

fix: require c keypress to comment on selection (#408)#411

Merged
tomasz-tomczyk merged 1 commit intomainfrom
fix/408-comment-button-on-selection
May 1, 2026
Merged

fix: require c keypress to comment on selection (#408)#411
tomasz-tomczyk merged 1 commit intomainfrom
fix/408-comment-button-on-selection

Conversation

@tomasz-tomczyk
Copy link
Copy Markdown
Owner

Summary

  • Selecting text no longer auto-opens the comment editor (preserves copy)
  • Pressing c after selecting opens a comment form anchored to the selection's line range, with the selected text saved as a quote
  • c without a selection falls back to its existing focused-block behavior
  • Shortcuts panel updated to reflect the new behavior

Closes #408

See also: tomasz-tomczyk/crit-web#151 (parity)

Test plan

  • go test ./... (passed)
  • e2e select-to-comment.spec.ts (18 git-mode + 2 file-mode passed)

🤖 Generated with Claude Code

Selecting text used to immediately open the comment editor, hijacking
copy. Now selection alone leaves the page selection untouched (so users
can copy normally) and the existing `c` shortcut is extended: when text
is selected, pressing `c` opens a comment form anchored to that line
range with the selection captured as a quote. With no selection, `c`
falls back to its existing behavior of commenting on the focused block.

The shortcuts panel is updated to reflect the new behavior.

Closes #408

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

codecov Bot commented May 1, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 67.29%. Comparing base (23e4615) to head (e6c3edb).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #411      +/-   ##
==========================================
+ Coverage   67.26%   67.29%   +0.03%     
==========================================
  Files          26       26              
  Lines        9650     9650              
==========================================
+ Hits         6491     6494       +3     
+ Misses       2649     2647       -2     
+ Partials      510      509       -1     
Flag Coverage Δ
e2e 34.14% <ø> (ø)
unit 63.49% <ø> (+0.03%) ⬆️

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 c01e104 into main May 1, 2026
8 checks passed
@tomasz-tomczyk tomasz-tomczyk deleted the fix/408-comment-button-on-selection branch May 1, 2026 07:56
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.

Add option to prevent comment editor opening immediately after text selection

1 participant