Skip to content

test(showcase): the smoke's global setup declines the console's workspace prompt before any spec runs - #29889

Merged
objectstack-fleet[bot] merged 2 commits into
mainfrom
claude/issue-29811-nightly-showcase-smoke
Nov 3, 2026
Merged

objectstack-fleet[bot] merged 2 commits into
mainfrom
claude/issue-29811-nightly-showcase-smoke

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Requested by 田騏 · project thread

Fixes #29811

Clause-②: no
Metadata-protocol: none

维护者速读

  • 改了什么:showcase 浏览器冒烟的 e2e/global-setup.ts 在所有用例开跑前,用控制台工作区提示框自己的「Not now」按钮把它关掉一次,只把提示框「已问过」的本机记录带进各用例共用的 storageState;没有改任何用例、断言、超时或产品代码。
  • 为什么改:feat(console): the workspace prompt also asks an administrator for a still-unset default currency #28953(2ac698baf1)让控制台在组织未设默认货币时弹出一个模态框询问管理员。showcase 的开发种子在主机未设区域/区域无国家时不写货币,于是夜间每个用例都撞上这个模态框:背后页面被标成 aria-hidden,按角色查找的三个用例(批量操作勾选框、Money 分组按钮、相关列表表格)找不到元素,夜间 live 层因此变红。
  • 风险与回滚:低。只动测试夹具;「Not now」不向工作区写任何东西,showcase 数据与金额显示保持原样;storageState 只多一条提示记录,不带入侧栏展开等其它状态。回滚即回退本 PR。
  • 先看:examples/app-showcase/e2e/global-setup.ts(declineWorkspacePrompt 及其返回的记录过滤)。
  • 两分钟验证:cd examples/app-showcase && CI=1 SMOKE_API_URL=http://localhost:39111 npx playwright test e2e/bulk-capability-gate.spec.ts e2e/detail-shapes.spec.ts,预期 4 passed。
  • 需要你做的:无,席位落地。

What changes

examples/app-showcase/e2e/global-setup.ts now answers the console's one-time workspace prompt once, before any spec runs:

  • It reads GET /api/settings/localization with the signed-in admin's token and decides whether the console would ask, by the console's own condition per key (a timezone still the default and unlocked, or a currency resolving from the default with no value and unlocked). Nothing to ask ⇒ nothing is opened.
  • Otherwise it opens the showcase app in a browser launched with the specs' own launch options (so OS_TEST_CHROMIUM_EXECUTABLE_PATH holds), waits for workspace-timezone-prompt, and presses workspace-timezone-prompt-decline ("Not now" / "Keep the default"). Declining writes nothing to the workspace.
  • It takes ONLY the prompt's per-device record (os:workspace-timezone-prompt:ORG:USER) from that context's localStorage and adds it to the storageState it already wrote. The rest of what the console stored while open (the sidebar's wide-open flag, recent items, the active organization) is left out, so every spec still starts from the fresh-context layout it measures from; detail-shapes derives its 780 px window from a context with no stored sidebar state.
  • A declined prompt that left no record throws, naming the cause, because every spec would meet the prompt again. A prompt the backend says would ask but the console never showed is a warning, as in ui/e2e/live/global-setup.ts, which already answers the same prompt for the console's own live suite.

No spec, assertion, timeout or product file changes.

Root cause, per failing test

All three reds have one cause: 2ac698baf1 (#28953, card #28872, "the workspace prompt also asks an administrator for a still-unset default currency"), which landed between the last green nightly (494c7435f8, run 41394734666) and the red one (339f63da30, run 41584589032). git merge-base --is-ancestor 2ac698baf1: not an ancestor of 494c7435f8 (exit 1; control leg on the same shallow checkout: 65a8d4ffb1 = 494c7435f8~3, deeper than the tested commit, exit 0), an ancestor of 339f63da30 (exit 0). The same commit taught ui/e2e/live/global-setup.ts to answer the prompt; the showcase smoke's global setup was not taught.

The page snapshot of each failure (local reproduction at 4b71a82b76) shows dialog: heading "Set the default currency" with the console behind it aria-hidden:

  1. bulk-capability-gate.spec.ts:38: getByRole('checkbox').first() resolves, then the click waits behind the modal overlay until the 45 s test timeout.
  2. detail-shapes.spec.ts:95: getByRole('button', { name: 'Money' }) excludes the aria-hidden subtree, so "Money header icon svg" is not found. The icon itself renders.
  3. detail-shapes.spec.ts:161: getByRole('table') inside the details column is excluded for the same reason, so INV-1002 is not found.

The product change is intended, so the specs stay as they are and the harness answers the prompt the way a person would.

Tests

  • Reproduced red at base 4b71a82b76: the two spec files, --retries=0, gave 3 failed and 1 passed, with the same three tests and the same errors as the nightly.
  • Green on head, three consecutive runs of the same two files (--retries=0, CI=1, a free port each run): 4 passed, 4 passed, 4 passed. After each run the storageState held exactly auth-session-token and the prompt record.
  • pnpm --filter @objectstack/example-showcase typecheck: exit 0 (its tsconfig includes e2e/**/*).
  • eslint --no-inline-config on the changed file: exit 0.

Acceptance notes

  • The other 51 tests in showcase-smoke.spec.ts stayed green on the red night with the same modal over every surface they opened. A "renders cleanly" check that a modal over the whole page does not disturb is weaker than its name. Noted here only; no card.
  • Answering with "Not now" keeps the showcase as seeded. The prompt's confirm arm (writing the browser region's currency) is not exercised by this smoke, as before.
  • No changeset: @objectstack/example-showcase is private and the diff is an e2e fixture. Labelled skip-changeset.

Verification

Derived gates

node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack: 32 commands for the 1 changed path. Each one was run with its exit code captured before any pipe: 31 exit 0, and pnpm check:dual-build-cjs-loads exit 3 (PREREQUISITE NOT MET: some packages had no dist/ in this worktree, so nothing was measured; CI's Lint & Repo Gates runs it). --ran reconciliation: 32 derived families accounted for, 31 run, 1 NOT-MEASURED, 0 UNRUN.

Full showcase live test

OS_TEST_TIERS=nightly pnpm --filter @objectstack/example-showcase test under the verify lock, twice on head 835ac408b2 (main 4b71a82b76), Console and the showcase's dependency closure built at that tree:

  • test/showcase-smoke.live.test.ts (this card's file): passed both times, Playwright 54 passed.
  • test/console-live-specs.live.test.ts: failed both times on ONE spec of ui/e2e/live/, record-history-display.spec.ts:56 ("the timeline stream's Changes chip shows display values"). The Owner and Customer Since change lines render as field names with no values, so Live E2E showcase_manager is not found. That file passed on the red nightly at 339f63da30, and it boots its own backend and its own global setup (ui/e2e/live/global-setup.ts), which this diff does not touch. So the package command exited 1 (lock VERDICT command-exit 1, twice). The cause is not attributed here; it is reported to the seat as a finding outside this card.

🤖 Generated with Claude Code

…pace prompt before any spec runs

The console's one-time workspace prompt gained a currency arm (2ac698b):
an administrator on a workspace whose localization.currency has no value
is asked in a modal on the first app page. The showcase's dev seed leaves
the currency unset on a host whose locale names no country, so every smoke
spec met that modal; the page behind it is aria-hidden, and the three specs
that read the page through role queries or click it went red in the
nightly live tier.

global-setup now answers the prompt once through its own decline button,
as ui/e2e/live/global-setup.ts does, and saves the storageState that
carries the prompt's per-device record. Declining writes nothing to the
workspace.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017ihL2gLghEqeDKTbDTC7Zd
…ke's storageState

Saving the whole context after the decline also stored the console's
sidebar wide-open flag, recent items and active organization, which
would change the fresh-context layout detail-shapes derives its 780 px
window from. Keep the sign-in state as it was and add the prompt's
per-device record alone; a decline that leaves no record throws.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017ihL2gLghEqeDKTbDTC7Zd
@objectstack-fleet objectstack-fleet Bot added the skip-changeset PR has no user-facing published change; bypasses the changeset gate label Nov 3, 2026
@github-actions github-actions Bot added the size/m label Nov 3, 2026
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:devx#2 · marchtian · session_017ihL2gLghEqeDKTbDTC7Zd

席位核对 — ACCEPT · domain:devx#2 · head 835ac408b201c680dec665b7a93c625604c72e2a · 2026-11-03T09:50Z

Checked against GitHub and the PR head, not against the report (os-dev-report 6600406834 on #29811).

  • Shape: a draft to main with Fixes #29811 once, Clause-②: no and Metadata-protocol: none. No assignees, no reviewers, skip-changeset (the example's e2e harness publishes nothing). +101/−2 in examples/app-showcase/e2e/global-setup.ts only.
  • Path surface: check-governed-merges --pr 29889 reads NOT governed (103 changed lines). No spec, assertion, timeout or product file changes.
  • Root cause, read in the diff and the bisect: 2ac698baf1 (feat(console): the workspace prompt also asks an administrator for a still-unset default currency #28953, card Console: when the organization has no default currency, the workspace prompt that asks for the timezone also offers a currency — today amounts silently show as bare numbers #28872) made the console open a modal asking an admin to set the workspace default currency, an intended change. The same commit taught ui/e2e/live/global-setup.ts to answer that prompt (its workspace-timezone-prompt test ids, read at main) but not the showcase smoke's global setup. So all three reds sat behind the modal. The control leg 65a8d4ffb1 is green and 2ac698baf1 is an ancestor of the red 339f63da30.
  • The fix mirrors the console harness. It asks GET /api/settings/localization whether the console would ask. If it would, it presses the prompt's own "Not now" button, which writes nothing to the workspace. It then keeps only the os:workspace-timezone-prompt:* record in the saved state, leaving out the sidebar flag that detail-shapes.spec.ts:161's 780 px layout depends on. If the decline leaves no record, setup throws instead of passing silently.
  • Gates (the dev's readings): the three specs pass on three consecutive runs at head; typecheck and eslint exit 0; dispatch-gates --commands 32 derived, 31 exit 0, and check:dual-build-cjs-loads exits 3 (no local dist/; CI runs it); --ran 1 NOT-MEASURED, prerequisite only. The seat lands once every check on this head is green.
  • Accepted deviation: the order's "full showcase live test exits 0 once" was not met. Both full runs passed showcase-smoke.live.test.ts (54/54) but failed the sibling console-live-specs.live.test.ts on ui/e2e/live/record-history-display.spec.ts:56. That suite boots its own backend and global setup, which this diff does not touch, and it was green on the 339f63da30 nightly. The seat lands on this card's own file and leaves the sibling to tomorrow's nightly. If it is red there, the nightly card names it, and the seat files it then.
  • Out of scope, not carded: the 51 "surface renders cleanly" cases stayed green with the modal over every surface on the red night, so they are a weaker check than their name says. This is noted in the PR's acceptance notes. Skills-docs: none — e2e harness only.
  • Landing: non-governed. The seat marks the PR ready and enables auto-merge; the queue waits for green.

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review November 3, 2026 09:51
@objectstack-fleet
objectstack-fleet Bot enabled auto-merge November 3, 2026 09:51
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Nov 3, 2026
Merged via the queue into main with commit 9edd6e7 Nov 3, 2026
46 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/issue-29811-nightly-showcase-smoke branch November 3, 2026 10:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/m skip-changeset PR has no user-facing published change; bypasses the changeset gate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

nightly-tiers: red on main

1 participant