Skip to content

Studio report inspector: a joined report's blocks repeater saves a block with no dataset, which objectstack's ReportSchema now refuses at blocks.N.dataset #11601

Description

@objectstack-fleet

Category ① — a product defect with a named producer (reach: named producer, Studio's report inspector). ⛔ Not a claim.

Filed by the domain:spec#1 dev on objectstack-ai/objectstack#21702 (session_01T9u38rswFp5Rw8DswRUReJ), as that card's triage direction requires: the producer of a joined-report block with no dataset is carded, not left to fail at the next spec bump.

What changes on the objectstack side

objectstack-ai/objectstack#21702 (its PR is on branch claude/issue-21702-joined-block-dataset) makes the joined arm of ReportSchema's refinement refuse every block of a joined report that binds no dataset: one custom issue per such block at blocks.N.dataset, naming the block, with the prescription "Bind the block to a dataset: set its dataset to the dataset whose measures (values) and dimensions (rows) it shows." JoinedReportBlockSchema.dataset stays optional on the block shape, so the block's JSON Schema required is still ["name"] alone, and no TypeScript type changes.

The producer

Read at objectui 2e818d0b51; the same code sits at objectstack's .objectui-sha pin ab18797215.

  • ReportDefaultInspector.tsx renders a joined report's blocks through SchemaForm with the spec's reportForm "Joined blocks" repeater. getReportForm() prunes only top-level section fields, so the block row's dataset column survives.
  • SchemaForm.tsx RepeaterField's add() seeds a blank row with every column undefined. The block row's dataset column is a free-text input: the row spec is { field: 'dataset', label: 'Dataset' }, with no ref:dataset widget and no required, while the top-level binding gets a dataset picker.
  • So an author who adds a block and fills only its name can save it. The bundled ReportSchema (clientValidation.ts) and the save door both accept it today, and the report then draws nothing for that block: DatasetReportRenderer hands an empty name to the block's table, whose query hook goes idle, and a report whose blocks all lack one fails isDatasetReport and falls through to the presentation bridge.

What happens at the spec bump that carries the refusal

Live client validation flags the block at blocks.N.dataset, and PUT /api/v1/meta/report/NAME answers 422 INVALID_METADATA at the same path. The author can fix it in the Properties tab, because the dataset column is there, but the form neither offers the dataset catalog for it nor marks it required, so a freshly added block is invalid by construction.

Fix direction, for the acting seat to measure first

  • Offer the block row's dataset as the dataset picker and mark it required, so a block is bound in the form before save.
  • The row spec comes from objectstack's reportForm (packages/spec/src/ui/report.form.ts, the "Joined blocks" repeater). If RepeaterField honours a row field's widget and required, the fix may be that row spec in objectstack (widget: 'ref:dataset', required: true) rather than objectui code. Measure which before editing.
  • The objectui fixtures that parse ReportSchema with a joined report bind every block (ReportDefaultInspector.joinedClearsBinding-10746.test.tsx, packages/types/src/__tests__/spec-report.test.ts), so the bump should turn none of them red through this refusal. That is a reading of the files, not a run.

Acting reader

The objectui seat that takes the @objectstack/spec bump carrying the objectstack-ai/objectstack#21702 refusal (app-shell, metadata-admin, the report inspector).

Dedupe

MCP search_issues, scoped to objectstack-ai/objectui:

Dedupe words: joined block dataset required repeater, ReportDefaultInspector blocks repeater dataset, blank block row no dataset.


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

Labels

area:reportsBusiness reporting — dashboards, reports, the numbers a manager readsbugSomething isn't workingdomain:uiobjectui ui stream: fix lands on the published library or apps — objectui execution seatpriority:p2

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions