@ai-matrx/records-ui 0.43.0 → 0.44.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/dist/index.d.cts CHANGED
@@ -2330,6 +2330,19 @@ interface TablePageProps {
2330
2330
  * it always has.
2331
2331
  */
2332
2332
  activeDashboardId?: Uuid$1 | null | undefined;
2333
+ /**
2334
+ * THE RECORD A LINK NAMED, OPENED ON ARRIVAL.
2335
+ *
2336
+ * 🚨 THE DEAD LINK THIS CLOSES (lane SCREENS-2, 2026-09-20). `ActionInbox` has always
2337
+ * handed its host `onOpenRecord(recordId, tableId)`, and the app has always routed that to
2338
+ * `/data-v2/<table>?record=<record>` — and NOTHING read the parameter. Pressing Open on a
2339
+ * checklist step, an assignment or an agent's proposal landed you on the table with the
2340
+ * record still shut, which is the inbox not finishing the sentence it started. Measured in
2341
+ * the real app on a dental practice's onboarding steps.
2342
+ *
2343
+ * Absent, nothing changes: the page opens exactly as it did.
2344
+ */
2345
+ activeRecordId?: Uuid$1 | null | undefined;
2333
2346
  className?: string | undefined;
2334
2347
  }
2335
2348
  /**
@@ -2371,7 +2384,7 @@ declare const DEFAULT_VIEW_NAME = "All records";
2371
2384
  * it: the bar above saves a view, and from then on the layout is remembered.
2372
2385
  */
2373
2386
  declare const VIEW_NOT_SAVED_YET: string;
2374
- declare function TablePage({ tableId, pageSize, seedViews, onLeave, leaveLabel, activeDashboardId, className, }: TablePageProps): react.JSX.Element;
2387
+ declare function TablePage({ tableId, pageSize, seedViews, onLeave, leaveLabel, activeDashboardId, activeRecordId, className, }: TablePageProps): react.JSX.Element;
2375
2388
 
2376
2389
  /** One Field a person asked for, in the words a person uses (FLD-1 / FLD-11). */
2377
2390
  interface NewFieldSpec {
package/dist/index.d.ts CHANGED
@@ -2330,6 +2330,19 @@ interface TablePageProps {
2330
2330
  * it always has.
2331
2331
  */
2332
2332
  activeDashboardId?: Uuid$1 | null | undefined;
2333
+ /**
2334
+ * THE RECORD A LINK NAMED, OPENED ON ARRIVAL.
2335
+ *
2336
+ * 🚨 THE DEAD LINK THIS CLOSES (lane SCREENS-2, 2026-09-20). `ActionInbox` has always
2337
+ * handed its host `onOpenRecord(recordId, tableId)`, and the app has always routed that to
2338
+ * `/data-v2/<table>?record=<record>` — and NOTHING read the parameter. Pressing Open on a
2339
+ * checklist step, an assignment or an agent's proposal landed you on the table with the
2340
+ * record still shut, which is the inbox not finishing the sentence it started. Measured in
2341
+ * the real app on a dental practice's onboarding steps.
2342
+ *
2343
+ * Absent, nothing changes: the page opens exactly as it did.
2344
+ */
2345
+ activeRecordId?: Uuid$1 | null | undefined;
2333
2346
  className?: string | undefined;
2334
2347
  }
2335
2348
  /**
@@ -2371,7 +2384,7 @@ declare const DEFAULT_VIEW_NAME = "All records";
2371
2384
  * it: the bar above saves a view, and from then on the layout is remembered.
2372
2385
  */
2373
2386
  declare const VIEW_NOT_SAVED_YET: string;
2374
- declare function TablePage({ tableId, pageSize, seedViews, onLeave, leaveLabel, activeDashboardId, className, }: TablePageProps): react.JSX.Element;
2387
+ declare function TablePage({ tableId, pageSize, seedViews, onLeave, leaveLabel, activeDashboardId, activeRecordId, className, }: TablePageProps): react.JSX.Element;
2375
2388
 
2376
2389
  /** One Field a person asked for, in the words a person uses (FLD-1 / FLD-11). */
2377
2390
  interface NewFieldSpec {
package/dist/index.js CHANGED
@@ -11804,7 +11804,7 @@ function TablesHome({ onOpenTable, className }) {
11804
11804
  }
11805
11805
 
11806
11806
  // src/TablePage.tsx
11807
- import { useCallback as useCallback32, useState as useState45 } from "react";
11807
+ import { useCallback as useCallback32, useEffect as useEffect36, useState as useState45 } from "react";
11808
11808
  import { useRecordsClient as useRecordsClient37, useTable as useTable20 } from "@ai-matrx/records/react";
11809
11809
  import { Button as Button40, Separator as Separator8, Skeleton as Skeleton30, cn as cn45 } from "@ai-matrx/design-system";
11810
11810
  import { Fragment as Fragment21, jsx as jsx49, jsxs as jsxs45 } from "react/jsx-runtime";
@@ -11814,6 +11814,9 @@ var VIEW_NOT_SAVED_YET = "This table has no saved view yet, so the layout you pi
11814
11814
  function defaultView(tableId) {
11815
11815
  return { name: DEFAULT_VIEW_NAME, subject: tableId, layout: "grid", isDefault: true };
11816
11816
  }
11817
+ function openingRail(activeRecordId) {
11818
+ return activeRecordId ? { rail: "record", record: activeRecordId } : { rail: "none", record: null };
11819
+ }
11817
11820
  function TablePage({
11818
11821
  tableId,
11819
11822
  pageSize = 100,
@@ -11821,6 +11824,7 @@ function TablePage({
11821
11824
  onLeave,
11822
11825
  leaveLabel = "Back to your tables",
11823
11826
  activeDashboardId,
11827
+ activeRecordId,
11824
11828
  className
11825
11829
  }) {
11826
11830
  const client = useRecordsClient37();
@@ -11828,12 +11832,18 @@ function TablePage({
11828
11832
  const rights = useTableRights(table.data);
11829
11833
  const organizationId = useRecordsClient37().config.organizationId;
11830
11834
  const [view, setView] = useState45(null);
11831
- const [rail, setRail] = useState45("none");
11835
+ const opening = openingRail(activeRecordId);
11836
+ const [rail, setRail] = useState45(opening.rail);
11832
11837
  const [asking, setAsking] = useState45(null);
11833
11838
  const [main, setMain] = useState45(activeDashboardId ? "dashboards" : "records");
11834
- const [openRecord, setOpenRecord] = useState45(null);
11839
+ const [openRecord, setOpenRecord] = useState45(opening.record);
11835
11840
  const viewVersion = useRecordVersion(view?.id ?? null);
11836
11841
  const show = (next) => setRail((current) => current === next ? "none" : next);
11842
+ useEffect36(() => {
11843
+ if (!activeRecordId) return;
11844
+ setOpenRecord(activeRecordId);
11845
+ setRail("record");
11846
+ }, [activeRecordId]);
11837
11847
  const patchView = useCallback32(
11838
11848
  async (patch) => {
11839
11849
  const current = view;