feat(messages): add quote action for composer#504
Conversation
Screen.Recording.2026-02-24.at.10.15.17.mov |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4e55791dd4
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| onPlanAccept={options.onPlanAccept} | ||
| onPlanSubmitChanges={options.onPlanSubmitChanges} | ||
| onOpenThreadLink={options.onOpenThreadLink} | ||
| onQuoteMessage={options.canInsertComposerText ? options.onInsertComposerText : undefined} |
There was a problem hiding this comment.
Avoid draft-bound callback in quote prop wiring
This line passes options.onInsertComposerText directly into Messages, but that callback is created by useComposerInsert with draftText in its dependency list (src/features/app/hooks/useComposerInsert.ts), so its identity changes on every keystroke. As a result, Messages (and all markdown rows) re-render while typing even when message data is unchanged, which can noticeably degrade input responsiveness in long threads.
Useful? React with 👍 / 👎.
| return trimmed | ||
| .split(/\r?\n/) | ||
| .map((line) => `> ${line}`) | ||
| .join("\n") | ||
| .concat("\n\n"); |
There was a problem hiding this comment.
Start generated quote blocks on a new line
The generated quote text always begins with > and has no leading newline, so when users quote into a non-empty draft the shared insert helper prefixes a space (not a line break) and the result becomes inline text like ... > quote instead of a Markdown blockquote. This means the feature fails to produce quote formatting unless the cursor is already at a line start.
Useful? React with 👍 / 👎.
Summary
Validation