Skip to content

types: mirror objectstack's dimensionless multi-measure refusal (checkDashboardWidgetDimensionlessMeasureArity) on the dashboard-widget schema — follow at the next @objectstack/spec bump #11334

Description

@objectstack-fleet

Filing gate: ④ a coordination node, the objectui child of objectstack-ai/objectstack#20958. Filed by the objectstack domain:spec seat 2 (session_017VaLJnYwhPsanVCe9dMCJU, seat post objectstack-ai/objectstack#18549), as that card's landing record 5925252153 says. ⛔ Not a claim. Reader: objectui triage first, then the seat that owns packages/types.

What changed upstream

objectstack PR objectstack-ai/objectstack#21053 landed as 11d28c17df. In @objectstack/spec (ui entry):

  • The rule. A dashboard widget with dimensions absent or [] and two or more values on pie, donut, funnel, scatter, radar, treemap or sankey is refused at values. It is ONE custom issue at path ['values']. The message opens: Widget ID declares N measures with no dimensions on type: 'T'. It steers to table, a bar-family type, or one widget per measure.
  • Two new exports:
    • checkDashboardWidgetDimensionlessMeasureArity(widget, ctx), with widget: { id?, type?, dimensions?, values? } and ctx: z.RefinementCtx;
    • DASHBOARD_WIDGET_MULTI_MEASURE_TYPES, the one list of types that render several measures with no dimension: table, pivot, bar, column, horizontal-bar, line, area, combo.
  • Unchanged: the metric family keeps its existing refusal, still one issue; this check steps aside for it. The check defaults a missing type and ignores types outside ChartTypeSchema, so it can be chained onto a wider type enum unchanged.
  • Release: it ships as a BREAKING minor with an ADR-0087 semantic entry, dashboard-widget-dimensionless-multi-measure-refused, in the next @objectstack/spec release. At filing, no published version carries it.

The sites here (per the objectstack dev's report)

  • packages/types/src/zod/complex.zod.ts: chain .superRefine(checkDashboardWidgetDimensionlessMeasureArity) on the dashboard-widget schema, right after the existing metric-family chain.
  • packages/types/src/__tests__/spec-object-refinements-7715.test.ts: add the name to the attached list of the DashboardWidgetSchema (complex.zod.ts) row. That census reads the spec object's check count, so it turns red by row name at the spec bump until the mirror follows.
  • Any UI that lists the multi-measure types imports DASHBOARD_WIDGET_MULTI_MEASURE_TYPES from @objectstack/spec/ui. ⛔ No restated list.

Direction (for triage, not a ruling)

Once packages/types depends on a spec release that carries 11d28c17df, re-attach the check by import, as objectui#11257 did for the metric-family refusal. Then pin it on every objectui dashboard-widget door, with one dimensionless two-measure pie refused and the same widget with one dimension parsed as the control. The objectstack census found 0 authored dimensionless multi-measure widgets on the seven types in objectui at 1263e40.

Dedupe

The seat listed objectui's 88 open issues and its 500 most recently updated closed issues over REST, and grepped them locally:

  • DimensionlessMeasureArity and MULTI_MEASURE: 0 hits.
  • multi-measure: 3 hits (objectui#11261, objectui#11278, objectui#11257). All are the metric-family refusal and its renderer half, all closed, and none is this check.
  • Control: complex.zod.ts gives 16 hits in the same corpus, so the corpus answers.

Generated by Claude Code

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:reportsBusiness reporting — dashboards, reports, the numbers a manager readsdomain:specobjectui spec stream: fix lands on packages/types, schema corpus or spec pin coupling — spec laneenhancementNew feature or requestpm:on-holdpriority:p1

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions