Repository navigation
feat(web): Cmd/Ctrl+Enter posts a comment, and comment drafts survive a reload (E9) - #388
Merged
Merged
Conversation
… a reload The issue and PR comment boxes and the inline review comment box run their main action on Cmd+Enter or Ctrl+Enter, as GitHub does. An unsent issue or PR comment is kept in this browser per issue or PR, cleared once posted, and dropped after two weeks. A private repository's drafts are never written to storage. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 4 minutes. View limit detailsLimit details: You’ve used the included review currently available. Review configuration: ⚙️ Run configuration
📒 Files selected for processing (7)
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 |
…ent, bound the store Drafts are keyed by the signed-in identity and only kept for public repositories; Sign out & forget key removes them. While a post's outcome is unknown nothing is stored, so a reload after an unconfirmed write cannot bring the text back to be posted twice; a post that sent nothing keeps it again. At most 100 drafts are kept and expired ones are dropped as drafts are written. Cmd/Ctrl+Enter in an inline comment does nothing while its button is disabled. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Why
Power-user basics from the roadmap. Losing a long comment to a reload or a closed tab is a common complaint, and reaching for the mouse to post breaks the flow.
How
MarkdownEditortakesonSubmit. Cmd/Ctrl+Enter in the field calls it, but not while an input method is composing. The field also getsaria-keyshortcuts. The shortcut is wired only where the Comment button would be enabled for the viewer's situation (not when composing is blocked or the viewer is locked out). The action runs its own checks (empty, too long, funds) as the button does.lib/view/draft-text.ts:useDraftText(key)isuseStatebacked bylocalStorage(forge:draft:v1:<identity>:<repoId>:<targetId>:comment). An empty text removes the entry. A damaged or expired entry reads as no draft, and storage errors leave the draft in memory. At most 100 drafts are kept, and expired ones are dropped as drafts are written.null, so nothing is written. Their text is encrypted on Platform, and a plaintext copy on disk would outlive the session.How tested
Reviewed with the code-review skill. The fixes are in the second commit: per-identity keys, cleared with a forgotten key; nothing stored during an unconfirmed write; a bounded store; the inline shortcut gated like its button; and public repos only, failing closed.
tsc, eslint, and the full vitest run (345 files pass). The new
draft-text.test.tsxcovers store, clear, expiry, a damaged entry, restore after a remount per target, no storage without a key, and the shortcut (Enter alone does nothing).Live on devnet sakura with this branch's static build, PR Publish the browse index on ordinary pushes #4 in scratch repo
2D3Akz31nwDupidzP4hJ16s8tqjByYe55Vtg1iQN1MrZ/mp-merge-a:Evidence:
/Users/pasta/workspace/dash-forge-qa/evidence/p0/merge-power/e9-composer-keys/(screenshots and video) and the scripte9-composer-keys.mjs.Limits
As on GitHub, a restored draft turns "Close" into "Close with comment". The text is in the box.
Edit boxes, the review summary and the new-issue and new-PR forms don't keep drafts. The review summary has no shortcut, because submitting a review needs its verdict confirmed.
🤖 Generated with Claude Code