Skip to content

Card/column field curation: lead with author-signaled value fields, not declaration order #2

@rrrodzilla

Description

@rrrodzilla

Problem

KanbanBoardEntityCard (and the list table) pick their summary fields via listColumns(), which fills slots in schema declaration order after honoring @list hints. On the demo Deal schema this surfaces currency ("USD") on each card instead of the monetary value — declaration order happens to put the currency-code field first, and value falls outside the per-card cap (default 3).

So cards lead with a low-information field while the field the schema author clearly cares about (value) is hidden.

![cards show "currency: USD" instead of the deal value]

Why it matters

A board/card view is a glance surface — the 2–3 fields it shows should be the most informative, not whatever was declared first.

Options

  1. Honor @dashboard(widgets) references (preferred). When the schema declares widgets: ["sum:value", "avg:value"], the author has explicitly signaled value is a key metric. listColumns / a new card-curation helper could promote fields referenced by dashboard widget specs ahead of the declaration-order fill. Durable — works for any schema without per-field annotation.
  2. Heuristic weighting. Prefer numeric/currency/enum-with-colors fields over plain free-text codes when filling remaining slots.
  3. Interim/demo-only: add @list(primary|column) hints to the demo schema (Govcraft/schemaforge) so value is forced in. Quick, but doesn't fix the general case.

Recommend (1) as the lasting fix in @schemaforge/client (pure, testable), with (3) as an optional stopgap on the demo schema.

Scope

  • @schemaforge/client: listColumns / a cardColumns variant that accepts the dashboard widget fields as priority hints.
  • Add unit coverage; update the Organisms/KanbanBoard + EntityTable/CuratedColumns stories to demonstrate.

Surfaced while wiring the kanban board into the console (7dc307c, 0973ef2).

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions