@ai-matrx/records-ui 0.116.69 → 0.116.71

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,7 +1,12 @@
1
1
  # Changelog — @ai-matrx/records-ui
2
2
 
3
- ## 0.116.69
3
+ ## 0.116.71
4
4
 
5
+ - **A link can keep the linked record as it was (lane CLOSE-LINK, CD-LINK-05, 2026-10-21).** `FieldEditor` gains "When a linked record changes" on an existing link column: "Show its changes" (live) or "Keep it as it was when linked" (snapshot, `binding`), sent only when it changed. An invoice's "Bill to" then keeps the March address after the client moves. Guard: two cases in `FieldEditor.test.tsx` (red before: no such control). Needs `@ai-matrx/records` with `FieldPatch.binding`. Consumer action: none.
6
+
7
+ ## 0.116.70
8
+
9
+ - **Agents can edit, per table; an agent's proposed column waits in the table's own Settings (lane CLOSE-AGENT, CD-AGENT-04/05, 2026-10-21).** `TableSettings` draws "Agents can edit" (new `TableAgentWrites.tsx`: `TableAgentWritesSwitch`, `agentsMayChangeTable`), on by default; off writes `agent_writable: false` on the Table document through `record_update`, and the store then refuses every agent change to that table in one sentence naming it (matrx-frontend migration `20261021170000_closeagent_a`). With no `proposals` handed in, the "Proposed" section now reads this table's own proposals from the one queue (`custom.work_inbox`, new `tableProposals.ts`: `useTableProposals`, `proposalsForTable`) and Accept / Reject decide them through `custom.work_approval_decide`, the Inbox's own door, which applies the column on yes. Guard: `TableSettings.agent-writes.test.tsx` (red before: no switch; no proposal listed). Consumer action: none.
5
10
  - **Move under… on a record, and a link's choices can come from one view (lane CLOSE-LINK, 2026-10-21).** New `MoveUnderDialog` (record menu `move-under`, grid row menu `row-move-under`, both Full access): pick a table, find a record by name, Move; it calls `client.recordReparent`, draws the store's refusal in place (a record never moves under itself or under a record inside it: matrx-frontend migration `closelink_a`), and announces the move with Undo, which puts the old parent back. `RelationPicker` reads `config.limit_to_view`: it lists only that saved view's records (the view's filter goes to the read door), and says "Its view is gone, so every record is offered." when the view is archived. `FieldEditor` gains "Choices come from" (Every record or a view of the target table) on an existing link column. Guards: `a-record-moves-under-another-and-a-refused-move-says-why.test.tsx`, `a-link-limited-to-a-view-offers-only-that-views-records.test.tsx` (red before). Consumer action: none. Needs `@ai-matrx/records` with `FieldPatch.limit_to_view`.
6
11
 
7
12
  - **A whole view reads as of a past day (CD-VIEW-13, lane CLOSE-VIEW, 2026-10-21).** The table page's grid toolbar gains "As of" (`TableAsOfButton`, new `TableAsOf.tsx`): type a day and every row shows what the store held at the end of it (`client.query` with `asOf` over `custom.query_table_as_of`), the pager counts the rows there were then (`client.recordAggregateAsOf`, count), the "Said then / True then" clocks are the record panel's own `AsOfControl`, the grid is read only while it shows the past (no New record, no cell edits; the read-only reason is `TABLE_AS_OF_WORDS.readOnly`), and "Back to today" returns the live page. Search, filters and sort are not applied to a past reading and the panel says so while any is on. The embedded grid (a Spaces block) draws no As of. New exports from `TableAsOf`: `useTableAsOfPage`, `tableAsOfAsk`, `TABLE_AS_OF_WORDS`. Guard: `a-whole-view-reads-as-of-a-past-day.test.tsx` (red before: the grid had no As of). Consumer action: none.
@@ -8554,6 +8554,8 @@ function FieldEditor(props) {
8554
8554
  const [dependency, setDependency] = useState27(dependencyStart);
8555
8555
  const limitViewStart = typeof start?.config?.["limit_to_view"] === "string" ? String(start.config["limit_to_view"]) : "";
8556
8556
  const [limitView, setLimitView] = useState27(limitViewStart);
8557
+ const bindingStart = start?.config?.["binding"] === "snapshot" ? "snapshot" : "live";
8558
+ const [binding, setBinding] = useState27(bindingStart);
8557
8559
  const [targetViews, setTargetViews] = useState27(null);
8558
8560
  const limitTarget = field2?.type === "relation" && field2.relation_target && !onEntity ? String(field2.relation_target) : null;
8559
8561
  useEffect19(() => {
@@ -8759,6 +8761,7 @@ function FieldEditor(props) {
8759
8761
  ...type === "button" && JSON.stringify(buttonSettings) !== JSON.stringify(buttonStart) ? { button: buttonSettings } : {},
8760
8762
  ...field2.type === "relation" && dependency !== dependencyStart ? { dependency } : {},
8761
8763
  ...field2.type === "relation" && limitView !== limitViewStart ? { limit_to_view: limitView === "" ? null : limitView } : {},
8764
+ ...field2.type === "relation" && binding !== bindingStart ? { binding } : {},
8762
8765
  ...type === "modified_time" ? watchedFieldsPatch(watchStart, watchFields) : {},
8763
8766
  ...type === "autonumber" && numberPrefix.trim() !== prefixStart ? { display_format: { id: "autonumber", options: numberPrefix.trim() === "" ? {} : { prefix: numberPrefix.trim() } } } : {},
8764
8767
  // THE CHOICES, ONE ROW EACH, IN ORDER (CHOICE-COLUMN-EDIT): `{id, words}` re-words a
@@ -9100,6 +9103,16 @@ function FieldEditor(props) {
9100
9103
  ] })
9101
9104
  ] })
9102
9105
  ] }) : null,
9106
+ editing && field2?.type === "relation" ? /* @__PURE__ */ jsxs33("div", { className: "flex flex-col gap-1", "data-records-link-binding": "", children: [
9107
+ /* @__PURE__ */ jsx37(Label9, { className: "text-xs", children: "When a linked record changes" }),
9108
+ /* @__PURE__ */ jsxs33(Select5, { value: binding, onValueChange: (next) => setBinding(next === "snapshot" ? "snapshot" : "live"), children: [
9109
+ /* @__PURE__ */ jsx37(SelectTrigger5, { size: "sm", "aria-label": "When a linked record changes", children: /* @__PURE__ */ jsx37(SelectValue5, {}) }),
9110
+ /* @__PURE__ */ jsxs33(SelectContent5, { children: [
9111
+ /* @__PURE__ */ jsx37(SelectItem5, { value: "live", children: "Show its changes" }),
9112
+ /* @__PURE__ */ jsx37(SelectItem5, { value: "snapshot", children: "Keep it as it was when linked" })
9113
+ ] })
9114
+ ] })
9115
+ ] }) : null,
9103
9116
  personColumn ? /* @__PURE__ */ jsxs33("label", { className: "flex items-center gap-1.5 text-sm", title: "Each person added to this column gets a notice", children: [
9104
9117
  /* @__PURE__ */ jsx37(
9105
9118
  Checkbox4,
@@ -12556,4 +12569,4 @@ export {
12556
12569
  RecordNameText,
12557
12570
  HeldChangeDecision
12558
12571
  };
12559
- //# sourceMappingURL=chunk-D2QW36IF.js.map
12572
+ //# sourceMappingURL=chunk-YXPUXD5H.js.map