Skip to content

workplace: the console's workspace cookie names the workspace this page is open in - #39

Merged
richard-epsilla merged 1 commit into
mainfrom
fix/workplace-workspace-cookie
Oct 1, 2026
Merged

richard-epsilla merged 1 commit into
mainfrom
fix/workplace-workspace-cookie

Conversation

@richard-epsilla

Copy link
Copy Markdown
Contributor

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 named org.founderepsilla__hr_default with the kit launched there, the app's headers named org.songrenchu.0918.gmail.com__hr_default).

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 currentWorkspace() reads the cookie first and keeps the per-organization records as the fallback for a console that keeps only those. workspace.test.mjs pins 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

…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>
@richard-epsilla
richard-epsilla merged commit 02e8fbf into main Oct 1, 2026
6 checks passed
@richard-epsilla
richard-epsilla deleted the fix/workplace-workspace-cookie branch October 1, 2026 21:42
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.

1 participant