fix(accessibility): keep read-only link shortcut inert - #152
Conversation
📝 WalkthroughWalkthrough
Changes읽기 전용 링크 단축키
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@coderabbitai review |
✅ Action performedReview finished.
|
There was a problem hiding this comment.
🧹 Nitpick comments (1)
src/components/CwlEditor.accessibility.test.tsx (1)
79-95: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win
Meta+K경로도 회귀 테스트에 포함하세요.
EditorFrame는event.metaKey || event.ctrlKey를 처리하지만, 현재 테스트는ctrlKey만 설정합니다. macOS에서Meta+K경로만 회귀해도 이 테스트는 통과합니다.metaKey: true도 동일한 검증에 포함하세요.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/components/CwlEditor.accessibility.test.tsx` around lines 79 - 95, Update the read-only shortcut test around CwlEditor to cover the Meta+K path as well as Ctrl+K: trigger the keydown with metaKey enabled and verify window.prompt remains uncalled, while preserving the existing read-only behavior assertion.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@src/components/CwlEditor.accessibility.test.tsx`:
- Around line 79-95: Update the read-only shortcut test around CwlEditor to
cover the Meta+K path as well as Ctrl+K: trigger the keydown with metaKey
enabled and verify window.prompt remains uncalled, while preserving the existing
read-only behavior assertion.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: e5670188-abbe-415a-ab57-4989d784d018
📒 Files selected for processing (2)
src/components/CwlEditor.accessibility.test.tsxsrc/components/EditorFrame.tsx
|
@coderabbitai review |
|
Problem
CwlEditordocumentseditable={false}as read-only with no editing actions and hides its editing toolbar in that state, but the sharedEditorFramekeyboard handler still processed Mod+K. A read-only editor could therefore open the link-editing prompt and attempt an editing command.RED -> fix -> GREEN
main@50ac98cfa0ad9e8dd75f93ca437a5679fed4d804.084d739437d2db4070ee8547b265316dd4c9e420was rerun in CI run31419836520, build/test job93558861504, which explicitly checked out that SHA. Typecheck passed; coverage failed only onCwlEditor.accessibility.test.tsxbecause Ctrl+K invokedwindow.prompt("Link URL", "https://")once. Result: 140 test files / 818 tests passed, with the one new read-only shortcut regression failing as intended.547ba5e68a55efce7bfd5dded313cd5a7b909fc6gates the existing shared keyboard handler on the existingeditableauthority and addseditableto the callback dependency set. It does not add a second state source or change editable-mode shortcut behavior.ac419f48fc0894a1d61e4a48dd36015440df4a9badds the Meta+K assertion while preserving the Ctrl+K assertion.Exact-head proof
For unchanged exact head
ac419f48fc0894a1d61e4a48dd36015440df4a9b:31420426964: success;31420426951: success;31420426965: success;547ba5e...->ac419f48...) as deferred until the quota resets. That rate limit is not treated as passing review evidence.Automated/model status is not qualifying independent formal approval. Any subsequent head movement invalidates this proof and must be revalidated.
Integration dependency
This remains Draft because protected
main@50ac98cfa0ad9e8dd75f93ca437a5679fed4d804is still the exact 0.6.0 stable release candidate tracked by #118. Do not advance protected main until that registry operational-acceptance boundary is resolved. Revalidate live main, exact head, review state, and live policy before any eventual readiness or merge transition.Summary by CodeRabbit
버그 수정
Ctrl+K단축키 사용 시 편집 관련 대화상자가 표시되지 않도록 수정했습니다.테스트