Bugfix: when user login or register, do not open session expire modal#3082
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes a UX bug where the session-expired modal could pop over an in-progress login/register flow, and tightens the BFF refresh-token handling. It also makes minor adjustments to agent config UI: read-only handling when no agent is selected, copy updates for the new top-of-page agent selector, and a couple of small UI cleanups in AgentSelectorHeader / ToolManagement.
Changes:
- Suppress the session-expired modal (and re-bind the listener with current modal state) while the login/register modal is already open; short-circuit
/api/user/refresh_tokeninserver.jswith a 401 when no refresh-token cookie is present. - Treat "no agent selected and not in create mode" as read-only in the agent config store, and drop the redundant
isReadOnlyprop path fromToolManagement/AgentConfigComp. - Update zh/en translations from "left panel" to "top panel" and remove
type="text"from the Import button to visually match the New button.
Reviewed changes
Copilot reviewed 1 out of 1 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| frontend/hooks/auth/useAuthenticationUI.ts | Guard the session-expired handler when login/register modal is open and add the modal flags to the effect deps. |
| frontend/server.js | Return 401 immediately from the BFF when the refresh-token cookie is missing, and bail out of forwarding. |
| frontend/stores/agentConfigStore.ts | Make isReadOnly return true when no agent is selected and not in create mode. |
| frontend/app/[locale]/agents/components/agentConfig/ToolManagement.tsx | Remove the isReadOnly prop and rely solely on the store selector. |
| frontend/app/[locale]/agents/components/AgentConfigComp.tsx | Stop passing the now-removed isReadOnly prop into ToolManagement. |
| frontend/app/[locale]/agents/components/AgentSelectorHeader.tsx | Drop type="text" on the Import button so it matches the New button styling. |
| frontend/public/locales/en/common.json | Update copy from "left panel" to "top panel" for the no-agent-selected hint. |
| frontend/public/locales/zh/common.json | Same copy change in Chinese. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
WMC001
approved these changes
May 29, 2026
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.
No description provided.