-
Notifications
You must be signed in to change notification settings - Fork 19
ECHO-613 ECHO-614 ECHO-591 ECHO-571 translation fixes, "Go deeper" or "Make it concrete" showing instead of "Refine", Refine was clickable when "Go deeper" was generating response #390
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🌐 Web query:
Mantine useLocalStorage same tab synchronization multiple components💡 Result:
Short answer: Mantine's useLocalStorage syncs across browser tabs/windows via the storage event, but it does NOT automatically propagate updates to other hook instances in the same tab. Use one of these patterns to keep multiple components in the same tab in sync:
Background / why: Mantine's hook subscribes to the window "storage" event which only fires in other documents (other tabs/windows), not in the same tab where localStorage was changed — so same-tab updates won't trigger other hook instances. [1][2]
Sources:
Refine disable flag is not synchronized within the same tab—Refine button likely stays enabled during "Go deeper" response generation
The refine disable mechanism is split across three components using separate
useLocalStorageinstances:RefineSelectionwritestrueto localStorage viauseLocalStoragewhen starting "Go deeper"ParticipantConversationAudioContentclears it viaremoveValue()ononError/onFinishParticipantConversationAudioreads via its ownuseLocalStorageinstance and disables the button viadisabled={isStopping || isRefineDisabled}The problem: Mantine's
useLocalStorageonly synchronizes state across browser tabs/windows via thestorageevent. Within the same tab, updating localStorage in one component does not automatically update the state in other components using the same key—each hook instance maintains isolated React state. WhenRefineSelectioncalls its setter,ParticipantConversationAudio'sisRefineDisabledstate does not update in the same tab. Additionally, navigating between nested routes keepsParticipantConversationAudiomounted, so its initializer only runs once and won't pick up later writes.Result: The Refine button is probably never actually disabled while a Go deeper response is generating, and may remain disabled longer than intended on cleanup. This defeats ECHO-614.
Recommendation: Replace the cross-component localStorage coordination with a single source of truth owned by the parent component and passed to children:
Then have
RefineSelectionandParticipantConversationAudioContentcallsetIsRefineDisabledviauseOutletContext()instead of their ownuseLocalStorageinstances. You can optionally mirror to localStorage afterward if persistence across full page reloads is needed.Applies to lines: 13–14, 50–56, 218–225, 458–474
🤖 Prompt for AI Agents
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ussaama
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.