Repository navigation
fix(fields): notification topic and channel pickers rank a real match first and the free-text row last - #39615
Conversation
…ow (red on main) Claude-Session: https://claude.ai/code/session_01L9qibzVCaQPuEu6rGmqH8J Co-authored-by: Claude <noreply@anthropic.com>
… first and the free-text row last Claude-Session: https://claude.ai/code/session_01L9qibzVCaQPuEu6rGmqH8J Co-authored-by: Claude <noreply@anthropic.com>
…old its order Claude-Session: https://claude.ai/code/session_01L9qibzVCaQPuEu6rGmqH8J Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L9qibzVCaQPuEu6rGmqH8J Co-authored-by: Claude <noreply@anthropic.com>
|
repo:objectstack@os-tesla · os-tesla · session_01L9qibxZ1DSpavkJARmHCQF 席位核对L1-c · 2026-12-04T10:31Z · ACCEPT · head
|
…ee-text-row-last Claude-Session: https://claude.ai/code/session_01L9qibzVCaQPuEu6rGmqH8J Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L9qibzVCaQPuEu6rGmqH8J Co-authored-by: Claude <noreply@anthropic.com>
|
repo:objectstack@os-tesla · os-tesla · session_01L9qibzVCaQPuEu6rGmqH8J 2026-12-04T11:06Z · Test UI (8/16) red at head
|
|
repo:objectstack@os-tesla · os-tesla · session_01L9qibxZ1DSpavkJARmHCQF 席位核对L1-c · 2026-12-04T11:20Z · ACCEPT (delta) · head
|
|
repo:objectstack@os-tesla · os-tesla · session_01L9qibzVCaQPuEu6rGmqH8J 2026-12-04T11:22Z · Landing · head
State: ready + auto-merge through the queue; |
Fixes #39560
Clause-②: no
Metadata-protocol: none
维护者速读
What changes
ui/packages/fields/src/widgets/RegistryRefField.tsx, the fillable arm (PreferenceOptionField) behindnotification-topicandnotification-channel:Which pickers draw RegistryRefField, measured on this branch's tree:
sys_notification_preference.topicandsys_notification_template.topic(notification-topic),sys_notification_preference.channel(notification-channel), all in service-messaging.position-refonsys_user_position.positionand on asys_useraction param;permission-refonsys_user_permission_set.permission_set, on thesys_usercreate-user and grant params, and on the twosys_idp_group_mappingpermission-set fields.New census pin,
ui/packages/fields/src/__tests__/free-text-combobox-census-39560.test.ts: reads every non-test.tsxunderui/packages/PKG/srcandui/apps/APP/src(throughimport.meta.glob, since this package's test program carries no Node typings by design), finds each combobox row that commits or shows the search text, and holds the set of such files equal to its table, both ways. A site listedlastmust keep the row after every other row of its list. Current table:RegistryRefField.tsxlast(this PR)CommandPalette.tsx("Create «text» as OBJECT")trailing: 1InspectorComboField.tsxopen: free-text-first on main; PR #39556 moves it last. Its order is not asserted either way, so that PR lands without touching this file.InCellOptionList.tsx("Add «text»")open: leads by its own documented choice; see Acceptance notesTests
Red on main, green with the fix: RegistryRefField.freeTextLast-39560.test.tsx
On the unfixed widget (commit fc436df, test only):
Tests 5 failed | 1 passed (6); the CONTROL (no match, Enter commits the typed text) was the one passing. With the fix, together with the existingRegistryRefField.preferenceOptions-31062.test.tsx:Test Files 2 passed (2),Tests 20 passed (20).Census pin and its ablation
free-text-combobox-census-39560.test.ts:Tests 9 passed (9). Ablation: withRegistryRefField.tsxrestored from the base commit (worktree only, restored after), the census goes red on exactly the RegistryRefField row-order case:Tests 1 failed | 8 passed (9). The detector's own cases pin a first row, a last row, a commented-out row, a.mapparameter that rebinds the search name, and aninput role=comboboxlist with a leading "Add" option.Package suite and type-check
@object-ui/fieldswhole suite (before the census moved toimport.meta.globand the changeset; neither touches a non-test file):Test Files 338 passed | 1 skipped (339),Tests 5117 passed | 7 skipped (5124).pnpm --filter @object-ui/fields type-check(bothtsc --noEmitandtsc -p tsconfig.test.json): exit 0 at 2c8f904;--listFileson the test project lists both new test files. ESLint on the three changed source files: 0 errors, 0 warnings.Derived gates (dispatch-gates --commands at 2c8f904)
38 derived: 36 run locally, all exit 0, including
pnpm --dir ui exec vitest run scripts/(Test Files 172 passed | 2 skipped (174)). NOT MEASURED:pnpm check:query-options-erasureandpnpm check:type-check-debt, both timed out on the shared box (150 s and 200 s); CI's Lint & Repo Gates runs them.Acceptance notes
InCellOptionList.tsx(the in-cell option list's "Add «text»" row). It leads by an explicit choice in its own comment ("so Enter after typing a new tag adds it rather than toggling a longer tag that contains the text"), and it is offered only when no option's LABEL equals the typed text, case-sensitively. Whether tags follow the "real match first" rule is a product decision this PR does not take; the row is listedopenin the census and reported to the seat.InspectorComboField'sopenentry should be turned intolastonce PR fix(app-shell,plugin-report): dataset pickers rank a real match first; unlabelled members read as their source field #39556 lands (owner: the same seat).Verification
Read first, by risk:
RegistryRefField.tsx(therankedMatcheshelper and the moved "Use «text»" group at the end ofCommandList), then the census pin's detector (freeTextRows).Two-minute check: in a running console, open Setup, a notification preference record, the Topic field; type
approvaland press Enter. Expected:approval.requested(or whatever topic starts with the text) is stored, notapproval. Type a topic that does not exist and press Enter: the typed text is stored.Requested by Tesla · project thread
Generated by Claude Code