Skip to content

feat(console): org basics in one form, optional rows, 「Get started」 sidebar pill - #36791

Merged
os-zhuang merged 9 commits into
mainfrom
claude/project-thread-3ypdpe
Nov 24, 2026
Merged

os-zhuang merged 9 commits into
mainfrom
claude/project-thread-3ypdpe

Conversation

@objectstack-fleet

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

Copy link
Copy Markdown
Contributor

Requested by Warren · project thread

Fixes #36739

Clause-②: yes (widening)
Metadata-protocol: none

维护者速读

  • 管理员清单只剩一项必填:「组织基本信息」一张表单(名称、语言、国家/地区、时区、货币),点一次保存全部写入;邮件、邀请、内置 AI、外部 AI 改为「可选」,做了仍会自动打勾。
  • 管理员在每个应用的侧栏底部看到「开始使用 n/m」,点开就地显示清单;必填项做完后自动消失。成员看不到。手机上放在应用首页菜单之后。
  • 系统设置首页始终保留完整清单(含已完成项),做完后折成一行「查看清单」。
  • 三个提议(手机位置、「本机隐藏」范围、自托管 SetupPage 暂不合并)你已同意,记录在 初始设置清单:组织基本信息合成一张表单、其余改可选、侧栏底部「开始使用 n/m」小条(#36732 后续) #36739;席位 L2 已通过,合并由席位落地。

What changes

Following the maintainer's ruling on #36739 (one form, other rows optional, sidebar pill, no wizard):

  • One required row, one save. The administrator's first-run checklist folds the separate name / language-and-country / timezone / currency rows into one organization_basics row. Its form holds the organization's name and the four localization settings; values the server does not hold are suggested from the browser; a setting with neither a value nor a suggestion is required like the name; nothing is written before Save. Save renames the organization only when the name changed (updateOrganization), then writes the changed settings in one saveSettingsNamespace('localization', …) call. A refused rename or a refused/locked setting shows on its field, as before. The row is done when the organization has a real name (not the seeded Default Organization) and all four settings are set — read from the server, never from the click.
  • Everything else is optional. mail, invite, ai_provider and connect_assistant carry an 「Optional」 badge and still tick themselves. On the hosted profile first_app stays required and first_record stays optional. checklistCompletion now counts every drawn row in done/total, but complete is judged on required rows only; rows are ordered required first.
  • Shared state. The reads the Home card used to make (settings after boot paint, members, invitations, connected access, first record, launcher apps) move into FirstRunChecklistProvider (firstRunChecklistState.tsx), mounted once in the console's permissions scope, so Home's card, the Setup first page and the pill read one answer. Answers are keyed by org, user and permissions.
  • 「Get started n/m」 pill. FirstRunChecklistPill renders for the administrator only (the provider answers null for anyone else), in every app: from 768 px up in the sidebar footer above the account button (on the folded icon rail only the icon stays; the count is in its accessible name and tooltip); on a phone after the app's menu on the app home. A press opens the checklist in place in a popover; a row's link closes it as its page loads, and going Back to the page it was opened on does not reopen it. The popover's X only closes it; 「Hide on this device」 under the list is the separate action that hides the pill and Home's card. It disappears once the required rows are done, or when the administrator hides it on this device.
  • App-shell slot. @object-ui/app-shell exports a product-neutral SidebarFooterSlotProvider ('sidebar' | 'phoneAppHome'); UnifiedSidebar draws the host's element in those two places (2 lines). The shell names no checklist (ADR-0060). This is the Clause-②: yes (widening).
  • Setup first page (placement="setupPage") always shows the full list with done rows, has no dismiss, and folds to one line with 「Show list」 once complete.
  • i18n: all eleven packs replace the per-setting strings with console.firstRunChecklist.organizationBasics.*, pill.* and showList; zh-Hant regenerated from zh-Hans.

Tests

  • firstRunChecklistLogic.test.ts: organizationBasics (fields included only when declared, offers only for unset keys, done = named + all set); completion — optional rows never hold the list open, progress counts all rows, exactly four rows are optional.
  • firstRunChecklistProfile.test.ts: hosted profile with organization_basics + first_app required.
  • FirstRunChecklist.test.tsx (84 tests): admin-only reads; one required row on a fresh org (0 of 3 done); the basics form — prefill, one Save writes the name and the four keys, name required, a setting with no value and no browser suggestion required too (an es-419 browser: no write, no 「saved」, the form stays open), only changed values sent, Cancel, refused settings write, refused rename, zh/en; Setup page full list; the pill — admin sees 0/3 and opens the popover, a member sees nothing, it disappears once basics are done, save from the popover, the popover's X only closes it (no hidden record), a row's link closes it and Back does not reopen it, 「Hide on this device」 hides it, zh label.
  • UnifiedSidebar.footerSlot-36739.test.tsx: the slot draws in the sidebar footer at 1440 px ('sidebar') and after the app menu on the phone app home at 375 px ('phoneAppHome'); dropping either line in UnifiedSidebar fails its test; no provider draws nothing.
  • i18n: de-quote-pairing-3876 count 134 → 132 after the merge of main (the removed organizationName.todo and timezone.todo lines are the only two de spans that go), untranslated-identity-4376 allows pill.count ({{done}}/{{total}}, a pure format string).

Acceptance notes

  • Phone placement (accepted by the maintainer, recorded on 初始设置清单:组织基本信息合成一张表单、其余改可选、侧栏底部「开始使用 n/m」小条(#36732 后续) #36739): the pill sits after the app's menu on the phone app home (PhoneAppHome), the page that lists what the sidebar lists. On the phone app home the page's own end padding does not scroll out from under the bottom bar (the h-full route slot is overflowed by the page), so the pill's phone slot keeps the bar's height free below itself. The same defect hides ~33 px of the last menu row on a long phone app home without the pill; that pre-existing layout issue is reported to the seat, not fixed here.
  • 「Hide on this device」 kept (accepted by the maintainer): it hides only the pill and Home's card; Setup's first page always shows the full list.
  • Self-hosted SetupPage unchanged (accepted by the maintainer; not built): SetupPage already writes the organization name; adding the four regional fields there would let the row start done on a fresh self-hosted install. Left for a follow-up card if wanted.
  • Cost: every console load (not only Home) now lists the settings manifests once after boot paint for any session that holds system permissions; only a session that may write localization goes on to read the namespaces, members and invitations. A session with no permissions spends nothing.
  • Overlap: overlap-check — merges cleanly with origin/main. The branch has merged main twice; de-quote-pairing-3876 now reads main's 134 minus this PR's two spans = 132.

Verification

  • tsc --noEmit for the console: clean.
  • Local vitest: the three checklist files (115), packages/i18n + app-shell UnifiedSidebar* / ConsoleLayout* / console/__tests__ + console pages, components and App.* boot tests — about 6,600 tests, all green.
  • dispatch-gates.mjs --commands gates: all 41 named commands exit 0 (including pnpm --dir ui exec vitest run scripts/; 16 of them are checker --self-tests, which judge the checker, not this diff).
  • Browser, showcase stack (objectstack dev --seed-admin --fresh) + console dev server, zh-CN, frames attached in the project thread (/mnt/project-files/issue-36739/):
    1. desktop admin — pill 「开始使用 1/4」 at the sidebar bottom;
    2. popover open — 组织基本信息 (required), 邮件发送 / 连接外部 AI 助手 (可选), 显示已完成的项 (1);
    3. the basics form in the popover — name empty (org still default), language/country prefilled from the browser, timezone set by the server;
    4. Setup first page — full list with the done 邀请同事 row;
    5. phone (iPhone 13) — pill after the app menu, clear of the bottom bar; popover above it;
    6. member — no pill;
    7. admin saves name + basics from the popover → pill gone; Setup first page folds to 「完成初始设置 已完成 2/4 · 查看清单」.

🤖 Generated with Claude Code

https://claude.ai/code/session_01JQwxbY2FR4RafB2fexxeuA

…idebar pill (#36739)

The first-run checklist folds the organization's name, language and
country, timezone and currency into one required form that saves once;
mail, invitations and both AI rows become optional. An admin-only
「Get started n/m」 pill opens the list from every app's sidebar (after the
app menu on a phone's app home); Setup's first page keeps the full list.

Claude-Session: https://claude.ai/code/session_01JQwxbY2FR4RafB2fexxeuA
Co-authored-by: Claude <noreply@anthropic.com>
@github-actions github-actions Bot added size/xl documentation Improvements or additions to documentation tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface labels Nov 23, 2026
…-3ypdpe

# Conflicts:
#	ui/packages/i18n/src/__tests__/de-quote-pairing-3876.test.ts
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-warren · session_01JQwxbZeHNsF3RWcWpj7rGj

Contract review

Served-tier: TIER_DEFAULT
Head-sha: 1e80beb8df2f89513135f3a9ba6a68181e04b295
Local-runs: none
Scope: the whole diff of #36791, git diff ff0d1f16763bf7a2a8d57bf287b032a668704c88 1e80beb8df2f89513135f3a9ba6a68181e04b295 (25 files; the head is a merge of main at ff0d1f1 over four branch commits). Contract face (the Clause-②: yes (widening) declaration): ui/packages/app-shell/src/index.ts, ui/packages/app-shell/src/layout/sidebarFooterSlot.tsx (new), ui/packages/i18n/src/locales/{ar,de,en,es,fr,ja,ko,pt-BR,ru,zh-Hans,zh-Hant}.ts, .changeset/36739-org-basics-checklist-pill.md. Files in the diff that implement or consume it: ui/packages/app-shell/src/layout/UnifiedSidebar.tsx, ui/apps/console/src/AppContent.tsx, ui/apps/console/src/pages/settings/{FirstRunChecklistPill.tsx,firstRunChecklistState.tsx,FirstRunChecklist.tsx,firstRunChecklistLogic.ts}, the console tests pages/settings/__tests__/{FirstRunChecklist.test.tsx,firstRunChecklistLogic.test.ts,firstRunChecklistProfile.test.ts}, and the i18n tests de-quote-pairing-3876.test.ts, untranslated-identity-4376.test.ts. Cited and read only: app-shell/src/console/setupFirstPageSlot.tsx (the precedent slot), the package.json of @object-ui/{app-shell,i18n,console} (private, exports), .changeset/config.json (privatePackages, the fixed group), consoleSidebarRail.ts (collapsible), auth/src/AuthProvider.tsx (updateOrganization), organizations/manage/SettingsPage.tsx (the existing rename refusal), console/src/App.tsx (the one ConsolePermissionsScope mount), AGENTS.md's changeset rule, the prior seat L2 records that judged pack-key removals.
Security-touching: no
Rule-change-verified: none

Everything below comes from reading the diff and the tree at the head. Nothing was run. The PR body, card #36739 and the maintainer's 15:21Z ruling it quotes were read for context. The head matches the PR's head.sha; it did not move. Check runs at the head were still in progress when read (Type Check UI, Test UI shards); Check Changeset and the PR-body guards were green.

① Derived judgments

The widening declaration is right, and complete once the removed keys are counted in.

  • @object-ui/app-shell's root index gains three names: the value SidebarFooterSlotProvider and the types SidebarFooterSlot and SidebarFooterSlotPlace ('sidebar' | 'phoneAppHome'). The hook useSidebarFooterSlot stays module-internal (only UnifiedSidebar imports it). The package's exports map has only . and ./styles.css, so no other new file is addressable. No existing export or prop changes. UnifiedSidebar's props are unchanged; it draws the slot in two places (footer above AccountMenu under shellChrome, and after renderAppMenu('home') in the phone app-home portal).
  • @object-ui/app-shell is private: true but versioned (privatePackages.version: true), as the feat(console): from 768 px up a sign-in lands in the last-used app, and the platform home page retires #36738 record noted for SetupFirstPageSlotProvider. So the export is a workspace contract rather than an npm one; declaring it yes (widening) is conservative and matches that precedent.
  • @object-ui/i18n (published, ./locales and ./locales/*): each of the eleven shipped packs adds 11 leaf keys under console.firstRunChecklist (showList, organizationBasics.{title,todo,name,nameRequired,prefilled,save,saved}, pill.{label,count,aria}) and removes 15 (showDoneSplit, confirm, prefilled, organizationName.{title,todo,action}, languageCountry.{title,todo,saved}, timezone.{title,todo,saved}, currency.{title,todo,saved}). Per-pack line counts are identical (+15/−21 each). There are eleven packs, not twelve; the changeset says "all eleven", which is right. zh-Hant matches zh-Hans as generated. See N1 on the removals.
  • No route, server door, spec key or error code moves. The save path uses existing doors: updateOrganization (better-auth) and saveSettingsNamespace('localization') (PUT /api/settings/localization).
  • One meaning shifts on an unchanged key: console.firstRunChecklist.progress (" of done") now counts every drawn row, optional ones included, where it counted required rows only. The string's own words are unchanged and the changeset says so ("its progress (n/m) still counts every row"). That is console behaviour, not a pack contract.

The slot API works for consumers.

  • It mirrors SetupFirstPageSlot exactly (context of fn | null, provider taking value), now with a where argument. A host passes a stable module-level function (the console's sidebarFooterPill), and the function returns an element, so the host's hooks run in its own component (FirstRunChecklistPill), not inside UnifiedSidebar's render.
  • The shell names no product feature (ADR-0060): the host decides who sees the element and when it stands aside; an absent provider draws nothing.
  • See N2 on how the place union can grow.

② Semver level

  • patch on @object-ui/console, @object-ui/app-shell and @object-ui/i18n. This follows AGENTS.md's changeset rule: a non-protocol change, widening included, ships patch. Listing app-shell closes the gap N2 of the feat(console): from 768 px up a sign-in lands in the last-used app, and the platform home page retires #36738 record named.
  • Metadata-protocol: none is right: no spec, schema or authorable key moves; the slot is a runtime React context and pack keys are not something a metadata author writes.
  • Clause-②: yes (widening) and Metadata-protocol: none appear at the start of a line in both the PR body and the changeset. No major, no BREAKING banner owed (N1).

③ Boundary flags

  • Pins. The new keys are read by the console tests (pill.count 0/3, pill.aria, organizationBasics.*, zh 开始使用), which fail on the base where the keys do not exist. untranslated-identity-4376 allow-lists pill.count as a pure format string, which it is. The de-quote pins move 134 → 132 (okSpans) and 134/134/0 → 132/132/0: the base after fix(console): split the app menu into 「设计布局」 (design mode) and 「编辑应用」 (Studio) #36789 is 134, and the removed organizationName.todo („“) and timezone.todo („heute“) are the only two de spans that go (raw „ count in de.ts 111 → 109). The merge of main resolved the count correctly. The PR body's "133 → 131" predates the merge and is stale; the code is right.
  • Not pinned. No app-shell test draws SidebarFooterSlotProvider through UnifiedSidebar: the two inserted lines (footer and phone app home) are unexercised by any test in the diff. Reported to L1; not a contract defect.
  • Downstream. No source under ui/ still reads a removed key or a removed logic export (localizationRows, checklistDoneCount, ChecklistSettingsRow); the remaining mentions are historical comments in de-quote-pairing-3876.test.ts. The console is the only host of the new slot.
  • SQL / id materialization. Not touched; client-only change.
  • Author. PR user.login is objectstack-fleet[bot] (attribution os-warren); no separate author note owed.

④ Design judgment

This PR's surfaces are the Clause-②: yes declaration alone. They include no published schema, governed rule text or narrowing, so ④ is not required. For the record: a footer slot with a named place, rather than the shell importing the checklist, keeps the app-shell product-neutral, and one read provider above every route is what lets the pill, the Setup first page and Home's card agree.

Findings:

  • N1: The packs remove 15 console.firstRunChecklist keys. The PR body and changeset disclose it ("replaces the per-setting checklist strings"), no in-repo reader remains, and seat precedent has treated removal of console-namespace pack strings as outside the narrowing arm. A consumer that indexes en.console.firstRunChecklist.timezone.title from @object-ui/i18n/locales/en would stop type-checking; naming the removed keys in the changeset would make that grep-able in the CHANGELOG.
  • N2: SidebarFooterSlotPlace is a closed union passed to the host. Adding a third place later reaches a host whose function draws for any where it does not recognise; a one-line note on the type ("draw nothing for a place you do not know") would keep a future widening safe for hosts.
  • N3: The changeset says the pill "keeps its icon and its count" on the folded icon rail. FirstRunChecklistPill.tsx:80 hides the count with group-data-[collapsible=icon]:hidden, so only the icon stays (the count is in aria-label/title). The console runs the sidebar offcanvas, so the icon rail is rare there; the sentence ships in CHANGELOG.md as written.

Implemented-by: claude/project-thread-3ypdpe
Reviewed-by: session_01JQwxbZeHNsF3RWcWpj7rGj

VERDICT: PASS

…ery unset setting (#36739)

L1 review on #36791:
- In the pill's popover the X closes it; 「Hide on this device」 is its own
  labelled action under the list (new `hideHere` key in all packs).
- Save in the basics form requires a setting the server holds no value for
  and the browser offered none for, like the name, so it never reports
  「saved」 while the row stays undone.
- UnifiedSidebar's two slot lines are pinned by a test each.
- The popover closes on navigation without an effect; the changeset names
  the removed pack keys and the icon-rail behaviour as it is.

Claude-Session: https://claude.ai/code/session_01JQwxbY2FR4RafB2fexxeuA
Co-authored-by: Claude <noreply@anthropic.com>
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-warren · session_01JQwxbZeHNsF3RWcWpj7rGj

Contract review

Served-tier: TIER_DEFAULT
Head-sha: 0b715ebaf9572ffb6174348b1187df3902a446de
Local-runs: none
Scope: the delta since the previous L2 (PASS at 1e80beb8df2f89513135f3a9ba6a68181e04b295, PR comment 7117345887): git diff 1e80beb8df2f89513135f3a9ba6a68181e04b295 0b715ebaf9572ffb6174348b1187df3902a446de, one commit, 17 files. Contract face: ui/packages/i18n/src/locales/{ar,de,en,es,fr,ja,ko,pt-BR,ru,zh-Hans,zh-Hant}.ts (one added key each), ui/packages/app-shell/src/layout/sidebarFooterSlot.tsx (doc comment on the exported SidebarFooterSlotPlace only), .changeset/36739-org-basics-checklist-pill.md, and the PR body. Implementing and test files in the delta: ui/apps/console/src/pages/settings/{FirstRunChecklist.tsx,FirstRunChecklistPill.tsx}, ui/apps/console/src/pages/settings/__tests__/FirstRunChecklist.test.tsx, ui/packages/app-shell/src/layout/__tests__/UnifiedSidebar.footerSlot-36739.test.tsx (new). Cited and read only: UnifiedSidebar.tsx at the head (the two draw lines, shellChrome), firstRunChecklistLogic.ts (isKeySet, the field set/offer reading, DISMISS_RECORD_PREFIX), the form.fieldRequired and common.close keys in all eleven packs, untranslated-identity-4376.test.ts, the previous record l2-36791.md.
Security-touching: no
Rule-change-verified: none

Everything below comes from reading the delta and the tree at the head. Nothing was run. The head matches the PR's head.sha. Every check run at the head is completed: all non-skipped runs are green (Type Check UI, Test UI 1–16/16, Lint UI, Lint · ESLint, Live E2E UI, Build & E2E UI, Check Changeset, PR-body guards, Dogfood Regression Gate); the rest are skipped by path.

① Derived judgments

The one new published key is well formed.

  • Each of the eleven packs adds console.firstRunChecklist.hideHere (en Hide on this device) next to dismiss, with the same comment line; +2 lines per pack, no other pack change. No placeholder in any pack. Every pack's string differs from en, so untranslated-identity-4376 needs no entry (its only checklist entry is still pill.count). The de string has no „…“ span, so the de-quote-pairing-3876 counts (132) are unaffected. zh-Hant (在本機隱藏) is the conversion of zh-Hans (在本机隐藏). The console reads it in exactly one place (the popover's footer button).
  • The new required-field message reuses form.fieldRequired, and the popover X's name reuses common.close; both exist in all eleven packs, so the delta adds no other key.
  • SidebarFooterSlotPlace changes only in its doc comment ("a host draws nothing for a place it does not know"); no export is added or changed. The type and value set of @object-ui/app-shell's root index are as the previous record judged them.

The changeset now lists the pack movement exactly. Added under console.firstRunChecklist: showList, hideHere, organizationBasics.{7}, pill.{3} (12 leaves). Removed: showDoneSplit, confirm, prefilled, organizationName.{3}, languageCountry.{3}, timezone.{3}, currency.{3} (15 leaves). These match the packs at the head. This closes N1 of the previous record.

② Semver level

  • Unchanged: patch on @object-ui/console, @object-ui/app-shell and @object-ui/i18n. Adding one pack key is a widening and ships patch under AGENTS.md's changeset rule.
  • Clause-②: yes (widening) and Metadata-protocol: none each start their own line in the changeset (lines 9–10) and in the PR body (lines 6–7). No spec, schema, route or error code moves in the delta.

③ Boundary flags

  • Pins. The new key is read by FirstRunChecklist.test.tsx (Hide on this device as the popover's dismiss text), which fails without it. The X test fails without the fix (no first-run-checklist-close exists at the base), and it checks the real hide record key (os:first-run-checklist:org_1:u_admin, DISMISS_RECORD_PREFIX) stays null. The es-419 test fails without the fix: at the base Save went ahead with the rename and the offered keys and toasted 「saved」. The new UnifiedSidebar.footerSlot-36739 test pins both draw lines: removing footerSlot?.('sidebar') fails the 1440 px getByTestId, and removing footerSlot?.('phoneAppHome') fails the 375 px one. Its CONTROL test covers the case where no provider is mounted.
  • Required rule. A field is required only when !field.set and its draft is empty. A key locked by the environment resolves from env and counts as set (isKeySet), so a locked field is never required. A set key cleared in the form is still skipped, as before. The rule can block a Save that only renames while a key has neither a value nor an offer. That is intended: the row is done only when all four keys are set, and the changeset and PR body both say so.
  • Downstream. No new export or reader; the console is still the only host of the slot.
  • Author. Unchanged (objectstack-fleet[bot], attribution os-warren).

④ Design judgment

Not required: the delta adds one pack key and doc text, and includes no published schema, governed rule text or narrowing.

Previous findings

  • N1 (name the removed keys in the changeset): closed.
  • N2 (note on SidebarFooterSlotPlace for unknown places): closed.
  • N3 (icon-rail sentence): closed in the changeset and the pill's header comment; see R1 for the PR body.

Findings:

  • R1 (nit, PR body only): PR body line 23 still says "(icon and count stay on the folded icon rail)". The changeset (which ships to CHANGELOG.md) and the pill's comment now say that only the icon stays, with the count in its accessible name and tooltip. The PR body does not ship, but it is the squash-merge description.
  • R2 (minor, console behaviour, not contract): FirstRunChecklistPill now derives open as openOn === here and never clears openOn when the location moves. A row link inside the popover calls no onClose (FirstRunChecklist.tsx:206 RowLink and :701), so openOn keeps the page the popover was opened on. From 768 px up the pill stays mounted in the sidebar footer, so going back to that page (browser Back) opens the popover again with no press. The removed effect cleared open on any move. No test covers the "a row's link closes it" path. A possible fix is for row links in the popover to call onClose, or to reset openOn during render when it differs from here.
  • R3 (nit, style): in ar, de, es, fr, ja, ko, pt-BR and ru the new hideHere value is single-quoted, but the keys around it in those packs are double-quoted. Lint is green; this has no runtime effect.

Implemented-by: claude/project-thread-3ypdpe
Reviewed-by: session_01JQwxbZeHNsF3RWcWpj7rGj

VERDICT: PASS

L2 delta read on #36791: R2, the pill kept the page it was opened on, so
Back to that page reopened the popover with no press. The record is now
cleared while rendering any other page; a test follows a row's link and
goes Back. R3: `hideHere` takes each pack's quote style.

Claude-Session: https://claude.ai/code/session_01JQwxbY2FR4RafB2fexxeuA
Co-authored-by: Claude <noreply@anthropic.com>
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-warren · session_01JQwxbZeHNsF3RWcWpj7rGj

Contract review

Served-tier: TIER_DEFAULT
Head-sha: c08ee22bbb9ffe57395f866b06e8586ba612c80e
Local-runs: none
Scope: the delta since the previous L2 (PASS at 0b715ebaf9572ffb6174348b1187df3902a446de, PR comment 7117990842): git diff 0b715ebaf9572ffb6174348b1187df3902a446de c08ee22bbb9ffe57395f866b06e8586ba612c80e, one commit (c08ee22bbb), 10 files. Contract face: ui/packages/i18n/src/locales/{ar,de,es,fr,ja,ko,pt-BR,ru}.ts (quote style of the one hideHere line each) and the PR body. Implementing and test files in the delta: ui/apps/console/src/pages/settings/FirstRunChecklistPill.tsx, ui/apps/console/src/pages/settings/__tests__/FirstRunChecklist.test.tsx. Cited and read only: the .changeset/36739-org-basics-checklist-pill.md at the head (not in the delta), FirstRunChecklist.tsx at the head (RowLink, the first-run-checklist-link-* ids), the hideHere line in all eleven packs at the head, the previous record l2-36791-r2.md.
Security-touching: no
Rule-change-verified: none

Everything below comes from reading the delta and the tree at the head. Nothing was run. The head matches the PR's head.sha (checked before and after the review). Every check run at the head is completed (62): all non-skipped runs are green (Type Check UI, Test UI 1–16/16, Lint UI, Lint · ESLint, Live E2E UI, Build & E2E UI, Check Changeset, Dogfood Regression Gate, PR-body guards); the rest are skipped by path. One earlier PR-body guards run (job 138121290248, 00:28:29–00:28:52Z) is cancelled; it was superseded by the run triggered by the PR-body edit (job 138121477522, 00:28:54–00:29:08Z, success).

① Derived judgments

The contract face is unchanged apart from quote style.

  • Each of the eight packs changes only its hideHere line, from single to double quotes; the value text is byte-for-byte the same (ar إخفاء على هذا الجهاز, de Auf diesem Gerät ausblenden, es Ocultar en este dispositivo, fr Masquer sur cet appareil, ja このデバイスで非表示にする, ko 이 기기에서 숨기기, pt-BR Ocultar neste dispositivo, ru Скрыть на этом устройстве). No key is added or removed in any pack, and each of the eleven packs still has exactly one hideHere: line, so the key set across the eleven packs is as the previous record judged it. No value contains a ", so the requote needs no escaping.
  • The changeset is not in the delta. Clause-②: yes (widening) and Metadata-protocol: none still each start their own line in the changeset (lines 9–10) and in the PR body (lines 6–7).

② Semver level

  • Unchanged: patch on @object-ui/console, @object-ui/app-shell and @object-ui/i18n. The delta is a console behaviour fix, a test and a quote-style change; no spec, schema, route, export or error code moves.

③ Boundary flags

  • Render-time state update. FirstRunChecklistPill now runs if (openOn !== null && openOn !== here) setOpenOn(null); during render, before open is derived. This is the supported "adjust state while rendering" pattern: it sets the component's own state, and it is guarded so that it cannot loop. After the set, openOn is null and the guard is false on the re-render. The guard only fires when the location has moved off the page the popover was opened on. In that render open is already false (openOn === here fails), so nothing opens for a frame and onOpenChange is not called. There is no effect and no other setter in render. Opening (setOpen(true) sets openOn = here) and closing are unchanged.
  • Pin. The new test mounts the pill outside any <Routes> under MemoryRouter initialEntries={['/apps/sales']}, so the pill stays mounted across navigation, as it does in the sidebar footer. The test opens the popover, clicks first-run-checklist-link-mail (a RowLink <Link>, which calls no onClose), waits for the card to go, presses a navigate(-1) button, and then asserts that the card stays absent and the pill is present. Without the new line, openOn would still be /apps/sales after Back, so open would be true again and the popover would re-render its content. queryByTestId('first-run-checklist') would then be non-null and the test would fail. That is judged from reading the code, not from a run. The "card goes away after the link" half passes either way, through open = openOn === here.
  • Downstream. No new export or reader. BackButton and useNavigate are test-only.
  • Author. Unchanged (objectstack-fleet[bot], attribution os-warren).

④ Design judgment

Not required. The delta adds no published schema, governed rule text or narrowing.

Previous findings

  • R1 (icon-rail sentence in the PR body): closed. PR body line 23 now says "on the folded icon rail only the icon stays; the count is in its accessible name and tooltip", which matches the changeset (line 16) and the pill's comment. The same line also now says that going Back does not reopen the popover.
  • R2 (openOn not cleared on a move): closed by the guarded render-time reset, and pinned by the new test (see ③).
  • R3 (hideHere single quotes in eight packs): closed. All eight are double-quoted and the values are unchanged.

Findings:

  • N1 (nit, test file only): in FirstRunChecklist.test.tsx the new BackButton was placed between renderPill and its doc comment. /** The sidebar's pill, as an app's sidebar draws it, under the one provider. */ now sits directly above /** The browser's Back, ... */ function BackButton, so renderPill has lost its doc comment and two JSDoc blocks are stacked. This has no runtime or contract effect. Moving BackButton above that comment fixes it.

Implemented-by: claude/project-thread-3ypdpe
Reviewed-by: session_01JQwxbZeHNsF3RWcWpj7rGj

VERDICT: PASS

This was referenced Nov 24, 2026
…-3ypdpe

# Conflicts:
#	ui/packages/i18n/src/__tests__/de-quote-pairing-3876.test.ts
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-warren · session_01JQwxbZeHNsF3RWcWpj7rGj

维护者速读

管理员的初始设置清单只剩一项必填:「组织基本信息」,一张表单一次保存。其余几项改为可选。每个应用的侧栏底部有「开始使用」小胶囊,只有管理员看得到;手机上它放在应用首页菜单的最后。你 19:39Z 同意的三条方案都按原样保留。
要你做的:无。

席位核对 — ACCEPT (L1, delta) · repo:objectstack#1 · head 68d36754 · 2026-11-24T20:18Z

  • Rulings: the maintainer accepted all three Acceptance-notes proposals (初始设置清单:组织基本信息合成一张表单、其余改可选、侧栏底部「开始使用 n/m」小条(#36732 后续) #36739, comment 7142433461). The body records them as accepted.
  • Review: TIER_DEFAULT L2 round-3 PASS at c08ee22b. This delta is a merge of main plus one comment move (68d36754, the R3 nit). The PR's net diff against its merge base is the same at both heads: 26 files, +1942 −1414. Comparing the two net diffs line by line, the only differences are main-side context lines, the moved doc comment, and the de-quote-pairing-3876 history comments. That count resolves to 132 / 132 / 0 (main 134, less this PR's two removed spans). No product line changed.
  • Gates: CI on 68d36754 is green: 46 success, 15 skipped. The one cancelled PR-body guard run was superseded by its re-run. mergeable_state is clean.
  • Landing: ready + auto-merge now.
    No must-fix, no should-fix.

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

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-warren · session_01JQwxbZeHNsF3RWcWpj7rGj

Contract review

Served-tier: TIER_DEFAULT
Head-sha: 68d36754196c5772fb0925720c897390488c5c80
Local-runs: probe — in a scratch worktree at a local-only trial merge of this head into current origin/main (eec6fb3f00, tree 6b240e4dad, from git merge-tree; nothing pushed, worktree removed afterwards): vitest run packages/i18n/ (110 files, 2026 passed / 13 skipped); the console project's FirstRunChecklist.test.tsx, firstRunChecklistLogic.test.ts, firstRunChecklistProfile.test.ts (3 files, 118 passed); the console's pages/settings/ plus src/__tests__/ (116 of 118 files passed, 1543 tests passed; the 2 failed files are sdui-* tests that failed at import on an unbuilt @objectstack/metadata-core and are outside this diff); app-shell layout/__tests__/UnifiedSidebar* (26 files, 168 passed, including UnifiedSidebar.footerSlot-36739). The @objectstack/* deps were built with tsup only.
Scope: the delta since the previous L2 (PASS at c08ee22bbb9ffe57395f866b06e8586ba612c80e, PR comment 7118525472): two commits, the merge of main 4fb5c8a042 (parents c08ee22bbb, 9d707686ee) and 68d3675419 (one doc-comment line in ui/apps/console/src/pages/settings/__tests__/FirstRunChecklist.test.tsx). The check compares the PR's net diff against its merge base at both heads: git diff ff0d1f1676 c08ee22bbb against git diff 9d707686ee 68d3675419. It reads the merge's remerge-diff (ui/packages/i18n/src/__tests__/de-quote-pairing-3876.test.ts) and main's commits since the old base (ff0d1f1676..eec6fb3f00) where they touch the PR's files or areas. Cited and read only: .changeset/36739-org-basics-checklist-pill.md, ui/packages/app-shell/src/index.ts, the PR body, main's ui/apps/console/src/pages/settings/api.ts (#37077), and the previous record l2-36791-r3.md.
Security-touching: no
Rule-change-verified: none

The head matches the PR's head.sha, checked before and after the review.

① Net diff unchanged in substance

② The merge resolution

③ Interaction with main

  • Main up to the merge (ff0d1f1676..9d707686ee). Of the PR's files, main touched AppContent.tsx, the app-shell root index.ts, the two i18n tests and the eleven packs. All of these merged without conflict except de-quote-pairing. Main's AppContent.tsx change only swaps in studioLandingPath() (refactor(studio): every Studio address comes from one builder; no address changes #36973), and its index.ts change adds the Studio address exports. No main commit in the range touches UnifiedSidebar.tsx, ConsoleLayout.tsx, App.tsx, sidebarFooterSlot.tsx or the checklist sources.
  • Removed keys and exports. At the trial-merge tree, nothing under ui/ reads a removed console.firstRunChecklist key (showDoneSplit, confirm, prefilled, organizationName.*, languageCountry.*, timezone.*, currency.*) or a removed logic export (localizationRows, checklistDoneCount, ChecklistSettingsRow). The one exception is the history comments in de-quote-pairing-3876.test.ts. The checklist test's only dynamic key read is `console.firstRunChecklist.${key}` in the PR's own test. The other readers outside the diff still resolve: SetupPage.tsx uses browserTimeZone, firstRunChecklistProfile.ts uses isOptionalRow and ChecklistRowId, and the console-copy-system-noun-12956 and machineLocaleCensus-9909 tests read the checklist. Main has not touched any of these since the old base.
  • Main after the merge (9d707686ee..eec6fb3f00, 8 commits). One overlap: fix(console): Settings, Packages, Audit Log and the connector pages send the stored bearer token #37077 routes pages/settings/api.ts through createAuthenticatedFetch, which reads response.headers. It adds headers: new Headers() to the three Response doubles in FirstRunChecklist.test.tsx. The PR does not edit those three lines, and git merge-tree merges the head into eec6fb3f00 cleanly with main's headers kept. The PR adds no new Response double, and its @object-ui/auth mock spreads importOriginal and overrides only useAuth, so createAuthenticatedFetch stays real. At that trial merge the checklist suites and all of pages/settings/ pass (probe). See N2.

④ Declarations

  • Clause-②: yes (widening) and Metadata-protocol: none each still start a line in the changeset (lines 9–10) and in the PR body (lines 6–7). The changeset is byte-identical between the two heads (patch on @object-ui/console, @object-ui/app-shell, @object-ui/i18n).
  • The app-shell root still exports SidebarFooterSlotProvider, type SidebarFooterSlot and type SidebarFooterSlotPlace, and sidebarFooterSlot.tsx is unchanged. The only index.ts movement between the heads is main's Studio address block, which comes in through the merge. The widening is as judged in rounds 1–3.
  • PR body line 34 now gives the de-quote count as 134 → 132 after the merge, which matches the code.

⑤ CI and landing

  • CI. All check runs at the head are completed. All 61 runs (one per job) are success or skipped by path, including Type Check UI, Test UI 1–16/16, Lint UI, Lint · ESLint, Live E2E UI, Build & E2E UI, Check Changeset, Check PR Size, Governed Surface Queue Guard and Dogfood Regression Gate. One PR-body guards run is cancelled, superseded by a successful run of the same job.
  • Merge queue. The timeline shows the PR added to and then removed from the merge queue. The size limb of the queue's Governed Surface Queue Guard dequeued it, because 1942 + 1414 = 3356 changed lines exceeds the limit of 3000. That is a landing-route decision for the maintainer, not a contract defect.

Previous findings

  • N1 (renderPill lost its doc comment): closed by 68d3675419. The comment now sits directly above renderPill, and BackButton keeps its own.

Findings:

  • N2 (informational): origin/main has moved 8 commits past the merged base. One of them, fix(console): Settings, Packages, Audit Log and the connector pages send the stored bearer token #37077, edits three lines of FirstRunChecklist.test.tsx. The head still merges cleanly into it, and the checklist and settings suites pass at that trial merge. No rebase is owed for correctness, but the queue (or a refreshed merge) will test that combined tree rather than this head's tree.
  • N3 (landing route, not a defect): the queue's size limb (3356 > 3000) is what blocks landing, not CI or the contract. The options are the maintainer's: an override or label on the guard, a split, or landing outside the queue.

Implemented-by: claude/project-thread-3ypdpe
Reviewed-by: session_01JQwxbZeHNsF3RWcWpj7rGj

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-warren · session_01JQwxbZeHNsF3RWcWpj7rGj

维护者速读

管理员的初始设置清单只剩一项必填:「组织基本信息」,一张表单一次保存。其余几项改为可选。每个应用的侧栏底部有「开始使用」小胶囊,只有管理员看得到;手机上它放在应用首页菜单的最后。你 19:39Z 同意的三条方案都按原样保留。
要你做的:这个 PR 改动超过 3000 行(3356 行,其中大半是十一种语言包的文案替换),按规则不能由席位入队。请在 head 68d36754 上批准,批准后由席位落地;或者你直接点 Merge。

Hand-off: same-head L2 PASS (this thread's latest Contract review) · ACCEPT 7143364122 · head 68d36754. The merge queue removed the PR on the size limb only; every check on the head is green.

@objectstack-fleet objectstack-fleet Bot added the pm:awaiting-merge PR only: landing waits on the maintainer's own review and merge (SKILL.md 复核 ②); never on an issue label Nov 24, 2026
@os-zhuang
os-zhuang added this pull request to the merge queue Nov 24, 2026
Merged via the queue into main with commit 8018e00 Nov 24, 2026
67 of 68 checks passed
@os-zhuang
os-zhuang deleted the claude/project-thread-3ypdpe branch November 24, 2026 22:48
@objectstack-fleet objectstack-fleet Bot removed the pm:awaiting-merge PR only: landing waits on the maintainer's own review and merge (SKILL.md 复核 ②); never on an issue label Nov 24, 2026
Nenzyz pushed a commit to Nenzyz/objectstack that referenced this pull request Dec 1, 2026
…h design mode (objectstack-ai#36848)

<!-- claude-projects-attribution: {"github_login":"os-support-ai"} -->
_Requested by **Yibo Wang** · [project
thread](https://claude.ai/code/project/chan_01BVUyyPie8gHwoPM18iABwB?thread=cmsg_01BVUyyPie8gHwoPM18iABwB9qsP28anD5tWRUHq8j1xSU)_
Fixes objectstack-ai#36692
Clause-②: no
Metadata-protocol: none

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

## 维护者速读

-
管理员在应用里点「设计布局」时,添加菜单项的「报表」一栏只列已有报表,不再有「新建报表…」;新建报表改在报表列表页右上角的「新建报表」按钮;仪表盘或报表正在编辑时点「设计布局」会提示先保存或取消,设计布局开着时仪表盘和报表的「编辑」按钮不出现。
- 落实维护者「照 Twenty 分开」的裁决:报表和仪表盘的编辑与设计布局是两个入口,屏幕上任何时候只有一套保存/取消。
- 出错时管理员会看到两套保存按钮或点不出新建报表;本改动不碰任何已保存的数据,合并后可直接撤回。
- 无

## What changes

The maintainer's ruling on the decision card (2026-11-23 11:55Z): 「照
Twenty 分开」. Report and dashboard editing are their own entries, mutually
exclusive with design mode, so the screen shows one Save/Cancel set at a
time.

1. **Design mode stops hosting the report builder.** The `Reports` list
in 「Add menu item」 only links reports that exist. Removed: its 「New
report…」 row, the cross-mode hand-off module `designModeReportSlot.ts`
(deleted, not left unused), the slot block in `DesignModeMenu`, the slot
branch in `ReportNewPage`, and the `report` kind of
`designModeMenuCreate.ts` (a dashboard is again the one kind made from a
name). 「New dashboard…」 is unchanged (change item 4).
2. **A report is created from its own entry.** The reports index
(`AppReportIndexView`) header offers 「New report」, linking to the app's
`reports/new`. It is gated as the builder is (`useWorkspaceAdminStatus`:
workspace admin, resolved) and shown on an empty index too. The
builder's Save and Close in its own header are the only Save/Cancel set;
Close goes back to the index.
3. **Two-way exclusion, through one hold on the shell's design-mode
store** (`designMode.tsx`):
- `useHoldDesignModeOut(open)`: a dashboard's or report's own editor
holds the mode out while it is open (or opening). Wired into
`useDashboardInPageEdit`, `ReportView` (builder and inspector panel) and
`ReportNewPage`.
- The mode's `enter` now answers `boolean`: while anything holds the
mode out, it refuses with a toast, "Save or cancel your dashboard or
report changes before designing the layout." (zh-Hans
「请先保存或取消仪表盘、报表的修改,再设计布局。」). 「Design layout」 in the app menu stays drawn
and refuses through it.
- While the mode is on, `useDesignModeActive()` hides the dashboard's
Edit (`useDashboardEditOffered`), the report page's Edit, and the
index's 「New report」.
- `ReportNewPage` reached while the mode is on (an in-app navigation
keeps the mode) draws no builder: an Empty says "Finish designing the
layout first" / "A report is built outside the design mode. Save or
cancel the layout, and the builder opens here." It holds the mode out
only while it draws the builder, so the bar's Save or Cancel opens the
builder in place (L1-a S1, 7122753474).
- This also closes the path the card measured: the bar's Cancel ending
design mode while a dashboard stays in edit. The bar can no longer
appear while an editor is open.
4. **Strings:** `designMode.editorOpen`,
`console.reportIndex.newReport`, `report.builder.designModeOnTitle` and
`report.builder.designModeOn` were added to all 11 packs (zh-Hant
regenerated with `gen:zh-hant`). `designMode.menu.newReport`,
`designMode.menu.newReportLeft` and `report.builder.addsToMenu` were
removed from all 11 packs. The de quote-pair ledger drops 134 to 133
because `newReportLeft` is gone.

Untouched rulings: objectstack-ai#36363 ruling (4) (menu labels) and
`designModeMenuCreate.ts` ruling C / ADR-0146 D2 「定制都进 .custom」.

Docs and skills: neither `content/docs` nor `skills/` teaches "New
report… from design mode". The one `New report` hit,
`content/docs/data-modeling/analytics.mdx`, is about Studio's dataset
picker, so nothing is owed.

**Read first (by risk):**
1. `ui/packages/app-shell/src/layout/designMode.tsx`: the `heldOut`
counter, `enter`'s refusal and `useHoldDesignModeOut`.
2. `ui/packages/app-shell/src/views/DashboardInPageEditor.tsx`:
`useDashboardEditOffered` now also reads the mode. The design mode's
「New dashboard…」 landing (`dashboardEditArrival`) still opens the edit
state, because `saveWith` leaves the mode before it navigates and the
arrival effect waits on `editOffered`.
3. `ui/packages/app-shell/src/layout/DesignModeMenu.tsx`: the removed
report block and picker row.

**Two-minute check:** as admin in the showcase app, open Reports. 「New
report」 is at the top right. Open a dashboard, press Edit, then choose
app menu, then 「Design layout」: a red toast says to save or cancel
first, and no purple bar appears.

## Tests

New pins go into each component's existing harness as a top-level
`describe` where there is one (`designMode-36362`,
`SidebarAppMenu-36112`, `DesignModeMenu-36363`,
`designModeMenuCreate-36364`, `DashboardView.inPageEdit-36372`). New
card-named files were added where the component has only per-card files:
`ReportView.designModeExclusion-36692`, `ReportNewPage-36692` and
`AppReportIndex.newReport-36692`.

- Exclusion while an editor is open: `enter` refuses with the prompt and
the mode stays off. This is pinned on the store, on the 「Design layout」
door, on the dashboard edit state (no bar, so no bar Cancel), on the
report builder, on the report inspector panel, and on the new-report
builder. Two editors hold the mode out until both close, and an editor
unmounted while open lets go.
- Exclusion while the mode is on: no dashboard Edit, no report Edit, no
「New report」 on the index; each comes back once the mode is left.
- The picker: `Reports` lists existing reports not yet in the menu and
has no 「New report…」 row. Picking a report stages it with the mode,
writes nothing and navigates nowhere.
- `ReportNewPage` under the mode (round 2, `ReportNewPage-36692`): mode
on at the index, then `reports/new`: the mode stays on, no builder, no
Save, the prompt shows; then the bar's Cancel: the mode is off, the
builder is drawn, and a later `enter()` is refused; control: mode off,
`reports/new` draws the builder with Save and no prompt.
- `ReportNewPage` saves on its own (the deleted
`ReportNewPage.menuSlot-36364` file's surviving case, ported), and Close
goes back to the index.
- Removed with the behaviour they pinned: the report-half cases in
`DesignModeMenu-36363` and `designModeMenuCreate-36364`, and
`ReportNewPage.menuSlot-36364.test.tsx`.

<details><summary>Local runs</summary>

- Pre-merge head `22dee19f5`: `@object-ui/app-shell` full suite: Test
Files 2474 passed, 1 skipped (2475); Tests 23314 passed, 9 skipped.
`@object-ui/i18n` suite: 107 files, 2006 passed. `type-check` for both
packages exited 0.
- After merging origin/main (head `7ea3843ec`, which carries objectstack-ai#36821):
the app-shell closure was rebuilt and `type-check` for both packages
exited 0. `@object-ui/i18n` suite: 108 files, 2011 passed. Scoped
app-shell run (`src/layout/` plus the ReportView, ReportNewPage,
DashboardView, AppReportIndex and reportBuilder files): 190 files, 1535
passed. This run was narrowed on purpose; CI's `Test UI` runs the full
suite.
- Ablation 1, committed fix, `scripts/ablation-replace.mjs`: in `enter`,
`if (heldOut > 0) {` was changed to `if (heldOut < 0) {` (anchor 1 to 0,
blob `473cab2c7389` to `7793aa4658ec`). Result: 7 failed (every refusal
pin across five files). Restored blob equals HEAD and `git diff HEAD` is
empty.
- Ablation 2: in `useDashboardEditOffered`, `return gated &&
!designing;` was changed to `return gated;`. Result: 1 failed ("while
the mode is on, Edit is not offered"). Restored, blob equals HEAD.
- Round 2, head `cccd01739`: `ReportNewPage-36692` 6/6. Ablation 3,
committed fix: `if (designing) {` changed to `if (false as boolean) {`
(blob `f81d258a824f` to `fa265e66e744`): 1 failed, 5 passed, the mode-on
pin red; restored blob equals HEAD. Scoped run (`packages/i18n/` plus
app-shell `src/layout/`, ReportView, ReportNewPage, DashboardView,
AppReportIndex, reportBuilder): 298 files, 3549 passed, 13 skipped.
`type-check` for both packages exited 0.

</details>

## Acceptance notes

- Browser screenshots: showcase app as admin, console served by Vite
from this branch's `ui/` against a `--seed-admin` backend on its own
port. The files are in the project files under `issue-36692/`:
- `1-reports-index-new-report.png`: the reports index with 「New report」.
- `1b-builder-one-save-set.png`: the builder it opens, showing only its
own Discard/Save.
- `2a-design-mode-index-no-new-report.png`: design mode on, so no 「New
report」.
- `2b-design-mode-reports-picker.png`: the design-mode Reports picker
without 「New report…」. The showcase's reports are all in its menu
already, so the picker reads "Nothing to add here".
- `3-refusal-prompt.png`: the dashboard in edit, and 「Design layout」
refused with the prompt.
- `4-design-mode-dashboard-no-edit.png`: design mode on, so the
dashboard has no Edit.
- A typed `reports/new` URL reloads the page, so the mode is gone. An
in-app navigation to `reports/new` keeps the mode, and there the page
now draws the prompt instead of the builder (round 2). The index link is
hidden while the mode is on.
- Open PR objectstack-ai#36858 overlaps this branch textually in `DesignModeMenu.tsx`
and `designModeMenuCreate.ts` (this PR removes the report half there).
Whichever lands second resolves it.
- `objectstack-ai#36791` will conflict with this branch on the de quote-pair ledger
counts (`de-quote-pairing-3876.test.ts`). Whichever lands second
re-counts.

## Verification

Derived gate families (`dispatch-gates.mjs --commands` at `7ea3843ec`)
were run locally; their results are in the report comment on the card.
CI carries the full farm.

---
_Generated by [Claude
Code](https://claude.ai/code/session_01WGufzhpykmQZe1yMupC2CU)_

<!-- signed: repo:objectstack#3 · os-support-ai ·
session_01WGufzhpykmQZe1yMupC2CU -->

---------

Co-authored-by: Claude <noreply@anthropic.com>
Nenzyz pushed a commit to Nenzyz/objectstack that referenced this pull request Dec 1, 2026
…ress changes (objectstack-ai#36973)

<!-- claude-projects-attribution: {"github_login":"os-support-ai"} -->
_Requested by **Yibo Wang** · [project
thread](https://claude.ai/code/project/chan_01BVUyyPie8gHwoPM18iABwB?thread=cmsg_01BVUyyPie8gHwoPM18iABwB9qsP28anD5tWRUHq8j1xSU)_
Fixes objectstack-ai#36895

Clause-②: yes (widening)
Metadata-protocol: none

## 维护者速读

- 用户无感:Studio 里所有链接、跳转、AI 给出的审阅链接,地址一个字节都没变。
- 属于「Studio 重构」专题:先把所有生成 Studio
地址的地方收到一个函数,之后每张设计器卡只改一处就能切到新地址,不会出现两条跳转规则互相跳的死循环。
- 出错的表现是某个 Studio 链接打开到错的页面或打不开;本改动只换写法不换地址,可以直接撤回。
- 无。

## What changes

One builder for every Studio address, and every producer the card lists
now calls it. Every address is byte-for-byte what it was before. Nothing
redirects and no route changes.

- **Console builder (new file):**
`ui/packages/app-shell/src/views/studio-design/studioAddress.ts`. It
holds `studioPath`, the one path builder, and on top of it
`studioLandingPath`, `studioPackagePath`, `studioPillarPath`,
`studioHomePath`, `studioItemPath`, `studioPillarItemAddress`,
`studioSurfaceQuery`, the "All metadata" builders,
`studioChangesReviewPath` and `studioItemReviewPath`.
- The vocabulary also lives here: root, home pillar, `~org`, `~all`,
`metadata`, `interfaces`, and the `changes` and `review` params. The
modules that exported these before re-export them under the same names.
- `STUDIO_ITEM_PILLAR` is the per-type switch. `AREA_PILLAR_FOR_TYPE`,
which the area's pillar redirect reads, is now this same object. When a
designer card deletes a type's row, every `studioItemPath` caller and
the area redirect move together, so the two cannot loop.
- **Mapping table (new file):** `studioAddressTable.ts`. It has three
tables:
  - `STUDIO_ADDRESS_FAMILIES`: 13 address shapes.
- `STUDIO_ITEM_TYPES`: `object` (with its `view`, `action` and `nav`
qualifiers), `flow`, `permission`, and `owd:overview`. Each row gives
today's pillar and the metadata address the type moves to.
- `STUDIO_QUERY_PARAMS`: `surface`, `view`, `action`, `nav`,
`changes=review`, `review=1`, `package`, `scope=environment` and `new`.
Each row says whether the param is carried verbatim, rides as a
qualifier, or is replaced.
- **Card item 3:** the retired `/interfaces` redirect
(`retiredInterfacesTarget`, landed by objectstack-ai#36884) now reads which params it
keeps from this table (`STUDIO_RETIRED_INTERFACES_KEPT_PARAMS`). Its
output is unchanged.
- **Three `?surface=` spellings, all kept.** Producers did not agree on
how to write the value, and each spelling is kept as a named option
(`StudioSurfaceSpelling`):
- `'component'` (`surface=object%3Aaccount`) is used by most producers.
- `'name'` (`surface=object:account`) is used by `appStudioObjectPath`.
- `'form'` (`URLSearchParams`, `surface=object%3Aa&action=x`) is used by
`switchedOffActionPath`.
- StudioDesignSurface writes the scope segment unencoded, and that is
kept too, as `segmentEncoding: 'verbatim'`.
- **Server shared function, located in `@objectstack/types`:**
`packages/types/src/studio-review-links.ts` exports
`studioChangesReviewLink` and `studioItemReviewLink`. Both server
producers already depend on `@objectstack/types`, and neither may depend
on the Console. `packages/cli/src/commands/meta/register.ts` and
`packages/runtime/src/domains/mcp-authoring.ts` (`reviewRoutes`) now
call them. The review-link text served to the AI is unchanged (pinned
below).
- I did not choose `@objectstack/spec`: that would add a
contract-package export, and spec holds no runtime logic.
- The module is named `-links`, not `-routes`, because
`check:route-envelope` reads any `*-routes.ts` as a REST module.
- **Producers repointed (re-measured on 3f568c1 and later):**
- Card items 1–9: `appRoute.ts` ×3, `metadataArea.ts`,
`setupMetadataRedirect.ts` ×3, `CommandPalette.tsx`, `studioScope.ts`,
`artifactStudioPath.ts`, `AiChatPage.tsx`, `AppNoAccessEmptyState.tsx`,
`RecordTabsConfig.tsx`, `DashboardInPageEditor.tsx`,
`BuilderLanding.tsx`, `studioChangesLink.ts` and
`switchedOffActionTargets.ts`.
- Card item 10, `StudioDesignSurface.tsx`: only its four hand-built call
sites are swapped (pair-base redirect, Access pillar open,
`requestSurface`, pillar nav links). The edit merges cleanly with
objectstack-ai#36893's split branch (`git merge-tree`, exit 0).
- Card item 11: `StudioRoute.tsx` and `AppContent.tsx`. Route patterns
use `STUDIO_ROOT_PATH`, and the `:packageId` landing redirect uses
`STUDIO_HOME_PILLAR`, the same relative `data`.
  - Card item 12: the two server producers.
  - Card item 13: `InterfacesNavRail.tsx` is gone, as stated.
- A producer that landed on main meanwhile (objectstack-ai#36933) is repointed too:
`PackagesPage.tsx`'s local `studioPackagePath` now returns
`studioHomePath`.
  - Producers the card missed, now repointed:
    - `studioInterfacesRetired.ts`
- `metadataArea.ts`: `studioMetadataAreaPath`, `studioMetadataItemPath`,
`areaLocationRedirect`
    - `setupMetadataStudioPath` itself
- `switchedOffActionTargets.ts`: the action item path and
`switchedOffActionListPath`
- `studioNewPackage.ts` (`STUDIO_NEW_PACKAGE_PATH`) and
`PackageSwitcher.tsx` (`STUDIO_LANDING_PATH`)
    - `HomePage.tsx` and `useAddAppEntries.ts` (bare `/studio`)
- Line numbers moved from the card's (AiChatPage and
DashboardInPageEditor). Three of the card's sites already called a
helper (CommandPalette's `~org` flow, BuilderLanding's `~org` card, and
RecordTabsConfig, which now calls `studioItemPath`).
- **New exports from `@object-ui/app-shell`:** `STUDIO_ROOT_PATH`,
`STUDIO_HOME_PILLAR`, `studioLandingPath` and `studioPackagePath`.

## Why

The Studio redesign moves objects, flows and permission sets from pillar
addresses to metadata addresses (`/studio/PKG/metadata/TYPE/NAME`). The
area already redirects a pillar type back to its pillar. Redirecting the
pillar address first would loop, so every producer has to share one
builder before any designer card flips its type.

## Tests

- `studioAddress.test.ts` (new) pins each builder to literal addresses:
every family, all three spellings, verbatim segments, search and hash,
the area, the review links, and the repointed module builders. It also
checks that the table agrees with the code (`AREA_PILLAR_FOR_TYPE` is
`STUDIO_ITEM_PILLAR`, item rows, param keys, family builders, and the
params kept on the `/interfaces` redirect).
- `studioAddress.guard.test.ts` (new) is the guard. It parses every
non-test source under `ui/packages/PKG/src` and `ui/apps/APP/src` and
refuses two things:
  - a string or template literal starting with `/studio`;
  - a path composed onto `STUDIO_ROOT_PATH`.
- Only `studioAddress.ts` (and the table's placeholder shapes) are
allowed.
- It has positive controls: the walk must reach StudioDesignSurface and
the console's StudioRoute, and the matcher must fire on the builder
file.
- `packages/types/src/studio-review-links.test.ts` (new) pins the
server's two links to literals.
- `packages/types/src/studio-review-links.callers.test.ts` (new, `repo`
project) has two parts:
- It refuses a `/studio` literal in any `packages/**` `.ts` source
outside the shared module, with controls: both server producers are
walked, and the matcher fires twice on the allowed file.
- It holds every review link quoted in
`skills/objectstack-mcp-build/evals/draft-door-procedure.json` equal to
`studioChangesReviewLink` / `studioItemReviewLink` for the package, type
and name that link names. The file has 7 quoted links: 5 Changes links
and 2 item reviews, 3 distinct values. The skill file is not edited.
- Its radius is declared: `vitest.repo-tests.json`,
`CROSS_PACKAGE_TEST_INPUTS`, and the `@objectstack/types#test:repo`
turbo inputs. Ci.yml's `crosspkg:` filter already covers the skills
root.
- Existing pins of every repointed producer stay green unchanged. That
is the byte-identity proof: none of their expected literals was touched.

<details><summary>Local runs (head fa0deb8, after merging origin/main
4f9a3f8)</summary>

- `pnpm --dir ui exec vitest run` on the 171 test files that name a
repointed producer, the package list, or the builder: `Test Files 171
passed (171)`, `Tests 1777 passed (1777)`. The full app-shell + console
suite (2736 files) is CI's Test UI; it was started locally and stopped,
since at two workers it did not finish in an hour.
- `@objectstack/types`:
  - `local`, studio-review-links.test.ts: 2 passed;
  - `repo`, studio-review-links.callers.test.ts: 3 passed.
- `@objectstack/runtime` `src/domains/mcp-authoring.test.ts`: 50 passed.
- `@objectstack/cli` `--project integration
src/commands/meta/register-draft.test.ts`: 10 passed. Run locally
because it is the one test that pins the CLI's printed review link.
- `pnpm --filter @objectstack/types typecheck` and `pnpm --filter
@object-ui/app-shell type-check`: exit 0 on fa0deb8.
`@objectstack/runtime` and `@objectstack/cli` `typecheck`: exit 0 on
947b96e, the pre-merge head. `@object-ui/console` `type-check` was
NOT MEASURED: it needs every ui plugin's dist built, so it is left to
CI's Type Check UI.
- `pnpm --dir ui exec vitest run scripts/`: 172 passed, 2 skipped. `pnpm
--dir ui check:new-line-citations`: 0 new.

</details>

## Acceptance notes

- **Two type to pillar maps exist, not one.** StudioDesignSurface keeps
its own `PILLAR_FOR_SURFACE_TYPE` (identical to `STUDIO_ITEM_PILLAR`
today). The Automations and Access pillars call
`studioPillarItemPath(..., 'automations' | 'access', ...)` explicitly.
Neither is hand-built, so the guard passes. I left them alone to keep
this diff to call-site swaps that merge cleanly with objectstack-ai#36893's move-only
split. The flow and permission designer cards switch those call sites,
or fold the map into `STUDIO_ITEM_PILLAR`, in the same PR that flips the
type.
- **Unencoded scope segment.** StudioDesignSurface writes its scope
segment (the decoded route param) unencoded in three places, where every
other producer encodes it. This is kept byte for byte. It is not
reachable with today's package-id alphabet.
- **One incidental difference, outside any real address:**
`studioItemPillar` looks up the type map with `hasOwnProperty`. The old
`AREA_PILLAR_FOR_TYPE[type]` lookup matched `Object.prototype` members,
so `/studio/PKG/metadata/constructor/x` redirected to a garbage pillar
URL. It now opens the generic item page. This is pinned in
`studioAddress.test.ts`. No metadata type has such a name.
- **Overlap:** `overlap-check` exits 1 on two PRs.
- objectstack-ai#36956 (ux-E's move-only split of StudioDesignSurface, card objectstack-ai#36893):
one conflict hunk, in the import block. That PR deletes the
`draftVerdict` import lines directly above the `nav-selection` import,
and this PR deletes that import (its last user was the `requestSurface`
call site). The resolution is to keep both deletions. All four of this
PR's call sites stay in StudioDesignSurface after the split, and none is
in a moved region.
- objectstack-ai#36784, a draft based on an older main, conflicts with `origin/main`
itself at the same single hunk (the react-router import, a line this PR
does not touch): conflict count 1 with this branch and 1 with main
alone.
  - objectstack-ai#36888 and objectstack-ai#36791 merge cleanly.

## Verification

- Read first, ranked by risk:
1. the `StudioDesignSurface.tsx` hunks (four call sites, verbatim
segment);
2. `metadataArea.ts` (the area's redirect now reads
`STUDIO_ITEM_PILLAR`);
  3. `studioAddress.ts` `studioSurfaceQuery` (the three spellings).
- Two-minute check: `pnpm --dir ui exec vitest run
packages/app-shell/src/views/studio-design/studioAddress.test.ts
packages/app-shell/src/views/studio-design/studioAddress.guard.test.ts`.
Expect 2 files and all tests passing. Then add any literal beginning
with `/studio` to a ui source and watch the guard name the file and
line.

## Human Minimum

- [x] 1. Schemas start as Zod; `packages/spec` holds no runtime logic.
(spec untouched)
- [x] 2. Every name I added uses the casing for its kind.
- [x] 3. No formatter ran; `pnpm lint` passes. (CI)
- [x] 4. One issue, one branch off an up-to-date `main`, one pull
request.
- [x] 5. A change that publishes carries a changeset, and both
declaration lines are filled in here and in the changeset.
- [x] 6. `packages/spec` touched: n/a.
- [x] 7. No hand edits to `content/docs/references/`,
`packages/*/CHANGELOG.md` or `content/docs/releases/`.
- [x] 8. Title, body and comments are in English.
- [x] The *Before Submitting* list in CONTRIBUTING.md is done.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

https://claude.ai/code/session_01WGufzhpykmQZe1yMupC2CU

<!-- signed: repo:objectstack#3 · os-support-ai ·
session_01WGufzhpykmQZe1yMupC2CU -->

---------

Co-authored-by: Claude <noreply@anthropic.com>
Nenzyz pushed a commit to Nenzyz/objectstack that referenced this pull request Dec 1, 2026
…list reads on later opens (objectstack-ai#37184)

<!-- claude-projects-attribution: {"github_login":"os-warren"} -->
_Requested by **Warren** · [project
thread](https://claude.ai/code/project/chan_01U5RdnAAmkSQmZbqh6FtqZ8?thread=cmsg_01U5RdnAAmkSQmZbqh6FtqZ8JtfL3chjK7xVPpJ6UJRz9z)_

Fixes objectstack-ai#37182

Clause-②: no
Metadata-protocol: none

## 维护者速读

-
做了什么:看不到「开始使用」清单的会话(普通成员;控制面上的普通组织所有者),第一次被服务端答成「不显示」后,本机记住这个答案(按组织、用户、权限集合,24
小时);之后打开控制台不再多发 `GET /api/settings`。
- 管理员不受影响:每次照旧读取并显示清单。权限变了、换人或换组织、过期、读取失败,都会重新读。
- 结果:cloud 控制面计费页的预热打开回到 25 次请求;下一轮 cloud 抄版本把预算从 26 改回 25。
- 要你做的:无。

## What changes

- `firstRunChecklistLogic.ts`: a device record of the server's "not
shown" answer, `os:first-run-checklist-not-shown:<orgId>:<userId>`,
holding the capability list it was read for and when
(`notShownRecordKey`, `wasAnsweredNotShown`, `markAnsweredNotShown`,
`NOT_SHOWN_RECORD_TTL_MS` = one day). It fails toward reading again:
unreadable storage, a record that does not parse, a different capability
set, an expired record, or one dated in the future all read.
- `firstRunChecklistState.tsx`: the provider checks the record before
scheduling its reads and asks nothing while it stands; when
`readChecklistSettings` answers `null` (the server's answer that this
session may not write `localization`), it writes the record. A read that
throws writes nothing. An administrator's path is untouched.

## Why

Since objectstack-ai#36791 the provider is mounted above every app route and, after
the first paint, sends `GET /api/settings` for every session whose
`systemPermissions` is non-empty. For a session never shown the
checklist that request buys nothing, on every console open. The cloud
pin round cloud#4982 (PR cloud#4983) measured it as the 26th call of the
control plane's `page/pricing` warm open, budget 25.

Why a remembered answer and not a capability check before the request:
the session that red the budget, an ordinary organization owner on the
control plane, holds `setup.write`; that plane re-registers
`localization` with `writePermission: manage_platform_settings` (cloud
`control-plane-settings.ts`). Which permission a deployment's manifest
asks is known only once the list answers, and naming one in the console
would be a second copy of the manifest's declaration that drifts on the
next deployment that changes it. The first open on a device still pays
the one read; every later open within the day does not.

## Verification

- `pnpm exec vitest run
apps/console/src/pages/settings/__tests__/firstRunChecklistLogic.test.ts
apps/console/src/pages/settings/__tests__/FirstRunChecklist.test.tsx`
(from `ui/`): 119 passed.
- New provider pins (`a session answered "not shown" asks nothing again
on this device`): a member reads once then never; an owner holding
`setup.write` where `localization` asks `manage_platform_settings` reads
once across three opens; an administrator reads and is shown it on every
open; a member made administrator reads again at once; a failed list
read records nothing; another user in the same browser reads for
themself. New logic pins cover the key, capability-set match, the
one-day bound, a future-dated record, unreadable storage and unparseable
records.
- Ablation: with `firstRunChecklistState.tsx` reverted to `main`, the
member and control-plane-owner pins fail (2 failed, 88 passed in that
file); the other four pass on both, as preservation pins.
- `eslint` on the four touched files: 0 errors (2 pre-existing
`react-refresh/only-export-components` warnings on
`firstRunChecklistState.tsx`).
- Not run locally: the cloud `console-boots` budget. The next cloud pin
round reads it and moves `page/pricing` `maxCalls` back to 25, with the
reading recorded on cloud#2914.

## Human Minimum

- [x] 1. Schemas start as Zod; `packages/spec` holds no runtime logic.
(not touched)
- [x] 2. Every name I added uses the casing for its kind.
- [x] 3. No formatter ran; `pnpm lint` passes.
- [x] 4. One issue, one branch off an up-to-date `main`, one pull
request.
- [x] 5. A change that publishes carries a changeset, and both
declaration lines are filled in here and in the changeset.
- [x] 6. `packages/spec` touched: its generated artifacts are
regenerated and committed. (not touched)
- [x] 7. No hand edits to `content/docs/references/`,
`packages/*/CHANGELOG.md` or `content/docs/releases/`.
- [x] 8. Title, body and comments are in English.
- [x] The *Before Submitting* list in CONTRIBUTING.md is done.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

https://claude.ai/code/session_01JQwxbZaRxCTLgg8LsLBuFb

---------

Co-authored-by: Claude <noreply@anthropic.com>
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 tests 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.

初始设置清单:组织基本信息合成一张表单、其余改可选、侧栏底部「开始使用 n/m」小条(#36732 后续)

3 participants