Skip to content

Fix 'Edit In Place' feature appending instead of editing messages#6955

Merged
zanesq merged 2 commits intoblock:mainfrom
bzqzheng:fix/6954-edit-in-place-append-issue
Feb 4, 2026
Merged

Fix 'Edit In Place' feature appending instead of editing messages#6955
zanesq merged 2 commits intoblock:mainfrom
bzqzheng:fix/6954-edit-in-place-append-issue

Conversation

@bzqzheng
Copy link
Contributor

@bzqzheng bzqzheng commented Feb 4, 2026

Summary

  • Fixes issue "Edit In Place" feature only appends instead of edits #6954 where "Edit In Place" feature appends the edited content as a new message instead of replacing the existing message
  • Modifies the onMessageUpdate function to properly update the content of the edited message instead of creating a new one
  • Preserves existing image content if present in the message being edited

Test plan

  1. Open an existing conversation with multiple messages
  2. Hover over a user message and click the "Edit" button
  3. Modify the message content
  4. Click "Edit in Place"
  5. Verify that the edited content replaces the original message and doesn't appear as a new message
  6. Verify that messages after the edited message are removed as expected

🤖 Generated with Claude Code

…pending

The 'Edit In Place' feature was appending the edited content as a new message
instead of modifying the existing message as intended. This fix updates the
onMessageUpdate function to properly update the content of the last message in
the truncated conversation when using the 'Edit In Place' feature, rather than
adding a new message.

Fixes block#6954

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings February 4, 2026 17:58
@katzdave
Copy link
Collaborator

katzdave commented Feb 4, 2026

Can you try reloading a session from history; does it follow the expectation there where the old message is removed/replaced?

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes issue #6954 where the "Edit In Place" feature was appending edited messages as new messages instead of replacing the existing message content.

Changes:

  • Modified onMessageUpdate function to properly update the last user message in place after truncating the session
  • Added logic to preserve existing image content when editing a message
  • Implemented proper message content replacement before requesting a new assistant response

@bzqzheng
Copy link
Contributor Author

bzqzheng commented Feb 4, 2026

Can you try reloading a session from history; does it follow the expectation there where the old message is removed/replaced?

not sure if i understand this question.

I'm experiencing the same issue from reloading the past sessions;

Copy link
Collaborator

@zanesq zanesq left a comment

Choose a reason for hiding this comment

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

@bzqzheng thanks cleaned it up and added a working state, tested locally I think this is gtg!

@katzdave yes it does on refresh, verified locally

@zanesq zanesq enabled auto-merge February 4, 2026 21:57
@zanesq zanesq added this pull request to the merge queue Feb 4, 2026
Merged via the queue into block:main with commit 950f141 Feb 4, 2026
18 checks passed
@bzqzheng bzqzheng deleted the fix/6954-edit-in-place-append-issue branch February 4, 2026 22:46
tlongwell-block added a commit that referenced this pull request Feb 5, 2026
* origin/main:
  fix: detect context length errors in GCP Vertex AI provider (#6976)
  Added the ability to escape Jinja variables in recipes to include them in prompts (#6975)
  Bug Fix: bump pctx (#6967)
  fix(acp): fixtures now raise content mismatch errors (#6912)
  custom provider form minor improvements (#6966)
  Fix 'Edit In Place' feature appending instead of editing messages (#6955)
  docs: change RPI slash commands (#6963)
kuccello pushed a commit to kuccello/goose that referenced this pull request Feb 7, 2026
…ock#6955)

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Zane Staggs <zane@squareup.com>
Tyler-Hardin pushed a commit to Tyler-Hardin/goose that referenced this pull request Feb 11, 2026
…ock#6955)

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Zane Staggs <zane@squareup.com>
Tyler-Hardin pushed a commit to Tyler-Hardin/goose that referenced this pull request Feb 11, 2026
…ock#6955)

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Zane Staggs <zane@squareup.com>
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