Repository navigation
fix(app-shell): "Add filter" in the Studio list-view inspector adds a row that can be edited - #26821
Conversation
…plete, so Add filter adds an editable row Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jV9H4DGK4phGzhzdZ4
|
Seat note ·
This is not this PR's failure. The diff touches only The seat re-runs the failed jobs once. A second failure counts as real. Generated by Claude Code |
…spector string cases Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jV9H4DGK4phGzhzdZ4
…chip cases Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jV9H4DGK4phGzhzdZ4
|
Seat note · Test UI (5/16) on Generated by Claude Code |
…-jlfl08 Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jV9H4DGK4phGzhzdZ4
席位核对ACCEPT · seat
Landing: no contract review is owed (no published schema, no governed text, |
Requested by Steedos · project thread
Fixes #26738
Clause-②: no
Metadata-protocol: none
维护者速读
foldFilterGroupToSpecRules)会正确地丢掉未填完的行,于是新加的空行在下一次渲染就消失了,Studio 里根本无法给列表视图加筛选。ui/packages/app-shell/src/views/metadata-admin/widgets.tsx里FilterBuilderField的draft/seededFrom两个状态和handle里新增的「与已存规则相同则不写」判断;新测试widgets.filterBuilderHeldRow-26738.test.tsx。cd ui && pnpm exec vitest run packages/app-shell/src/views/metadata-admin/widgets.filterBuilderHeldRow-26738.test.tsx,预期 4 个用例全绿;或在 Studio Interfaces 打开某对象的列表视图检查器,Filter →「Add filter」,出现一行,填入值后视图草稿里出现该 filter。What changes
FilterBuilderField(thefilter-builderwidget the Studio list-view inspector's Filter row uses, and the per-tab filter offilter-modetab presets) built theFilterBuilder's row group from the stored rules on every render. The builder's "Add filter" inserts a blank row; the save-side fold drops a row that is not complete yet, as it must; the host stored the unchanged rules and re-rendered, and the re-derived group replaced the builder's rows, so the new row disappeared before it could be edited.The widget now holds the builder's row group in its own state:
viewFilterFold.tsis unchanged: what is persisted is decided by the same fold as before.Tests
New
widgets.filterBuilderHeldRow-26738.test.tsxmounts the realfilter-builderwidget in a host that writes the wayObjectListViewInspectordoes (a new body object on everyonChange,filterdropped when empty):[{ field: 'title', operator: 'equals', value: 'open' }]with the row still on screen;Reverse verification (one-off, not kept): with the fix committed,
widgets.tsxrestored to basec8583f80in the working tree only (groupOfStoredRulesoccurrences 3 → 0) made the new file red, Tests 3 failed | 1 passed (4); each red is the vanished row ("expected [] to have a length of 1 but got +0"). The round-trip case is green on base too, as a preservation pin should be. Restored withgit checkout HEAD -- …(occurrences back to 3,git diff HEADempty).Acceptance notes
FilterGroupto a builder typed onFilterBuilderRowGroup, and the two row shapes are assignable in neither direction (hidden byanyuntil #26293) #26306 / components / plugin-list: the filter builder emits[true]for a boolean row switched to In, which the spec'sViewFilterRulerefuses — the builder's own(string | number | boolean)[]list member outlives #26306 #26348. Those changed the builder's value types, not how this widget feeds the builder; the re-derived group predates them in the code read here. History was not walked (shallow checkout), so when it started is not measured.onChange, so before this change an incomplete row would also have written an unchanged body back to the draft. The widget now writes only when the folded rules change.Verification
All readings at head
5221c34d(basec8583f80), underscripts/pm/os-verify-lock.sh.Touched package: @object-ui/app-shell
pnpm exec turbo run build --concurrency=2 --filter='@object-ui/app-shell^...', 63 tasks, VERDICT command-exit 0.pnpm --filter @object-ui/app-shell run type-check(tsc --noEmit, thentsc -p tsconfig.test.json): VERDICT command-exit 0, zero TS errors.widgetsmodule,filter-builder-trigger,FilterBuilderWidget,viewFilterFold,ObjectListViewInspector,FilterModeWidgetorfilter-mode(52 files): Test Files 52 passed (52), Tests 754 passed (754). The rest of app-shell is left to CI's Test UI shards.Derived gates
node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstackderived 34 commands at5221c34d; each ran with its exit code captured before any pipe, pluspnpm check:changeset-fixed(its roster sits under.changeset/).--ranreconciliation: "34 derived famil(ies) accounted for — 34 run, 0 NOT-MEASURED".node scripts/check-adr-0087-registration.mjs --base origin/main→ exit 0node scripts/check-adr-0087-registration.mjs --self-test→ exit 0node scripts/check-changeset-no-major.mjs --base origin/main→ exit 0node scripts/check-closing-keyword-parity.mjs→ exit 0node scripts/check-closing-keyword-parity.mjs --self-test→ exit 0node scripts/check-comment-mask-corpus.mjs→ exit 0node scripts/check-empty-changeset.mjs --base origin/main→ exit 0node scripts/check-empty-changeset.mjs --self-test→ exit 0node scripts/check-sdui-manifest.mjs→ exit 0node scripts/check-sdui-manifest.mjs --self-test→ exit 0node scripts/pm/release-rehearsal-clone.mjs --self-test→ exit 0node scripts/release-pending-publish.mjs --self-test→ exit 0pnpm --filter @objectstack/spec run check:duration-unit-keys→ exit 0pnpm check:changeset-gate-self-tests→ exit 0pnpm check:closed-ceremony-text→ exit 0pnpm check:cross-package-test-inputs→ exit 0pnpm check:dispatcher-error-vocabulary→ exit 0pnpm check:driver-memory-census→ exit 0pnpm check:engine-double-contract→ exit 0pnpm check:gitlink-declared→ exit 0pnpm check:nul-bytes→ exit 0pnpm check:pm-changeset-deadline-census→ exit 0pnpm check:published-files→ exit 0pnpm check:query-options-erasure→ exit 0pnpm check:refd-timer-probe→ exit 0pnpm check:skill-identifier-liveness→ exit 0pnpm check:test-source-alias→ exit 0pnpm check:tier-file-adoption→ exit 0pnpm check:type-check-coverage→ exit 0pnpm check:type-check-debt→ exit 0pnpm check:undeclared-dep-imports→ exit 0pnpm check:watch-hint-literal→ exit 0pnpm check:where-matcher→ exit 0pnpm check:changeset-fixed→ exit 0pnpm --dir ui exec vitest run scripts/→ exit 0pnpm --dir ui exec vitest run scripts/: Test Files 178 passed | 2 skipped (180), Tests 5065 passed | 2 skipped (5067).pnpm check:new-line-citations(fromui/): 0 new citation(s), exit 0.Generated by Claude Code
🤖 Generated with Claude Code
https://claude.ai/code/session_01QsR2jV9H4DGK4phGzhzdZ4