Skip to content

feat(sheets)!: a model-driven grid that works with any tenant schema - #63

Merged
yyyyaaa merged 19 commits into
mainfrom
feat/sheets-production-ready
Nov 16, 2026
Merged

yyyyaaa merged 19 commits into
mainfrom
feat/sheets-production-ready

Conversation

@yyyyaaa

@yyyyaaa yyyyaaa commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Related: constructive-io/constructive#1996 (the _meta fields this grid reads), constructive-io/dashboard#324 (the Dashboard copy; draft until @constructive-io/data is published) and constructive-io/constructive-desktop#283 (the Desktop Sheets tab).

What changed

  • One table model (@constructive-io/data, table-model/). Each table is built once from _meta (contract 2026-07) plus targeted __type lookups. The model holds the keys, column kinds, write rules, relations, filter operators, order-by values, label fields and storage role. Every list, find, create, update and delete document is built from it, with no name guessing.
  • Sheets reads only the model. Cell types, editors, filters, sort, search, relations and uploads all route from ColumnModel / RelationModel. Anything the model cannot prove is read-only with a reason the user can see. A field or table that cannot be resolved degrades on its own and never breaks the database view.
  • Every column kind has a matching cell and editor:
    • exact big numbers and decimals;
    • enum labels;
    • three-state booleans;
    • ranges, records and intervals;
    • geometry, with a map editor and a GeoJSON fallback;
    • network addresses, lists, JSON;
    • read-only viewers for binary, vector and full-text values;
    • one date and time display rule (YYYY-MM-DD HH:mm:ss, zoned values in the viewer's zone, the exact text kept for copy and writes).
  • Linked records of every shape (belongs to, has one, has many, many to many), including composite keys. The link editor lists every current link, pages and searches the related table, and supports "Create new" and Change link. Its changes are written one by one.
  • Files through the storage service's own _meta:
    • presigned PUT with uploadHeaders sent unchanged, deduplication, and one renewal of an expired URL;
    • bucket limits checked before upload;
    • a confirmation wait on the cell, with "Processing file…" and "Not saved" plus Retry;
    • a files-table preview column;
    • uploadToFilesTable for uploads outside a cell.
    • An unfinished upload's file row is left for the storage service to expire, and unfinishedUploadOf(error) names it.
  • Airtable-style view features:
    • filters by the operators each column really has, multi-key sort and search;
    • column order, hide, freeze, row height, and columns that fill the grid width;
    • saved views;
    • a record panel with linked records, files, previous/next, delete and a new-record form;
    • CSV/TSV import with mapping and an error report; Export view and Export selected.
  • One save status in a status bar pinned under the rows. It covers every write: cells, pastes, fills, undo/redo, new rows, deletes, the link and file editors, and record panel fields. Error cards keep every server message. A paste or fill that stops at a refused row keeps the rows saved before it, and the status says "N changes saved, M not saved".
  • Writes a row rule refuses are not "saved". The server answers an update or delete of a row it hides from the user with an empty record and no error. The update and delete documents now report applied, and the adapter turns an empty answer into an error: the value comes back, the status says "Not saved", and the card says "This record was not changed. You may not be allowed to change it, or it no longer exists."
  • Fresh uploads preview without a reload. A file whose download link is not ready yet (the storage service confirms uploads in the background) is looked up again on a short backoff (2 to 30 s), then left alone.
  • Relation names read as relations: a generated name reads short ("Assignee" for personByAssigneeEmail, "Tasks", "Projects"). The long form ("People by manager", "Projects via project members") is kept for a list of the table's own records and where two fields of the table would read the same.
  • Link changes are undoable. Each saved link change, from a cell or the record panel, is one Mod+Z step that runs the inverse writes: key values put back, a moved record returned to its old owner, a removed link row added again, an added one removed. Redo runs them again; a step the server refuses stays to retry, with the reason.
  • Link editor: it fits above or below its cell and its body scrolls, so Save stays reachable. Records with the same label show what tells them apart (another label field such as email, else the key). The open icon sits at the cell's right edge (on hover in a list), so a click on the label selects the cell.
  • New rows say what they need. Add row puts the cursor on the first cell to fill. A Save that still lacks fields sends nothing, says "Fill in Title and Project to save this row.", marks the cells and goes back to the first one.
  • Delete row acts on the selected rows, else the rows under the cursor. A new row is discarded ("Discard new row?"), also where saved rows cannot be deleted; a disabled item gives its reason.
  • Editing like a spreadsheet: Enter saves and moves down, Tab and Shift+Tab save and move across. The date editor takes a typed date (year first, or the locale's day/month order). A money field reads "$1,234.56". Whole numbers are checked against their Postgres range (a smallint too). Clearing a required text field of a saved record is refused. Refused writes read in plain words (unique, not null, check, missing link, a delete blocked by linked records).
  • Failures and stale data: a failed rows request (a search the server refuses) keeps the toolbar and shows the error over the grid with Clear and Try again. The grid reads its rows and model again when the page comes back after 30 s away.
  • System tables behind a switch: SheetsTableSelector items take system: true, and the list hides those behind "Show system tables (N)", off by default and remembered per browser; while on they show in their own section, and the open table always stays listed. isSystemTable and tableRolesFromCatalog (@constructive-io/data) decide from the platform catalog's table category (anything but APP is a module's) plus the _meta facts (storage, scope database), since the catalog files generated search tables as APP. _meta selects tableName where the server has it. The table list scrolls instead of cutting off a long list.
  • An empty table keeps its toolbar: "No rows yet" covers the body with Add row and Import, so Import is there when a table has nothing in it. A host's slots.empty still replaces the grid.
  • Smaller fixes: the new-record form marks a required link with "*" and shows "Set automatically when created" for a field the table fills in; the search box never names a full-text or vector column; CSV headers are the grid labels; the import result lists the top reasons rows were refused; a copied link cell holds the record labels, not JSON; on a narrow grid a frozen column takes at most 40% of the width; column headers carry aria-colindex.
  • Keyboard and accessibility:
    • one named-command pipeline (commands, keymap, interceptors, onCommand);
    • Escape and click-outside dismissal, and Shift+F10 for the context menu;
    • links that open only from the active cell;
    • the cell wrapper is the gridcell and carries aria-selected and the read-only reason;
    • editors take focus on open and return it to the cell on close.
  • Design pass (light and dark):
    • tabular figures;
    • instant hover, editors and record panel;
    • nested radius, image outlines, optical alignment;
    • a Storybook page background that follows the theme;
    • one shared editor frame (EditorHeader / EditorFooter).
  • Docs: README (with an "Upgrading" section), docs/FEATURES.md, docs/HOST_INTEGRATION.md, docs/EMBEDDING.md, docs/OVERLAY_EDITORS.md, and the registry docs string.
  • CSV formula protection, a host option off by default. With csvExport={{ protectFormulas: true }}, every CSV export (Export view, Export selected, exportCsv) writes text that starts with =, +, -, @, a tab or a carriage return with a leading apostrophe. Numbers and the header are never changed. exportCsv({ protectFormulas }) overrides it per call. The import error report always protects its text, because it is read, never imported back.
  • The status bar shows no count until the current view's first count arrives, so a new filter never flashes "0 rows". Initial loading also covers the table model step, so the grid never draws an empty toolbar and body before its loading placeholder.
  • Large tables stay fast. Profiled on 100,000 rows (dev build): a click, an arrow key, opening the editor and a save each took 300 ms to 1.5 s and now stay under 60 ms. The TanStack table holds columns only and the viewport draws rows by index; each row is memoized on its own share of the cursor, range and editor; the data hooks keep their values until a page changes; the cell cache is keyed by row object, so a save renders only the saved row.
  • Toolbar in two groups. The view on the left (view switcher, Fields, Filters, Sort, search); Fields, Filters and Sort stay quiet until they change the view, then show a tint and a count. The actions on the right: Import and Export view as quiet tools, New record, and Add row as the one filled button. Selected rows get their own group (count, Export, Delete, Clear) in place of the tools. Labels fold into icons on a narrow toolbar, which keeps one line from about 740 px.
  • A host readOnly prop (true or a reason). Every cell, paste, fill, link, New record, Import, Delete and record panel field refuses with the reason. Add row is hidden and the toolbar shows "Read-only". Viewing, sorting, filtering, search and export stay. Headless useSheets hosts use SheetsReadOnlyProvider.
  • One auth rule, one code list: an auth error is HTTP 401, or the error code UNAUTHENTICATED or BAD_TOKEN_DEFINITION (AUTHENTICATION_ERROR_CODES), never message text. isAuthenticationError (@constructive-io/data) and Sheets' executor share the list.
  • Repository cleanup: the stale tracked packages/sheets/dist-vendor/ build output is deleted and now gitignored (pnpm build:vendor still works locally), and the unused inflekt dependency is dropped from @constructive-io/sheets.
  • Columns fill the grid by kind: checkbox and number columns keep their base width while text, date, list and link columns take the spare width. User-sized and frozen columns never grow, and the computed widths are never saved.
  • Map settings (SheetsConfig.map). tiles is { url, attribution, subdomains? } or 'off', and 'off' edits shapes as GeoJSON text. placeSearch is { url } or 'off', and 'off' removes the search box. The default is unchanged: OpenStreetMap and Nominatim. An unusable setting turns that part off with a logged warning and never falls back to the public services.
  • packages/ui polish:
    • List highlights (select, menu, combobox, command, autocomplete, multi-select) move at once. A new travel prop keeps the spring for the toggle group and the one-time-code input.
    • Menu and select items are 5px round inside the 10px popup (nested radius).
    • Button press animates only the scale (0.97, 150ms), and its focus ring and shadow change at once.
    • The Sheet close button's hover no longer fades.

The table model

flowchart LR
  meta["_meta (2026-07)"] --> model["TableModel"]
  types["targeted __type lookups"] --> model
  model --> docs["list / find / create /<br/>update / delete documents"]
  model --> grid["cells, editors, filters,<br/>sort, search, relations"]
  smeta["storage _meta"] --> plane["upload plane: mutation,<br/>input fields, bucket limits"]
  plane --> grid
  docs --> adapter["SheetsBackendAdapter<br/>(host executor)"]
  model -. "cannot prove it" .-> ro["read-only with a reason"]
Loading

The save status

stateDiagram-v2
  [*] --> Pending: a write starts (startOperation / trackWrite)
  Pending --> Saving: still running after 300 ms
  Pending --> Outcome: the last overlapping write ends
  Saving --> Outcome: the last overlapping write ends
  Outcome --> [*]: success 3 s · partial 4 s · error 5 s
  Outcome --> ErrorCard: a write failed
  ErrorCard --> [*]: dismissed
Loading

Overlapping writes settle once, to one outcome: one write keeps its own message ("Saved", "Row created", "3 rows deleted"); several read "All changes saved", "Some changes were not saved" or "Changes were not saved".

Host API at a glance

<SheetsProvider config={{ endpoint, auth, storage: { endpoint: storageEndpoint, execute: storageExecute } }}>
  <Sheets
    tableName="Project"
    readOnly="Archived projects cannot be changed." // or true: "This table is read-only here." 
    csvExport={{ protectFormulas: true }} // opt-in: =, +, -, @, tab, CR text gets a leading '
    filters={filters}
    onFiltersChange={setFilters}
  />
</SheetsProvider>
// A host control that reports through the grid's save status
function ArchiveButton({ id }: { id: string }) {
  const feedback = useOptionalFeedback();
  const archive = () => feedback
    ? feedback.trackWrite('update', 1, () => archiveProject(id), { saved: 'Archived', failed: 'Not archived' })
    : archiveProject(id);
  return <button onClick={archive}>Archive</button>;
}
// A file outside any cell; an unfinished upload names its file row
try {
  const { fileId, file } = await uploadToFilesTable({ storage, filesTable: 'AppFile', file: picked, ownerId });
} catch (error) {
  const leftover = unfinishedUploadOf(error)?.fileId; // expired by storage; remove sooner if you want
}
// The geometry editor's map: your own tiles, no place search (default: OpenStreetMap + Nominatim)
const config: SheetsConfig = {
  endpoint, auth,
  map: { tiles: { url: 'https://tiles.example.com/{z}/{x}/{y}.png', attribution: '&copy; Example Maps' }, placeSearch: 'off' },
};

Upgrading

This is a breaking release. The full table is in the README, under "Upgrading". The headlines:

  • SheetsBackendAdapter gains fetchTableModel. AdapterTableContext is now { model, tableName }, and AdapterListQuery changes shape.
  • Filter types are renamed (SheetsFilterGroup, …), and SheetsViewState moves to version 2 (columns is required). Version 1 is still read.
  • executeFieldUpload takes a TableModel. useSheetsFieldUpload is deprecated. SheetsConfig.upload is now SheetsUploadConfig.
  • The grid renders SaveStatus in its status bar instead of FloatingStatus, which is still exported. "Image saved" and "Update failed" are no longer toasts.
  • Behavior:
    • Read-only comes from the model, not from column names.
    • Auth errors: only HTTP 401, UNAUTHENTICATED or BAD_TOKEN_DEFINITION.
    • Escape and click-outside clear the active cell.
    • Link cells open only from the active cell.
    • Editors and the record panel open without animation.
    • onError receives failed uploads with source: 'upload'.
    • Computed column widths are never saved.
  • Kept unchanged on purpose: callUploadOp, discoverUploadCapability, fetchDownloadUrl, presignedPut and sha256HexFromBuffer. Tests pin their earlier behavior.
  • SheetsHandle.exportCsv and ExportViewControl take an optional protectFormulas.
  • isAuthenticationError no longer reads message text. A host that relied on a message to sign users out now needs a 401 or one of the codes in AUTHENTICATION_ERROR_CODES.
  • Sheets adds readOnly, and the package exports SheetsReadOnlyProvider and DEFAULT_READ_ONLY_REASON.
  • SheetsConfig.map is new and optional, and the default is unchanged. A site with a Content-Security-Policy needs img-src for the tile host and connect-src for the search endpoint.
  • packages/ui: the list highlight no longer slides between items unless a component passes travel.
  • CSV exports write the grid's labels as headers ("Country code", "Assignee"), not field names. The import matches a header by label or by field name.
  • @constructive-io/data: ColumnValueModel.integerBounds is new (null for non-integer columns), and a Postgres money column has semantic: 'currency'.
  • SheetsDraftBindings adds deleteRows(rows).
  • New: isSystemTable, tableRolesFromCatalog and the TableRoles types (@constructive-io/data); useShowSystemTables, visibleTables and TableWithCategory.system (@constructive-io/sheets).
  • The default empty state no longer replaces the toolbar; pass slots.empty to keep a full replacement.
  • Behavior: Enter and Tab in an inline editor move the cursor after saving, and Mod+Z also undoes saved link changes.
  • SheetsControls: Delete and Export selected show only while rows are selected, in their own group. ImportRecordsControl and ExportViewControl render quiet ghost buttons whose labels fold inside a narrow Sheets toolbar (anywhere else they keep their labels).

Screenshots

Live on a local stack with a seeded tenant database (dark theme). These surfaces are new, so there is no earlier screen to compare.

Task table with 20,005 rows: choice chips, priorities, the bottom bar with the row count and "Saved" after an edit

pr-1-task-grid-saved

Link editor on a required link: the current link, a searchable picker over 303 projects, and why it cannot be removed

pr-2-link-editor

Record panel (Shift+Space): fields with their own editors, linked records with Change link and Clear link

pr-3-record-panel

Image cells from real uploads, and relation columns named "People by manager" and "Projects via project members"

pr-4-person-avatars

An edit a row rule refuses: the value comes back, the bar says "Not saved", and the card says why

pr-5-refused-edit

Gallery cells with thumbnails, and the file editor on a multi-file column

pr-6-file-editor

Relation and stress pass

From a pass over every relation shape and a 20,000-row table on the local stack.

Same-name records told apart in the link picker

pr63-link-picker-distinct

Mod+Z undoes a saved link change ("Link change undone")

pr63-link-undo

Save on an incomplete new row names the missing fields and marks them

pr63-draft-guidance
Delete row on a new row Its confirm
pr63-discard-menu pr63-discard-confirm
A typed date moves the calendar New record: a required link and a field the table fills in
pr63-typed-date pr63-new-record-marks

A search the server refuses keeps the toolbar, with Clear search and Try again

pr63-rows-error

Follow-ups

  • Publish in order after merge: @constructive-io/data, then @constructive-io/sheets and @constructive-io/ui; then the Dashboard bump and re-sync, and the Desktop bump.
  • The full-text setup can target an existing text column and then overwrite it on every write; the platform could refuse that setup (backend).
  • Server gaps from the stress pass (search when the embedding gateway is down, _meta table kind and foreign-key delete rules, nulls-last sort values, codes for length and RESTRICT errors, row versions, per-row permissions) need backend work; Sheets reads each one once the server sends it.
  • A full-text column still shows by default; hiding it needs a model-aware default in the saved view state.

🤖 Generated with Claude Code

https://claude.ai/code/session_017WbsG7zuvxWWo3jB12oYkA

- Resolve a `TableModel` from `_meta` and targeted introspection: keys, column kinds,
  write rules, relations (belongs-to, has-one, has-many, many-to-many), filter
  operators, order-by values and label fields. Nothing guesses a GraphQL name.
- Build list, find-one, create, update and delete documents from the model, with a
  write codec that encodes values by the column's input type.
- Update and delete documents report whether a row changed (`applied`), so a write a
  row rule hides is not mistaken for a save.
- `isAuthenticationError` counts HTTP 401 and the codes in the exported
  `AUTHENTICATION_ERROR_CODES` only, never message text.
…tton press

- Menu, select and list highlights move at once; toggle groups and the code input keep
  their slide through an opt-in `travel` prop.
- Menu and select items use a 5px radius, nested inside the 10px popup.
- Button press animates only its scale (0.97, 150ms) and stays still with reduced
  motion; the Sheet close button's hover is instant.
- Build every read and write from the table model: all scalar kinds, files (image,
  upload, attachment), every relation kind, composite keys, views and read-only
  columns, each degraded with a visible reason instead of a guess.
- Editors for every kind, a shared editor frame, link editor and picker, file editor,
  record panel, CSV import and export (opt-in formula protection), saved views,
  filters, sort, search, fill-width columns and a host `readOnly` prop.
- One save status in a bottom bar for every write; a write a row rule refuses shows
  "Not saved" and puts the value back.
- Split `sheets.tsx` and `use-sheets.ts` into focused render and assembly modules.
- Remove the stale tracked `dist-vendor/` output and the unused `inflekt` dependency.
@luxor-code-review

luxor-code-review Bot commented Nov 13, 2026 •

Copy link
Copy Markdown

Review complete. 🟠 1 high · 🟡 1 medium

💬 Inline comments (2)

🧹 Nitpicks (2) — 🟢 2 low
  • 🟢 Import error report CSV skips formula protection (files.ts:46) — The export path protects spreadsheet formulas with a leading apostrophe (protectFormulaText, formula-protection.ts:29), but the import error report written by importErrorReportText (files.ts:46-52) never applies it.
  • 🟢 Form spec builder drops bigint and bitstring fields (form-spec-builder.ts:13) — This PR re-maps bigint/int8 to the new bigint cell type and bit/varbit to bitstring in mapToFrontendCellType (type-mapping.ts:50, 89-90, 104-106), but the deprecated form builder's SCALAR_CELL_TYPE_TO_KIND (form-spec-builder.ts:13-38) gained no bigint or bitstring entries, so createScalarFieldSpec hits the return null at line 127 and those columns silently disappear from generated form specs.

This PR ships a major rewrite of the sheets package onto a shared table-model layer in packages/data, covering introspection, capabilities, value codecs, and relation inference, with the grid, editors, uploads, import/export, relations, and a new record panel rebuilt on top of it.

Files Change
packages/data/src/table-model/* New table-model subsystem: column/relation construction, schema introspection, selection, value codecs, and meta capabilities.
packages/sheets/src/adapter, hooks, cell-types, cell-model Adapter and cell-type plumbing remapped onto table-model types, with per-type factories, views, and width/routing tables.
packages/sheets/src/grid (hooks, view-state, assembly, feedback) Grid state rebuilt around assembly hooks, view queries with filters/sort/search, batch commit, and write feedback.
packages/sheets/src/relations, record, forms Relation editing/linking and the record detail panel rebuilt; form-spec builder carried over for hosts.
packages/sheets/src/uploads, import-export, selection Upload flows (presigned, files-table, pending writes), import/export with formula protection, and TSV export.
packages/ui/src/components/*, scripts/check-packed-packages.ts Minor component updates and packed-package size assertions refreshed for the new sheets CSS/layout.

Several verified defects remain around batch-commit rollback, filter application reporting, import error-report formula injection, and dropped bigint/bitstring form fields.

Reviewed commit: 6f435d1

The registry installs Sheets as source, and the smoke test compiles it with
`strictNullChecks` off. Without it, `!result.ok` does not narrow a result union and
`null` initializers widen to `any`, so results now compare `ok === false` and those
values carry explicit types. Behavior is unchanged.
…l uses

The smoke install looked for `.w-[52px]`, which only the old toolbar's page-size
inputs used. It now looks for `.min-w-[320px]`, the small editor width preset.

@luxor-code-review luxor-code-review Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rewrites @constructive-io/sheets as a table-model-driven CRUD grid with a new table-model subsystem in @constructive-io/data, plus cell-type, upload, import/export, and record-panel rework.

Key findings

A paste or fill saves one row at a time and stops at the first row the server
refuses. The rows saved before it used to go back to their old values on screen
while the server kept the new ones. Now only the refused row and the rows not sent
yet go back; the saved rows keep their values, stay undoable, and the status says
"N changes saved, M not saved".
When the table's filter input has no `and` field, two conditions on one field (or a
condition on the field the search uses) cannot be combined, and the query left them
out while the filter count still called them applied. Those conditions now show why
they are not applied, the count leaves them out, and the search still applies.
The error report repeats column names from the imported file and values that
reasons quote. Text that a spreadsheet app would run as a formula now gets a
leading apostrophe. The report is never imported back, so this changes no data.
…orm builder

The type mapping now gives `bigint` and `bitstring` cell types, which the deprecated
`buildScalarFormSpec` did not know, so those fields dropped out of its forms. They
map to the `integer` and `bit` kinds they had before.
In infinite mode no page query exists until the table model resolves, so the grid was
not "loading" yet and drew its toolbar over an empty grid before the loading
placeholder. Loading now covers the model step too.
Profiled on a 100,000-row table: a click, an arrow key or a save took 300 ms to
1.5 s because every interaction rebuilt and re-rendered far more than it changed.

- The TanStack table holds columns only. It built a row object for every row
  whenever the row array changed; the viewport now draws rows by index.
- The infinite-scroll hooks keep their values until a page's data changes, read
  pages by a hash computed once per page, and normalize each row once.
- Each body row is memoized on its own share of the active cell, range and
  in-place editor, so a cursor move renders the two rows it touches.
- The cell resolver caches by row object and reads the rows at call time, so a
  save renders only the saved row; its options and the table options no longer
  change identity on every render.
- The row marker changes only with the selected rows.
- The view on the left: the saved view, then Fields, Filters and Sort, quiet until
  they change the view and then tinted with a count, then search.
- The actions on the right: Import and Export view as quiet tools, New record, and
  Add row, the one filled button.
- Selected rows get their own group (count, Export, Delete, Clear) in place of the
  tools; Add row stays put. Delete no longer shows without a selection.
- Labels fold into their icons on a narrow toolbar (container queries) and keep
  their accessible names, so the toolbar stays on one line from about 740 px.
- The view and action groups are memoized, so a cursor move renders neither.
@yyyyaaa

yyyyaaa commented Nov 14, 2026

Copy link
Copy Markdown
Contributor Author

Tenki nitpicks: both valid and fixed. Import error report: 3f9a675 protects text that starts like a formula (the report is read, never imported back). Form spec builder: 33c2b76 maps bigint to integer and bitstring to bit, the kinds they had before this PR.

…only tables

- `integerBounds` on integer columns: the range of the Postgres type (a smallint
  holds -32768..32767 though GraphQL types it `Int`), so a value out of range is
  refused before it is sent.
- A Postgres `money` column has the `currency` semantic, like the `currency` domain.
- A table without a primary key that is a view says so ("This is a view of other
  tables, so its records cannot be changed here."), in the table issue and the
  update and delete reasons.
- The no-primary-key reason says what cannot happen: records cannot be changed or
  deleted.
Links
- Undo covers saved link changes: each save is one step that runs the inverse
  writes (key values put back, a moved record returned to its old owner, a removed
  link row added again, an added one removed). A refused step stays to retry.
- The link editor fits the space above or below its cell, and its body scrolls.
- The open icon sits at the cell's right edge (on hover in a list), and a press
  inside a portalled surface no longer counts as a press outside the grid.
- Records with the same label show what tells them apart (email, else key).
- Link columns read short ("Assignee", "Tasks"); the long name is kept only where
  two fields would read the same, and for a list of the table's own records.
- A copied link cell holds the record labels, not JSON.

Editing
- Inline editors: Enter saves and moves down, Tab and Shift+Tab save and move
  across.
- The date editor takes a typed date (year first, or in the locale's day/month
  order) and Enter saves it.
- Money fields read "$1,234.56"; integer fields check their Postgres range;
  clearing a required text field of a saved record is refused.
- Refused writes read in plain words (unique, not null, check, foreign key, a
  delete blocked by linked records).

Rows
- Add row puts the cursor on the first cell the row still needs; Save names the
  missing fields and goes back there.
- Delete row acts on the selected rows, else the cursor's; a new row is
  discarded ("Discard new row?"), also where saved rows cannot be deleted.
- A failed rows request keeps the toolbar and shows the error over the grid,
  with Clear and Try again.
- The grid reads its rows and model again when the page comes back after 30 s.

Other
- The new-record form marks a required link and shows "Set automatically when
  created" for a field the table fills in.
- The search box never names a full-text or vector column.
- Export headers use the grid labels; the import result lists the top reasons
  rows were refused.
- On a narrow grid a frozen column takes at most 40% of the width.
- Column headers carry aria-colindex.
- `tableRolesFromCatalog(platformTables)` reads each table's `category` from the
  platform API (`tables { name category schema { schemaName } }`): `APP` is the
  owner's, any other category a platform module's. Keys are the physical schema plus
  the SQL table name, the same in the catalog and in `_meta`.
- `isSystemTable(metaTable, roles?)`: a table the catalog files as a module's, or one
  `_meta` marks (storage files and buckets, scope `database`). The catalog only adds:
  generated search tables are filed as APP but stay system tables.
- `_meta` selects `tableName` when the server has it (optional capability).
…able

- `SheetsTableSelector` items take `system: true`. System tables are hidden behind a
  "Show system tables (N)" switch, off by default and remembered per browser; while
  on, they show in their own section. The open table always stays listed.
  `useShowSystemTables()` shares the setting with any other picker on the page.
- The table list scrolls, so a long list or the second section is never cut off,
  and the search, switch and list sit on an even rhythm.
- An empty table keeps the toolbar, headers and status bar; "No rows yet" covers the
  body with Add row and Import. A host's `slots.empty` still replaces the grid.
@yyyyaaa
yyyyaaa merged commit 3f63395 into main Nov 16, 2026
6 checks passed
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