Skip to content

fix: one list of every problem, with codes and fixes as data - #859

Merged
LeslieOA merged 6 commits into
developfrom
feat/table-problems
Nov 24, 2026
Merged

LeslieOA merged 6 commits into
developfrom
feat/table-problems

Conversation

@LeslieOA

Copy link
Copy Markdown
Member

Refs #858 (parts 1 and 2; part 3, the apps' UI, is separate).

What changes

  • tableProblems(bundle) / problemsOf(table, name) in table-core return every problem a table has:

    • what section 9 says makes it invalid;
    • every line its reader kept and couldn't use;
    • the optional warnings.

    Each problem has a stable code, a severity (error, warning, notice), its place (cell, row, field, kept line or file), details under stable keys, an English message, and its fixes as data. A fix has a label and changesSchema, and fixes are listed safe first, then decisions, then schema changes. Nothing applies a fix.

  • The reader's diagnostics carry codes, and a kept line carries its file and text.

  • A repeated field id is now reported. The reader still gives the second field a new id, but now says so.

  • An unreadable schema.json still throws, as the spec's one fatal case. It is now an UnreadableSchemaError with code: "schema.unreadable".

  • The validator now checks:

    • categories (before, only constraints.enum);
    • yearmonth values (now a FieldType, labelled Month);
    • exclusive bounds and bounds on dates, datetimes, times and year-months;
    • uniqueKeys.

    It doesn't order durations, whose months and days have no fixed length.

  • viewSummary now uses problemsOf. "schema valid" means the table has no errors: cells, pages, and lines the reader kept all count. Its new problems field lists every problem.

  • Spec: adds "Showing a table's problems" (guidance) to section 9. It also resolves the contradiction between section 7 and section 9: an orphaned page makes a table invalid.

  • Fixtures: the submodule moves to feat(table): schema problem examples, and a formula column of every type workspace-fixtures#17, adding schema-errors.table, broken/schema-unreadable.table, and a column of every type in formula-errors.table.

    • schema-errors is left out of the checks that every example reads cleanly. problems.test.ts checks that each labelled row has its problem.
    • The generated fixture modules include schema-errors with what its reader said, so the demo apps open it.

Checks

  • core: 581 tests pass. app: 393 tests pass.
  • Typecheck: core, ui, app, fixtures, web, glass-bar, file-browser, files, mobile and the Linux app pass. In this checkout, macIndexHost.ts and the desktop tsconfig report modules that aren't installed. These files aren't changed here.
  • workspace-fixtures#17 has to land first, and this PR's submodule moves to its merge commit.

High-priority backlog: checked (gh issue list --label "priority: high").

🤖 Generated with Claude Code

LeslieOA and others added 5 commits November 23, 2026 19:39
tableProblems() and problemsOf() return what section 9 says makes a table
invalid, what its reader kept and couldn't use, and the optional
warnings. Each has a stable code, a severity, its place and the fixes
that apply, as data. The reader's diagnostics carry codes. A repeated
field id is said, not only mended. An unreadable schema.json throws
UnreadableSchemaError. The validator now checks categories, yearmonth,
exclusive bounds, bounds on dates and times, and uniqueKeys.

Refs #858

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ry type

Refs #858

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Refs #858

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Refs #858

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Refs #858

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@LeslieOA LeslieOA changed the title Table problems: one list of every problem, with codes and fixes as data fix: one list of every problem, with codes and fixes as data Nov 24, 2026
Refs: #858

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant