Skip to content

fix: require c keypress to comment on selection#151

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#151
tomasz-tomczyk merged 1 commit intomainfrom
fix/408-comment-button-on-selection

Conversation

@tomasz-tomczyk
Copy link
Copy Markdown
Owner

@tomasz-tomczyk tomasz-tomczyk commented May 1, 2026

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

Mirrors the parity fix in tomasz-tomczyk/crit#411.

Test plan

  • mix test (516 passed)

🤖 Generated with Claude Code

Mirrors crit/#408 fix: text selection alone no longer hijacks copy by
opening the comment form. Now the user must press `c` after selecting
text to open the comment form (with the selection captured as a quote).
This builds on the existing `c` shortcut for "comment on focused block".

Pressing `c` with no active selection falls back to the focused-block
behavior. With a selection, it opens a comment form anchored to the
selection's line range with the selected text saved as the quote.

The shortcuts panel is updated to reflect the new behavior.

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 77.37%. Comparing base (bc1813f) to head (9d7bf83).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #151   +/-   ##
=======================================
  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 fa85c1d into main May 1, 2026
4 checks passed
@tomasz-tomczyk tomasz-tomczyk deleted the fix/408-comment-button-on-selection branch May 1, 2026 07:49
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