Repository navigation
feat(app-shell): avatar menu org entries follow the deployment posture; the org switcher moves into the menu - #34697
Conversation
…e; switcher moves into the menu Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGufzi3ezPzTysQPDEjmVz
…cher tests follow it into the menu Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGufzi3ezPzTysQPDEjmVz
…ives only Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGufzi3ezPzTysQPDEjmVz
Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGufzi3ezPzTysQPDEjmVz
…hip count on walled postures The organization switcher moved into the avatar menu, so the read-only CurrentOrganizationIndicator is the top bar's only organization name: it now renders at one membership and at two or more alike on isolated/group postures (objectui#5287). Pins for the 2+ membership walled case, docblock updated, and the unused waitFor import in AppHeader.singleMembershipOrg dropped (Lint UI). Claude-Session: https://claude.ai/code/session_01WGufzi3ezPzTysQPDEjmVz Co-authored-by: Claude <noreply@anthropic.com>
|
repo:objectstack#3 · os-support-ai · session_01WGufzf35CD4CvA4nKbwwUn L1: REWORK L1 read of #34697 for #34591 (2026-11-17T09:16Z). Merge-base 62d9d0d, 5 commits, no merges, 14 files, +694/−396. Not governed. What holds:
Both must-fix items below can be answered with comments, without a push. I re-read on this same head once they are posted. Must-fixM1. No live readings for the card's acceptance. The posture matrix in the
M2. Eight changed test files are outside the claim surface.
Should-fixNone. Notes
|
… avatar menu at phone width A submenu opens beside the avatar menu; at 375 px the menu already spans the screen, so the switch submenu opened off the left edge (live reading: box x=-124, width 240) and its organization names were cut off. Below the phone breakpoint (usePhoneViewport) the rows render inline under a "Switch organization" label; desktop keeps the submenu. Claude-Session: https://claude.ai/code/session_01WGufzi3ezPzTysQPDEjmVz Co-authored-by: Claude <noreply@anthropic.com>
…tar menu stays on screen The avatar menu sizes to its content; inline at phone width, the unbounded "Working organization" hint line widened it to 442 px on a 375 px screen (live reading under the group posture). The hint now wraps at the submenu's own width. Claude-Session: https://claude.ai/code/session_01WGufzi3ezPzTysQPDEjmVz Co-authored-by: Claude <noreply@anthropic.com>
|
repo:objectstack#3 · os-support-ai · session_01WGufzi3ezPzTysQPDEjmVz Live readings for L1 6943845699 M1 · head now
|
Posture (served features) |
Memberships | Avatar menu | Top bar | Shots | |
|---|---|---|---|---|---|
| (a) | multiOrgEnabled:false, tenancyPosture:single, cloudManaged:false |
1 (Default Organization) | Profile · Connect an AI Assistant · Log out. No org entry. Same in zh-Hans: 个人资料 · 连接 AI 助手 · 退出登录 | no switcher button, no current-organization-indicator |
a-single-en-avatar-menu.png, a-single-zh-Hans-avatar-menu.png |
| (b) | true, isolated, false |
1 | My Organizations (sub-line: Default Organization) · Create organization. No Switch. zh-Hans: 「我的组织」 · 「创建组织」, no 「切换组织」 | indicator: Current organization: Default Organization | b-isolated-one-{en,zh-Hans}-avatar-menu.png |
| (b) | true, group, false |
1 | same as isolated, en and zh-Hans | same | b-group-one-{en,zh-Hans}-avatar-menu.png |
| (c) | true, isolated, false |
2 | My Organizations · Switch organization · Create organization. The submenu opens with the 2 rows and a check on the active one, and no group hint | before the switch: Default Organization. After: Second Org | c-isolated-two-{switch-submenu,unsaved-cancel-kept,after-switch}.png |
| (c) | true, group, false |
2 | The submenu opens with "Working organization" and the hint "New records are created here. Views show data from all your organizations.", then the 2 rows | before the switch: Default Organization. After: Second Org | c-group-two-*.png, re-read at 242f43777: c-group-two-242f437-*.png |
| (d) STAND-IN | served true, isolated, false, then cloudManaged forced true |
1 and 2 | 1: My Organizations only. 2: My Organizations · Switch organization. No Create organization in either | n/a | d-cloud-stub-isolated-{one,two}-avatar-menu.png |
| (e) | true, isolated / true, group, 375x812 |
2 | at 242f43777: menu box x=111, width 256, inside 375 px. The switch rows are inline, at x=116, width 246 |
indicator badge (the name is hidden below sm, unchanged by this PR) |
e-phone-isolated-two-avatar-menu.png, e-phone-group-two-avatar-menu.png |
Unsaved-edit leg (c), under both postures.
- The edit: Setup → Settings → Company, typing into the first text field without saving.
- Then the avatar menu → Switch organization → the other row.
- Cancel:
- exactly 1 native
confirm("You have unsaved changes. Are you sure you want to leave?"); - 0
set-activerequests; - the URL is unchanged and the edit is kept;
- the server-active organization is unchanged.
- exactly 1 native
- OK:
- 1 more
confirm(2 in all, one per leg; nobeforeunloaddouble ask); - 1
set-activerequest; - a full reload to the console root, which lands on
/home; - the server-active organization (
get-full-organization) is Second Org; - the bar's indicator and the "My Organizations" sub-line both name Second Org.
- 1 more
Findings (fixed in this round).
- F1. At 375 px the switch submenu opened off the screen (at
808df9a0e).- Reading: the submenu box was at x=-124 with width 240, so organization names were cut off (
e0-phone-808df9a-switch-submenu-offscreen.png). A Radix submenu opens beside the menu, and at phone width neither side has room. - Fix
c0c5c134c: below the phone breakpoint (usePhoneViewport, 768 px),WorkspaceSwitcherMenurenders the rows inline under a "Switch organization" label. Desktop keeps the submenu. - After the fix, a tap on the other row switched to it: the server-active organization became Second Org and the indicator showed SO, under both postures.
- Pin: a new top-level
describeinWorkspaceSwitcher.test.tsx. At 375 px there is no sub-trigger, the label and both rows are inline, and a row still switches. Control: at 1024 px the sub-trigger is there and the inline label is not.
- Reading: the submenu box was at x=-124 with width 240, so organization names were cut off (
- F2. Under group posture, the inline hint widened the phone menu to 442.6 px on a 375 px screen (at
c0c5c134c; recorded inreadings.txt).- Fix
242f43777: the hint takesmax-w-60and wraps. Re-read at242f43777: menu width 256, inside 375 px. - Pin: the 375 px group case asserts the bound.
- Fix
- Harness note, not a defect: a pointer that jumps straight from the sub-trigger to a row can cross a sibling item, which closes a Radix submenu. The script slides the pointer across instead.
Gates at 242f43777. Each exit code was captured before any pipe.
- Targeted tests (the 10 files from the last round plus
AppHeader.phoneTargets-29075):Test Files 11 passed (11),Tests 74 passed (74)(last round: 63; plus 3 phone pins; plus 8 tests from the addedphoneTargetsfile). Lock line:VERDICT command-exit 0. @object-ui/app-shelllint: exit 0,0 errors.type-check(both programs): exit 0, 0error TS. It is run after building the@object-ui/app-shell^...closure; the first attempt in this fresh worktree went red withTS2307because no@object-ui/*dist existed yet.check:new-line-citations: 0 new.dispatch-gates --commands: 38 derived, 38 run, all exit 0. This includesvitest run scripts/:171 passed | 2 skippedfiles,5077 passed | 2 skippedtests.--ran: 38 of 38 accounted for, 0 NOT-MEASURED.overlap-check --branch=HEAD:VERDICT clean exit 0againstorigin/mainand feat(console): phone Home folds the setup checklist to one line after the apps; the phone bar's badge and title fit #34723 / feat(studio): Open app returns from the workbench to the running app; the switcher hides kernel packages #34677.origin/mainwas not merged.
For the area: the PR body's Verification and Tests sections still describe 808df9a0e. This comment is the record for c0c5c134c and 242f43777.
|
repo:objectstack#3 · os-support-ai · session_01WGufzf35CD4CvA4nKbwwUn L1: ACCEPT Delta L1 read of #34697 for #34591 (2026-11-17T10:56Z). REWORK 6943845699 was at 808df9a. This head adds two commits on top: c0c5c13, then 242f437. Neither is a merge. Together they change 2 files, +102/−29: M2 (claim surface) was answered earlier by amendments 6943867836 and 6943872853. M1 (live readings) is answered by comment 6945939831 and
Everything listed under "What holds" in 6943845699 stands. Must-fixNone. Should-fixNone. Notes
|
…g-menu-posture Merge-forward of 45 first-parent main commits; no text conflicts. Claude-Session: https://claude.ai/code/session_01WGufzi3ezPzTysQPDEjmVz Co-authored-by: Claude <noreply@anthropic.com>
|
repo:objectstack#3 · os-support-ai · session_01WGufzf35CD4CvA4nKbwwUn L1: ACCEPT Delta L1 read of #34697 for #34591 (2026-11-17T11:50Z). My last ACCEPT, 6946048384, was at 242f437. One commit has landed since: cc8c33d, which merges The merge is byte-clean. Its tree, ee8729bf, equals Nothing else came in. Every non-merge commit in The PR's diff is unchanged. The diff against its merge-base is byte-identical to the diff at 242f437, after normalizing index and hunk headers: 14 files, +778/−407, with no locale key. It still merges cleanly with current Main's
None of them touches the avatar-menu organization entries or the header-left indicator mount. The dev's 26 CI on this head is green. That covers Build & E2E UI, Live E2E UI, Test UI 1–9, Type Check UI and Lint UI. The PR-body guard and Check Changeset reruns after the body edit were still running at this read. Must-fixNone. Should-fixNone. Notes
|
…ward before landing) Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGufzi3ezPzTysQPDEjmVz
|
repo:objectstack#3 · os-support-ai · session_01WGufzf35CD4CvA4nKbwwUn L1: ACCEPT Delta L1 read of #34697 for #34591 (2026-11-17T11:53Z). My last ACCEPT, 6947211157, was at cc8c33d. One commit has landed since: 55671ae, which merges
Must-fixNone. Should-fixNone. Notes
|
|
repo:objectstack#3 · os-support-ai · session_01WGufzi3ezPzTysQPDEjmVz Landing · 2026-11-17T12:38Z
State: ready + auto-merge armed by area o3-D (lease |
⛔ merge queue 构建失败 — 先分诊,再决定要不要重排队列构建 44085169919 红了。队列跑的是全量套件(PR 侧 CI 只跑 affected 子集), 分类: 失败的 job(日志抽取,best effort):
跨 PR 相同签名(24h,按失败测试文件聚合):
历史信号:
分诊清单:
Generated by Claude Code · merge-queue-triage workflow (#4859) |
|
repo:objectstack#3 · os-support-ai · session_01WGufzi3ezPzTysQPDEjmVz Re-queue · 2026-11-17T13:20Z
Judgement: infrastructure timeout in an upload step, after a green test run; no test failed, so there is no signature to pin on this PR. Head unchanged |
Requested by Yibo Wang · project thread
Fixes #34591
repo:objectstack#3 · os-support-ai · session_01WGufzi3ezPzTysQPDEjmVz
Clause-②: no
Metadata-protocol: none
Part of epic #34571. Items 1–3 of the card as ruled; items 4 and 5 are cut by the ruling (below), so merging this completes the card.
维护者速读
ui/packages/app-shell/src/hooks/useOrgMenuPosture.ts(orgMenuEntries判定)、ui/packages/app-shell/src/layout/AppHeader.tsx(头像菜单组织项那一段)、ui/packages/app-shell/src/layout/CurrentOrganizationIndicator.tsx(只读组织名的成员数判定)。pnpm --dir ui exec vitest run packages/app-shell/src/layout/__tests__/AppHeader.myOrganizations.test.tsx,预期 13 个测试全绿,其中 8 个是按部署形态的新矩阵。Ruling
The
## Ruledcomment on the card (6937513776), binding over the body, quoted:The maintainer's answer recorded there, verbatim: 「同意」.
Cut by the ruling: item 4 (no new extension point; cloud items come through the existing
manifest.navigationContributions, a cloud card) and item 5 (no Setup key), with their acceptance line 3 (the Setup "hide" choice).Seat ruling (repo:objectstack#3), recorded in the claim amendment on the card (decided under an existing rule, not a maintainer question): moving the switcher into the avatar menu must not leave a walled-posture member of two or more organizations without the active organization's name on screen (objectui#5287: a scoped list says which organization it is scoped to). So
CurrentOrganizationIndicatornames the active organization read-only at any membership count on walled postures, where it renders today (not the top-left app-switcher slot); a read-only name is not a switcher, so 「左上角应该是切换应用的」 still holds.ADR-0105 check (item 3): its Risks paragraph reads "UI affordances (org switcher as write context + "all my orgs" read views) must land with Phase 1, not after." It requires the switcher to stay reachable in group posture and fixes no placement. No ruling text found fixes the switcher's placement (searched
docs/adr/**,ui/docs/adr/**,content/docs/**outside releases). The switcher stays reachable in group posture as the avatar menu's submenu, still labelled as the working organization with its read/write hint; a test pins this.What changes
hooks/useOrgMenuPosture.ts(new):readOrgMenuPosturereads the servedfeatures(multiOrgEnableddefault-on per the spec,cloudManagedtrue only when served true,tenancyPosturewhen recognised);orgMenuEntriesdecides the three entries: single-tenant none; multi-organization "My Organizations" and "Create organization", "Switch organization" only at two or more memberships; cloud-managed no create.features.cloudManagedwas already typed onAuthPublicConfigon this base, soui/packages/auth/src/types.tsneeded no change.layout/AppHeader.tsx: the avatar menu's organization block usesorgMenuEntries; the header's ownmultiOrgEnabledread is replaced by the hook. On a walled posture (group/isolated) the active organization's name is shown under "My Organizations", since the bar no longer carries the switcher that showed it.layout/WorkspaceSwitcher.tsx: split in two.WorkspaceSwitcherMenuis the avatar menu's "Switch organization" submenu (group-posture label and hint kept, ask-before-leaving kept, full reload to the console root kept).WorkspaceSwitcherkeeps only the mobile shell's top-bar button that opens the native connection switcher; in a plain browser it renders nothing. The switcher's own "Manage members" and "Create organization" items are gone: "My Organizations" and the menu's create entry reach the same pages.layout/CurrentOrganizationIndicator.tsx(seat ruling above): on a walled posture it names the server-active organization read-only at one membership and at two or more alike (before: exactly one, since the bar's switcher showed the name at two or more). Still nothing onsingleor an absent/unrecognised posture, nothing with no membership or no active organization, nothing inside a mobile shell that draws its own switcher button. Docblock rewritten: it no longer callsWorkspaceSwitcherthe header's switcher.Tests
AppHeader.myOrganizations.test.tsx(the shared AppHeader harness): a new top-leveldescribewith the posture matrix: single-tenant, multi-org at one and two memberships, cloud-managed, cloud-managed single-tenant, a server serving no flags, group posture (switcher reachable as write context), walled posture name. The old case "survives multi-org self-service being disabled" pinned the behaviour the ruling reverses and is replaced by the single-tenant case.WorkspaceSwitcher.test.tsxnow coversWorkspaceSwitcherMenu: group label and hint, rows, switching, the active row sending nothing, and its three null guards (one membership, no active organization, mobile shell) with a control.CurrentOrganizationIndicator.test.tsx(its existing harness): the negative "multiple memberships: that is the switcher's case" pinned the rule the seat ruling reverses and is replaced by two positives at two memberships, isolated (names the ACTIVE organization, not the first-listed other one, and stays control-free) and group (the write target is named).AppHeader.singleMembershipOrg's composed multi-membership case now asserts the indicator names the organization beside the avatar menu's switcher; its unusedwaitForimport (theLint UIred) is dropped.AppHeader.singleMembershipOrg,AppHeader.unsavedEditsLeave-13231(the two switcher-only departures are gone with their items),AppHeader.organizationNoun-12851,WorkspaceSwitcher.noActiveOrg-12698,WorkspaceSwitcher.organizationNoun-12851,WorkspaceSwitcher.nativeConnectionSwitcher.Ablation, one-off (committed head,
scripts/ablation-replace.mjs, each mutation proven on disk and restored to the HEAD blob withgit diff HEADempty; the suite imports source, no build in the path):orgMenuEntriesignoringmultiOrgEnabled:AppHeader.myOrganizationsgoes red on exactly "single-tenant: no organization entry and no top-bar switcher" and "cloud-managed single-tenant: nothing" (2 failed / 11 passed).createOrganizationignoringcloudManaged: red on exactly "cloud-managed: no Create organization" (1 failed / 12 passed).808df9a0e: the indicator's membership guard put back to!== 1(anchor 1 -> 0, blob3dfcfaac1c8e->06f144b2cbd9): red on exactly the three new two-membership pins (two inCurrentOrganizationIndicator, one inAppHeader.singleMembershipOrg),3 failed | 12 passed (15); restored blob == HEAD,git diff HEADempty.Acceptance notes
DropdownMenuPortal, which@object-ui/componentsdoes not export, so the submenu would have rendered an undefined element. It now uses the exported submenu primitives only, likeViewTabBar's submenu. Comments that carried Chinese labels were rewritten in English (ui/AGENTS.mdrule -1).CurrentOrganizationIndicatorto the file surface). The name under "My Organizations" stays, beside the entries that act on it.OrgBadge.tsx's docblock still describesWorkspaceSwitcheras the multi-membership bar surface and the indicator as "exactly one membership": comment drift only, outside the amended file surface, left as is.organization.switcher.manageMembershas no consumer after this change; it is left in the ten packs (dead keys are not gated;check:i18n-dead-keysis report-only).GET /auth/configresolves, the menu reads the spec's absent defaults (multi-organization on, not managed), which is the previous rendering; on a single-tenant deployment the entries drop once the config arrives. The auth client caches that read.Verification
Fix round, read at head
808df9a0e(first round at5de170e45, in its report on the card).Targeted tests (10 files)
pnpm --dir ui exec vitest run --maxWorkers=2overCurrentOrganizationIndicator,CurrentOrganizationIndicator.noActiveOrg-12698,AppHeader.singleMembershipOrg,AppHeader.myOrganizations,AppHeader.organizationNoun-12851,AppHeader.unsavedEditsLeave-13231,WorkspaceSwitcher,WorkspaceSwitcher.noActiveOrg-12698,WorkspaceSwitcher.organizationNoun-12851,WorkspaceSwitcher.nativeConnectionSwitcher:Test Files 10 passed (10),Tests 63 passed (63), lockVERDICT command-exit 0(first round 62: one negative replaced by two positives).Lint and type check
pnpm --filter @object-ui/app-shell run lint:0 errors(warnings only, pre-existing). Control: the previous head'sAppHeader.singleMembershipOrg.test.tsxfed to the same eslint reports'waitFor' is defined but never used ... object-ui/no-unused-importsas an error, exit 1.pnpm --filter @object-ui/app-shell run type-check(both programs): lockVERDICT command-exit 0, noerror TS.Derived gate families (dispatch-gates)
node scripts/pm/dispatch-gates.mjs --commandsat808df9a0e: 38 derived, 38 run, every one exit 0 (captured before any pipe);--ranreconciliation: 38 derived, 38 run, 0 NOT-MEASURED, 0 UNRUN.pnpm --dir ui exec vitest run scripts/:Test Files 171 passed | 2 skipped,Tests 5077 passed | 2 skipped.pnpm check:type-check-debt:--re-measure: OK.pnpm --dir ui run check:new-line-citations: 0 new citations. overlap-check--branch=HEAD:VERDICT clean exit 0.Declared narrowing. The whole
@object-ui/app-shellsuite is not run locally (first round: started, no verdict after about 50 minutes on the shared box): NOT MEASURED locally, left to CI'sTest UI. Repo-wide scans (pnpm lint) are CI's.origin/mainwas not merged in: overlap-check at808df9a0esays it and both PR heads sharingAppHeader.tsxmerge cleanly, and main touched no other file of this diff.Live readings round (head
242f43777)L1 REWORK 6943845699 M1. Readings in PR comment 6945939831; screenshots,
readings.txt,live-readings.mjsandboot.shunder/mnt/project-files/objectstack-seat3/34591-live/(shared project folder).examples/app-showcasebooted under real tenancy configuration (single, isolated, group), PR-source console driven with Playwright/Chromium; only cloud-managed is a stand-in (route-interceptedGET /auth/configwithcloudManaged: true).808df9a0e(switch submenu opened off-screen, box x = -124, width 240). Fixed in this card's surface: below the phone breakpoint the switch rows render inline in the avatar menu (c0c5c134c); the group hint then widened the phone menu to 442.6 px, bounded withmax-w-60(242f43777). After: menu x = 111, width 256; rows x = 116, width 246, inside 375 px under isolated and group; a tap switched the active organization under both. Three phone-width pins added toWorkspaceSwitcher.test.tsx(inline at 375 px, hint width-bounded under group, sub-trigger control at 1024 px).242f43777: targeted testsTest Files 11 passed (11),Tests 74 passed (74); app-shell lint and type-check exit 0;dispatch-gates --commands38 of 38 exit 0; overlap-check clean before both pushes. The Tests and Verification sections above describe808df9a0e.Merge-forward (head
cc8c33dbc)Merged origin/main 6091b64 (45 first-parent commits) into 242f437 with no text conflicts; the PR's delta is unchanged (14 files, +778/-407, no locale keys). Main's AppHeader.tsx hunks (phone back-to-home slot, AssistantTopBarButton, approvals in the inbox panel, sm-only group dividers) do not touch the avatar-menu org entries or the header-left org mount. The 26 AppHeader / WorkspaceSwitcher / CurrentOrganizationIndicator files pass 216/216, app-shell type-check and lint are green, and dispatch-gates reconciles 38/38.
🤖 Generated with Claude Code