feat(core): add label seam (getLabelFieldName / getItemLabel + ui.labelField)#635
Conversation
…elField) Adds a single resolver the admin UI can use to answer "what field represents a row, and what text is its label" — relationship cells, dropdown options, and page headings all read from the same place, so projection and rendering can't drift apart.
🦋 Changeset detectedLatest commit: 41e4352 The changes in this PR will be included in the next version bump. This PR includes changesets to release 9 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Review: Label seam (
|
Coverage Report for Core Package Coverage (./packages/core)
File Coverage
|
||||||||||||||||||||||||||||||||||||||
Coverage Report for UI Package Coverage (./packages/ui)
File CoverageNo changed files found. |
Coverage Report for CLI Package Coverage (./packages/cli)
File CoverageNo changed files found. |
Coverage Report for Auth Package Coverage (./packages/auth)
File CoverageNo changed files found. |
Coverage Report for Storage Package Coverage (./packages/storage)
File CoverageNo changed files found. |
Coverage Report for RAG Package Coverage (./packages/rag)
File CoverageNo changed files found. |
Coverage Report for Storage S3 Package Coverage (./packages/storage-s3)
File CoverageNo changed files found. |
Coverage Report for Storage Vercel Package Coverage (./packages/storage-vercel)
File CoverageNo changed files found. |
Summary
ui.labelField?: stringtoListUIConfig— the field used to represent a row as a single label (relationship cells, dropdown options, page headings)getLabelFieldName(listConfig), which resolvesui.labelField ?? 'name' ?? 'title' ?? 'id'(first field that exists on the list), throwing if a configuredlabelFielddoesn't reference a declared, non-relationship fieldgetItemLabel(listConfig, item), which reads the fieldgetLabelFieldNameresolves off a row, falling back toidwhen that field is missing (e.g. stripped by field-level access)@opensaas/stack-coreroot entry pointCONTEXT.mdTest plan
(ui.labelField, fields present, row), asserting the fieldgetLabelFieldNamereturns is the fieldgetItemLabelreadspnpm test(packages/core) — all 744 tests passpnpm build(packages/core) — type-checks cleanpnpm lint— no new warnings/errorspnpm format/pnpm manypkg fixCloses #629
Generated by Claude Code