You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(views): the five per-view-type configs speak the spec vocabulary (#2231 phase 3) (#2892)
* fix(views): the five per-view-type configs speak the spec vocabulary (#2231 phase 3)
`kanban`/`calendar`/`gantt`/`gallery`/`timeline` on `ListViewSchema` were the last
hand-written forks after #2882 — and the fork was not cosmetic. objectui named the
same concepts differently from `@objectstack/spec/ui`, and several read-sites only
understood one of the two dialects. Two of those gaps were live bugs.
Kanban lanes ignored the spec key. `ListView` gated the Kanban tab on
`groupByField || groupField` but rendered lanes off `groupField` alone, so a config
authored with the spec key — what the product's own `CreateViewDialog` emits —
offered the tab and then grouped by whatever `detectStatusField()` guessed. The
spec's `columns` (fields shown on each card) was also spread onto the board
verbatim, where `columns` means LANES, so `ObjectKanban` built lanes with undefined
id/title. `columns` now maps to `cardFields`, and the vocabulary keys are stripped
from the passthrough (matching plugin-view's adapter, which already did this).
Timeline lost every spec key in app-shell. `ObjectView`'s `timeline` branch was a
three-key whitelist while its `gallery`/`gantt` siblings had already been fixed to
spread-first, so a stored `timeline: { startDateField, endDateField, groupByField,
colorField, scale }` arrived with only `titleField` and an axis pinned to the
`'due_date'` fallback.
Also: plugin-view's `ObjectView` now reads `gallery.coverField` and
`timeline.startDateField` (it understood only the legacy aliases), the dead
`gallery.subtitleField` is removed (three producers computed it; `ObjectGallery`
never read it), and `defaultKanbanFromObject` no longer emits the legacy key
alongside the spec one — that dual-write existed only to work around the render bug.
Schema side: the four remaining configs derive from the spec via `.partial()` —
the product authors partial configs while spec marks `columns`/`titleField`/
`startDateField` required — and `gantt` needs no local schema at all. `.passthrough()`
is preserved so renderer-ahead knobs (calendar's `allDayField`) still reach the
renderer. The pre-#2231 names (`groupField`, `cardFields`, `imageField`, `dateField`)
stay accepted as deprecated aliases so stored views keep validating; the spec key
wins wherever both appear. `calendar.defaultView` stays local — no spec counterpart.
The drift guard now pins the derivation per config, and five ListView regression
tests cover the kanban bugs.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01V3EDGLKNvbcpDTLzyiAd3Q
* fix(list): collect the fields named by the spec view-config keys into $select
Third instance of the same root cause as the kanban lane bug. The view-config
field collector — which decides what `$select`/`$expand` asks the server for —
listed only the legacy objectui keys (`groupField`, `groupBy`, `cardFields`), so
a spec-authored config named its lane and card fields in a vocabulary the
collector could not see. The board then rendered from rows that never carried
those fields, which reads as an empty board rather than a config error.
Adds the spec counterparts (`groupByField`, `summarizeField`, and `columns` — the
kanban card fields) ahead of the aliases, in both collectors.
Pinned by a test that asserts the queried field set contains the lane and card
fields of a spec-authored kanban; it fails without this change.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01V3EDGLKNvbcpDTLzyiAd3Q
---------
Co-authored-by: Claude <noreply@anthropic.com>
0 commit comments