Skip to content

feat:Add inline user message editing - #346

Closed
6crucified wants to merge 3 commits into
pingdotgg:mainfrom
6crucified:6crucified/edit-feature
Closed

6crucified wants to merge 3 commits into
pingdotgg:mainfrom
6crucified:6crucified/edit-feature

Conversation

@6crucified

@6crucified 6crucified commented Mar 7, 2026 •

Copy link
Copy Markdown

Summary

  • add an inline edit action for user chat bubbles
  • send edited content directly from the bubble editor instead of staging it in the main composer
  • wait for checkpoint revert state to land before resending so the edited message replaces the original row

Fixes #331

Note

Add inline editing of user messages in the chat timeline

  • Adds an EditableUserMessageBubble component in ChatView.tsx that lets users edit previously sent messages (text and images) directly in the timeline.
  • On edit submission, the app silently reverts to the message's checkpoint (skipping the confirmation dialog), waits up to 3 seconds for the message to disappear from the thread, then resends the updated content.
  • Extracts a submitUserTurn helper to share send logic between normal sends and edit resends; edit resends preserve the composer draft while normal sends clear it.
  • Image editing supports adding (via button or paste), removing, and previewing attachments; keyboard shortcuts Ctrl/Cmd+Enter to submit and Escape to cancel are supported.
  • Risk: the 3-second timeout (EDIT_REVERT_SYNC_TIMEOUT_MS) means a slow store update could cause the edited message to be sent before the reverted message is fully removed, producing a race in the timeline.

Macroscope summarized d458ed4.

@coderabbitai

coderabbitai Bot commented Mar 7, 2026 •

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 23fc8f01-fa91-4e9d-ba5d-0060ac471284

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Tip

Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs).
Share your feedback on Discord.


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@6crucified

6crucified commented Mar 7, 2026 •

Copy link
Copy Markdown
Author

https://www.youtube.com/watch?v=X70q_qgrSWo

The video was too large (16MB) for GitHub's limit (10MB)

@6crucified 6crucified mentioned this pull request Mar 7, 2026
@6crucified 6crucified changed the title Add inline user message editing feat:Add inline user message editing Mar 7, 2026
@maria-rcks

Copy link
Copy Markdown
Collaborator

closing this for now because it does not follow our contribution guidelines:
https://github.com/pingdotgg/t3code/blob/main/CONTRIBUTING.md

for ui changes, please include clear before/after screenshots, and a short video if the change depends on motion or interaction details.

feel free to update the pr with that context and reopen it.

@maria-rcks maria-rcks closed this Mar 9, 2026
@6crucified

Copy link
Copy Markdown
Author

Before

image

(you can see that there is no edit button next to the paste one)

After

after.mov

(in this case, you can see that we do have one)

@maria-rcks maria-rcks reopened this Mar 9, 2026
@github-actions github-actions Bot added the vouch:unvouched Author is not yet trusted in the VOUCHED list. label Mar 9, 2026
@juliusmarminge

Copy link
Copy Markdown
Member

does it work with attachments?

@6crucified

Copy link
Copy Markdown
Author

it should, now.

@jparta

jparta commented Apr 14, 2026

Copy link
Copy Markdown

This is an essential feature. I don't know how Theo and Julius don't find this annoying enough to ship a fix.

@juliusmarminge do you have time to look at this?

@juliusmarminge

Copy link
Copy Markdown
Member

Essential feature? Just hit the revert button and then type in your revised message.

Your attitude doesn't help here, I am basically soloing maintenance + engineering and have 400 open issues, 300 open PRs and a product vision I need to fulfill so excuse me if stuff gets lost in the noise

@jparta

jparta commented Apr 15, 2026 •

Copy link
Copy Markdown

@juliusmarminge

Sorry.

I can see the revert button now, but didn't before.

I wonder if this PR is relevant anymore if revert does the job.

@6crucified 6crucified closed this May 14, 2026
@Igloczek

Igloczek commented Aug 3, 2026

Copy link
Copy Markdown

@juliusmarminge can you please re-open this? the revert feature doesn't really solve the problem

for example - when I stop the execution seconds after sending the prompt to correct it, there is no way to do anything with it, revert doesn't allow me to send new prompt in the same place, it just removes what AI generated in the few seconds, which isn't really helpful tbh

it would work fine-ish if there would be a way to revert to the end of the AI response, so it will remove my prompt, but it doesn't work that way

also reverting doesn't work at all with grok cli, it just throw errors

the edit is what plenty of other AI apps using, it's just good UX, simply because people are used to doing it that way

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-julius vouch:unvouched Author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feat: Editing messages

5 participants