From 172e70df22cd2ded93d59635f816def8f572d9c4 Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Tue, 24 Nov 2026 09:31:00 +0000 Subject: [PATCH] :books: Clarify frontend routing guidance Use a direct routing memory and record team resolution precedence to help preserve the team context during navigation. AI-assisted-by: gpt-6.1-terra --- .serena/memories/backend/auth-sso.md | 2 +- .serena/memories/frontend/core.md | 2 +- .../frontend/{routing-app-shell-subtleties.md => routing.md} | 2 +- .serena/memories/frontend/viewer.md | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) rename .serena/memories/frontend/{routing-app-shell-subtleties.md => routing.md} (83%) diff --git a/.serena/memories/backend/auth-sso.md b/.serena/memories/backend/auth-sso.md index 5c6754b947..7d62b433f7 100644 --- a/.serena/memories/backend/auth-sso.md +++ b/.serena/memories/backend/auth-sso.md @@ -5,4 +5,4 @@ - `check-nitrate-sso` receives the client route as a query string, not an absolute URL. `build-dest-url` validates parameter keys and builds the destination under `public-uri`; invalid input falls back there. Accept root routes without `screen`, and keep callback revalidation for older state tokens. The state token binds the SSO grant to the profile that initiated it: a different session must not receive that grant. - A client-supplied organization ID requires `app.nitrate/organization-access?` before SSO; callers without organization access get the no-access short circuit, not an SSO challenge. - When public registration is disabled, a matching invitation can allow registration. Password registration rechecks the non-expired invitation row under lock. OIDC registration requires `:registration`, `:oidc-registration` or an invitation whose member email matches the provider email after `clean-email`; the callback verifies it and registration revalidates it under lock when the flags are off. Only recognized OIDC provider types take the SSO registration path. Keep invitation identity checks on authenticated login too. -- Test both the root and workspace route forms, malformed redirect targets, changed sessions and invitation email mismatches. Frontend query-string construction: `mem:frontend/routing-app-shell-subtleties`. For test flags and setup see `mem:backend/testing`. +- Test both the root and workspace route forms, malformed redirect targets, changed sessions and invitation email mismatches. Frontend query-string construction: `mem:frontend/routing`. For test flags and setup see `mem:backend/testing`. diff --git a/.serena/memories/frontend/core.md b/.serena/memories/frontend/core.md index 34f1507658..504210550d 100644 --- a/.serena/memories/frontend/core.md +++ b/.serena/memories/frontend/core.md @@ -19,7 +19,7 @@ Start at `app.main.ui` for Rumext components, `app.main.data` for Potok events, ## App shell -- Router, history, SSO destinations and team context: `mem:frontend/routing-app-shell-subtleties`. +- Router, history, SSO destinations and team context: `mem:frontend/routing`. - Authentication event sources and invitations: `mem:frontend/auth-events`. - Error boundary, transport errors and reports: `mem:frontend/error-reporting`. - WebSocket lifetime, membership revocation, and job progress: `mem:frontend/websocket-notifications`. diff --git a/.serena/memories/frontend/routing-app-shell-subtleties.md b/.serena/memories/frontend/routing.md similarity index 83% rename from .serena/memories/frontend/routing-app-shell-subtleties.md rename to .serena/memories/frontend/routing.md index d80f303a21..22650daa6d 100644 --- a/.serena/memories/frontend/routing-app-shell-subtleties.md +++ b/.serena/memories/frontend/routing.md @@ -4,5 +4,5 @@ - Push of the current token does not write or notify; replace always writes and notifies, even for the same token, so URL corrections reach the router. `app.util.dom/replace-history-state!` intentionally rewrites without routing; do not substitute a notifying replace. - Route data uses query params. A repeated param can decode as a vector; use `rt/get-query-param` for a scalar. Use `rt/token->query-string` at the SSO boundary: the server owns the destination origin. Use `rt/token->url` for a client-side absolute URL; do not require `screen`, since root flows can carry params such as a template without a route name. See `mem:backend/auth-sso`. - `rt/nav-raw` exits the router; tests observe its destination by dereferencing the event, not by looking for an app listener. Unknown or empty routes verify the profile and teams before redirecting so root and invitation flows do not race. See `mem:frontend/auth-events` for login and invitations. -- Use the team-scoped navigation helpers in `app.main.data.common` rather than building the route at the call site. Their private `resolve-team-id` considers the team already on screen before the profile default, so the user's personal team does not replace the current team. An invalid team route fails explicitly rather than rendering a blank shell. +- Use the team-scoped navigation helpers in `app.main.data.common` rather than building the route at the call site. Their private `resolve-team-id` chooses the valid explicit ID, then the initialized team, then the current route's team, then the profile default. The route precedes the default so the user's personal team does not replace the team on screen. An invalid team route fails explicitly rather than rendering a blank shell. - For store exceptions, React boundaries and report limits/classification see `mem:frontend/error-reporting`. For the client reaction to lost membership and job events see `mem:frontend/websocket-notifications`. diff --git a/.serena/memories/frontend/viewer.md b/.serena/memories/frontend/viewer.md index 646892dab6..f021b1af45 100644 --- a/.serena/memories/frontend/viewer.md +++ b/.serena/memories/frontend/viewer.md @@ -4,4 +4,4 @@ - Viewer initialization fetches a view-only bundle and sends all supported features because an anonymous viewer may not know team-enabled features. Comment threads are fetched only for logged-in users. - The viewer resolves pointer values in file data and `:pages-index` through `app.main.features.pointer-map/resolve-pointer` with share-link scope before storing the bundle. Membership and share-link bundles have different fragment permissions; an unresolvable fragment rejects rather than silently dropping a page. See `mem:backend/permissions`. - `bundle-fetched` indexes pages, precomputes frames and navigates to the requested or selected frame. Zoom and interaction mode also live in route query params. `update-zoom-querystring` must compare current and expected zoom before replacing the route: otherwise loading and navigation can loop into React's maximum update depth error. -- Dashboard behavior is `mem:frontend/dashboard`; shared routing rules are `mem:frontend/routing-app-shell-subtleties`. +- Dashboard behavior is `mem:frontend/dashboard`; shared routing rules are `mem:frontend/routing`.