@ai-matrx/records-ui 0.5.4 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,90 @@
1
1
  # Changelog — @ai-matrx/records-ui
2
2
 
3
+ ## 0.7.0
4
+
5
+ What the first headless walk of 0.6.0 through a real browser found, in the same
6
+ hour — every one of them on a table a person had just made.
7
+
8
+ - **A new table takes an empty record.** `DEFAULT_FIELDS` made `title`
9
+ REQUIRED, so "New record" — which writes an empty record and opens its first
10
+ cell — was refused (`REC-51: Title is required`) on every table the app makes.
11
+ A title is what makes a record a chip (REC-2), not a promise it can never be
12
+ written without; an organization that wants it demanded says so in the field
13
+ editor and the store then enforces it for everyone.
14
+ - **`TableSettings` can delete the table.** SCR-3 claims rename, reorder,
15
+ retype and delete; the panel only ever deleted a FIELD, so a table made in the
16
+ product could not be got rid of from anywhere in it. It is the same soft
17
+ delete every record gets, through the same door, and the consequence is named
18
+ before the second press. `onDeleted` lets the host leave the page, and
19
+ `TablePage` passes its `onLeave`.
20
+ - **Nobody conflicts with themselves any more.** Three separate paths wrote a
21
+ record twice against one version and were — correctly — refused `PT409` by the
22
+ store, so the screen showed a person a conflict with nobody but themselves:
23
+ Tab fired the cell's key handler AND its blur handler; two cells of one record
24
+ were written in parallel; and `useRecordVersion` never moved after a save, so
25
+ switching a saved view's layout twice, or saving a form twice, conflicted with
26
+ the save before it. One commit per opening, one write at a time per record,
27
+ and every successful write hands its new version back.
28
+ - **The demo harness renders like the product.** It imported the design
29
+ system's structural sheet and nothing else, so every page was unstyled HTML in
30
+ a real browser while `pnpm test` was green. It now runs Tailwind over this
31
+ package's own source, and the address bar takes `?demo=` and `?table=` so a
32
+ walk can make a throwaway table, work in it and delete it again.
33
+
34
+ ### Consumer action
35
+
36
+ **`useRecordVersion` now answers `{ version, note }` rather than a number.** A
37
+ screen that writes the same record more than once must hand each successful
38
+ write's new version back through `note(...)`, or the next write will be refused
39
+ as a conflict with the person who just made the last one. Nothing else changed:
40
+ `version` is the same value the hook used to return, and `null` still means "no
41
+ version was read", which is the store's ordinary last-writer-wins write.
42
+
43
+ A host that shows `TableSettings` on a page about one table should pass
44
+ `onDeleted`, or the person is left on a page about a table that is gone.
45
+
46
+ ## 0.6.0
47
+
48
+ Editing where the value is shown, and four other things an independent walk of
49
+ the real screens (19 September) found a person could not do.
50
+
51
+ - **`Grid` edits in place** (`src/gridEditing.tsx`). Click a cell, or focus it
52
+ and press Enter, and the Field's own editor opens there; Enter saves, Escape
53
+ cancels, Tab saves and opens the next cell. The write goes through the one
54
+ write door carrying the version the person started from, so the STORE decides
55
+ whether somebody else got there first — and on `PT409` the cell shows the
56
+ other person's value with Try again and Keep theirs beside it. Optimistic,
57
+ and the value comes back off the screen the moment the store refuses.
58
+ - **Rows can be added and deleted from the grid.** "New record" writes an empty
59
+ record and opens its first cell; a Table with a required Field refuses in its
60
+ own words and the grid offers the whole form by name. Delete names the
61
+ consequence and the Table's own restore window before it happens.
62
+ - **`PersonPicker`** (new) and the **`members` port** on `RecordsUiProvider`. A
63
+ person field offers the organization's members and resolves whoever is picked
64
+ to their record in the kernel Person Table. It no longer offers the Homes
65
+ that also live in that Table.
66
+ - **Kanban and calendar carry the picker their sentence always promised.** The
67
+ group-by Field and the date Field are chosen on the board and saved onto the
68
+ view record (`onViewChange` → `viewPatchDocument`), so the choice is
69
+ remembered per saved view. `ViewBar`'s duplicate layout `select` is gone: the
70
+ switcher owns the layout, and the two controls can no longer disagree.
71
+ - **`TablePage` says when a table is not reachable** (`TABLE_NOT_REACHABLE`)
72
+ instead of rendering an endless skeleton, and takes `onLeave` for the way out.
73
+ - **Names, never tokens** (`src/names.ts`). Field headers, table cards, record
74
+ chips and type words all read as a person writes them; the app's own
75
+ bookkeeping Tables get their own lane in `TablesHome` ("Kept by the app")
76
+ instead of sitting among a person's data under their slug.
77
+ - A `json` parity editor, and honest empty states for a choice field whose
78
+ options Table is empty versus one that names no Table at all.
79
+
80
+ ### Consumer action
81
+
82
+ `RecordsUiHost.members` is OPTIONAL: unbound, a person field is absent with
83
+ `NO_MEMBERS_REASON` rather than offering the wrong things. Bind it to your
84
+ host's organization roster to get the picker. `Grid` takes `editable` (default
85
+ true) — pass `false` on a read-only surface. `TableLane` gained `"app"`, so an
86
+ exhaustive switch over it needs the new arm.
87
+
3
88
  ## 0.5.4
4
89
 
5
90
  Makes the live FormBuilder certification wait for the editor state that follows