Repository navigation
feat(fields,app-shell,plugin-detail): a pointer whose target the platform deleted draws a tombstone in the declared option's label (objectui#12489) - #12665
Conversation
…form deleted draws a tombstone in the declared option's label resolveRecordPointer reads @objectstack/spec's referenceDeletedWhen beside referenceVia: on a row whose sibling select holds the declared option, the pair carries deletedLabel, that option's label from the caller's options. DetailSection passes the key and the sibling's options translated as the grid translates select options. The app-shell pointer face draws the tombstone in that label without mounting RecordPreviewCard: no read, no link, no id. The default text face draws the label in place of the id. Pins: the rule and default face (fields), the face under the real details grid (app-shell), and the four reference states on the served approval request page against the inbox sheet's pins (console). Claude-Session: https://claude.ai/code/session_01RXFSkyCWZHTfnnf5iKrQFN Co-authored-by: Claude <noreply@anthropic.com>
✅ Console Performance Budget
The eager closure is every chunk the entry reaches through static imports — what the browser fetches and parses before the app renders. The entry chunk on its own is a small fraction of it. 📦 Bundle Size Report
Size Limits
|
|
Contract reviewServed-tier: Face: the ① Derived judgments
② Semver level
③ Boundary flagsThe dev's four open questions:
Out of scope, carried to objectui#12484: the page H1 Implemented-by: VERDICT: PASS Generated by Claude Code |
席位核对 · ACCEPT ·
|
Fixes #12489
Clause-②: yes
Step 4 of objectui#12489, the build ruling A item 3 calls for (ruling
6203737086): the record pointer renderer draws the tombstone from the option's own label when the platform asserts the target was deleted. It reads nothing and links nothing.RecordPreviewCard's "the caller renders it" rule is unchanged, and the pointer renderer is that caller.What changed
@object-ui/fields:resolveRecordPointer(field, row, optionsOf?)reads@objectstack/spec'sFieldSchema.referenceDeletedWhen: { field, value }besidereferenceVia. When the row's siblingselectholds the declared option, the returnedRecordPointercarriesdeletedLabel: that option's label, looked up in the options the call site supplies. The predicate is evaluated here and nowhere else. With nooptionsOf, or no option with that value, the pair comes back as before; the raw option value is never used as the text. The default face underRECORD_POINTER_CARD_TYPEdraws the label in place of the record id.@object-ui/plugin-detail:DetailSectionpasses the object field'sreferenceDeletedWhenand the sibling's options, translated with the sametranslateOptionscall the grid already uses forselectoptions. So the tombstone reads the way the option reads in its own cell, localized labels included. It adds no i18n key.@object-ui/app-shell: the pointer face draws a pair carryingdeletedLabelas a tombstone (data-record-pointer="deleted", a wastebasket icon, the label, in the card's frame) and does not mountRecordPreviewCard. It makes no record read and no definition read, draws no link and shows no id.content/docs/guide/fields.mdandpackages/fields/README.md.Clause-②: yes (widening).
RecordPointergains the optionaldeletedLabel.resolveRecordPointer's field parameter gains the optionalreferenceDeletedWhen, and the function gains an optional third parameter,optionsOf. Nothing narrows: every existing call and return shape type-checks and resolves as before. There is no new export.The four states on the served page, against the sheet's pins
approvalRequestsDataSource.servedPageReferenceStates-12489.test.tsxuses the realRecordDetailViewon the app-scoped record route, throughApprovalRecordReads, under the rootSchemaRendererProviderasConsoleShellmounts it, with objectstack'ssys_approval_request_detailpage copied whole. The request definition carries the services declaration (record_iddeclares{ field: 'cancel_reason', value: 'record_deleted' }) and the contract'scancel_reasonlabels.recordLink: linkrecordLinkRefused-11878: no link, keeps the snapshot titletombstone: "Related record deleted", no link, no bare idunresolvableReference: "This record cannot be opened"Controls: a cancelled row with no
cancel_reasonreads the target and draws the card; a 404 on a row the platform did not flag draws no tombstone. A zh-CN bundle draws the tombstone as the localized option label. The sheet (ApprovalsInboxPage.tsx) and its four pins are untouched.Evidence
b78ab082(packages/fields/,packages/plugin-detail/,packages/app-shell/src/views/record-preview/, everyapprovalRequestsDataSource.*test, and the four sheet pins): Test Files 552 passed, 2 skipped (554); Tests 6937 passed, 21 skipped (6958).git diff HEAD:translateOptions: 2 failed (the localized pins).--filter '@object-ui/app-shell...': exit 0.type-check: exit 0 for fields, plugin-detail, app-shell and console. Console needed five plugin dists built first; they are outside the closure.check:changeset-claims,changeset:check,check:test-path-roots,check:spec-symbols, changeset presence and new line citations.@objectstack/spec@18.0.0-next.2lacks the services declaration (objectstack PR #23798), so a live request page cannot show the predicate yet; the served-page harness is the evidence.Acceptance notes
record_titleon its meta line; the served tombstone is the option label alone, per the ruling. Left to objectui#12484.cancel_reason=record_deleted). The sheet also checksstatus=cancelled; the contract declarescancel_reasonpresent only on cancelled rows.display_title) shows the raw record id in every state. objectui#12484 carries it.Provenance: built by the cloud session
session_01RXFSkyCWZHTfnnf5iKrQFN(claim6214527805) and opened by thedomain:uiseat 1 PM (session_011K9g23W67dy2zwnyzaoB6o) from that session's final message, because a cloud session cannot open a PR from its container. The seat changed nothing in the text except this provenance line, which replaces the dev's own one-line attribution.Generated by Claude Code