Skip to content

Comments

feat(messages): add quote action for composer#504

Merged
Dimillian merged 1 commit intoDimillian:mainfrom
vforsh:feat-message-quote-button
Feb 24, 2026
Merged

feat(messages): add quote action for composer#504
Dimillian merged 1 commit intoDimillian:mainfrom
vforsh:feat-message-quote-button

Conversation

@vforsh
Copy link
Contributor

@vforsh vforsh commented Feb 24, 2026

Summary

  • add a quote action button on message rows
  • wire quote action through message list into composer insertion
  • insert quoted message as Markdown blockquote and add a trailing blank line for immediate typing after quote
  • add/adjust tests for quote-to-composer behavior

Validation

  • npm run test -- src/features/messages/components/Messages.test.tsx
  • npm run test
  • npm run typecheck

@vforsh
Copy link
Contributor Author

vforsh commented Feb 24, 2026

Screen.Recording.2026-02-24.at.10.15.17.mov

@vforsh
Copy link
Contributor Author

vforsh commented Feb 24, 2026

@codex review

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

Comment on lines +71 to +75
return trimmed
.split(/\r?\n/)
.map((line) => `> ${line}`)
.join("\n")
.concat("\n\n");

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

@Dimillian Dimillian merged commit 5e656d5 into Dimillian:main Feb 24, 2026
9 checks passed
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.

2 participants