@ai-matrx/records-ui 0.6.0 → 0.9.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,132 @@
1
1
  # Changelog — @ai-matrx/records-ui
2
2
 
3
+ ## 0.9.0
4
+
5
+ **Sharing reaches the record and table screens (SCR-N-5).** `ShareControl` puts a
6
+ Share button on the record peek and on the table page, and hands the subject to
7
+ the host through a new `share` port on `<RecordsUiProvider>`.
8
+
9
+ This package ships NO share dialog, deliberately, for the same reason it ships no
10
+ chat: AI Matrx has exactly one sharing surface, and a second one here would give
11
+ the platform two answers to "who can see this". With no `share` port bound there
12
+ is NO BUTTON — not a greyed one, not one that opens an empty panel — and
13
+ `NO_SHARE_REASON` names the port for anything that asks why.
14
+
15
+ A Table is a record in this store, so one control, one subject shape and one
16
+ dialog serve both screens; `kind` only changes the noun in the sentences.
17
+
18
+ New exports: `ShareControl`, `useCanShare`, `shareUnavailableReason`,
19
+ `NO_SHARE_REASON`, and the `ShareSubject` type.
20
+
21
+ ### Consumer action
22
+
23
+ Bind `share` on your `<RecordsMount host={{ … }}>` with the app's own sharing
24
+ dialog, e.g. in matrx-frontend:
25
+
26
+ ```tsx
27
+ import { recordStoreShare } from "@/features/sharing/components/RecordStoreShareSurface";
28
+
29
+ <RecordsMount host={{ Link, density: "condensed", share: recordStoreShare }} …>
30
+ ```
31
+
32
+ Leave it out and nothing changes — the screens render exactly as they did in
33
+ 0.8.0, with no Share button.
34
+
35
+
36
+ ## 0.8.0
37
+
38
+ **The worst finding of the 19 September verdict: "Add field" opened a proper
39
+ panel and then refused everything.** Number and Date were refused as undeclared,
40
+ Person was refused as a Formula, a choice list demanded a table the panel could
41
+ not name, and before any of those the Key box was blank, unmarked and required.
42
+ A table made with the product's own button had exactly one column.
43
+
44
+ - **The panel collects an INTENTION, and the store decides the rest.**
45
+ `FieldEditor` writes through `custom.field_declare` (`useFieldMutation`) and no
46
+ longer assembles a Field document of its own. It never sets a behaviour, a
47
+ format, a unit, a relation target, a relation maximum, a compute_on or a
48
+ pattern Rule — every one of those was a second place for the thirteen types to
49
+ be wrong.
50
+ - **Sixteen things a column can hold, in a menu under four headings**, each with
51
+ one line saying what it is FOR. `fieldTypes.ts` is new;
52
+ `parityTypesWithNoExplanation()` fails the suite the moment the store ships a
53
+ fourteenth parity type nobody has written a sentence for.
54
+ - **A choice list is defined where a person defines it** — the words go in a box
55
+ and the store keeps them as a Table (FLD-5 / FLD-6 untouched). Nobody is asked
56
+ to build a table before they can have a dropdown.
57
+ - **A Person field offers people.** It resolves to a relation at the kernel
58
+ Person Table, decided by the store.
59
+ - **The Key box is gone.** The key is derived from the name and shown, never
60
+ demanded.
61
+ - **A field is edited and removed from the same panel**, and removal names the
62
+ consequence before the second press. `TableSettings` retires through the field
63
+ door rather than deleting the record, so the TABLE stops declaring the column
64
+ too; the three unsafe removals (the title field, the last field, one another
65
+ field reads through) are refused by name.
66
+ - **Ids stopped being drawn as values.** `RecordLabelProvider` resolves a choice
67
+ or a relation id to the name of the record it points at, once per Field, for
68
+ every read-only surface — the Kanban board's column headings were bare
69
+ 36-character identifiers.
70
+ - **`3` in `units` no longer renders as `units3`.** `editorKindFor` called any
71
+ range field with a unit longer than one character a currency; a currency is a
72
+ range whose FORMAT is currency, which is what the store's own `parity_type`
73
+ says.
74
+ - **One word per type everywhere** — the settings row says what the panel
75
+ offered, and the store's "made of" sentences (`REC-31: a File record reached
76
+ through a relation`, `evaluated by custom.rule_eval`) are out of the UI.
77
+ - The person picker draws a name and an email as two facts, not one run-on
78
+ string.
79
+
80
+ ### Consumer action
81
+
82
+ `renderValue` still works and still draws an unresolved id as "Loading…". A host
83
+ drawing values outside `RecordsMount` should render `<RecordValue>` (or wrap in
84
+ `RecordLabelProvider`) so ids resolve to names.
85
+
86
+
87
+ ## 0.7.0
88
+
89
+ What the first headless walk of 0.6.0 through a real browser found, in the same
90
+ hour — every one of them on a table a person had just made.
91
+
92
+ - **A new table takes an empty record.** `DEFAULT_FIELDS` made `title`
93
+ REQUIRED, so "New record" — which writes an empty record and opens its first
94
+ cell — was refused (`REC-51: Title is required`) on every table the app makes.
95
+ A title is what makes a record a chip (REC-2), not a promise it can never be
96
+ written without; an organization that wants it demanded says so in the field
97
+ editor and the store then enforces it for everyone.
98
+ - **`TableSettings` can delete the table.** SCR-3 claims rename, reorder,
99
+ retype and delete; the panel only ever deleted a FIELD, so a table made in the
100
+ product could not be got rid of from anywhere in it. It is the same soft
101
+ delete every record gets, through the same door, and the consequence is named
102
+ before the second press. `onDeleted` lets the host leave the page, and
103
+ `TablePage` passes its `onLeave`.
104
+ - **Nobody conflicts with themselves any more.** Three separate paths wrote a
105
+ record twice against one version and were — correctly — refused `PT409` by the
106
+ store, so the screen showed a person a conflict with nobody but themselves:
107
+ Tab fired the cell's key handler AND its blur handler; two cells of one record
108
+ were written in parallel; and `useRecordVersion` never moved after a save, so
109
+ switching a saved view's layout twice, or saving a form twice, conflicted with
110
+ the save before it. One commit per opening, one write at a time per record,
111
+ and every successful write hands its new version back.
112
+ - **The demo harness renders like the product.** It imported the design
113
+ system's structural sheet and nothing else, so every page was unstyled HTML in
114
+ a real browser while `pnpm test` was green. It now runs Tailwind over this
115
+ package's own source, and the address bar takes `?demo=` and `?table=` so a
116
+ walk can make a throwaway table, work in it and delete it again.
117
+
118
+ ### Consumer action
119
+
120
+ **`useRecordVersion` now answers `{ version, note }` rather than a number.** A
121
+ screen that writes the same record more than once must hand each successful
122
+ write's new version back through `note(...)`, or the next write will be refused
123
+ as a conflict with the person who just made the last one. Nothing else changed:
124
+ `version` is the same value the hook used to return, and `null` still means "no
125
+ version was read", which is the store's ordinary last-writer-wins write.
126
+
127
+ A host that shows `TableSettings` on a page about one table should pass
128
+ `onDeleted`, or the person is left on a page about a table that is gone.
129
+
3
130
  ## 0.6.0
4
131
 
5
132
  Editing where the value is shown, and four other things an independent walk of