Skip to content

Allow editing the previous user message#4094

Open
katinthehatsite wants to merge 5 commits into
trunkfrom
add/allow-editing-user-message
Open

Allow editing the previous user message#4094
katinthehatsite wants to merge 5 commits into
trunkfrom
add/allow-editing-user-message

Conversation

@katinthehatsite

@katinthehatsite katinthehatsite commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Related issues

Fixes STU-1832

How AI was used in this PR

It was used to scope and implement the change. Everything was reviewed and manually tested by me.

Proposed Changes

This PR allows editing the last user's message if the user interrupted the turn.

Testing Instructions

  • Pull the changes from this branch
  • Start Studio with npm start
  • Ensure that you have at least one site
  • Navigate to the Studio Code tab
  • Send a message
  • Pause the message before the AI had a chance to respond
  • Observe the edit button that appears
Screenshot 2026-07-07 at 11 51 27 AM
  • Click on that button and edit the prompt directly
  • Observe that the prompt gets updated and the chat continues (I used a similar editing experience that ChatGPT offers)
  • Confirm that only the last interruped prompt can be edited

Pre-merge Checklist

  • Have you checked for TypeScript, React or other console errors?

@katinthehatsite katinthehatsite self-assigned this Jul 6, 2026
@katinthehatsite katinthehatsite marked this pull request as draft July 6, 2026 18:24
@wpmobilebot

wpmobilebot commented Jul 6, 2026

Copy link
Copy Markdown
Collaborator

📊 Performance Test Results

Comparing 6716436 vs trunk

app-size

Metric trunk 6716436 Diff Change
App Size (Mac) 1411.97 MB 1411.51 MB 0.46 MB ⚪ 0.0%

site-editor

Metric trunk 6716436 Diff Change
load 780 ms 1053 ms +273 ms 🔴 35.0%

site-startup

Metric trunk 6716436 Diff Change
siteCreation 6491 ms 6474 ms 17 ms ⚪ 0.0%
siteStartup 2390 ms 2400 ms +10 ms ⚪ 0.0%

Results are median values from multiple test runs.

Legend: 🟢 Improvement (faster) | 🔴 Regression (slower) | ⚪ No change (<50ms diff)

@katinthehatsite katinthehatsite marked this pull request as ready for review July 7, 2026 11:53
@katinthehatsite katinthehatsite requested a review from a team July 7, 2026 11:54
return items;
}

// True when the most recent turn was interrupted by the user.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nit, I would propose to make more specific function name and avoid the comment.
e.g. isConversationStopped[ByUser/Manually]

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Makes sense, I will adjust. Thanks for the suggestion 👍

@nightnei nightnei left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Dark:
Screenshot 2026-07-07 at 14 42 03
Light:
Screenshot 2026-07-07 at 14 42 17
Light hover:
Screenshot 2026-07-07 at 14 42 25
But it LGTM and works great 👍
Screenshot 2026-07-07 at 14 46 00

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.

3 participants