Skip to content

fix(workspaces): signing in lands in the organisation used last again - #1693

Merged
sickerine merged 1 commit into
devfrom
fix/last-workspace-sign-in
Dec 1, 2026
Merged

sickerine merged 1 commit into
devfrom
fix/last-workspace-sign-in

Conversation

@sickerine

Copy link
Copy Markdown
Collaborator

Found on dev after #1692 deployed: signing in landed on the person's own home page, not in the organisation they used last.

Cause

/sign-in counted as a page of the person's own workspace. When the session started on it, the page wrote "own workspace used last" into the rail's cookie, which cleared the remembered organisation before the home page that follows was asked for.

It passed before merge because the first version wrote the cookie from the rail, which waits for the account to load. The bot review's fix moved the write to a part every page mounts, and I re-tested the start addresses and the phone width after it, but not sign-in.

Fix

  • A page that is in no workspace says nothing about which workspace was used last.
  • The pages for signing in and signing up are such pages.

Checks

  • npx tsc --noEmit, npx vitest run lib/workspaces
  • In a browser on a production build against the dev backend, with real sign-outs:
    • first sign-in on a new browser lands on /
    • a member whose last workspace was the organisation lands in it after signing out and in, also when already signed in and opening /sign-in
    • with ?redirect_url=/publish they land on the organisation's Publish
    • with their own workspace used last they land on /
    • another member of the same organisation signing in on that browser lands on /
    • /, /publish?report=new, a paper page and a policy page behave as before

The sign-in page counted as a page of the person's own workspace, so the moment the session started it cleared the
organisation the browser remembered, and the home page that follows opened as the person's own. A page that is in no
workspace now says nothing about which was used last, and the pages for signing in are such pages.
@coderabbitai

coderabbitai Bot commented Dec 1, 2026

Copy link
Copy Markdown

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: a607feac-f36d-4649-b0ed-0df05d884e75
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Dec 1, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-12-01T19:02:19.324570Z af49d50 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@sickerine
sickerine merged commit 48fcdca into dev Dec 1, 2026
7 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.

1 participant