feat: Add inline chat renaming functionality to Dashboard and All Chats#279
Draft
Mohammad-Hassan027 wants to merge 1 commit into
Draft
feat: Add inline chat renaming functionality to Dashboard and All Chats#279Mohammad-Hassan027 wants to merge 1 commit into
Mohammad-Hassan027 wants to merge 1 commit into
Conversation
Replaced the modal-based "Rename Chat" workflow with an inline editing experience for a smoother user interaction. - Added a pencil edit button directly next to the chat titles in both the Dashboard chat cards and the AllChats list rows. - Clicking the edit button replaces the title with an inline text input pre-filled with the current name. - Added keyboard event handlers to the input: - `Enter`: Saves changes by blurring the input, which triggers the API call. - `Escape`: Reverts changes and exits edit mode immediately. - `Blur`: Automatically triggers the PATCH request if the name is valid and changed. - Removed the old separate rename modal layout and the separate edit button from the action lists.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Replaced the modal-based "Rename Chat" workflow with an inline editing experience for a smoother user interaction.
Modified
src/pages/Dashboard.tsxandsrc/pages/AllChats.tsxto:Enter: Saves changes by blurring the input, which triggers the API call.Escape: Reverts changes and exits edit mode immediately.Blur: Automatically triggers the PATCH request if the name is valid and changed.Fixes #275
Type of Change
Checklist
pnpm run testorvitest rununderbackend/) and they passVerification Details
Please describe the tests or manual steps that you ran to verify your changes. Provide instructions so we can reproduce.
Enteror click outside the input field (triggeringblur).Escapeinstead.Enter/blur: The input turns back into a text label, the chat name updates, and the change is persisted (a toast notification may appear if configured).Escape: The input reverts back to the original title without saving.Visual Documentation