Skip to content

Bugfix: when user login or register, do not open session expire modal#3082

Merged
WMC001 merged 8 commits into
developfrom
xyq/bugfix_frontend
May 29, 2026
Merged

Bugfix: when user login or register, do not open session expire modal#3082
WMC001 merged 8 commits into
developfrom
xyq/bugfix_frontend

Conversation

@xuyaqist
Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI review requested due to automatic review settings May 29, 2026 03:47
@xuyaqist xuyaqist requested review from Dallas98 and WMC001 as code owners May 29, 2026 03:47
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 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_token in server.js with 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 isReadOnly prop path from ToolManagement / 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 WMC001 merged commit c8710cd into develop May 29, 2026
8 checks passed
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