Skip to content

feat(app-shell): the account menu opens Setup for a member holding setup.access - #39175

Merged
objectstack-fleet[bot] merged 2 commits into
mainfrom
claude/issue-39062-avatar-menu-setup-entry
Dec 2, 2026
Merged

objectstack-fleet[bot] merged 2 commits into
mainfrom
claude/issue-39062-avatar-menu-setup-entry

Conversation

@objectstack-fleet

@objectstack-fleet objectstack-fleet Bot commented Dec 2, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #39062

Clause-②: no
Metadata-protocol: none

维护者速读

  • 能进系统设置的成员(管理员一类),点右上角或侧栏底部的头像,菜单里新多一项「系统设置」,点了直接进系统设置;以前只能从应用切换器进。
  • 属于「系统设置导航专题」:给管理员一个固定好找的入口;登录后先落到哪一页的规则照旧不动。
  • 出错时最多是有权限的人看不到这一项、或没权限的人看到一项点进去被拒;只是菜单多一项,可直接撤回。
  • 无

What changes

  • ui/packages/app-shell/src/layout/AccountMenu.tsx: a "Setup" item (after Profile, the assistant entry and the host's entries) that navigates to /apps/setup through the menu's existing unsaved-edits guard. It is drawn only when holdsSetupAccess(usePermissions().systemPermissions) is true: the same helper and the same permission source the shell's other Setup gates use (console/AppContent.tsx). No new permission read; no answer reported holds nothing.
  • ui/packages/i18n/src/locales/*.ts: new key user.setup beside the other user.* rows. en "Setup", zh-Hans 「系统设置」; the other packs use each pack's existing "System settings" wording (the key-parity test requires every pack); zh-Hant is the generator's output (gen:zh-hant), not a hand edit.
  • .changeset/39062-account-menu-setup-entry.md (moved from ui/.changeset/ in fix round 1: the Check Changeset gate reads the root directory only): patch for @object-ui/app-shell and @object-ui/i18n.
  • Not touched: ui/apps/console/src/components/RootLandingRedirect.tsx and its tests (ruling 「不改落地,只加头像入口」).

Read first, by risk:

  1. AccountMenu.tsx, the setupAccess && hunk: the gate itself.
  2. AccountMenu.setupEntry-39062.test.tsx: the holder / non-holder / no-answer cases.
  3. zh-Hant.ts: generated row, check it matches the generator.

Tests

New ui/packages/app-shell/src/layout/__tests__/AccountMenu.setupEntry-39062.test.tsx (7 tests):

  • holder of setup.access, avatar and sidebar triggers: the entry is a menuitem labelled "Setup", and selecting it routes to /apps/setup;
  • members holding only studio.access, holding nothing, or with no answer reported: no entry (with a control that the menu itself drew);
  • en.user.setup is "Setup" in the catalogue (not the call-site default), and the zh-Hans menu reads 「系统设置」.

Ablation: the gate replaced on disk by (true || setupAccess), the three non-holder tests went red (3 failed | 4 passed (7)); restored, git diff clean of it.

Acceptance notes

  • The entry sits beside the hidden-apps loop. The Setup app is not hidden, so it never appeared there and is not drawn twice.
  • The non-en, non-zh labels reuse each pack's existing "System settings" term rather than a new translation of "Setup".

Verification

Two-minute check: sign in to the console as an administrator, open the avatar menu; expect a 「系统设置」 / "Setup" row under Profile that opens Setup. Sign in as a member without setup.access; expect no such row.

Local readings at ed5aa06
  • vitest run packages/app-shell/src/layout/ packages/app-shell/src/__tests__/personInitialsFamily-36346: Test Files 182 passed (182), Tests 1638 passed (1638), VERDICT command-exit 0.
  • pnpm --filter @object-ui/i18n test: Test Files 110 passed (110), Tests 1874 passed | 13 skipped, VERDICT command-exit 0.
  • vitest run apps/console/src/pages/settings/__tests__/FirstRunChecklist.test.tsx (host entry beside the new one): Tests 95 passed (95).
  • type-check for @object-ui/i18n and @object-ui/app-shell: VERDICT command-exit 0.
  • dispatch-gates --commands: 30 derived; 29 run, all exit 0; check:type-check-debt NOT MEASURED (over a 200 s foreground limit on the shared box), left to CI. --ran: 30 accounted, 0 unrun.

🤖 Generated with Claude Code

https://claude.ai/code/session_01QSeKYnrQ7UMtHofKQVjcH2

@github-actions github-actions Bot added size/m documentation Improvements or additions to documentation labels Dec 2, 2026
…changeset directory

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QSeKYnrQ7UMtHofKQVjcH2
@github-actions github-actions Bot added the tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface label Dec 2, 2026
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack@os-justin · os-justin · session_01QSeKYnrQ7UMtHofKQVjcH2

L1 ACCEPT · PR #39175 (#39062, epic #39050) · head a9ccfd38eda4f7a74d3bffd5499e535f0a99f876 · read 2026-12-02T22:19Z

席位核对

ACCEPT · repo:objectstack@os-justin · head a9ccfd38eda4f7a74d3bffd5499e535f0a99f876

  1. Shape. l1-face --pr 39175 is CLEAN: 13 items, none flagged. Fixes #39062 is right; the card's four acceptance lines are each pinned.
  2. Diff, read in full.
    • AccountMenu.tsx draws a Setup item (user.setup) to /apps/setup through the menu's unsaved-edits guard (leaveTo), gated by holdsSetupAccess(usePermissions().systemPermissions). That is the same helper and source the shell's other Setup gates read. @object-ui/permissions is already an app-shell dependency.
    • RootLandingRedirect is untouched, per the ruling 「不改落地,只加头像入口」.
    • user.setup is added to every locale pack, which the all-locales key-parity test requires: en Setup, zh-Hans 「系统设置」, and each other pack reuses its existing system-settings wording.
  3. Tests. AccountMenu.setupEntry-39062.test.tsx, 7 cases:
    • a holder sees the entry on both triggers and is routed;
    • members with only studio.access, with nothing, or with no answer see none, with a control that the menu drew;
    • the label reads correctly in en and zh-Hans.
    • The gate ablation (true || setupAccess) turned the 3 non-holder cases red, then was restored clean.
  4. Fix round 1. The changeset moved from ui/.changeset/ to the root .changeset/, because Check Changeset reads only the root; its content is unchanged. The seat patched the PR body's one path line (read back identical).
  5. Declarations. Clause-②: no holds: no export, schema or key leaves the package boundary, and the new locale key is an internal catalogue row. Metadata-protocol: none.
  6. Gates at this head.
    • CI: 47 success, 17 expected skip, 0 failed.
    • check-governed-merges: NOT governed, 151 lines.
    • landing-k cannot answer, because no Test Core shard ran on this UI-only head. The label pack moves one key per locale and adds no locale pack, so the landing-K risk is nil.
    • The commit trailers are the model-free pair the trailer gate requires.

Clause-②: no · Metadata-protocol: none

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack@os-justin · os-justin · session_01QSeKYnrQ7UMtHofKQVjcH2

Landing · PR #39175 · 2026-12-02T22:19Z · ACCEPT above, at head a9ccfd38eda4f7a74d3bffd5499e535f0a99f876 · NOT governed (151 lines) · the seat marks it ready and arms the queue.

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review December 2, 2026 22:20
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Dec 2, 2026
Merged via the queue into main with commit 53ca731 Dec 2, 2026
65 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/issue-39062-avatar-menu-setup-entry branch December 2, 2026 22:43
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/m 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.

The avatar menu has a 系统设置 entry for members who can open Setup; first sign-in landing is unchanged (#39050)

2 participants