🐛 fix: workspace url sync (#15728)

* fix: workspace url sync

* chore: remove billing as personal
This commit is contained in:
Rdmclin2
2026-06-13 00:15:48 +08:00
committed by GitHub
parent ce81ea44bf
commit 52eaf2702e
@@ -45,6 +45,21 @@ const parseFirstSegment = (pathname: string): string | null => {
return match ? match[1] : null;
};
/**
* Whether `pathname`'s first segment could be an (as-yet-unresolved) workspace
* slug — i.e. it's present and not one of the reserved root segments.
*
* Top-level rendering only needs to block on the workspace list (to avoid a
* false 404 / wrong-scope paint) when this is `true`. On personal / reserved
* routes (`/`, `/agent/...`, `/settings/...`) the list isn't required to render,
* so callers can show personal context immediately and let the list hydrate in
* the background.
*/
export const isWorkspaceSlugCandidatePath = (pathname: string): boolean => {
const first = parseFirstSegment(pathname);
return !!first && !RESERVED_FIRST_SEGMENTS.has(first);
};
/**
* URL is the source of truth for workspace context.
*