workplace: the console's workspace cookie names the workspace this page is open in - #39
Merged
Merged
Conversation
…ge is open in A browser signed in to several organizations holds one hr.workspace.current record per organization, and the app took the last one written, which was not the organization the page was open in: on a hosted console with eight organizations, My Workplace opened and said it had not been launched (the catalog was asked about another organization's workspace, 2026-10-01). The console writes the active workspace as the hr_workspace cookie on this origin when it opens a kit, and its API proxy scopes by that cookie too, so the cookie decides wherever it exists; the records stay as the fallback for a console that keeps only those. Tests for the choice. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
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.
A browser signed in to several organizations holds one
hr.workspace.current.<org>record per organization, and the app took the last one written, which was not the organization the page was open in. On the hosted console, with eight organizations in one browser, My Workplace opened and said "This workplace has not been launched": the kit asked the catalog about another organization's workspace (reproduced in that browser, 2026-10-01: the console's cookie namedorg.founderepsilla__hr_defaultwith the kit launched there, the app's headers namedorg.songrenchu.0918.gmail.com__hr_default).The console writes the active workspace as the
hr_workspacecookie on this origin when it opens a kit, and its API proxy scopes by that cookie too, socurrentWorkspace()reads the cookie first and keeps the per-organization records as the fallback for a console that keeps only those.workspace.test.mjspins the choice: cookie over records, a non-default workspace without the default flag, the record without a cookie, null with nothing.🤖 Generated with Claude Code