feat(FR-2189): add concurrent login session guard with force-login support#6174
feat(FR-2189): add concurrent login session guard with force-login support#6174nowgnuesLee wants to merge 1 commit intomainfrom
Conversation
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has required the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
Coverage report for
|
St.❔ |
Category | Percentage | Covered / Total |
|---|---|---|---|
| 🔴 | Statements | 8.78% (-0.01% 🔻) |
1543/17571 |
| 🔴 | Branches | 7.57% (-0% 🔻) |
930/12282 |
| 🔴 | Functions | 5.68% (-0% 🔻) |
278/4893 |
| 🔴 | Lines | 8.46% (-0.01% 🔻) |
1446/17099 |
Test suite run success
784 tests passing in 37 suites.
Report generated by 🧪jest coverage report action from dbe304b
648bcc1 to
3412ed6
Compare
3412ed6 to
7fc9981
Compare
There was a problem hiding this comment.
Pull request overview
Adds a user-facing “concurrent login session” guard to the login flow, letting users force-login (terminating existing sessions) when the server rejects login due to an active session, and documenting the intended behavior.
Changes:
- Extend
client.login()to optionally send aforceflag and surface 409 Conflict as a distinct error. - Handle 409 in
LoginViewby prompting with a confirm modal and persisting force-approval across retries. - Add i18n strings for concurrent-session messaging and include a feature spec document.
Reviewed changes
Copilot reviewed 24 out of 25 changed files in this pull request and generated 22 comments.
Show a summary per file
| File | Description |
|---|---|
| src/lib/backend.ai-client-esm.ts | Adds force parameter support and 409 Conflict handling for session login. |
| react/src/components/LoginView.tsx | Shows a confirm modal for concurrent sessions and retries login with force=true after user approval. |
| resources/i18n/en.json | Adds concurrent-session strings and “Proceed to Login” label. |
| resources/i18n/ko.json | Adds concurrent-session strings and “ProceedLogin” label. |
| resources/i18n/de.json | Adds concurrent-session title/content translations. |
| resources/i18n/el.json | Adds concurrent-session title/content translations. |
| resources/i18n/es.json | Adds concurrent-session title/content translations. |
| resources/i18n/fi.json | Adds concurrent-session title/content translations. |
| resources/i18n/fr.json | Adds concurrent-session title/content translations. |
| resources/i18n/id.json | Adds concurrent-session title/content translations. |
| resources/i18n/it.json | Adds concurrent-session title/content translations. |
| resources/i18n/ja.json | Adds concurrent-session title/content translations. |
| resources/i18n/mn.json | Adds concurrent-session title/content translations. |
| resources/i18n/ms.json | Adds concurrent-session title/content translations. |
| resources/i18n/pl.json | Adds concurrent-session title/content translations. |
| resources/i18n/pt.json | Adds concurrent-session title/content translations. |
| resources/i18n/pt-BR.json | Adds concurrent-session title/content translations. |
| resources/i18n/ru.json | Adds concurrent-session title/content translations. |
| resources/i18n/th.json | Adds concurrent-session title/content translations. |
| resources/i18n/tr.json | Adds concurrent-session title/content translations. |
| resources/i18n/vi.json | Adds concurrent-session title/content translations. |
| resources/i18n/zh-CN.json | Adds concurrent-session title/content translations. |
| resources/i18n/zh-TW.json | Adds concurrent-session title/content translations. |
| .specs/draft-concurrent-login-guard/spec.md | Adds the feature specification and scenarios/acceptance criteria. |
…pport Handle 409 Conflict responses from the login API when another active session exists. Shows a confirm modal allowing users to force-login and terminate existing sessions. Supports TOTP retry scenarios by persisting force approval across login attempts via ref.
7fc9981 to
dbe304b
Compare

resolves #5711 FR-2189
Summary
POST /server/loginwhen another active session existsmodal.confirm()dialog allowing users to force-login and terminate existing sessionsforceparameter toclient.login()that signals the server to terminate existing sessionsforceLoginApprovedReflogin.ConcurrentSessionTitle,login.ConcurrentSessionDetected,login.ProceedLogin)Test plan
🤖 Generated with Claude Code