feat(spec): ADR-0079 record display-name foundation — nameField + resolver#2434
Merged
Conversation
…olver - Add canonical `nameField` to ObjectSchema; `displayNameField` kept as a deprecated back-compat alias (parse/safeParse/create map it → nameField). - New `data/display-name.ts`: isTitleEligible, resolveDisplayField (nameField → displayNameField → ranked type-aware derivation), resolveRecordDisplayName (Record #<id> floor, never "Untitled"), provisionPrimary (designate-or- synthesize, idempotent), objectTitleCompleteness. 36 unit tests. - Consumers (objectql search, plugin-approvals) read nameField ?? displayNameField. - Blueprint object schema carries optional `nameField` (AI authoring). - Migrate single-field-title sys objects to explicit nameField (additive). - Auto-provision NOT wired at registry (synthesize would migrate system tables); seam + designate-only path documented as TODO(ADR-0079). titleFormat retained. Gates: @objectstack/spec 6642/6642, objectql 719/719 — green. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
📓 Docs Drift CheckThis PR changes 9 package(s): 98 hand-written doc(s) reference the affected code and may need an implementation-accuracy re-verification:
|
- liveness/object.json: nameField → live (read by display-name.ts + objectql search + plugin-approvals); note displayNameField now its deprecated alias. Fixes the ADR-0049 liveness gate (was 1 UNCLASSIFIED). - Regenerate api-surface.json + signatures for the new display-name exports (resolveRecordDisplayName, resolveDisplayField, provisionPrimary, …). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
Foundation for ADR-0079 (record display-name contract). Makes a record's human title a real, resolvable field instead of an optional render-time guess.
What
nameFieldadded toObjectSchemaas the canonical primary-title pointer;displayNameFieldkept as a deprecated back-compat alias (parse/safeParse/create map it →nameField, output preserves both). No hard required-refine yet (staged).data/display-name.ts(pure, 36 unit tests):isTitleEligible(excludes date/number/select/lookup/… ; email yes, phone no),resolveDisplayField(nameField → displayNameField → ranked type-aware derivation incl.*_name),resolveRecordDisplayName(Record #<id>floor — never "Untitled"),provisionPrimary(designate-or-synthesize, idempotent),objectTitleCompleteness.objectqlsearch,plugin-approvals) readnameField ?? displayNameField.nameField(AI authoring).nameField(additive).Staged (deliberate)
SchemaRegistry.registerObject— synthesizing anamecolumn would migrate dozens of title-less system tables; seam + designate-only path documented asTODO(ADR-0079)..refine()requiring a title (would reject existing metadata).titleFormatretained (objectui still reads it cross-repo).Gates
@objectstack/spec6642/6642 ·@objectstack/objectql719/719 — green.ADR:
objectstack-ai/clouddocs/adr/0079-record-display-name.md.🤖 Generated with Claude Code