Repository navigation
fix(platform): close the session-lapse leftovers after #3795 - #3804
Merged
Merged
Conversation
The one table the Google Drive, OneDrive and SharePoint pickers share rendered its checkboxes without a name, so a screen reader announced each row's box as a bare "checkbox" (WCAG 4.1.2). The header box now reads "Select all" (common.aria.selectAll) and each row's box names its item through the new documents.aria.selectItem, in en, de and fr. The dialog tests find a row's box by that name instead of by position; a table test pins the names in every shipped locale and runs axe.
In an installed iPhone app, the two-factor and embedding banners stood first in the shell's alert stack whenever no session notice was above them. Their words sat under the notch, and the shell's header (or a thread page's spacer) still padded the notch below them, leaving a blank band as tall as the notch between the banner and the header. The three banners now render through one ShellAlert, which marks the row as a shell alert (data-shell-alert) and pads the notch when it stands first. The session notice carries the same marker instead of its own. The header and the spacer drop their pad while any shell alert stands, so the notch is padded once, by whichever alert is on top.
The page ran a signed-out redirect of its own under the dashboard layout, which already owns both a signed-out visit (beforeLoad and its re-check) and a session that ends under an open page (Sign in / Stay here). Once the session probe lost its user, the page swapped the wizard for the loading frame, losing the typed organization name, and left for /log-in without the page to return to or the choice. The effect and the auth conditions are gone, so the wizard stays mounted behind the layout's confirmation. The frame now waits on the capabilities read's isPending rather than isLoading: that read waits for the session probe, and the layout mounts the page as soon as Better Auth confirms a live session, while the probe may still read signed out. A read that has not run yet is not loading, so the page said creation was forbidden in that window.
The connector OAuth intent lane kept its own copies of the suite's cookie handling and throwaway sign-up, which integration-lane-helpers.ts exists to hold once. It signs up through signUpUser now, and the identity lane's freshUser takes its Cookie header from cookieHeaderFrom (which also drops empty pairs), keeping its own password and address.
"Select {name}" read the same for a folder and a file of one name, which
Google Drive allows side by side, and a file named "all" read exactly
like the header's "Select all". A row's box now says what it selects,
the way the documents' own openFolder/openDocument labels do: "Select
folder {name}" or "Select file {name}", in en, de and fr.
A session that ends under the create-organization page is mostly met by a re-read: once the stale window has passed, a reconnect re-reads the capabilities, and the refusal marks the query as errored while it keeps its last answer. The page took any error for a failed load and swapped the wizard, and the name typed into it, for "the page could not load" behind the layout's Stay here. Only a read that never answered is an error now, the rule the org layout already applies to its member context. The probe-window case also asserts positively that the mounted page shows its frame.
useUserOrganizations still read the session probe for the create-organization page, which no longer asks it; the grace banner explained itself against a Banner component long since deleted; and an e2e note still credited the page with a guard of its own, where the /dashboard layout is what turns anonymous visitors away.
This was referenced Sep 29, 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.
Follow-up to #3795: the four leftovers from its review, each re-checked on current
mainfirst.What changed
1. The cloud file pickers' checkboxes are named (WCAG 4.1.2).
OneDriveFileTableis the one table the Google Drive, OneDrive and SharePoint pickers share. Its header box now reads Select all (common.aria.selectAll), and each row's box says what it selects:The keys are new,
documents.aria.selectFolder/selectFile, next to that group'sopenFolder/openDocument. The dialog tests now find a row's box by name instead ofconst [, rowCheckbox] = getAllByRole('checkbox').cloud-import-dialogs.lapsed-session.test.tsxdoes it with the real catalogs in en/de/fr.2. The dashboard's banners clear the notch when no session notice stands above them. The two-factor grace, low-backup-codes and embedding banners were three copies of one row; they now render through one
ShellAlert(app/components/layout/shell-alert.tsx).ShellAlertcarriesrole="status", the tint and adata-shell-alertmarker. Whichever alert stands first pads the notch (first:pt-[calc(0.75rem+var(--safe-top))]).data-session-lapse-notice.ShellMobileHeader/ShellNotchSpacerdrop their pad for.mobile-nav-shell:has(>[data-shell-alert]), so with any alert on top the notch is padded once, not twice.3. The create-organization page leaves a lapse to the dashboard layout.
routes/dashboard.tsxalready owns signed-out entry (beforeLoad and its re-check) and a session that ends under the page (Sign in / Stay here).navigate({ to: '/log-in' })effect is gone, and so are its auth conditions, so the wizard and the typed name stay mounted under Stay here.isLoadingError), the rule$id.tsxapplies to its member context. A session that ends here is mostly met by a re-read: a reconnect re-reads stale queries once the 5-minute stale window has passed. That re-read's 401 marks the query as errored while it keeps its last answer. Under the oldisErrorcheck, the page swapped the wizard for "the page could not load" behind Stay here.capabilities.isPendinginstead ofisLoading. The capabilities query isenabled: isAuthenticated, and the layout mounts the page as soon as Better Auth confirms a live session, possibly while the/users/meprobe still reads signed out. In that window the query has not run:isLoadingis false butisPendingis true. Without the old auth conditions, anisLoadingguard would have said creation is forbidden there.useUserOrganizationsdrops the auth fields this page no longer reads.4. The OAuth intent lane uses the shared lane helpers.
oauth-intent.integration.tsdrops its copies (cookieOf,signUp) forsignUpUserfromintegration-lane-helpers.ts.oidc-integration.ts'sfreshUsertakes its cookie fromcookieHeaderFrom, which adds the empty-pair filter; its own password and email domain stay.Where this differs from the brief, and why:
ShellAlertcannot miss the rule, and the header's selector stays a single attribute.isAuthLoadingis dropped as well. The layout never mounts its children before the probe resolves, so the page could only see it true after a reset of the probe, and unmounting the wizard then is exactly what this change removes.signUpUseris imported into the OAuth lane. ItscookieOfwas used only insidesignUp, socookieHeaderFromwould be an unused import.Review
An independent adversarial read of the diff found the re-read path in item 3 (fixed above), the same-named row labels (fixed), a probe-window test that asserted only absences (it now asserts that the mounted page shows its frame), and three stale notes (fixed).
Left as is, deliberately:
/users/menever answers a user, the page holds its frame; the layout reloads once after 8 s. Main's page bounced to/log-ininstead, whose guard sends a live session straight back to/dashboard.How it was verified
Unit/component (jsdom): 258 tests over the 25 test files that import or mock a module changed in the last round, all green.
onedrive-file-table.test.tsx: literal names in en/de/fr, every box named, axe clean.session-lapse-drafts.test.tsxruns the real/dashboardlayout with the real create-organization page. The wizard and the typed name survive Stay here both when the probe loses its user and when a re-read of the capabilities meets the 401. There is no navigate, and while a live session's probe catches up the mounted page shows its frame, never the refusal.organization-creation.test.tsxmodels v5 results (isPending,isLoadingError) and covers a failed re-read keeping the wizard.Before/after:
isError), exactly the two new re-read cases fail.isLoadingkept, the probe-window case fails ononboarding.workspace.creationForbidden.Browser (real Chromium).
session-lapse-recovery.browser.test.tsxrenders the real three banners in the phone shell with--safe-top: 47px: each alone above the header and above a thread page, two stacked, and one under the notice.Real app (backend + Vite, 375 px, a 47 px notch from the first paint), embedding banner showing.
visual-aspect-analyzer, main → branch: documents at 375 px with the notch 95 → 92, chat at 375 px with the notch 95 → 92 (twice), desktop at 1440 px 86 → 86 with identical defects.
Real Postgres.
ITEST_LANES=checkConnectorOauthIntent,checkNativeIdentitypassed 87/88: all 13 OAuth-intent and 58 identity checks. The one failure is the BM25 boot check, which needspg_search, and the scratch server lacks it. No workflow runsbackend:integration, so this is the only run of these lanes.Static checks.
oxlint --type-awareandoxfmt --checkon the changed files, and a scopedtscover them and their imports: all clean.bun run lint:manualis ok, andcheck-guide.tsfinds nothing new.Manual layer. AUTH-B14's notched-iPhone step now covers a banner with no notice, and the wizard keeping its typed name.
reference/automation.mdrecords the new coverage, including an accessibility row for the picker names.Overlap: open PRs #3801 and #3784 also edit
messages/{en,de,fr}.yml, and they, #3803 and #3778 edittests/manual/reference/automation.md, all on other lines.