Skip to content

test(ui): Setup navigation e2e per role on desktop and phone, checklist re-pointed to the regrouped Setup (#39060) - #39318

Merged
objectstack-fleet[bot] merged 4 commits into
mainfrom
claude/issue-39060-setup-nav-e2e
Dec 3, 2026
Merged

objectstack-fleet[bot] merged 4 commits into
mainfrom
claude/issue-39060-setup-nav-e2e

Conversation

@objectstack-fleet

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

Copy link
Copy Markdown
Contributor

Part of #39060
Clause-②: no (tests and the QA checklist only; no accept set or public surface moves)
Metadata-protocol: none

维护者速读

  • 用户无感:这次只加了「系统设置」导航的端到端测试和测试清单条目,管理员和审计员在电脑和手机上看到的菜单没有变化。
  • 属于「系统设置导航重组」那组工作,为它补上按角色核对菜单、折叠记忆和旧名搜索的自动检查。
  • 出错只会让测试误报或漏报,不影响任何用户;整个改动可以直接撤回。
  • 要你做一件事:定义「部门管理员」是哪一种权限组合,目前代码里没有这个角色,所以这一半还没测。

What changes

  • New live e2e ui/e2e/live/setup-nav-39060.spec.ts (desktop, 1280x900) and ui/e2e/live/setup-nav-39060-phone.spec.ts (phone, 390x844, touch), both driving ui/e2e/live/helpers/setup-nav-39060.ts. For each role and viewport, three tests:
    1. Visibility. The groups shown, in DOM order, and the entries each group shows, read from the requiredPermissions gates on origin/main (setup.app.ts, setup-nav.contributions.ts, plugin nav contributions). Entries the gates withhold are asserted absent by name.
    2. Collapse persists. Close a group that opens by default (Audit & Data), open one that starts closed (Company Settings), reload, and both choices hold.
    3. Old-name search. In the command palette, Localization finds exactly one row, Company Settings › Language & Region, with the former-name note, and opens /settings/localization. Mail Delivery finds Notifications › Email Channel for the admin and no row for the auditor, because that entry carries manage_platform_settings.
  • Roles.
    • Platform administrator: the seeded dev admin (admin_full_access).
    • Auditor: a member holding setup.access + view_all_audit_log and nothing else. This is the separation-of-duties audit officer that setup.app.ts names on group_audit_data. No shipped set carries exactly that pair, so the helper saves one through the metadata door (PUT /api/v1/meta/permission/e2e_setup_auditor_39060) and creates the member with signInMember.
    • Department administrator: not driven. No permission set, position or seeded user defines the role on main. Per the dispatch it is an open question on the card, not an invented set.
  • Checklist (docs/qa/platform-checklist/areas/):
    • access-security.json
      • access-security.sharing-rule-authoring-ui re-pointed to group_access_sharing (rev 4).
      • New access-security.setup-nav-role-audience (rev 1): per-role groups and entries, the gated negatives, and the old-name search. It is automated by the two specs.
    • approvals.json: approvals.setup-nav-entry rewritten for Routing & Approvals (rev 3). It covers the group order, the ruled absence of an Approvals Inbox entry, the zh-CN labels, and a negative for members without manage_platform_settings.
    • automation.json: automation.setup-packaged-automation-board re-pointed to group_apps_ai (rev 16).
    • No retired group id is left in any of the three files.

Tests

Live e2e: 12 of 12 green (admin and auditor × desktop and phone × 3)

Ran against a real backend: ui/e2e/live/ci/start-backend.sh, showcase on its own port and DB, and a console bundle built at dc4a2cdbd6. The final run was after both ablation restores, on a fresh backend.

12 passed (39.6s)
admin, desktop   3/3
auditor, desktop 3/3
admin, phone     3/3
auditor, phone   3/3
Ablation 1: visibility (auditor, desktop)
  • Mutation. requiredPermissions: ['manage_platform_settings'] dropped from the Data Retention entry (the keywords: ['Data Lifecycle'] line, a marker added).
  • Blobs. 015f8780b61e became b014b1758605. The dist preflight found the marker in 4 built files.
  • Red. The auditor's Audit & Data exact list failed with + Data Retention.
  • Restore. Back to blob 015f8780b61e. A rebuild found the marker in 0 of 66 files, the tree was clean, and the test was green.
  • Disclosed. A first attempt with -g "auditor, desktop › shows" matched no tests, so that run measured nothing. The red above is from the rerun with the regex auditor, desktop.*shows the groups.
Ablation 2: collapse persists (all four role and viewport pairs)
  • Mutation. readRememberedGroupOpen(storageKey) ?? firstView became a global that is never set, so the remembered state is never read.
  • Blobs. 8bef662fe5a3 became ecf5357c77da. The marker was in 1 dist file.
  • Red. All four collapse cases failed with expected "false", received "true".
  • Restore. Back to blob 8bef662fe5a3. The marker was in 0 dist files, the tree was clean, and the run was 12 passed.
Typecheck, lint, checklist

All at head c14f50548b:

  • npx tsc -p tsconfig.e2e.json --noEmit (ui): exit 0. --listFiles names all 3 new files.
  • npx eslint on the 3 new files: exit 0.
  • node scripts/check-platform-checklist.mjs: exit 0, "OK — 16 areas, 451 items (440 active, 5 planned)".
  • dispatch-gates --commands derived 44 commands. All 44 were run, every one exit 0. That includes pnpm --dir ui exec vitest run scripts/ under the verify lock: 172 files and 5161 tests passed. check:doc-formula-expressions first exited 3 (PREREQUISITE NOT MET: @objectstack/formula not built). It passed after building that package.
  • node scripts/pm/overlap-check.mjs: VERDICT clean exit 0. It merges cleanly with origin/main 23e859ae39.
  • dispatch-gates --ran: "44 derived famil(ies) accounted for — 44 run, 0 NOT-MEASURED (a DERIVED zero — all 44 recorded an exit code and none of them is 3)".
  • NOT MEASURED locally. The type-check lanes, the Plan Test Core shards job, and the families outside the derivation (roster, wide-population, pending-changeset). These belong to CI.

Acceptance notes

  • Department administrator. It is undefined on main, so it is not covered here. That is why this is Part of, not Fixes. The options are on the card.
  • platform-core.json is a remainder. It is serial behind fix(plugin-auth): the dev admin seed stops storing the host's time zone and currency #39302, which was still open at the time of writing. On origin/main dc4a2cdbd6 it carries the retired ids on 7 lines: 670 (group_overview), 812 (group_configuration), 2417, 2420, 2426, 2428 and 2504 (group_apps / group_integrations).
  • Nightly live lane. The two specs run in the nightly live lane: test:e2e:live:nightly in ui/package.json, driven by examples/app-showcase/test/console-live-specs.live.test.ts. They are not in the required :ci allowlist, so a pull request does not run them.
  • Found: Connector Credentials points at a retired group. service-automation's Connector Credentials contribution still names group: 'group_integrations'. objectstack dev warns nav_contribution_group_renamed for it at boot. Reported to the seat to file.
  • Ctrl+K in headless Chromium. It did not open the palette, so the specs click the sidebar's Search… opener instead. Not investigated.

Verification

Read first:

  1. ui/e2e/live/helpers/setup-nav-39060.ts, the ROLES table. Each entry list is a claim about a gate, and this is the one place a wrong expectation would hide.
  2. docs/qa/platform-checklist/areas/approvals.json, approvals.setup-nav-entry. It was rewritten, not only re-pointed.
  3. docs/qa/platform-checklist/areas/access-security.json, the new access-security.setup-nav-role-audience.

Two-minute check: bash ui/e2e/live/ci/start-backend.sh, then pnpm --dir ui exec playwright test --config=playwright.live.config.ts setup-nav-39060. You should see 12 passed.

🤖 Generated with Claude Code

https://claude.ai/code/session_01QSeKYnrQ7UMtHofKQVjcH2

…uditor, desktop and phone (#39060)

Live Playwright specs drive the regrouped Setup navigation against a real
backend: per role the groups and entries its gates allow and withhold, a
closed group stays closed after a reload (and an opened one stays open), and
the command palette finds a renamed entry by its old name.

Claude-Session: https://claude.ai/code/session_01QSeKYnrQ7UMtHofKQVjcH2
Co-authored-by: Claude <noreply@anthropic.com>
Replace the retired Setup group ids in access-security, approvals and
automation with their renamedFrom successors, rewrite the approvals
Setup-nav item for Routing & Approvals, and add
access-security.setup-nav-role-audience for the per-role groups,
entries and old-name search the new e2e drives.

Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QSeKYnrQ7UMtHofKQVjcH2
@objectstack-fleet objectstack-fleet Bot added the skip-changeset PR has no user-facing published change; bypasses the changeset gate label Dec 3, 2026
@github-actions github-actions Bot added the dependencies Pull requests that update a dependency file label Dec 3, 2026
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

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

L1 ACCEPT · PR #39318 (#39060, epic #39050) · head c14f50548b39db0ff2604bb08d26854f05b31a7d · read 2026-12-03T13:08Z

席位核对

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

  1. Shape. Part of #39060 is right: the merge delivers the card in part.
  2. Contract review: not owed. The diff is an e2e spec, the QA checklist and one test script list. It touches no published schema or governed text (check-governed-merges: NOT governed). It declares no narrowing and Clause-②: no.
  3. skip-changeset. The dev hung it when the PR was created, and the seat accepts it. l1-face reads that no published package is touched (@objectstack/spec-monorepo, object-ui-monorepo).
  4. Scope. Seven files, all within claim 7376194506 and amendment 7377847394. The amendment allows exactly one edit to ui/package.json: two names appended to test:e2e:live:nightly, read in the diff as a single -/+ line pair. The patch-round commit c14f50548b corrects three statements the wiring made false: the two spec docblocks and knownGaps[1] on access-security.setup-nav-role-audience, which moves to revision 2. All three files are on the claim surface, and the seat accepts the correction.
  5. Tests.
    • Live e2e against a real backend: 12 passed, covering the admin and the auditor on desktop and on phone, 3 cases each.
    • Two ablations, each red and then restored blob-equal: dropping the Data Retention gate showed it to the auditor, and removing the remembered-open read failed all four collapse cases.
    • The auditor's permission set is authored as a fixture inside the run. No shipped set carries exactly setup.access + view_all_audit_log.
    • One classifier refusal: a hand curl to a throwaway backend. It was not resent; the fixture does the same thing inside Playwright.
    • The spec code is unchanged since the 12/12 reading, and only docblocks moved. I spot-read the helper: no waitForTimeout, .only, skip or fixme.
  6. Gates.
    • The dev's dispatch-gates --ran at this head: 44 derived, 44 run, all exit 0. overlap-check is clean.
    • CI: Lint & Repo Gates and TypeScript Type Check succeed. l1-face reads 51 success, 16 expected skips, 0 failed and 0 pending.
    • mergeable_state is clean. Dogfood is not owed.
  7. Routed.

Clause-②: no · Metadata-protocol: none

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file size/l skip-changeset PR has no user-facing published change; bypasses the changeset gate tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants