Repository navigation
Conversation
P2-T02 (pages 01 and 19). The account menu from the avatar: identity, Profile & preferences, the account-menu.plan-billing slot for cloud, Help & docs and Sign out. Sign out POSTs /api/v1/logout with the CSRF token, resets analytics and opens the returned URL; if the POST fails it falls back to the GET logout. No "Switch to old version" item (D14). The organisation switcher from the pill: search, a row per organisation with role, member count and region (absent fields left out), the current one marked, a confirmation before switching, the one-organisation and member states, and a load error with retry. After a switch the app does a full load of the same section in the new organisation, else its dashboard. Create organisation is left for a decision (plan gap 6). lib/http.ts is the shared client: session cookie, X-CSRFToken on unsafe methods. Invisible until the shell (P2-T01) renders these components. Co-Authored-By: Claude Opus 5.5 <[email protected]>
… has no name Found on the dev preview: a user without a name got an empty title line above the e-mail. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…e and guard the CSRF cookie signOut now throws when the reply has no redirect URL so the GET logout fallback runs. signOutAndLeave in services/session.ts owns the whole sequence (POST, analytics reset, navigate, fallback) and AccountMenu calls it. A malformed CSRF cookie sends no header instead of throwing. The account trigger shows one letter, and the Help & docs link announces that it opens in a new tab. Co-Authored-By: Claude Opus 5.5 <[email protected]>
A switch in flight can no longer be cancelled, a 412 from the list sends the user to sign-in, an empty search says so, the dialog's from side comes from the current organisation, and overlapping list loads keep only the latest. The loading text is a live region and the current row carries aria-current. The Switch button gets the arrows icon, and avatars show two letters for a one-word name while the pill shows one. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
[Medium impact] No blocking issue remains, with the two earlier theme findings addressed by dependent PR #2402.
|
| <li | ||
| key={org.id} | ||
| {...(isCurrent ? { "aria-current": "true" } : {})} | ||
| className={`flex h-14 items-center gap-2.5 rounded-lg px-2.5 ${isCurrent ? "bg-[#f5f5fa]" : ""}`} |
There was a problem hiding this comment.
The current organisation row always uses the light background #f5f5fa, but OrgLine uses --foreground, which becomes near-white in dark mode. This makes the organisation's name hard to read. Use a theme-aware background for this row.
| className={`flex h-14 items-center gap-2.5 rounded-lg px-2.5 ${isCurrent ? "bg-[#f5f5fa]" : ""}`} | |
| className={`flex h-14 items-center gap-2.5 rounded-lg px-2.5 ${isCurrent ? "bg-[var(--muted)]" : ""}`} |
Prompt To Fix With AI
This is a comment left during a code review.
Path: frontend/src/v1/shell/OrganizationSwitcher.tsx
Line: 307
Comment:
**Current row fades in darkness**
The current organisation row always uses the light background `#f5f5fa`, but `OrgLine` uses `--foreground`, which becomes near-white in dark mode. This makes the organisation's name hard to read. Use a theme-aware background for this row.
```suggestion
className={`flex h-14 items-center gap-2.5 rounded-lg px-2.5 ${isCurrent ? "bg-[var(--muted)]" : ""}`}
```
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.There was a problem hiding this comment.
Valid on this branch alone. The token port that follows #2399 moves the current row to bg-muted and defines --primary-muted in all three themes. Leaving this open until it lands.
| className="z-50 flex w-[280px] flex-col gap-0.5 rounded-[10px] border border-[var(--border)] bg-[var(--sidebar)] p-1.5 shadow-[0_8px_24px_0_#0000001f]" | ||
| > | ||
| <div className="flex items-center gap-2.5 px-[9px] pt-1.5 pb-2"> | ||
| <span className="flex size-9 shrink-0 items-center justify-center rounded-full bg-[var(--primary-muted)] text-[13px] font-semibold text-[var(--primary)]"> |
There was a problem hiding this comment.
Avatar and badge backgrounds disappear
--primary-muted is not defined in the frontend styles. The account avatar, switch dialog icon and Current badge therefore lose their intended background. Use an existing colour variable or provide a fallback until the v1 colours land.
Prompt To Fix With AI
This is a comment left during a code review.
Path: frontend/src/v1/shell/AccountMenu.tsx
Line: 69
Comment:
**Avatar and badge backgrounds disappear**
`--primary-muted` is not defined in the frontend styles. The account avatar, switch dialog icon and Current badge therefore lose their intended background. Use an existing colour variable or provide a fallback until the v1 colours land.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.There was a problem hiding this comment.
Valid on this branch alone. The token port that follows #2399 moves the current row to bg-muted and defines --primary-muted in all three themes. Leaving this open until it lands.
…ins in the ignore check (UN-4270) Reported by Athul while building #2394/#2395 on this branch: - src/v1/tsconfig.json: skipLibCheck back on, as in tsconfig.json. Off, tsc also checked third-party typings, and @types/chai 5.2.3 and vitest 3.2.6 both declare `containSubset`, so any v1 test importing vitest failed typecheck:v1. A fixture test now imports vitest to keep this covered. - The "no v1 file is git-ignored" check skips src/v1/plugins/<id>/: cloud plugins copied there are git-ignored on purpose (#2394).
…o the viewport The popover had no height limit, so with many organisations the rows ran past the bottom of a short window. The panel now takes Radix's measured available height (8px collision padding) and only the list scrolls, so the search box stays in view. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|



What
account-menu.plan-billingslot that cloud fills.Why
How
POST /logout, resets analytics and opens the URL the backend returns (the identity provider's logout). If the POST fails it falls back to the GET logout, which still ends the session.lib/http.tsis a small axios client with the CSRF header. It is a stand-in for P0-T05 (UN-4313, the shared HTTP client) and is replaced when that lands.#v1-portalcontainer) when those land.Can this PR break any existing features. If yes, please list possible items. If no, please explain why. (PS: Admins do not merge the PR without this section filled)
frontend/src/v1/; nothing in v0 imports them, and no route renders them until the v1 shell (P2-T01) mounts them.Database Migrations
Env Config
Relevant Docs
83e4fff.Related Issues or PRs
Dependencies Versions
Notes on Testing
bun run typecheck:v1,lint:v1,test:v1: clean, 82 vitest tests.main, i.e. after UN-4270 [FEAT] v1 scaffold, strict TypeScript and import boundary #2380 and UN-4286 [FEAT] Add the v1 plugin manifest, slots and build check #2394 merge. The commands above were run locally./landingwith the session gone (after unstract-cloud#1899). No console errors.Screenshots
To add from the dev run.
Checklist
I have read and understood the Contribution Guidelines.
🤖 Generated with Claude Code