Repository navigation
fix(fields): a tap on a lookup picker option's preview chip selects the option - #36602
Merged
objectstack-fleet[bot] merged 2 commits intoNov 23, 2026
Merged
Conversation
… option (repro) Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01ADHkmNmMEXS4EzeVz9RjvD
… a link The quick-picker's option preview drew a reference column through the read cell, which links the referenced record when the host answers recordHref; the link's click handler stopped propagation and opened the record, so a tap on a record chip in an option's preview navigated instead of selecting the option. renderLookupColumnValue, the one renderer both picker surfaces call, now draws every cell under a host with no record destination and draws self-linking types with the text face, the rule the dialog table already applied on its own. Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01ADHkmNmMEXS4EzeVz9RjvD
Contributor
Author
|
repo:objectstack#2 · os-steve · session_01ADHkmNmMEXS4EzeVz9RjvD 席位核对ACCEPT — one card, one PR, not governed (
Landing: area lands it (non-governed, under 3000 lines): ready + auto-merge. |
objectstack-fleet
Bot
deleted the
claude/issue-36479-lookup-preview-chip-selects
branch
November 23, 2026 03:07
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #36479
Clause-②: no
Metadata-protocol: none
repo:objectstack#2 · os-steve · session_01ADHkmNmMEXS4EzeVz9RjvD
维护者速读
What changes
The lookup quick-picker's option preview drew each extra column through the read cell. A reference column became a link to its record whenever the host answers
recordHref(on a record page, the record chip), and that link's click handler stops propagation and calls the host'sopenRecord, so the option row's own click never fired. Anemail/url/phone/ file column did the same with its own anchor (the email cell's anchor also stops propagation).renderLookupColumnValueis the one renderer both picker surfaces call (the dropdown preview and the browse-all dialog table). It now carries the picker rule the dialog applied on its own (objectui#11903, point 7): every candidate cell renders under a host with no record destination (WithoutRecordLinks), so a reference keeps its face (the chip included) without the anchor or hover card, and a self-linking type is drawn with thetextface. The fix sits where the preview gets the read cell's link; no event is swallowed anywhere.Desktop answer the card asked for: yes, the same click navigated with a mouse too. The defect was the link's click handler, not the pointer type; the pin drives both
[TouchA]and[MouseLeft].First read (by risk)
ui/packages/fields/src/widgets/lookupColumnDisplay.tsx: the renderer branch ofrenderLookupColumnValue(face substitution +WithoutRecordLinks).ui/packages/fields/src/widgets/LookupField.previewLinkFree-36479.test.tsx: the pin.Tests
Premise reproduced on main (c0eecb1 code, pin only)
With the fix
Ablation (fix committed first; renderer branch reverted with scripts/ablation-replace.mjs)
@object-ui/fieldsresolves tosrc/through the ui vitest alias, so no dist rebuild was involved in either leg.Package suite and type-check
At head 186d4b4:
Only
@object-ui/fieldschanges, and its public surface is byte-unchanged (no export added or removed), so no importer owes a run.Acceptance notes
RecordPickerDialog.tsxkeeps its ownSELF_LINKING_CELL_TYPESsubstitution andWithoutRecordLinkswrapper; with the rule now in the shared renderer they are redundant there (idempotent, no behaviour change). Removing them is outside this card's file surface and left in place.ReferenceChipContext) still reaches the preview through the popover, so a reference in an option preview draws as an unlinked chip there and as plain text elsewhere. Unchanged here; noted only.Verification
Two-minute check:
cd ui/packages/fields && pnpm exec vitest run --root ../.. packages/fields/src/widgets/LookupField.previewLinkFree-36479.test.tsxshows 4 passed. In the Console (not driven in a browser by this PR; the component pin is the evidence): showcase Field Zoo record at 375 px, inline-edit the Master-Detail field, open the picker, tap theAccount: Fabrikamchip in an option preview: expect the option to be selected and no record to open.Gate families derived for this diff (head 186d4b4)
node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstackderived 38 families; all 38 ran locally and exited 0 (the vitest one under os-verify-lock).--ranreconciliation:38 derived, 38 run, 0 NOT-MEASURED, 0 UNRUN(a derived zero: every line carries its exit code). The type-check programs CI runs over the whole workspace (Type Check UIand thelint.ymltype-check lanes) are CI's; the package's owntype-checkabove is the local reading.Generated by Claude Code