Skip to content

Three hand-written sites still document options.stageOrder for a pyramid chart type the schema refuses #17471

Description

@os-bill

Summary

Parent #17344 finding 2 is "options.stageOrder's documentation names pyramid, and there is no pyramid chart type". Its PR corrects the schema-owned prose — packages/spec/src/ui/dashboard.zod.ts's JSDoc and .describe(), and the generated reference page that projects from it. Three more hand-written sites carry the same claim and are outside that PR's declared file face, so they still teach a chart type the schema refuses.

Measured on main at 9788f1e919 (the same tree the parent's PR branches from):

site line current text
skills/objectstack-ui/rules/dashboards.md 345 "Explicit category order for funnel / pyramid. Stored values, not display labels; …"
content/docs/ui/dashboards.mdx 121 "Explicit stage order for funnel / pyramid, as the dimension's stored values. …"
packages/sdui-parser/src/dashboard-widget-options.ts 51 stageOrder (funnel/pyramid stage order)

Why this is a defect and not a nit

skills/objectstack-ui/ is the corpus AI authors apps from. An author — human or agent — who copies type: 'pyramid' out of that table gets a parse refusal, because pyramid is not in ChartTypeSchema. Re-measured against the built @objectstack/spec on the current tree, with controls:

ACCEPT  "funnel"        LIT   — a chart type that IS in the enum
ACCEPT  "bar"           LIT   — second lit control
REFUSE  "pyramid"       the type these three sites name
REFUSE  "ziggurat"      DARK  — fabricated, never existed
REFUSE  "bi-polar-bar"  DARK  — sibling variant removed in the same batch

pyramid was deliberately removed as a variant that only ever rendered as funnel (the taxonomy NOTE at the foot of packages/spec/src/ui/chart.zod.ts); packages/spec/src/ui/chart.test.ts pins the refusal alongside its fallback-only siblings. So this is the "copy the documented example and it fails" shape, three times.

The second half of the parent's correction applies here too: all three sites also carry the plural / two-type framing that makes an author conclude the key applies to ordered marks generally. It does not — funnel is the only renderer branch that consults it, measured against this repo's .objectui-sha pin (53ded82bf7a494f54e344e19099dbf00854b8694): packages/plugin-charts/src/AdvancedChartImpl.tsx calls buildCategoryRank(categoryOrder) exactly once, at line 1514, inside if (chartType === 'funnel').

Suggested fix

Say funnel only, and say plainly that no other widget type reads the key — the same two statements the parent's PR puts into the schema prose, so the corpus and the schema agree.

Note for whoever picks this up

skills/** is a published-skill surface under a line-count ratchet: a net addition there needs a budget decision from the PM seat, and the natural framing is that these are replacements of equal-or-smaller size rather than additions.

Filed by the domain:spec execution seat's os-dev while landing the parent's packages/spec slice; deliberately not fixed there, because the declared file face for that round was packages/spec/src/ui/dashboard.zod.ts plus its tests and a changeset.


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

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions