Repository navigation
fix(console): save a language picked on the sign-in page as the person's own when they have none - #30539
Merged
Conversation
…n's own when they have none Claude-Session: https://claude.ai/code/session_01L6bhgUkfsVq9sKkVSugapT Co-authored-by: Claude <noreply@anthropic.com>
…ry exit Claude-Session: https://claude.ai/code/session_01L6bhgUkfsVq9sKkVSugapT Co-authored-by: Claude <noreply@anthropic.com>
…uage harness Claude-Session: https://claude.ai/code/session_01L6bhgUkfsVq9sKkVSugapT Co-authored-by: Claude <noreply@anthropic.com>
…te census Claude-Session: https://claude.ai/code/session_01L6bhgUkfsVq9sKkVSugapT Co-authored-by: Claude <noreply@anthropic.com>
Contributor
Author
|
domain:ui#4 · os-sales · session_01L6bhgVfPeFZkN1FP93imKU 维护者速读
席位核对 — ACCEPT · head e29693a
Generated by Claude Code |
This was referenced Nov 5, 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.
Requested by Sales · project thread
domain:ui#4 · os-sales · session_01L6bhgVfPeFZkN1FP93imKU
维护者速读
sys_user.locale),换设备、发邮件都跟着走。LoginPage.tsxPost-login effect 新增的第 0 步;useUserLocale.ts的saveSignInLanguagePick。Fixes #30399
Clause-②: yes (widening)
Metadata-protocol: none
What changes
@object-ui/app-shelluseUserLocale.ts: a language picked while signed out is now also held for one save (signInPickToSave, page-load memory, no storage key). NewsaveSignInLanguagePick(userId, writer?)reads the person'ssys_userrow and, only whenlocaleis unset, writes the pick through the column's one write door,update('sys_user', id, { locale }), the calluseLanguageSelectionmakes. It spends the pick on the first call, sends no request when nothing was picked, and never rejects: a failed read or write logs once aterror(the pick stays in the device slot, so this browser still renders it).hasSignInLanguagePick()answers whether there is anything to save.hasSignInLanguagePick,saveSignInLanguagePickand theSignInLanguagePickWritertype are exported from@object-ui/app-shell(henceClause-②: yes (widening); the claim's line saysnoand names this case for the seat to correct).LoginPage.tsx, the Post-login orchestration effect only: a new step 0 starts the save once (ref latch) when there is a pick, holds the spinner, and re-runs the effect when the save settles (state). Steps 1 to 3 are unchanged, so all five exits wait on it:followOauthAuthorize)assign(handoff.target))assign(root or redirect))assign('/organizations'))assign(redirect or root), after the single-org auto-select)The "Read public auth config" effect and the
DevAdminRowrender are untouched (#30420 is changing them in parallel).Why
Measured on
origin/mainf6faf751and in a live sign-in (Verification below): the pick ends in theobjectui-localeslot,sys_user.localestays empty. Two findings the order's suggested route needed adjusting for:adapter.update('sys_user', id, { locale }).useAdapter()answersnullon/login: the console mountsAdapterProviderinsideConnectedShell, and the public auth routes render outside it. SosaveSignInLanguagePickbuilds the sameObjectStackAdapterAdapterProviderbuilds (same base URL,createAuthenticatedFetch) for the one save. Live, that is oneGET /api/v1/discovery, oneGETand onePATCHon/api/v1/data/sys_user/ID, all before the next page-load's discovery.signedOutPickis consumed by the owner-change event, which fires (insideAuthProvider) before the post-login effect runs, and never fires when the browser's last owner signs in again. So the save reads a second page-load copy, cleared by the same signed-in-switch path.Route B as ruled: awaited before the navigation, no fire-and-forget, no new storage marker.
Acceptance notes
RegisterPage.tsxrenders the same footer language menu and leaves by the same fourwindow.location.assignexits after a sign-up that signs the person in, so a pick made there is kept in the slot but not saved.SetupPage.tsxhas no language menu of its own; a pick made on another signed-out page earlier in the same page-load would reach its two exits unsaved.destaysde); what renders then is the existing reader's business, unchanged here.Tests
ui/packages/app-shell/src/hooks/__tests__/userLocaleSignInPick-30338.test.tsx, new top-level describe (8 cases): saved for a new owner; saved when the last owner signs in again (no owner change); an existing language is read and kept; CONTROL no pick, no request; spent once; a signed-in switch replaces it; a failed write resolves, logs aterror, slot kept; a failed read writes nothing.ui/apps/console/src/pages/auth/__tests__/signInLanguagePick-30399.test.tsx(new, 11 cases): for each of the five exits, nothing leaves while the save is in flight and the expected exit is taken once it settles; CONTROL for each exit with no pick; a session the mobile hand-off refuses saves nothing.vitest: locale hook files, the app-shell layout suite and every console auth page test (merged head 3e162ec)
Ablations (each through scripts/ablation-replace.mjs, mutation proven on disk, restored: blob == HEAD, git diff HEAD empty)
Type check
Verification
Live: showcase
pnpm dev -- --freshplus the console on vite, Playwrighten-US, 1440 wide. Users created by the seeded admin. Row 1 before = this head with step 0 disabled in place (ablation-replace --hold, restored after).sys_user.localeafter sign-indeRequests in row 1 after, in order:
POST sign-in/email,GET discovery,GET sys_user/ID,PATCH sys_user/ID, then the next page-load'sGET discovery.Gates (merged head 3e162ec)
node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstackderived 35; all 35 exit 0, codes captured before any pipe.pnpm --dir ui exec vitest run scripts/was killed once by the container's memory limit while other gates ran (exit 1, SIGKILL) and re-run alone: 170 passed, 2 skipped files, exit 0. Extra, outside the derivation:pnpm --dir ui run check:spec-symbolsexit 0;node scripts/check-sdui-manifest.mjsexit 0 (also derived).dispatch-gates --ran: 35 derived, 35 run, 0 NOT-MEASURED (a derived zero).Branch
claude/project-thread-3ct8gdis the card thread's platform-assigned branch (notclaude/issue-30399-*).🤖 Generated with Claude Code
https://claude.ai/code/session_01L6bhgUkfsVq9sKkVSugapT
Generated by Claude Code