Skip to content

feat(app-shell): avatar menu org entries follow the deployment posture; the org switcher moves into the menu - #34697

Merged
objectstack-fleet[bot] merged 9 commits into
mainfrom
claude/issue-34591-org-menu-posture
Nov 17, 2026
Merged

objectstack-fleet[bot] merged 9 commits into
mainfrom
claude/issue-34591-org-menu-posture

Conversation

@objectstack-fleet

@objectstack-fleet objectstack-fleet Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

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.

维护者速读

  • 改了什么:头像菜单里的组织菜单项改为按服务端已下发的部署形态显示:单租户不显示任何组织项;多组织显示「我的组织」「创建组织」,加入两个及以上组织才显示「切换组织」;云端托管不显示「创建组织」。顶栏左侧的组织切换器收进头像菜单,左上角只留产品标志与应用切换器。隔离/集团形态下,顶栏的只读「当前组织」名称改为不论加入几个组织都显示(原来只在恰好一个组织时显示)。
  • 为什么改:维护者要求单租户部署不出现组织菜单、左上角留给应用切换;裁决 6937513776 定为只读已下发信号,不加设置项、不加扩展点。
  • 风险与回滚:只改控制台前端(app-shell),无服务端/spec/云端改动;回滚即 revert 本 PR。风险点是多组织用户在隔离/集团形态下顶栏多出一个只读组织名(它替代了原来切换器上显示的名称,不是新控件);单租户顶栏不变。
  • 先看: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 ## Ruled comment on the card (6937513776), binding over the body, quoted:

Ruled: A — org menu items follow the served deployment signals (features.cloudManaged, features.tenancyPosture, multiOrgEnabled from GET /auth/config); no Setup override key (item 5 is dropped; this supersedes the maintainer's earlier 「这些应该在设置中都可以配置」); no new menu extension point (item 4): the cloud layer adds its items through the existing manifest.navigationContributions path (setup-nav.contributions.ts). Single-org member management stays reachable at Setup → Organization (ruling 6384629949 on #25347). Item 3 (moving WorkspaceSwitcher into the avatar menu) is checked against ADR-0105 before building; a conflict comes back to the maintainer.

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 CurrentOrganizationIndicator names 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): readOrgMenuPosture reads the served features (multiOrgEnabled default-on per the spec, cloudManaged true only when served true, tenancyPosture when recognised); orgMenuEntries decides 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.cloudManaged was already typed on AuthPublicConfig on this base, so ui/packages/auth/src/types.ts needed no change.
  • layout/AppHeader.tsx: the avatar menu's organization block uses orgMenuEntries; the header's own multiOrgEnabled read 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. WorkspaceSwitcherMenu is the avatar menu's "Switch organization" submenu (group-posture label and hint kept, ask-before-leaving kept, full reload to the console root kept). WorkspaceSwitcher keeps 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 on single or 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 calls WorkspaceSwitcher the header's switcher.
  • No cloud control-plane address is added anywhere (the diff's added lines carry no URL).

Tests

  • AppHeader.myOrganizations.test.tsx (the shared AppHeader harness): a new top-level describe with 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.tsx now covers WorkspaceSwitcherMenu: 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 unused waitFor import (the Lint UI red) is dropped.
  • Updated to the new placement: 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 with git diff HEAD empty; the suite imports source, no build in the path):

  • orgMenuEntries ignoring multiOrgEnabled: AppHeader.myOrganizations goes red on exactly "single-tenant: no organization entry and no top-bar switcher" and "cloud-managed single-tenant: nothing" (2 failed / 11 passed).
  • createOrganization ignoring cloudManaged: red on exactly "cloud-managed: no Create organization" (1 failed / 12 passed).
  • Fix round, head 808df9a0e: the indicator's membership guard put back to !== 1 (anchor 1 -> 0, blob 3dfcfaac1c8e -> 06f144b2cbd9): red on exactly the three new two-membership pins (two in CurrentOrganizationIndicator, one in AppHeader.singleMembershipOrg), 3 failed | 12 passed (15); restored blob == HEAD, git diff HEAD empty.

Acceptance notes

  • Inherited work. The first commit on this branch was written by an earlier run of this claim that a container restart stopped before it pushed. This run pushed it, reviewed it hunk by hunk, and fixed one defect in it: the submenu wrapped its content in DropdownMenuPortal, which @object-ui/components does not export, so the submenu would have rendered an undefined element. It now uses the exported submenu primitives only, like ViewTabBar's submenu. Comments that carried Chinese labels were rewritten in English (ui/AGENTS.md rule -1).
  • Multi-membership on a walled posture keeps an always-visible organization name in the bar. The first round left it only under "My Organizations"; the seat ruling above closed that inside this card (claim amendment added CurrentOrganizationIndicator to the file surface). The name under "My Organizations" stays, beside the entries that act on it.
  • OrgBadge.tsx's docblock still describes WorkspaceSwitcher as 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.manageMembers has no consumer after this change; it is left in the ten packs (dead keys are not gated; check:i18n-dead-keys is report-only).
  • Until GET /auth/config resolves, 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 at 5de170e45, in its report on the card).

Targeted tests (10 files)

pnpm --dir ui exec vitest run --maxWorkers=2 over CurrentOrganizationIndicator, 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), lock VERDICT 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's AppHeader.singleMembershipOrg.test.tsx fed to the same eslint reports 'waitFor' is defined but never used ... object-ui/no-unused-imports as an error, exit 1. pnpm --filter @object-ui/app-shell run type-check (both programs): lock VERDICT command-exit 0, no error TS.

Derived gate families (dispatch-gates)

node scripts/pm/dispatch-gates.mjs --commands at 808df9a0e: 38 derived, 38 run, every one exit 0 (captured before any pipe); --ran reconciliation: 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-shell suite is not run locally (first round: started, no verdict after about 50 minutes on the shared box): NOT MEASURED locally, left to CI's Test UI. Repo-wide scans (pnpm lint) are CI's. origin/main was not merged in: overlap-check at 808df9a0e says it and both PR heads sharing AppHeader.tsx merge 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.mjs and boot.sh under /mnt/project-files/objectstack-seat3/34591-live/ (shared project folder). examples/app-showcase booted under real tenancy configuration (single, isolated, group), PR-source console driven with Playwright/Chromium; only cloud-managed is a stand-in (route-intercepted GET /auth/config with cloudManaged: true).

  • Single-tenant: no organization entry, switcher or indicator (en and zh-Hans). Multi-organization at one membership: "My Organizations", no "Switch organization".
  • Two memberships under isolated and under group: the switch entry opens, the unsaved-edit ask fires (Cancel and OK both read), the reload lands on the root, and the indicator names the new active organization.
  • 375 px: the reading failed at 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 with max-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 to WorkspaceSwitcher.test.tsx (inline at 375 px, hint width-bounded under group, sub-trigger control at 1024 px).
  • At 242f43777: targeted tests Test Files 11 passed (11), Tests 74 passed (74); app-shell lint and type-check exit 0; dispatch-gates --commands 38 of 38 exit 0; overlap-check clean before both pushes. The Tests and Verification sections above describe 808df9a0e.

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

…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
@github-actions github-actions Bot added size/l documentation Improvements or additions to documentation tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface labels Nov 17, 2026
…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>
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#3 · os-support-ai · session_01WGufzf35CD4CvA4nKbwwUn

L1: REWORK
Head-sha: 808df9a

L1 read of #34697 for #34591 (2026-11-17T09:16Z). Merge-base 62d9d0d, 5 commits, no merges, 14 files, +694/−396.

Not governed. check-governed-merges --pr 34697: no governed paths, 1090 lines. CI: 55 runs on this head, none failed; Check Changeset and PR-body guards are green after the body edit. It still merges cleanly with current origin/main f6f5b50 (git merge-tree --write-tree clean). Main touched only AppHeader.tsx of this diff since the base.

What holds:

  • Shape. Fixes #34591 is right. Items 4 and 5 are cut by ruling 6937513776, which the body quotes. Items 1 to 3 are built, so nothing implementable is left on the card.
  • Declaration lines. Clause-②: no and Metadata-protocol: none match the claim. WorkspaceSwitcher, WorkspaceSwitcherMenu, CurrentOrganizationIndicator and useOrgMenuPosture are not exported from the package index, and outside layout/ only code comments name them, so no public face moves. No locale key is added.
  • Changeset. It names @object-ui/app-shell, the only published package whose src moved, and states both declaration lines.
  • The posture logic matches the ruling and the spec.
    • orgMenuEntries gates on multiOrgEnabled. The spec says it is "false on a single posture" (auth-endpoints.zod.ts:343–347), so single-tenant shows no entry and no switcher.
    • "Switch organization" needs two or more memberships.
    • cloudManaged drops create.
    • Absent flags read as the spec's defaults.
  • The ADR-0105 check holds. Under group, the switcher stays reachable as the write-context submenu, and CurrentOrganizationIndicator names the write target in the bar.
  • The seat's ruling B is applied inside the amended surface. The indicator still names the server-active organization, never the first-listed one (objectui#12698).
  • Acceptance 4. No added line carries a URL or a cloud address.
  • The ablations are real. Three one-off mutations go red on exactly the pins they should.

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-fix

M1. No live readings for the card's acceptance. The posture matrix in the AppHeader.myOrganizations harness is good evidence for orgMenuEntries. But the acceptance is about what a real console draws from a real GET /auth/config, through the real avatar menu, top bar and dropdown submenu. A first-round defect lived in exactly that layer: DropdownMenuPortal was not exported. #34656, #34665, #34677 and #34713 were held to the same standard. Please post readings from a booted console on this head, with screenshots under /mnt/project-files/objectstack-seat3/34591-live/:

  1. Single-tenant posture (multiOrgEnabled: false, tenancyPosture: single as served). The avatar menu has no organization entry, and the top bar has no switcher and no indicator. Give the served features with the shot. This is acceptance 1.
  2. Multi-organization, one membership. "My Organizations" and "Create organization" are there, and "Switch organization" is not. This is acceptance 2.
  3. Multi-organization, two memberships, walled posture.
    • The "Switch organization" submenu opens.
    • Switching goes through the unsaved-edits ask and reloads to the console root.
    • The bar's indicator names the new active organization.
    • Read it once under group (the write-target label and hint) and once under isolated.
  4. Cloud-managed. No "Create organization". A response stand-in for cloudManaged: true is fine if no cloud-managed boot is at hand; say which you used.
  5. One phone-width shot (375 px) of the avatar menu, since the switcher moved into it.

M2. Eight changed test files are outside the claim surface.

  • Claim 6937604379 names layout/AppHeader.tsx and layout/WorkspaceSwitcher.tsx (the files alone), hooks/**, auth/src/types.ts, the locale packs and .changeset/. Amendment 6941400194 adds CurrentOrganizationIndicator.tsx and its tests.
  • These edited pins are named by neither:
    • layout/__tests__/AppHeader.myOrganizations.test.tsx
    • AppHeader.organizationNoun-12851.test.tsx
    • AppHeader.singleMembershipOrg.test.tsx
    • AppHeader.unsavedEditsLeave-13231.test.tsx
    • WorkspaceSwitcher.test.tsx
    • WorkspaceSwitcher.nativeConnectionSwitcher.test.tsx
    • WorkspaceSwitcher.noActiveOrg-12698.test.tsx
    • WorkspaceSwitcher.organizationNoun-12851.test.tsx
  • The seat needs to post an amendment naming them, or ui/packages/app-shell/src/layout/__tests__/AppHeader*.test.tsx and WorkspaceSwitcher*.test.tsx. This is the same call as on feat(studio): Open app returns from the workbench to the running app; the switcher hides kernel packages #34677.

Should-fix

None.

Notes

  • A single-tenant deployment briefly draws the organization entries. Until GET /auth/config resolves, useOrgMenuPosture reads the spec defaults (multi-org on), so the menu draws "My Organizations" and "Create organization" for one frame until the config arrives. That is the previous behaviour, and the PR body says so. It is worth knowing, because acceptance 1 is read after the config resolves.
  • A degraded deployment loses switching. Here multiOrgEnabled is false although isolation was requested. A member of two or more organizations there now gets no switcher at all (before, the bar's switcher still drew). This follows the spec's own reading of the flag ("the console offers … switching … only when it is on"), so it is consistent. It is a visible change for that rare case, so one line in the changeset would help.
  • Out-of-scope items are stated and fine to leave:
    • the OrgBadge.tsx docblock drift;
    • the active org name appearing twice on walled postures;
    • the now-unread organization.switcher.manageMembers key.
  • The dev's open question about patching the PR body is answered by the skill reload (docs(pm-dispatch): premise before code, batched thread requests, card threads edit their own PR body #34630): area-run PRs have their body edited by the area. No action here.
  • Routing. Not governed. After ACCEPT, o3-D lands it through the queue.

… 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>
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#3 · os-support-ai · session_01WGufzi3ezPzTysQPDEjmVz

Live readings for L1 6943845699 M1 · head now 242f43777 (was 808df9a0e)

Read at 2026-11-17T10:49Z on a booted console. The phone reading failed on 808df9a0e, so this round fixed it in two commits (F1 and F2 below). Each has a test pin. The head moved: 808df9a0e → c0c5c134c → 242f43777.

Setup.

  • Backend: examples/app-showcase, run with objectstack dev --no-watch --seed-admin -p 38591 on a fresh SQLite database for each posture.
  • Console: the Vite dev server built from this PR's ui/ source on :38592, pointed at :38591.
  • Postures are real server configuration:
    • single: OS_TENANCY_POSTURE unset;
    • isolated / group: OS_TENANCY_POSTURE, plus OS_AUTH_MEMBERSHIP_POLICY=invite-only and OS_PLATFORM_OWNER_EMAIL, without which a walled boot refuses.
  • The second membership was created through the real POST /api/v1/auth/organization/create (HTTP 200).
  • Only (d) is stubbed: a browser route intercepts GET /api/v1/auth/config and forces features.cloudManaged: true. Everything else in (d) is served.
  • Everything is under /mnt/project-files/objectstack-seat3/34591-live/:
    • readings.txt (the full readings; each section names the console head it was read on);
    • live-readings.mjs and boot.sh (the scripts);
    • 22 PNGs.
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-active requests;
    • the URL is unchanged and the edit is kept;
    • the server-active organization is unchanged.
  • OK:
    • 1 more confirm (2 in all, one per leg; no beforeunload double ask);
    • 1 set-active request;
    • 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.

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), WorkspaceSwitcherMenu renders 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 describe in WorkspaceSwitcher.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.
  • F2. Under group posture, the inline hint widened the phone menu to 442.6 px on a 375 px screen (at c0c5c134c; recorded in readings.txt).
    • Fix 242f43777: the hint takes max-w-60 and wraps. Re-read at 242f43777: menu width 256, inside 375 px.
    • Pin: the 375 px group case asserts the bound.
  • 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.

For the area: the PR body's Verification and Tests sections still describe 808df9a0e. This comment is the record for c0c5c134c and 242f43777.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#3 · os-support-ai · session_01WGufzf35CD4CvA4nKbwwUn

L1: ACCEPT
Head-sha: 242f437

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: WorkspaceSwitcher.tsx and WorkspaceSwitcher.test.tsx, both inside the amended claim. The head still merges cleanly with current origin/main 6091b64. CI on this head has no failure; Test UI (aggregate), Type Check UI, Lint UI and Build & E2E UI are green, and Check Changeset was re-running after the body edit at read.

M2 (claim surface) was answered earlier by amendments 6943867836 and 6943872853.

M1 (live readings) is answered by comment 6945939831 and 34591-live/readings.txt. Single, isolated and group were each booted for real on app-showcase; cloudManaged is a route-intercepted /auth/config stand-in, and the readings say so.

  • Single posture (served multiOrgEnabled:false, single). The avatar menu has no organization entry, and the bar has no switcher and no indicator. Read in en and zh-Hans. This is acceptance 1.

  • Isolated, one membership. "My Organizations" (with the current name) and "Create organization" are there, and "Switch organization" is not. The bar names the organization read-only. This is acceptance 2.

  • Isolated and group, two memberships.

    • The submenu opens.
    • The unsaved-edit ask works both ways: Cancel keeps the edit and sends 0 set-active, while OK sends 1 and lands on /home.
    • The bar's indicator then names the new active organization.
    • Under group, the write-target label and hint show.
  • cloudManaged. No "Create organization".

  • Phone (375 px). The readings caught a real defect at 808df9a: the switch submenu opened at x = −124, off screen. It is fixed inside the surface:

    • c0c5c13 renders the rows inline below the phone breakpoint (usePhoneViewport, called before the early returns, so hook order is stable);
    • 242f437 bounds the group hint at max-w-60, which had widened the menu to 442 px.

    After the fix the menu sits at x = 111, width 256, inside 375 px under both walled postures, and a row tap switches. The before leg (e0-phone-808df9a-switch-submenu-offscreen.png) and the after legs are both on file. Three phone-width pins in WorkspaceSwitcher.test.tsx hold the inline form.

Everything listed under "What holds" in 6943845699 stands.

Must-fix

None.

Should-fix

None.

Notes

  • Menu height on short phones. At 375×812 the inline group menu is 737.5 px tall from y = 50, so it fits. On a shorter phone (375×667) it will run past the fold and relies on the dropdown's own scrolling or collision handling. This was not read; it is worth one look in a later round.
  • One screenshot was overwritten. e-phone-group-two-avatar-menu.png holds the 242f437 shot; the c0c5c13 shot of the same name was replaced. The readings text keeps both measurements.
  • Routing. Not governed. o3-D lands it once Check Changeset is green on this head.

…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>
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#3 · os-support-ai · session_01WGufzf35CD4CvA4nKbwwUn

L1: ACCEPT
Head-sha: cc8c33d

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 origin/main 6091b64.

The merge is byte-clean. Its tree, ee8729bf, equals git merge-tree --write-tree of 242f437 and 6091b64.

Nothing else came in. Every non-merge commit in 242f4377..cc8c33db is already on main.

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 origin/main 3bbda33.

Main's AppHeader.tsx changes sit beside this PR's, not on top of them. They are:

  • the phone back-to-home slot;
  • AssistantTopBarButton;
  • approvals in the inbox panel;
  • sm:-scoped dividers.

None of them touches the avatar-menu organization entries or the header-left indicator mount. The dev's 26 AppHeader*/WorkspaceSwitcher*/Indicator* files pass 216/216 on the merged tree.

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-fix

None.

Should-fix

None.

Notes

  • The merge commit carries the trailer pair. The body has a Merge-forward section.
  • Routing. Not governed. o3-D lands it through the queue once those two reruns are green.

…ward before landing)

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WGufzi3ezPzTysQPDEjmVz
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#3 · os-support-ai · session_01WGufzf35CD4CvA4nKbwwUn

L1: ACCEPT
Head-sha: 55671ae

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 origin/main 3bbda33. That main includes #34747. The merge brings the merge-base up to date for the K ≥ 15 rule.

  • The merge is byte-clean. Its tree, 0f0b2b83, equals git merge-tree --write-tree of the two parents.
  • Nothing else came in. Every non-merge commit it brings in is already on main.
  • The PR's diff is byte-identical to the diff at cc8c33d, after normalizing index and hunk headers: 14 files, +778/−407.
  • It merges cleanly with current origin/main 3bbda33.
  • The merge commit carries the trailer pair.

Must-fix

None.

Should-fix

None.

Notes

  • Routing. Not governed. o3-D lands it once CI on this head is green.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#3 · os-support-ai · session_01WGufzi3ezPzTysQPDEjmVz

Landing · 2026-11-17T12:38Z

Probe Reading
check-governed-merges.mjs --pr 34697 NOT governed · 1185 changed lines (+778 / -407) ≤ 3000
Head / L1 55671ae84a · L1 REWORK 6943845699 → live readings 6945939831 → delta ACCEPTs 6946048384, 6947211157, 6947294083 (this head) · all required check-runs success or skipped · mergeable_state: clean
Freshness merged forward to main 3bbda33 (K was 15 vs PRBASE 6091b64); now K = 1; no locale keys in this PR

State: ready + auto-merge armed by area o3-D (lease o3-D); Fixes #34591 closes the card on merge (items 4 and 5 cut by the Ruled comment 6937513776; seat ruling B inside the card).

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review November 17, 2026 12:39
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Nov 17, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Nov 17, 2026
@github-actions

Copy link
Copy Markdown
Contributor

⛔ merge queue 构建失败 — 先分诊,再决定要不要重排

队列构建 44085169919 红了。队列跑的是全量套件(PR 侧 CI 只跑 affected 子集),
所以失败的测试可能在本 PR 没碰过的包里 —— 那不是重排能修的。每次盲目重排都会让排在后面的所有 PR 重建一轮。

分类:failure —— 按下面的日志分诊。

失败的 job(日志抽取,best effort):

  • Test UI (4/16) — 失败步骤: Publish this shard's attestation(日志不可读,点进 job 看)

↳ 失败原因 是判读的关键:超时(Test timed out in … / Hook timed out in …)多半是负载/时序,不是本 PR 的回归;
断言(AssertionError: …)才指向真实的行为改变。两者的 FAIL 行长得一模一样,只有这一行能区分。

⚠️ 断言这一侧有一类例外,判据是断言在测什么,不是它是不是 AssertionError。 断言的对象是产品行为(一个值、一个形状、一次拒收)⇒ 照上面读:真实的行为改变,去查,⛔ 不要重排掉;
断言的对象是这次实验自身的有效性前提(跑完的耗时、负载下的先后、任何只在时间预算内才成立的条件)⇒ 它跟超时是同一类,同样对负载敏感,重排一次是合法的判别手段。
识别是机械的:断言的消息或它比较的值本身点名了一段时长、一个时间戳、一个耗时计数。实测过的一对 —— AssertionError: SecurityPlugin.init() ran: expected false to be true 测的是产品行为(真回归);
AssertionError: this run took over a second, so second-precision stamps could have differed too: expected 1006 to be less than 1000 测的是实验前提:它守护的那条不变式当时是绿的,同一个 head 原样重排一次即成功。
穿着 AssertionError 外衣的时间测量,仍然是时间测量。(⛔ 这只改「怎么读一次红」,不改「哪些测试可以重排」——后者由别处管。)

跨 PR 相同签名(24h,按失败测试文件聚合):

  • ⚠️ 本次没有可用的聚合签名(日志里没有能解析出测试文件名的 FAIL 行)—— 这不是「没有同签名的其他 PR」,是这一轮没测到。跨 PR 聚合本次不可用,请手工比对其他 PR 的同类评论。
  • ⚠️ 24h 评论账本没读完(超过 5 页仍未读到窗口尽头),所以上面的「不同 PR 数」是下界,不是全量。

历史信号:

  • 本 PR 过去 24h 无队列失败记录(首次)。
  • 过去 24h 队列共有 31 个失败构建(不含本次)。

分诊清单:

  1. 失败测试在本 PR 改动的包里 → 真回归,修 PR。
  2. 失败测试与本 PR 无关 → 看上面的「跨 PR 相同签名」;已有汇总 issue ⇒ flaky/环境问题实锤,去那张 issue 上谈,修好前重排只会再烧一轮全队列。
  3. 两者都不是 → 可能与同组 PR 语义冲突;等前面的 PR 落地或失败出队后再重排一次即可,不要连续重排。

Generated by Claude Code · merge-queue-triage workflow (#4859)

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#3 · os-support-ai · session_01WGufzi3ezPzTysQPDEjmVz

Re-queue · 2026-11-17T13:20Z

Probe Reading
Queue triage 6948722899 (build 44085169919) Test UI (4/16), failed step "Publish this shard's attestation"
Job 134047305467 log the shard's tests all passed (Test Files 290 passed (290), 12:53:30Z); the attestation artifact upload then failed with ##[error]Operation could not be completed within the specified time. (12:55:45Z)

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 55671ae84a82f90665f2e83d09a06f9dc1aa78bd (L1 delta ACCEPT 6947294083); merges cleanly with main, K = 14 (#34677 landed beside it on AppHeader.tsx without conflict). Re-armed once by area o3-D; a second ejection stops here and goes to the seat.

@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Nov 17, 2026
Merged via the queue into main with commit b04830f Nov 17, 2026
53 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/issue-34591-org-menu-posture branch November 17, 2026 13:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size/xl tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

头像菜单:组织相关菜单项按部署形态显示(单租户不显示),切换组织收进菜单,设置里可覆盖

2 participants