Repository navigation
feat(app-shell): Setup's and the Studio's navigation editor edits an entry's search keywords - #39236
objectstack-fleet[bot] wants to merge 7 commits into
Conversation
Claude-Session: https://claude.ai/code/session_01QSeKYnrQ7UMtHofKQVjcH2 Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QSeKYnrQ7UMtHofKQVjcH2 Co-authored-by: Claude <noreply@anthropic.com>
…v-editor-keywords
…v-editor-keywords
… pin check:test-source-alias: the inspector reaches a dynamic import of the lint package; pay that load at module top, not inside a clocked case. Claude-Session: https://claude.ai/code/session_01QSeKYnrQ7UMtHofKQVjcH2 Co-authored-by: Claude <noreply@anthropic.com>
…v-editor-keywords
|
repo:objectstack@os-justin · os-justin · session_01QSeKYnrQ7UMtHofKQVjcH2 Contract reviewServed-tier: ① Derived judgmentsInputs read: card #39147 body and all seven comments (triage first touch, carried N2 7357012641, unlock, claim 7361464075, the two dispatch notices, os-dev-report 7365216829); PR #39236 body and file list (6 files); the net diff against
② Semver levelThe changeset The open question (keep ③ Boundary flags
S1 (should-fix) —
④ Design judgmentNot owed (declaration face). Implemented-by: VERDICT: PASS |
A refused keywords draft carried over to the next keyword-less entry selected and could then be written to it: the list field resets its rows only when its value changes, and two entries without keywords share an undefined value. Key the field by the selection, as FlowEdgeInspector does. Claude-Session: https://claude.ai/code/session_01QSeKYnrQ7UMtHofKQVjcH2 Co-authored-by: Claude <noreply@anthropic.com>
|
repo:objectstack@os-justin · os-justin · session_01QSeKYnrQ7UMtHofKQVjcH2 Contract reviewServed-tier: ① Derived judgmentsThis is a delta review of
② Semver levelUnchanged from the record at ③ Boundary flagsS1: closed.
No must-fix, no should-fix. ④ Design judgmentNot owed (declaration face). Implemented-by: VERDICT: PASS |
|
repo:objectstack@os-justin · os-justin · session_01QSeKYnrQ7UMtHofKQVjcH2 L1 ACCEPT · PR #39236 (#39147, epic #39050) · head 席位核对ACCEPT · repo:objectstack@os-justin · head
|
Fixes #39147
Clause-②: yes (widening)
Metadata-protocol: none
维护者速读
What changes
AppNavInspector(the navigation editor Setup's app editor and the Studio's nav inspector share) gains a Search keywords list field, offered wherevernavEntryOffersField(type, 'keywords')offers it, so never on a separator.ObjectNavItemSchema.shape.keywords.safeParse) before it is written: a refused list (a keyword over 60 characters, a 21st keyword) is not written and the spec's message is shown beside the field (role="alert"). Removing the last keyword removes the key; nothing writes[]. An unchanged list writes nothing.NavigationEntryItem(@object-ui/types) declares the optionalkeywordsmember, typed by reference from the spec's nav-item base (carried N2 of PR feat(app-shell): the command palette finds a nav entry by its old name and shows its group path #39163), so the editor and the served entry shape agree.engine.inspector.appNav.keywords*strings in the Studio namespace (en,zh)..changeset/39147-nav-editor-keywords.md(patch:@object-ui/app-shell,@object-ui/types,@object-ui/i18n).Clause-② re-declared from the diff as
yes (widening): the published@object-ui/typesinterface gains a member. The claim carriedno; the diff decides. No spec shape, no authorable key, no error code changes;nav-target.tsis untouched (its offer table and retype already carrykeywords).Read first, by risk:
ui/packages/app-shell/src/views/metadata-admin/inspectors/AppNavInspector.tsx—commitKeywords(refusal, empty-list removal, no-op on equal list) andnavKeywordsRefusal.ui/packages/app-shell/src/views/metadata-admin/inspectors/AppNavInspector.keywords-39147.test.tsx— the acceptance pins.ui/packages/types/src/app.ts— the mirror member.Tests
AppNavInspector.keywords-39147.test.tsx, 9 tests:NavigationItemSchema, andpaletteNavEntryHitfinds the entry by the new word; non-vacuity: not found before the edit), edit, remove (last removal drops the key), unchanged writes nothing;keywords, a retype todashboardkeeps them;pipelineplus a refused 61-character word; on switching to entry B (no keywords) the field is empty, shows no alert and nothing is written to B; the next edit on B writes only B's own word. The field is keyed per entry (key={selection.id}, as inFlowEdgeInspector). This is S1 of contract review on355e2b57ac, closed by the delta review ond3fac7a692.Local test readings at 355e2b5 (the final head; test inputs unchanged since 6ec4983)
cd ui && pnpm exec vitest run --reporter=verbose packages/app-shell/src/views/metadata-admin/inspectors/AppNavInspector.keywords-39147.test.tsx:Tests 8 passed (8).cd ui && pnpm exec vitest run packages/types/ packages/i18n/ packages/app-shell/src/views/metadata-admin/inspectors/AppNav packages/app-shell/src/chrome/paletteNav:Test Files 507 passed (507),Tests 12437 passed | 13 skipped (12450).pnpm --filter @object-ui/types --filter @object-ui/i18n --filter @object-ui/app-shell run type-check: all threeDone, exit 0 (after building the app-shell dependency closure: 72 of 72 tasks).@object-ui/app-shellsuite: NOT MEASURED locally (stopped after 80 minutes on two workers); CITest Coreruns it.Ablation (one-off, restored,
git diff HEADempty after each, viascripts/ablation-replace.mjs):navKeywordsRefusalmade toreturn null(the spec check removed): redrefuses a 61-character keyword with the spec's message and writes nothing (CONTROL: 60 pass)andrefuses a 21st keyword with the spec's message and writes nothing (CONTROL: a 20th passes); 6 others green.navEntryOffersField(entryType, 'keywords')guard madetrue: reda separator is offered no keywords field; 7 others green.Fix round at d3fac7a (S1 and nit N1 of the contract review)
cd ui && pnpm exec vitest run --maxWorkers=2 packages/app-shell/src/views/metadata-admin/inspectors/AppNavInspector.keywords-39147.test.tsx:Tests 9 passed (9).key={selection.id}removed: redswitching from an entry with a refused draft to another keyword-less entry shows an empty field and writes nothing to it(A's two draft rows shown on B); 8 others green. Restored, blob equal to HEAD.keyprop and a jsdoc sentence. CIType Check UIis green at d3fac7a.dispatch-gates --ranat d3fac7a: 38 run, 0 NOT-MEASURED.Acceptance notes
Clause-②: nois re-declaredyes (widening)from the diff (published type gains a member).origin/maininto the branch (no conflicts), including PR fix(automation)!: a triggered flow whose fan-out or earlier branch reaches a subflow or map whose child can suspend is not armed #39144, which also editsstudio/en.tsandstudio/zh.ts;overlap-check.mjsreads clean at the final head.check:test-source-aliasfirst failed on the new test (it reaches a dynamicimport('@objectstack/lint')through the condition builder). Fixed with the repo's convention: a module-top side-effect import in the test file.@object-ui/app-shellsuite on two local workers did not finish in 80 minutes and was stopped: NOT MEASURED locally, left to CI's shardedTest Core. Locally measured instead:types,i18n, everyAppNavInspector*file and the palette keyword tests.Verification
Two-minute check:
cd ui && pnpm exec vitest run packages/app-shell/src/views/metadata-admin/inspectors/AppNavInspector.keywords-39147.test.tsx— expectTests 9 passed (9). In a running console (not browser-verified in this run): open an app in Setup's app editor, select a page entry in its navigation, and the Search keywords field lists, adds and removes words; select a separator and no such field shows.Derived gates (dispatch-gates --commands, 38 commands) at 355e2b5 and d3fac7a
dispatch-gates --ran:38 derived famil(ies) accounted for — 38 run, 0 NOT-MEASURED (a DERIVED zero — all 38 recorded an exit code and none of them is 3).check:test-source-aliaswas red on the first run and is green after the test fix;check:query-options-erasurehit a 300s local timeout once and passed on re-run (exit 0);check:type-check-debtfirst missed the verify lock (exit 3, NOT MEASURED) and passed on re-run.pnpm --dir ui exec vitest run scripts/,check:type-check-coverage,check:type-check-debt) ran on 94f7cd5 / 6ec4983; the later main merge changed none of their inputs.pnpm check:changeset-fixed(roster under.changeset/), exit 0.pnpm lint) are left to this PR's check-runs.🤖 Generated with Claude Code
https://claude.ai/code/session_01QSeKYnrQ7UMtHofKQVjcH2