Repository navigation
fix(app-shell): the command palette offers create-as only for the page's own object, when the query finds nothing else - #39116
Conversation
…he page's own object, and not when the query finds an entry Claude-Session: https://claude.ai/code/session_01WGufzeZMKeDN64azVSgNLF Co-authored-by: Claude <noreply@anthropic.com>
… a scheme; changeset Claude-Session: https://claude.ai/code/session_01WGufzeZMKeDN64azVSgNLF Co-authored-by: Claude <noreply@anthropic.com>
|
repo:objectstack@os-support-ai · os-support-ai · session_01WGufzeZMKeDN64azVSgNLF 2026-12-02T10:34Z · Final green head for L1:
|
|
repo:objectstack@os-support-ai · os-support-ai · session_01WGufzhGA3zoCFquQgku4pm L1 review — ACCEPT on
|
|
repo:objectstack@os-support-ai · os-support-ai · session_01WGufzeZMKeDN64azVSgNLF Landing · 2026-12-02T10:36Z · zone osa-setup
|
Requested by Yibo Wang · project thread
Fixes #39038
Clause-②: no
Metadata-protocol: none
Ruling-ref: maintainer ruling recorded as comment 7340468629 on the card, option A — 「A 只给当前页对象」: a create-as row shows only for the current page's object, and only when the query finds nothing else.
维护者速读
What changes
Per the ruling (option A), the second half of the card: the "Create 'words' as OBJECT" rows.
paletteCreate.ts: newpaletteCreateAsTargets(targets, currentObjectName, queryFindsEntry). A create-as row is offered only for the object of the page the palette was opened on (routeObjectName: its list, a named view, a record page), when the member may create one seeded with the words, and never while the query finds an entry of its own.CREATE_AS_MAX(three rows, any page) is deleted; it had no other user.CommandPalette.tsx:queryFindsEntryis true when the query found a navigation entry of any type (including the component/url entries from the first half), an app report, an app to switch to, a theme or full-search command, or a "New OBJECT" entry. The route object is read once and fed to both the create targets and the create-as rule.Tests
CommandPalette.setupPages-39038.test.tsx, new describe: on Setup's dashboard 时区, 邮件, 审计 show no create row; on a business-unit list 华东区 offers exactly 「Create "华东区" as 业务单元」; on that list 邮件 finds 邮件投递 and offers no create row; CONTROL: 业务单元 still finds 「New 业务单元」._selfurl entry with anhttps://address opens throughwindow.location.assign, notwindow.open, and the router location does not move.CommandPalette.previewCreate-36286.test.tsx: the three assertions the earlier create-from-typed-text card pinned are rewritten to the ruling, none deleted: on the Customer list 'Zhang San' offerscreate as customeronly (was customer and contact); on/apps/crmit offers no create row (was contact and customer); 'contact' on/apps/crmofferscreate new contactand no create-as (wascreate as customer). One CONTROL added: on the Customer list 'contacts' finds the Contacts entry and no create-as row. The earlier card's own acceptance (on the Customer list an unknown name offers 新建『某某』为客户, Enter opens the form seeded) still holds.Ablation, one run:
CommandPalette.tsxandpaletteCreate.tsrestored toorigin/main4b8a67d, with the scheme branch ofopenNavEntrydisabled → 7 of 52 red across the two files (the scheme pin, the two create-row cases of the new describe, the three rewritten assertions and the new CONTROL); restored withgit restore --source=HEAD --staged --worktree, status clean.Readings
All under
bash scripts/pm/os-verify-lock.sh, head1f5a644e, verdict lines quoted.cd ui && pnpm exec vitest run --maxWorkers=2 packages/app-shell/src/chrome/→Test Files 30 passed (30),Tests 213 passed (213),VERDICT command-exit 0.pnpm --filter @object-ui/app-shell run type-check(tsc --noEmitandtsc -p tsconfig.test.json) →VERDICT command-exit 0.Tests 7 failed | 45 passed (52).Acceptance notes
claude/issue-39038-palette-setup-pages-wip(change commit946592b4, cherry-picked ontoorigin/main, byte-identical to that branch's tip for the four palette files), plus the scheme pin and this changeset.docandactionnavigation entries still do not count as entries the palette finds (it does not match them at all, as before) — noted in the first half, not filed.Verification
Read first (by risk):
paletteCreateAsTargetsinpaletteCreate.ts(the whole rule); thequeryFindsEntrylist inCommandPalette.tsx(which finds suppress the row); the three rewritten assertions inCommandPalette.previewCreate-36286.test.tsx.Two-minute check:
OS_PORT=3000 pnpm dev, open Setup, press ⌘K and type 时区: no 「新建…为…」 row. Open a business-unit list, press ⌘K and type a new name: one row, 「新建「…」为业务单元」.Gates
node scripts/pm/dispatch-gates.mjs --commandsderived 38 commands on tree1f5a644e; each run with its exit code captured before any pipe;--ran→Run reconciliation — 38 derived, 38 run, 0 NOT-MEASURED, 0 UNRUN. All 38 exit 0 (check:query-options-erasurefirst stopped by my own 300 s timeout, re-run alone → exit 0 in 393 s).pnpm --dir ui exec vitest run --maxWorkers=2 scripts/→Test Files 172 passed | 2 skipped (174).overlap-check→VERDICT clean exit 0againstorigin/main634c598 (5 newer commits, none in the touched files). Type-check lanes, artifact rosters and the repo-wide lint are CI's.🤖 Generated with Claude Code
https://claude.ai/code/session_01WGufzeZMKeDN64azVSgNLF