Skip to content

fix: update message and rename conversation triggers#2439

Open
mustafa-sayyed wants to merge 5 commits intoarc53:mainfrom
mustafa-sayyed:fix/update-message-and-rename-conversation-triggers
Open

fix: update message and rename conversation triggers#2439
mustafa-sayyed wants to merge 5 commits intoarc53:mainfrom
mustafa-sayyed:fix/update-message-and-rename-conversation-triggers

Conversation

@mustafa-sayyed
Copy link
Copy Markdown

This PR fixes: #2369

  • Prevents submitting an message if the input is empty or unchanged from the original message
  • Disables the "Update" button and updates its styles when the edit input is empty or unchanged
  • Prevents saving a conversation if the name is empty or unchanged

Tested the changes, Videos:

Screen.Recording.2026-04-29.124843.mp4
Screen.Recording.2026-04-29.124934.mp4

Copilot AI review requested due to automatic review settings April 29, 2026 07:39
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 29, 2026

@mustafa-sayyed is attempting to deploy a commit to the Arc53 Team on Vercel.

A member of the Team first needs to authorize it.

@mustafa-sayyed
Copy link
Copy Markdown
Author

mustafa-sayyed commented Apr 29, 2026

Hey, @dartpain @ManishMadan2882
I have raised a clean PR which fixes #2369
Please review

Copy link
Copy Markdown
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 addresses #2369 by preventing “Update”/rename actions from triggering when the edited value is empty or unchanged, improving UX and avoiding unnecessary submissions.

Changes:

  • Adds guards to prevent saving a conversation name if it’s empty or unchanged.
  • Prevents edited message submission when the edit input is empty or unchanged.
  • Disables the “Update” button (and adjusts styling) when edits are invalid.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
frontend/src/conversation/ConversationTile.tsx Adds an unchanged/empty guard before calling onSave for conversation renames.
frontend/src/conversation/ConversationBubble.tsx Adds unchanged/empty guards for message edits and disables the “Update” button accordingly.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread frontend/src/conversation/ConversationTile.tsx Outdated
Comment thread frontend/src/conversation/ConversationBubble.tsx
Comment thread frontend/src/conversation/ConversationBubble.tsx Outdated
Copy link
Copy Markdown
Collaborator

@ManishMadan2882 ManishMadan2882 left a comment

Choose a reason for hiding this comment

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

@mustafa-sayyed Thanks for the fix.
one blocking concern:

  • Build is failing npm run build: fix is minimal - use the same null-coalesce pattern already used elsewhere in this file (line 209 already does setEditInputBox(message ?? ''))

> frontend@0.0.0 build
> tsc && vite build

src/conversation/ConversationBubble.tsx:135:57 - error TS18048: 'message' is possibly 'undefined'.

135 if (!editInputBox.trim() || editInputBox.trim() === message.trim()) return;
~~~~~~~

src/conversation/ConversationBubble.tsx:248:77 - error TS18048: 'message' is possibly 'undefined'.

248 disabled={!editInputBox.trim() || editInputBox.trim() === message.trim()}
~~~~~~~


Found 2 errors in the same file, starting at: src/conversation/ConversationBubble.tsx:135

@mustafa-sayyed
Copy link
Copy Markdown
Author

mustafa-sayyed commented May 4, 2026

@ManishMadan2882
Done, fixed the ts error
Also checked it by building the application

@codecov
Copy link
Copy Markdown

codecov Bot commented May 8, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.16%. Comparing base (9b8fe2d) to head (67f3939).
⚠️ Report is 27 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2439      +/-   ##
==========================================
- Coverage   91.34%   91.16%   -0.19%     
==========================================
  Files         248      255       +7     
  Lines       20709    21675     +966     
==========================================
+ Hits        18916    19759     +843     
- Misses       1793     1916     +123     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Copy Markdown
Collaborator

@ManishMadan2882 ManishMadan2882 left a comment

Choose a reason for hiding this comment

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

all comments resolved, thanks!

@mustafa-sayyed
Copy link
Copy Markdown
Author

mustafa-sayyed commented May 8, 2026

Hii @ManishMadan2882
Thanks for reviewing this.

Please take a look at #2453
Issue: #2452

@vercel
Copy link
Copy Markdown

vercel Bot commented May 8, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
oss-docsgpt Ready Ready Preview, Comment May 8, 2026 0:12am

Request Review

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

🐛 Bug Report: Edit Message Triggers Update Without Changes

3 participants