@ai-matrx/design-system 0.86.356 → 0.86.358
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 +16 -0
- package/dist/auth-gate-dialog.js +2 -2
- package/dist/carousel.js +11 -10
- package/dist/carousel.js.map +1 -1
- package/dist/{chunk-UWTODOMD.js → chunk-2BQAHLU3.js} +4 -4
- package/dist/{chunk-T4D7WAV7.js → chunk-42GFQMLA.js} +2 -2
- package/dist/chunk-5Z5GTXKL.js +79 -0
- package/dist/chunk-5Z5GTXKL.js.map +1 -0
- package/dist/{chunk-POJ3RR3K.js → chunk-B5D3VIMC.js} +1 -1
- package/dist/{chunk-POJ3RR3K.js.map → chunk-B5D3VIMC.js.map} +1 -1
- package/dist/{chunk-4WSXAP24.js → chunk-BB5LA7FQ.js} +3 -1
- package/dist/chunk-BB5LA7FQ.js.map +1 -0
- package/dist/{chunk-FRJ4PPA2.js → chunk-CZGZV35G.js} +2 -2
- package/dist/{chunk-RLM4RSED.js → chunk-GUGBVQ4T.js} +6 -4
- package/dist/{chunk-RLM4RSED.js.map → chunk-GUGBVQ4T.js.map} +1 -1
- package/dist/{chunk-LJKF267O.js → chunk-HS6GMHKZ.js} +18 -76
- package/dist/chunk-HS6GMHKZ.js.map +1 -0
- package/dist/{chunk-2PO3N42Q.js → chunk-K3XWUACX.js} +5 -5
- package/dist/{chunk-ZMUPFGQO.js → chunk-K5ZQROWN.js} +5 -5
- package/dist/{chunk-U46XUQI7.js → chunk-KSCSH7AO.js} +16 -14
- package/dist/chunk-KSCSH7AO.js.map +1 -0
- package/dist/{chunk-MTE6N7XU.js → chunk-NFJ63LIH.js} +2 -2
- package/dist/{chunk-CFUXEGW2.js → chunk-OUQT72UL.js} +4 -4
- package/dist/{chunk-WUD23YTG.js → chunk-P56Y43RL.js} +6 -6
- package/dist/{chunk-GMNROZQJ.js → chunk-QTPW44IJ.js} +2 -2
- package/dist/{chunk-QA7EHFRX.js → chunk-T3FKFPCW.js} +5 -5
- package/dist/{chunk-X6ZRHJQP.js → chunk-T57DLONB.js} +20 -11
- package/dist/chunk-T57DLONB.js.map +1 -0
- package/dist/{chunk-SOCNWQMX.js → chunk-TEMAM5ET.js} +3 -3
- package/dist/{chunk-CH2NWSES.js → chunk-TIV6M7Q7.js} +3 -3
- package/dist/{chunk-6XNYYROM.js → chunk-WVEDW5VO.js} +2 -2
- package/dist/clipboard-fallback-dialog.js +4 -4
- package/dist/controls.cjs +34 -13
- package/dist/controls.cjs.map +1 -1
- package/dist/controls.js +9 -8
- package/dist/data-table/data-row-inspector.cjs +99 -11
- package/dist/data-table/data-row-inspector.cjs.map +1 -1
- package/dist/data-table/data-row-inspector.js +8 -7
- package/dist/data-table/data-row-window.cjs +99 -11
- package/dist/data-table/data-row-window.cjs.map +1 -1
- package/dist/data-table/data-row-window.js +11 -10
- package/dist/data-table/drill-chart.cjs +15 -3
- package/dist/data-table/drill-chart.cjs.map +1 -1
- package/dist/data-table/drill-chart.js +2 -1
- package/dist/data-table/drill-chart.js.map +1 -1
- package/dist/data-table/host.cjs.map +1 -1
- package/dist/data-table/host.d.cts +6 -2
- package/dist/data-table/host.d.ts +6 -2
- package/dist/data-table/host.js +1 -1
- package/dist/data-table/index.cjs +54 -40
- package/dist/data-table/index.cjs.map +1 -1
- package/dist/data-table/index.d.cts +6 -2
- package/dist/data-table/index.d.ts +6 -2
- package/dist/data-table/index.js +25 -28
- package/dist/data-table/index.js.map +1 -1
- package/dist/data-table/pagination.cjs +19 -10
- package/dist/data-table/pagination.cjs.map +1 -1
- package/dist/data-table/pagination.js +4 -4
- package/dist/data-table/uuid-cell.cjs +99 -11
- package/dist/data-table/uuid-cell.cjs.map +1 -1
- package/dist/data-table/uuid-cell.js +5 -4
- package/dist/desktop.cjs +45 -15
- package/dist/desktop.cjs.map +1 -1
- package/dist/desktop.js +23 -15
- package/dist/desktop.js.map +1 -1
- package/dist/email-input-dialog.cjs +15 -3
- package/dist/email-input-dialog.cjs.map +1 -1
- package/dist/email-input-dialog.js +4 -3
- package/dist/email-input-dialog.js.map +1 -1
- package/dist/error-sentence.cjs +130 -0
- package/dist/error-sentence.cjs.map +1 -0
- package/dist/error-sentence.d.cts +49 -0
- package/dist/error-sentence.d.ts +49 -0
- package/dist/error-sentence.js +22 -0
- package/dist/error-sentence.js.map +1 -0
- package/dist/index.cjs +47 -26
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +12 -10
- package/dist/index.d.ts +12 -10
- package/dist/index.js +30 -28
- package/dist/index.js.map +1 -1
- package/dist/item.cjs +19 -10
- package/dist/item.cjs.map +1 -1
- package/dist/item.js +7 -7
- package/dist/lite-table.cjs +15 -3
- package/dist/lite-table.cjs.map +1 -1
- package/dist/lite-table.js +5 -4
- package/dist/lite-table.js.map +1 -1
- package/dist/menu-look.cjs +19 -10
- package/dist/menu-look.cjs.map +1 -1
- package/dist/menu-look.js +2 -2
- package/dist/notice-stack.cjs +2 -0
- package/dist/notice-stack.cjs.map +1 -1
- package/dist/notice-stack.d.cts +11 -1
- package/dist/notice-stack.d.ts +11 -1
- package/dist/notice-stack.js +3 -1
- package/dist/record-list.cjs +34 -13
- package/dist/record-list.cjs.map +1 -1
- package/dist/record-list.js +8 -7
- package/dist/record-list.js.map +1 -1
- package/dist/sandbox-gate-dialog.js +2 -2
- package/dist/scope-mismatch-dialog.js +2 -2
- package/dist/settings.js +3 -3
- package/dist/swipe-deck.cjs +15 -3
- package/dist/swipe-deck.cjs.map +1 -1
- package/dist/swipe-deck.js +2 -1
- package/dist/swipe-deck.js.map +1 -1
- package/dist/text-input-dialog.cjs +15 -3
- package/dist/text-input-dialog.cjs.map +1 -1
- package/dist/text-input-dialog.js +4 -3
- package/dist/text-input-dialog.js.map +1 -1
- package/dist/value-prompts-dialog.js +2 -2
- package/dist/writing-field.js +5 -5
- package/package.json +12 -2
- package/dist/chunk-4WSXAP24.js.map +0 -1
- package/dist/chunk-LJKF267O.js.map +0 -1
- package/dist/chunk-U46XUQI7.js.map +0 -1
- package/dist/chunk-X6ZRHJQP.js.map +0 -1
- /package/dist/{chunk-UWTODOMD.js.map → chunk-2BQAHLU3.js.map} +0 -0
- /package/dist/{chunk-T4D7WAV7.js.map → chunk-42GFQMLA.js.map} +0 -0
- /package/dist/{chunk-FRJ4PPA2.js.map → chunk-CZGZV35G.js.map} +0 -0
- /package/dist/{chunk-2PO3N42Q.js.map → chunk-K3XWUACX.js.map} +0 -0
- /package/dist/{chunk-ZMUPFGQO.js.map → chunk-K5ZQROWN.js.map} +0 -0
- /package/dist/{chunk-MTE6N7XU.js.map → chunk-NFJ63LIH.js.map} +0 -0
- /package/dist/{chunk-CFUXEGW2.js.map → chunk-OUQT72UL.js.map} +0 -0
- /package/dist/{chunk-WUD23YTG.js.map → chunk-P56Y43RL.js.map} +0 -0
- /package/dist/{chunk-GMNROZQJ.js.map → chunk-QTPW44IJ.js.map} +0 -0
- /package/dist/{chunk-QA7EHFRX.js.map → chunk-T3FKFPCW.js.map} +0 -0
- /package/dist/{chunk-SOCNWQMX.js.map → chunk-TEMAM5ET.js.map} +0 -0
- /package/dist/{chunk-CH2NWSES.js.map → chunk-TIV6M7Q7.js.map} +0 -0
- /package/dist/{chunk-6XNYYROM.js.map → chunk-WVEDW5VO.js.map} +0 -0
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
} from "./chunk-FXT7PZAF.js";
|
|
10
10
|
import {
|
|
11
11
|
useMatrxDataTableHost
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-B5D3VIMC.js";
|
|
13
13
|
import {
|
|
14
14
|
Button
|
|
15
15
|
} from "./chunk-7IOSA55D.js";
|
|
@@ -97,4 +97,4 @@ export {
|
|
|
97
97
|
CopyButtons,
|
|
98
98
|
DeferredCopyButtons
|
|
99
99
|
};
|
|
100
|
-
//# sourceMappingURL=chunk-
|
|
100
|
+
//# sourceMappingURL=chunk-CZGZV35G.js.map
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
ErrorActions,
|
|
4
|
-
isTimedOutError,
|
|
5
|
-
peopleErrorSentence,
|
|
6
4
|
useErrorCardMenus
|
|
7
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-5Z5GTXKL.js";
|
|
6
|
+
import {
|
|
7
|
+
isTimedOutError,
|
|
8
|
+
peopleErrorSentence
|
|
9
|
+
} from "./chunk-HS6GMHKZ.js";
|
|
8
10
|
import {
|
|
9
11
|
Button
|
|
10
12
|
} from "./chunk-7IOSA55D.js";
|
|
@@ -333,4 +335,4 @@ export {
|
|
|
333
335
|
ReadEmpty,
|
|
334
336
|
ReadStaleNotice
|
|
335
337
|
};
|
|
336
|
-
//# sourceMappingURL=chunk-
|
|
338
|
+
//# sourceMappingURL=chunk-GUGBVQ4T.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/error-notice.tsx","../src/read-state/reload-page-button.tsx","../src/read-state/read-failure.tsx","../src/read-state/stale-data-notice.tsx","../src/read-state/read-gate.tsx"],"sourcesContent":["\"use client\";\n\n/**\n * ErrorNotice — THE inline error card. Every error a surface renders inline\n * (\"Not saved\", \"Failed to load…\", a dialog's refusal, a form's failure) is\n * this component, so every one of them carries the Alchemy Menu and hands an\n * AI the sentence, the code, the operation, the records, the surface's declared\n * values and the person's unsaved input.\n *\n * <ErrorNotice\n * title=\"Not saved\"\n * message={item.error}\n * operation=\"Save comment\"\n * records={[{ type: \"document\", id: docId }]}\n * unsavedInput={{ comment: draft }}\n * actions={<Button onClick={retry}>Retry</Button>}\n * />\n *\n * Moved from matrx-frontend (chat host slots get real package defaults,\n * 2026-10-08). The host's actions (Matrx: the Alchemy Menu) arrive through\n * `ErrorActionsProvider`; the corner ⋯ and right-click menu through\n * `ErrorCardMenusProvider`. Without them the card still says everything.\n */\nimport type { ReactNode } from \"react\";\nimport { AlertTriangleIcon as AlertTriangle } from \"./icons\";\nimport { cn } from \"./cn\";\nimport { Button } from \"./button\";\nimport {\n ErrorActions,\n useErrorCardMenus,\n type ErrorActionsInput,\n type ErrorActionsRecord,\n} from \"./error-box\";\n\nimport {\n errorSentenceOf,\n isTimedOutError,\n peopleErrorSentence,\n TIMED_OUT_SENTENCE,\n} from \"./error-sentence\";\n\nexport { errorSentenceOf, isTimedOutError, TIMED_OUT_SENTENCE };\n\nexport type ErrorNoticeProps = {\n /** Short heading (\"Not saved\"). */\n title?: string;\n /** The sentence shown. Falls back to the error's own message. */\n message?: string | null;\n /** The raw error — code/status/stack go to the AI payload, never the screen. */\n error?: unknown;\n operation?: string;\n records?: readonly ErrorActionsRecord[];\n unsavedInput?: unknown;\n details?: Record<string, unknown>;\n code?: string | number;\n status?: number;\n /** The tables / RPCs the failed call used — pins its captured request as the cause. */\n calls?: readonly string[];\n /** Retry / Discard / other controls, rendered under the sentence. */\n actions?: ReactNode;\n /**\n * Run the failed call again. Shown as \"Try again\" when the error is the\n * store's statement timeout and no `actions` were given.\n */\n onRetry?: () => void;\n /** Extra content under the sentence. */\n children?: ReactNode;\n /**\n * `default` = the card. `compact` = the dense card used inside lists and\n * side panels. `inline` = a one-line field/form error (no card chrome): the\n * sentence in the destructive color with the menu at its end — the shape\n * every `<p role=\"alert\" className=\"text-destructive\">` render moves onto.\n */\n size?: \"inline\" | \"compact\" | \"default\";\n icon?: boolean;\n className?: string;\n};\n\nexport function ErrorNotice({\n title,\n message,\n error,\n operation,\n records,\n unsavedInput,\n details,\n code,\n status,\n calls,\n actions: actionsProp,\n onRetry,\n children,\n size = \"default\",\n icon = true,\n className,\n}: ErrorNoticeProps) {\n const timedOut = isTimedOutError(error, message, code);\n // The one funnel (error-sentence.ts): raw error text and code paths never reach the screen.\n const sentence = peopleErrorSentence(error, message, { code });\n const actions =\n actionsProp ??\n (timedOut && onRetry ? (\n <Button type=\"button\" size=\"sm\" variant=\"outline\" data-error-retry=\"\" onClick={onRetry}>\n Try again\n </Button>\n ) : undefined);\n const menus = useErrorCardMenus();\n const input: ErrorActionsInput = {\n title,\n message: sentence,\n error,\n operation,\n records,\n unsavedInput,\n details,\n code,\n status,\n ...(calls ? { calls } : {}),\n source: \"inline\",\n origin: \"design-system/ErrorNotice\",\n };\n if (size === \"inline\") {\n return (\n <div\n role=\"alert\"\n data-error-notice=\"\"\n className={cn(\"flex items-start gap-1 text-destructive\", className)}\n >\n <span className=\"min-w-0 flex-1 break-words\">\n {title ? (\n <span data-error-title=\"\" className=\"font-medium\">\n {title}:{\" \"}\n </span>\n ) : null}\n {sentence}\n </span>\n {children}\n {actions}\n <ErrorActions {...input} />\n </div>\n );\n }\n const compact = size === \"compact\";\n // Title, actions or extra content make the card taller than the ⋯ + menu column.\n const stacked = Boolean(title || actions || children);\n // The card is an action host like any other content (ALC-15): right-click,\n // ⋯ (the same menu, opened at the button), the phone's sheet and the palette\n // (⌘/Ctrl+Shift+K) all show the ONE registry's actions over this sentence.\n // Read-only: nothing here may change a record.\n const menuTitle = title ?? \"Error\";\n const menuText = title ? `${title}: ${sentence}` : sentence;\n const card = (\n <div\n role=\"alert\"\n data-error-notice=\"\"\n className={cn(\n \"rounded-md border border-destructive/30 bg-destructive/5\",\n compact ? \"px-2 py-1.5 text-xs\" : \"px-3 py-2.5 text-sm\",\n className,\n )}\n >\n <div className=\"flex items-start gap-2\">\n {icon && (\n <AlertTriangle\n aria-hidden\n className={cn(\n \"shrink-0 text-destructive\",\n compact ? \"mt-px h-3.5 w-3.5\" : \"mt-0.5 h-4 w-4\",\n )}\n />\n )}\n <div className=\"min-w-0 flex-1\">\n {title && (\n <p data-error-title=\"\" className=\"font-medium text-destructive\">\n {title}\n </p>\n )}\n <p className={cn(\"break-words text-foreground\", title && \"mt-0.5\")}>\n {sentence}\n {!stacked && <ErrorActions {...input} />}\n </p>\n {children}\n {actions && <div className=\"mt-1 flex flex-wrap gap-1\">{actions}</div>}\n </div>\n {/* The corner column the ⋯ already owns carries the menu under it: no\n new column (beside the ⋯ it narrowed every line — 176→224px at\n 375px) and no new line (inline, a full last line wrapped it,\n +16px). A one-line notice with nothing under its sentence is\n shorter than that column, so there the menu rides the sentence\n (RC-B12 layout rule). */}\n <div className=\"flex shrink-0 flex-col items-center\">\n {menus ? (\n <menus.Button\n title={menuTitle}\n text={menuText}\n {...(compact ? { className: \"h-6 w-6\" } : {})}\n />\n ) : null}\n {stacked && <ErrorActions {...input} />}\n </div>\n </div>\n </div>\n );\n if (!menus) return card;\n return (\n <menus.Boundary title={menuTitle} text={menuText}>\n {card}\n </menus.Boundary>\n );\n}\n","\"use client\";\n\n/**\n * THE SERVER-SAFE RETRY. A server page cannot hand a failure notice a retry\n * function — functions do not cross the server/client boundary — so its\n * \"Couldn't load …\" card had no way forward but the browser's own reload\n * (page-pass 2026-09-27, /chat/message-templates/<id>). This control is the\n * retry any server-rendered failure can carry: it takes no props a server\n * cannot send, and it reloads THIS url (path, query and hash), which re-runs the\n * server read that failed.\n *\n * Its words say what it does — \"Reload page\" — because a reload also drops\n * anything unsaved elsewhere on the page; a client surface that can retry just\n * its own read passes `onRetry` to `ReadFailure` instead.\n */\nimport { RefreshCwIcon as RefreshCw } from \"../icons\";\nimport { Button } from \"../button\";\n\nexport const RELOAD_PAGE_LABEL = \"Reload page\";\n\nexport function ReloadPageButton({ className }: { className?: string }) {\n return (\n <Button\n type=\"button\"\n variant=\"outline\"\n size=\"sm\"\n className={className ?? \"h-7 gap-1.5 text-xs\"}\n onClick={() => window.location.reload()}\n >\n <RefreshCw className=\"h-3.5 w-3.5\" aria-hidden /> {RELOAD_PAGE_LABEL}\n </Button>\n );\n}\n","\"use client\";\n\n/**\n * The failed-read view every list uses instead of its empty state (RC-B12\n * round 11): the error, with the Alchemy Menu (through ErrorNotice) and a\n * retry when the caller has one. `error` may be the error itself or just the\n * read's failed flag — the sentence never pretends there is nothing.\n *\n * ALWAYS A WAY FORWARD. With `onRetry` it offers \"Try again\" (the surface's own\n * read, nothing else touched). Without one — every SERVER page, which cannot\n * pass a function — it offers `ReloadPageButton`: a same-URL reload that re-runs\n * the server read. A failure card with no retry at all is gone.\n */\nimport { RefreshCwIcon as RefreshCw } from \"../icons\";\nimport { Button } from \"../button\";\nimport { ErrorNotice } from \"../error-notice\";\nimport { ReloadPageButton } from \"./reload-page-button\";\n\nexport type ReadFailureProps = {\n error: unknown;\n /** What could not be read, in the reader's words: \"your tasks\". */\n what?: string | undefined;\n /** Retry just this read. Absent (always, from a server page): a same-URL reload is offered. */\n onRetry?: (() => void) | undefined;\n className?: string | undefined;\n size?: \"compact\" | \"default\" | undefined;\n};\n\nexport function ReadFailure({\n error,\n what = \"this list\",\n onRetry,\n className,\n size = \"compact\",\n}: ReadFailureProps) {\n const flagOnly = error === true || error == null || error === \"\";\n return (\n <ErrorNotice\n size={size}\n className={className ?? \"m-3\"}\n title={`Couldn't load ${what}`}\n {...(flagOnly\n ? { message: `The read for ${what} failed, so nothing here is an answer — not \"empty\".` }\n : { error })}\n operation={`Load ${what}`}\n actions={\n onRetry ? (\n <Button variant=\"outline\" size=\"sm\" className=\"h-7 gap-1.5 text-xs\" onClick={onRetry}>\n <RefreshCw className=\"h-3.5 w-3.5\" /> Try again\n </Button>\n ) : (\n <ReloadPageButton />\n )\n }\n />\n );\n}\n","\"use client\";\n\n/**\n * StaleDataNotice — what a surface shows when a READ FAILED and the rows on\n * screen are therefore not to be trusted.\n *\n * THE DEAD END this kills: a list loads fine, the user acts, the surface\n * reloads — and the reload fails. A toast fires and fades. What remains is the\n * PREVIOUS list, rendered exactly like a fresh one. The user reads a roster\n * that no longer reflects the database and has no way to know. Bugbot found\n * this on the admins roster and the feedback table in the same pass, which is\n * what made it a primitive instead of two patches.\n *\n * This is the campaign's never-report-green rule at its sharpest: **a surface\n * must never present data it could not actually read as though it had.** The\n * sibling `DeepLinkMissNotice` states a definitive negative and so demands\n * proof the list WAS read; this states the opposite — that the read broke —\n * and is what that component's \"show the surface's ordinary error state\n * instead\" was pointing at. Neither is complete without the other.\n *\n * Two cases, and conflating them is the actual bug:\n *\n * 1. **Stale** (`hasData`) — rows are on screen from an earlier successful\n * read. Say they may be out of date. Do NOT blank them: old data plus an\n * honest label beats an empty screen, and the user may still need it.\n * 2. **Unknown** (`!hasData`) — nothing was ever read. An empty list here\n * reads as \"there are none\", which is a claim about the database nobody\n * is entitled to make. Say the read failed instead.\n *\n * `onRetry` is not optional decoration — a problem you can detect ships with\n * its one-click fix. The user should never have to reload the page to recover\n * from a failed fetch.\n */\n\nimport { AlertTriangleIcon as AlertTriangle, RefreshCwIcon as RefreshCw } from \"../icons\";\nimport { Button } from \"../button\";\nimport { cn } from \"../cn\";\nimport { ErrorActions } from \"../error-box\";\n\nexport interface StaleDataNoticeProps {\n /**\n * Whether rows from an earlier SUCCESSFUL read are currently displayed.\n * Decides between \"this may be out of date\" and \"we never read this\".\n */\n hasData: boolean;\n /**\n * What could not be read, as a plain noun phrase the user recognizes —\n * \"the admin roster\", \"feedback\". Never a table or endpoint name: our user\n * is a subject-matter expert, not an engineer.\n */\n what: string;\n /** Re-run the read. Required — the notice always carries its own fix. */\n onRetry: () => void;\n /** Disables the retry control and shows motion while a retry is in flight. */\n retrying?: boolean;\n /** Optional detail (a server message). Shown verbatim, never interpreted. */\n detail?: string | null;\n /**\n * A multi-source list where SOME sources read and some did not: the rows on\n * screen are current, but `what` is missing from them. Says so instead of\n * \"may be out of date\" (RC-B12 round 12 — a partly failed roster).\n */\n partial?: boolean;\n className?: string;\n}\n\nexport function StaleDataNotice({\n hasData,\n what,\n onRetry,\n retrying = false,\n detail,\n partial = false,\n className,\n}: StaleDataNoticeProps) {\n return (\n <div\n role=\"status\"\n className={cn(\n \"flex flex-wrap items-center gap-x-3 gap-y-1.5 rounded-md border border-amber-500/40 bg-amber-500/10 px-3 py-2 type-body\",\n className,\n )}\n >\n <AlertTriangle className=\"h-4 w-4 shrink-0 text-amber-600 dark:text-amber-500\" />\n <span className=\"min-w-0 flex-1 text-foreground\">\n {partial ? (\n <>\n Couldn't load {what}, so <strong>they are missing</strong> from\n the list below — everything else loaded.\n </>\n ) : hasData ? (\n <>\n Couldn't refresh {what}. What you see below is the last version\n we loaded and <strong>may be out of date</strong>.\n </>\n ) : (\n <>\n Couldn't load {what}, so this list is empty because the read\n failed — <strong>not</strong> because there is nothing here.\n </>\n )}\n {detail ? (\n <span className=\"ml-1 text-muted-foreground\">({detail})</span>\n ) : null}\n {/* A failed read is an error on screen: it carries the Alchemy Menu (RC-B12),\n INSIDE the sentence — as its own flex item it narrowed the text and\n grew the notice 118→138px at 375px. */}\n <ErrorActions\n title={partial || !hasData ? `Couldn't load ${what}` : `Couldn't refresh ${what}`}\n message={\n detail\n ? `${hasData ? \"Couldn't refresh\" : \"Couldn't load\"} ${what}: ${detail}`\n : `${hasData ? \"Couldn't refresh\" : \"Couldn't load\"} ${what}.`\n }\n operation={`${hasData ? \"Refresh\" : \"Load\"} ${what}`}\n details={partial ? { rows_on_screen_are_partial: true } : { rows_on_screen_are_stale: hasData }}\n source=\"inline\"\n origin=\"design-system/StaleDataNotice\"\n />\n </span>\n <Button\n size=\"sm\"\n variant=\"outline\"\n onClick={onRetry}\n disabled={retrying}\n className=\"h-11 shrink-0 gap-1.5 lg:h-7\"\n >\n <RefreshCw className={cn(\"h-3.5 w-3.5\", retrying && \"matrx-spin\")} />\n {retrying ? \"Retrying…\" : \"Try again\"}\n </Button>\n </div>\n );\n}\n","\"use client\";\n\n/**\n * THE rule for every empty view (RC-B12 round 11): \"nothing here\" is an answer\n * only after a read that SUCCEEDED and returned nothing.\n *\n * <ReadGate status={readStatusOf(query)} error={query.error} what=\"your tasks\"\n * isEmpty={tasks.length === 0} empty={<p>No tasks yet.</p>} onRetry={refetch}>\n * <TaskList tasks={tasks} />\n * </ReadGate>\n *\n * loading → a wait · error → the failure (with the menu) · ready + empty → the\n * empty view · ready → the rows. When a refresh fails but earlier rows are on\n * screen, the rows stay and the failure is said above them.\n * Guarded by the census `findUngatedEmptyStates` and the lint rule\n * matrx/error-render-carries-alchemy (an empty view under a loading check\n * with no failure check is refused).\n */\nimport type { ReactNode } from \"react\";\nimport { Loader2Icon as Loader2 } from \"../icons\";\nimport { ReadFailure } from \"./read-failure\";\nimport { StaleDataNotice } from \"./stale-data-notice\";\n\nexport type ReadStatus = \"loading\" | \"error\" | \"ready\";\n\n/** The usual shapes a read reports itself in, folded into one status. */\nexport function readStatusOf(read: {\n status?: string | null;\n isLoading?: boolean;\n loading?: boolean;\n isFetching?: boolean;\n isError?: boolean;\n error?: unknown;\n}): ReadStatus {\n if (read.isError || (read.error != null && read.error !== false && read.error !== \"\")) return \"error\";\n if (read.status === \"error\" || read.status === \"failed\") return \"error\";\n if (read.isLoading || read.loading || read.status === \"loading\" || read.status === \"idle\" || read.status === \"pending\") return \"loading\";\n return \"ready\";\n}\n\n/**\n * A read's outcome handed to a list/table primitive (RC-B12 round 13). Every\n * primitive that takes an `emptyState` also takes `read?: ReadOutcome` and\n * renders the empty state only when `status === \"ready\"`: \"error\" with no rows\n * → <ReadFailure/> with the retry; \"error\" with rows → the rows under a stale\n * notice; \"loading\" with no rows → loading. Structurally identical to the\n * design-system table's `MatrxDataTableRead`, so one value serves both.\n */\nexport interface ReadOutcome {\n status: ReadStatus;\n /** The failure itself, or a truthy flag when the read only says it failed. */\n error?: unknown;\n onRetry?: (() => void) | undefined;\n /** What was read, in the reader's words: \"your tasks\". */\n what?: string | undefined;\n /**\n * A successful read has already produced a value (rows, a count). Then a\n * refetch in flight is not \"loading\" and a failed refresh is not \"no value\":\n * counts keep their last known value (with the stale mark) — the same\n * stale-while-error rule as rows (RC-B12 r13 ruling).\n */\n hasData?: boolean | undefined;\n}\n\ntype ReadLike = Parameters<typeof readStatusOf>[0] & {\n refetch?: () => unknown;\n retry?: () => unknown;\n /** The read's value (react-query `data`, a hook's rows) — present means a read already landed. */\n data?: unknown;\n /** react-query: when the data last arrived (0 = never). */\n dataUpdatedAt?: number;\n /** A hook that tracks it directly. */\n hasData?: boolean;\n};\n\n/** Has a successful read already produced a value? */\nfunction readHasData(read: ReadLike): boolean {\n if (typeof read.hasData === \"boolean\") return read.hasData;\n if (typeof read.dataUpdatedAt === \"number\" && read.dataUpdatedAt > 0) return true;\n // An empty array is often a hook's initial placeholder, not an answer — it\n // proves nothing was read; only a hook's own `hasData`/`dataUpdatedAt` can.\n if (Array.isArray(read.data)) return read.data.length > 0;\n return read.data !== undefined && read.data !== null;\n}\n\n/**\n * Fold a query/hook result into a `ReadOutcome`:\n * <MatrxDataTable data={rows} emptyState={…} read={readOf(query, { what: \"your tasks\" })} />\n * The retry is the read's own `refetch` / `retry` unless `onRetry` is given.\n */\nexport function readOf(read: ReadLike, options: { what?: string; onRetry?: () => void } = {}): ReadOutcome {\n const again = options.onRetry ?? read.refetch ?? read.retry;\n return {\n status: readStatusOf(read),\n error: read.error ?? (read.isError ? true : undefined),\n ...(again ? { onRetry: () => void again() } : {}),\n ...(options.what ? { what: options.what } : {}),\n hasData: readHasData(read),\n };\n}\n\nexport function ReadGate({\n read,\n status: statusProp,\n error: errorProp,\n what: whatProp,\n isEmpty,\n empty,\n loading,\n onRetry: onRetryProp,\n children,\n}: {\n /**\n * The read's outcome in one value — what a list primitive's `read` prop\n * carries. Absent (and no `status`), the gate is \"ready\": a primitive whose\n * caller passed no read renders exactly as before.\n */\n read?: ReadOutcome | undefined;\n status?: ReadStatus;\n error?: unknown;\n what?: string;\n isEmpty: boolean;\n empty: ReactNode;\n loading?: ReactNode;\n onRetry?: (() => void) | undefined;\n children: ReactNode;\n}) {\n const status = statusProp ?? read?.status ?? \"ready\";\n const error = errorProp ?? read?.error;\n const what = whatProp ?? read?.what ?? \"this list\";\n const onRetry = onRetryProp ?? read?.onRetry;\n if (status === \"error\") {\n if (isEmpty) return <ReadFailure error={error ?? true} what={what} onRetry={onRetry} />;\n // Rows from an earlier read stay; the notice says they may be out of date.\n return (\n <>\n {onRetry ? (\n <StaleDataNotice hasData what={what} onRetry={onRetry} className=\"mb-2\" />\n ) : (\n <ReadFailure error={error ?? true} what={what} />\n )}\n {children}\n </>\n );\n }\n if (status === \"loading\" && isEmpty) {\n return (\n loading ?? (\n <div className=\"flex items-center justify-center gap-2 p-4 text-xs text-muted-foreground\" role=\"status\" aria-busy=\"true\">\n <Loader2 className=\"h-4 w-4 matrx-spin\" /> Loading {what}…\n </div>\n )\n );\n }\n if (isEmpty) return <>{empty}</>;\n return <>{children}</>;\n}\n\n/**\n * A list primitive's EMPTY branch (RC-B12 round 13): the failure while its read\n * failed, the wait while it loads, and the primitive's own empty view only\n * after a read that succeeded. No `read` → the empty view, as before.\n *\n * if (items.length === 0) return <ReadEmpty read={read}>{emptyState}</ReadEmpty>;\n */\nexport function ReadEmpty({ read, loading, children }: { read?: ReadOutcome | undefined; loading?: ReactNode; children?: ReactNode }) {\n return (\n <ReadGate read={read} isEmpty empty={children ?? null} {...(loading === undefined ? {} : { loading })}>\n {null}\n </ReadGate>\n );\n}\n\n/**\n * Above a primitive's ROWS: when the latest read failed, the rows on screen are\n * from an earlier read — say so (StaleDataNotice with its retry), never blank them.\n */\nexport function ReadStaleNotice({ read, className }: { read?: ReadOutcome | undefined; className?: string }) {\n if (read?.status !== \"error\") return null;\n const what = read.what ?? \"this list\";\n if (!read.onRetry) return <ReadFailure error={read.error ?? true} what={what} {...(className ? { className } : {})} />;\n return <StaleDataNotice hasData what={what} onRetry={read.onRetry} {...(className ? { className } : {})} />;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAsGM,cA4BM,YA5BN;AAxBC,SAAS,YAAY;AAAA,EAC1B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,SAAS;AAAA,EACT;AAAA,EACA;AAAA,EACA,OAAO;AAAA,EACP,OAAO;AAAA,EACP;AACF,GAAqB;AACnB,QAAM,WAAW,gBAAgB,OAAO,SAAS,IAAI;AAErD,QAAM,WAAW,oBAAoB,OAAO,SAAS,EAAE,KAAK,CAAC;AAC7D,QAAM,UACJ,gB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MAAU;AAAA,MAAK;AAAA,OAC3D;AAAA,EAGN;AACA,MAAI,QAAS,QAAO,gBAAAA,KAAAD,WAAA,EAAG,iBAAM;AAC7B,SAAO,gBAAAC,KAAAD,WAAA,EAAG,UAAS;AACrB;AASO,SAAS,UAAU,EAAE,MAAM,SAAS,SAAS,GAAkF;AACpI,SACE,gBAAAC,KAAC,YAAS,MAAY,SAAO,MAAC,OAAO,YAAY,MAAO,GAAI,YAAY,SAAY,CAAC,IAAI,EAAE,QAAQ,GAChG,gBACH;AAEJ;AAMO,SAAS,gBAAgB,EAAE,MAAM,UAAU,GAA2D;AAC3G,MAAI,MAAM,WAAW,QAAS,QAAO;AACrC,QAAM,OAAO,KAAK,QAAQ;AAC1B,MAAI,CAAC,KAAK,QAAS,QAAO,gBAAAA,KAAC,eAAY,OAAO,KAAK,SAAS,MAAM,MAAa,GAAI,YAAY,EAAE,UAAU,IAAI,CAAC,GAAI;AACpH,SAAO,gBAAAA,KAAC,mBAAgB,SAAO,MAAC,MAAY,SAAS,KAAK,SAAU,GAAI,YAAY,EAAE,UAAU,IAAI,CAAC,GAAI;AAC3G;","names":["jsx","jsxs","jsx","jsxs","jsx","jsxs","Fragment","jsx","jsxs"]}
|
|
1
|
+
{"version":3,"sources":["../src/error-notice.tsx","../src/read-state/reload-page-button.tsx","../src/read-state/read-failure.tsx","../src/read-state/stale-data-notice.tsx","../src/read-state/read-gate.tsx"],"sourcesContent":["\"use client\";\n\n/**\n * ErrorNotice — THE inline error card. Every error a surface renders inline\n * (\"Not saved\", \"Failed to load…\", a dialog's refusal, a form's failure) is\n * this component, so every one of them carries the Alchemy Menu and hands an\n * AI the sentence, the code, the operation, the records, the surface's declared\n * values and the person's unsaved input.\n *\n * <ErrorNotice\n * title=\"Not saved\"\n * message={item.error}\n * operation=\"Save comment\"\n * records={[{ type: \"document\", id: docId }]}\n * unsavedInput={{ comment: draft }}\n * actions={<Button onClick={retry}>Retry</Button>}\n * />\n *\n * Moved from matrx-frontend (chat host slots get real package defaults,\n * 2026-10-08). The host's actions (Matrx: the Alchemy Menu) arrive through\n * `ErrorActionsProvider`; the corner ⋯ and right-click menu through\n * `ErrorCardMenusProvider`. Without them the card still says everything.\n */\nimport type { ReactNode } from \"react\";\nimport { AlertTriangleIcon as AlertTriangle } from \"./icons\";\nimport { cn } from \"./cn\";\nimport { Button } from \"./button\";\nimport {\n ErrorActions,\n useErrorCardMenus,\n type ErrorActionsInput,\n type ErrorActionsRecord,\n} from \"./error-box\";\n\nimport {\n errorSentenceOf,\n isTimedOutError,\n peopleErrorSentence,\n TIMED_OUT_SENTENCE,\n} from \"./error-sentence\";\n\nexport { errorSentenceOf, isTimedOutError, TIMED_OUT_SENTENCE };\n\nexport type ErrorNoticeProps = {\n /** Short heading (\"Not saved\"). */\n title?: string;\n /** The sentence shown. Falls back to the error's own message. */\n message?: string | null;\n /** The raw error — code/status/stack go to the AI payload, never the screen. */\n error?: unknown;\n operation?: string;\n records?: readonly ErrorActionsRecord[];\n unsavedInput?: unknown;\n details?: Record<string, unknown>;\n code?: string | number;\n status?: number;\n /** The tables / RPCs the failed call used — pins its captured request as the cause. */\n calls?: readonly string[];\n /** Retry / Discard / other controls, rendered under the sentence. */\n actions?: ReactNode;\n /**\n * Run the failed call again. Shown as \"Try again\" when the error is the\n * store's statement timeout and no `actions` were given.\n */\n onRetry?: () => void;\n /** Extra content under the sentence. */\n children?: ReactNode;\n /**\n * `default` = the card. `compact` = the dense card used inside lists and\n * side panels. `inline` = a one-line field/form error (no card chrome): the\n * sentence in the destructive color with the menu at its end — the shape\n * every `<p role=\"alert\" className=\"text-destructive\">` render moves onto.\n */\n size?: \"inline\" | \"compact\" | \"default\";\n icon?: boolean;\n className?: string;\n};\n\nexport function ErrorNotice({\n title,\n message,\n error,\n operation,\n records,\n unsavedInput,\n details,\n code,\n status,\n calls,\n actions: actionsProp,\n onRetry,\n children,\n size = \"default\",\n icon = true,\n className,\n}: ErrorNoticeProps) {\n const timedOut = isTimedOutError(error, message, code);\n // The one funnel (error-sentence.ts): raw error text and code paths never reach the screen.\n const sentence = peopleErrorSentence(error, message, { code });\n const actions =\n actionsProp ??\n (timedOut && onRetry ? (\n <Button type=\"button\" size=\"sm\" variant=\"outline\" data-error-retry=\"\" onClick={onRetry}>\n Try again\n </Button>\n ) : undefined);\n const menus = useErrorCardMenus();\n const input: ErrorActionsInput = {\n title,\n message: sentence,\n error,\n operation,\n records,\n unsavedInput,\n details,\n code,\n status,\n ...(calls ? { calls } : {}),\n source: \"inline\",\n origin: \"design-system/ErrorNotice\",\n };\n if (size === \"inline\") {\n return (\n <div\n role=\"alert\"\n data-error-notice=\"\"\n className={cn(\"flex items-start gap-1 text-destructive\", className)}\n >\n <span className=\"min-w-0 flex-1 break-words\">\n {title ? (\n <span data-error-title=\"\" className=\"font-medium\">\n {title}:{\" \"}\n </span>\n ) : null}\n {sentence}\n </span>\n {children}\n {actions}\n <ErrorActions {...input} />\n </div>\n );\n }\n const compact = size === \"compact\";\n // Title, actions or extra content make the card taller than the ⋯ + menu column.\n const stacked = Boolean(title || actions || children);\n // The card is an action host like any other content (ALC-15): right-click,\n // ⋯ (the same menu, opened at the button), the phone's sheet and the palette\n // (⌘/Ctrl+Shift+K) all show the ONE registry's actions over this sentence.\n // Read-only: nothing here may change a record.\n const menuTitle = title ?? \"Error\";\n const menuText = title ? `${title}: ${sentence}` : sentence;\n const card = (\n <div\n role=\"alert\"\n data-error-notice=\"\"\n className={cn(\n \"rounded-md border border-destructive/30 bg-destructive/5\",\n compact ? \"px-2 py-1.5 text-xs\" : \"px-3 py-2.5 text-sm\",\n className,\n )}\n >\n <div className=\"flex items-start gap-2\">\n {icon && (\n <AlertTriangle\n aria-hidden\n className={cn(\n \"shrink-0 text-destructive\",\n compact ? \"mt-px h-3.5 w-3.5\" : \"mt-0.5 h-4 w-4\",\n )}\n />\n )}\n <div className=\"min-w-0 flex-1\">\n {title && (\n <p data-error-title=\"\" className=\"font-medium text-destructive\">\n {title}\n </p>\n )}\n <p className={cn(\"break-words text-foreground\", title && \"mt-0.5\")}>\n {sentence}\n {!stacked && <ErrorActions {...input} />}\n </p>\n {children}\n {actions && <div className=\"mt-1 flex flex-wrap gap-1\">{actions}</div>}\n </div>\n {/* The corner column the ⋯ already owns carries the menu under it: no\n new column (beside the ⋯ it narrowed every line — 176→224px at\n 375px) and no new line (inline, a full last line wrapped it,\n +16px). A one-line notice with nothing under its sentence is\n shorter than that column, so there the menu rides the sentence\n (RC-B12 layout rule). */}\n <div className=\"flex shrink-0 flex-col items-center\">\n {menus ? (\n <menus.Button\n title={menuTitle}\n text={menuText}\n {...(compact ? { className: \"h-6 w-6\" } : {})}\n />\n ) : null}\n {stacked && <ErrorActions {...input} />}\n </div>\n </div>\n </div>\n );\n if (!menus) return card;\n return (\n <menus.Boundary title={menuTitle} text={menuText}>\n {card}\n </menus.Boundary>\n );\n}\n","\"use client\";\n\n/**\n * THE SERVER-SAFE RETRY. A server page cannot hand a failure notice a retry\n * function — functions do not cross the server/client boundary — so its\n * \"Couldn't load …\" card had no way forward but the browser's own reload\n * (page-pass 2026-09-27, /chat/message-templates/<id>). This control is the\n * retry any server-rendered failure can carry: it takes no props a server\n * cannot send, and it reloads THIS url (path, query and hash), which re-runs the\n * server read that failed.\n *\n * Its words say what it does — \"Reload page\" — because a reload also drops\n * anything unsaved elsewhere on the page; a client surface that can retry just\n * its own read passes `onRetry` to `ReadFailure` instead.\n */\nimport { RefreshCwIcon as RefreshCw } from \"../icons\";\nimport { Button } from \"../button\";\n\nexport const RELOAD_PAGE_LABEL = \"Reload page\";\n\nexport function ReloadPageButton({ className }: { className?: string }) {\n return (\n <Button\n type=\"button\"\n variant=\"outline\"\n size=\"sm\"\n className={className ?? \"h-7 gap-1.5 text-xs\"}\n onClick={() => window.location.reload()}\n >\n <RefreshCw className=\"h-3.5 w-3.5\" aria-hidden /> {RELOAD_PAGE_LABEL}\n </Button>\n );\n}\n","\"use client\";\n\n/**\n * The failed-read view every list uses instead of its empty state (RC-B12\n * round 11): the error, with the Alchemy Menu (through ErrorNotice) and a\n * retry when the caller has one. `error` may be the error itself or just the\n * read's failed flag — the sentence never pretends there is nothing.\n *\n * ALWAYS A WAY FORWARD. With `onRetry` it offers \"Try again\" (the surface's own\n * read, nothing else touched). Without one — every SERVER page, which cannot\n * pass a function — it offers `ReloadPageButton`: a same-URL reload that re-runs\n * the server read. A failure card with no retry at all is gone.\n */\nimport { RefreshCwIcon as RefreshCw } from \"../icons\";\nimport { Button } from \"../button\";\nimport { ErrorNotice } from \"../error-notice\";\nimport { ReloadPageButton } from \"./reload-page-button\";\n\nexport type ReadFailureProps = {\n error: unknown;\n /** What could not be read, in the reader's words: \"your tasks\". */\n what?: string | undefined;\n /** Retry just this read. Absent (always, from a server page): a same-URL reload is offered. */\n onRetry?: (() => void) | undefined;\n className?: string | undefined;\n size?: \"compact\" | \"default\" | undefined;\n};\n\nexport function ReadFailure({\n error,\n what = \"this list\",\n onRetry,\n className,\n size = \"compact\",\n}: ReadFailureProps) {\n const flagOnly = error === true || error == null || error === \"\";\n return (\n <ErrorNotice\n size={size}\n className={className ?? \"m-3\"}\n title={`Couldn't load ${what}`}\n {...(flagOnly\n ? { message: `The read for ${what} failed, so nothing here is an answer — not \"empty\".` }\n : { error })}\n operation={`Load ${what}`}\n actions={\n onRetry ? (\n <Button variant=\"outline\" size=\"sm\" className=\"h-7 gap-1.5 text-xs\" onClick={onRetry}>\n <RefreshCw className=\"h-3.5 w-3.5\" /> Try again\n </Button>\n ) : (\n <ReloadPageButton />\n )\n }\n />\n );\n}\n","\"use client\";\n\n/**\n * StaleDataNotice — what a surface shows when a READ FAILED and the rows on\n * screen are therefore not to be trusted.\n *\n * THE DEAD END this kills: a list loads fine, the user acts, the surface\n * reloads — and the reload fails. A toast fires and fades. What remains is the\n * PREVIOUS list, rendered exactly like a fresh one. The user reads a roster\n * that no longer reflects the database and has no way to know. Bugbot found\n * this on the admins roster and the feedback table in the same pass, which is\n * what made it a primitive instead of two patches.\n *\n * This is the campaign's never-report-green rule at its sharpest: **a surface\n * must never present data it could not actually read as though it had.** The\n * sibling `DeepLinkMissNotice` states a definitive negative and so demands\n * proof the list WAS read; this states the opposite — that the read broke —\n * and is what that component's \"show the surface's ordinary error state\n * instead\" was pointing at. Neither is complete without the other.\n *\n * Two cases, and conflating them is the actual bug:\n *\n * 1. **Stale** (`hasData`) — rows are on screen from an earlier successful\n * read. Say they may be out of date. Do NOT blank them: old data plus an\n * honest label beats an empty screen, and the user may still need it.\n * 2. **Unknown** (`!hasData`) — nothing was ever read. An empty list here\n * reads as \"there are none\", which is a claim about the database nobody\n * is entitled to make. Say the read failed instead.\n *\n * `onRetry` is not optional decoration — a problem you can detect ships with\n * its one-click fix. The user should never have to reload the page to recover\n * from a failed fetch.\n */\n\nimport { AlertTriangleIcon as AlertTriangle, RefreshCwIcon as RefreshCw } from \"../icons\";\nimport { Button } from \"../button\";\nimport { cn } from \"../cn\";\nimport { ErrorActions } from \"../error-box\";\n\nexport interface StaleDataNoticeProps {\n /**\n * Whether rows from an earlier SUCCESSFUL read are currently displayed.\n * Decides between \"this may be out of date\" and \"we never read this\".\n */\n hasData: boolean;\n /**\n * What could not be read, as a plain noun phrase the user recognizes —\n * \"the admin roster\", \"feedback\". Never a table or endpoint name: our user\n * is a subject-matter expert, not an engineer.\n */\n what: string;\n /** Re-run the read. Required — the notice always carries its own fix. */\n onRetry: () => void;\n /** Disables the retry control and shows motion while a retry is in flight. */\n retrying?: boolean;\n /** Optional detail (a server message). Shown verbatim, never interpreted. */\n detail?: string | null;\n /**\n * A multi-source list where SOME sources read and some did not: the rows on\n * screen are current, but `what` is missing from them. Says so instead of\n * \"may be out of date\" (RC-B12 round 12 — a partly failed roster).\n */\n partial?: boolean;\n className?: string;\n}\n\nexport function StaleDataNotice({\n hasData,\n what,\n onRetry,\n retrying = false,\n detail,\n partial = false,\n className,\n}: StaleDataNoticeProps) {\n return (\n <div\n role=\"status\"\n className={cn(\n \"flex flex-wrap items-center gap-x-3 gap-y-1.5 rounded-md border border-amber-500/40 bg-amber-500/10 px-3 py-2 type-body\",\n className,\n )}\n >\n <AlertTriangle className=\"h-4 w-4 shrink-0 text-amber-600 dark:text-amber-500\" />\n <span className=\"min-w-0 flex-1 text-foreground\">\n {partial ? (\n <>\n Couldn't load {what}, so <strong>they are missing</strong> from\n the list below — everything else loaded.\n </>\n ) : hasData ? (\n <>\n Couldn't refresh {what}. What you see below is the last version\n we loaded and <strong>may be out of date</strong>.\n </>\n ) : (\n <>\n Couldn't load {what}, so this list is empty because the read\n failed — <strong>not</strong> because there is nothing here.\n </>\n )}\n {detail ? (\n <span className=\"ml-1 text-muted-foreground\">({detail})</span>\n ) : null}\n {/* A failed read is an error on screen: it carries the Alchemy Menu (RC-B12),\n INSIDE the sentence — as its own flex item it narrowed the text and\n grew the notice 118→138px at 375px. */}\n <ErrorActions\n title={partial || !hasData ? `Couldn't load ${what}` : `Couldn't refresh ${what}`}\n message={\n detail\n ? `${hasData ? \"Couldn't refresh\" : \"Couldn't load\"} ${what}: ${detail}`\n : `${hasData ? \"Couldn't refresh\" : \"Couldn't load\"} ${what}.`\n }\n operation={`${hasData ? \"Refresh\" : \"Load\"} ${what}`}\n details={partial ? { rows_on_screen_are_partial: true } : { rows_on_screen_are_stale: hasData }}\n source=\"inline\"\n origin=\"design-system/StaleDataNotice\"\n />\n </span>\n <Button\n size=\"sm\"\n variant=\"outline\"\n onClick={onRetry}\n disabled={retrying}\n className=\"h-11 shrink-0 gap-1.5 lg:h-7\"\n >\n <RefreshCw className={cn(\"h-3.5 w-3.5\", retrying && \"matrx-spin\")} />\n {retrying ? \"Retrying…\" : \"Try again\"}\n </Button>\n </div>\n );\n}\n","\"use client\";\n\n/**\n * THE rule for every empty view (RC-B12 round 11): \"nothing here\" is an answer\n * only after a read that SUCCEEDED and returned nothing.\n *\n * <ReadGate status={readStatusOf(query)} error={query.error} what=\"your tasks\"\n * isEmpty={tasks.length === 0} empty={<p>No tasks yet.</p>} onRetry={refetch}>\n * <TaskList tasks={tasks} />\n * </ReadGate>\n *\n * loading → a wait · error → the failure (with the menu) · ready + empty → the\n * empty view · ready → the rows. When a refresh fails but earlier rows are on\n * screen, the rows stay and the failure is said above them.\n * Guarded by the census `findUngatedEmptyStates` and the lint rule\n * matrx/error-render-carries-alchemy (an empty view under a loading check\n * with no failure check is refused).\n */\nimport type { ReactNode } from \"react\";\nimport { Loader2Icon as Loader2 } from \"../icons\";\nimport { ReadFailure } from \"./read-failure\";\nimport { StaleDataNotice } from \"./stale-data-notice\";\n\nexport type ReadStatus = \"loading\" | \"error\" | \"ready\";\n\n/** The usual shapes a read reports itself in, folded into one status. */\nexport function readStatusOf(read: {\n status?: string | null;\n isLoading?: boolean;\n loading?: boolean;\n isFetching?: boolean;\n isError?: boolean;\n error?: unknown;\n}): ReadStatus {\n if (read.isError || (read.error != null && read.error !== false && read.error !== \"\")) return \"error\";\n if (read.status === \"error\" || read.status === \"failed\") return \"error\";\n if (read.isLoading || read.loading || read.status === \"loading\" || read.status === \"idle\" || read.status === \"pending\") return \"loading\";\n return \"ready\";\n}\n\n/**\n * A read's outcome handed to a list/table primitive (RC-B12 round 13). Every\n * primitive that takes an `emptyState` also takes `read?: ReadOutcome` and\n * renders the empty state only when `status === \"ready\"`: \"error\" with no rows\n * → <ReadFailure/> with the retry; \"error\" with rows → the rows under a stale\n * notice; \"loading\" with no rows → loading. Structurally identical to the\n * design-system table's `MatrxDataTableRead`, so one value serves both.\n */\nexport interface ReadOutcome {\n status: ReadStatus;\n /** The failure itself, or a truthy flag when the read only says it failed. */\n error?: unknown;\n onRetry?: (() => void) | undefined;\n /** What was read, in the reader's words: \"your tasks\". */\n what?: string | undefined;\n /**\n * A successful read has already produced a value (rows, a count). Then a\n * refetch in flight is not \"loading\" and a failed refresh is not \"no value\":\n * counts keep their last known value (with the stale mark) — the same\n * stale-while-error rule as rows (RC-B12 r13 ruling).\n */\n hasData?: boolean | undefined;\n}\n\ntype ReadLike = Parameters<typeof readStatusOf>[0] & {\n refetch?: () => unknown;\n retry?: () => unknown;\n /** The read's value (react-query `data`, a hook's rows) — present means a read already landed. */\n data?: unknown;\n /** react-query: when the data last arrived (0 = never). */\n dataUpdatedAt?: number;\n /** A hook that tracks it directly. */\n hasData?: boolean;\n};\n\n/** Has a successful read already produced a value? */\nfunction readHasData(read: ReadLike): boolean {\n if (typeof read.hasData === \"boolean\") return read.hasData;\n if (typeof read.dataUpdatedAt === \"number\" && read.dataUpdatedAt > 0) return true;\n // An empty array is often a hook's initial placeholder, not an answer — it\n // proves nothing was read; only a hook's own `hasData`/`dataUpdatedAt` can.\n if (Array.isArray(read.data)) return read.data.length > 0;\n return read.data !== undefined && read.data !== null;\n}\n\n/**\n * Fold a query/hook result into a `ReadOutcome`:\n * <MatrxDataTable data={rows} emptyState={…} read={readOf(query, { what: \"your tasks\" })} />\n * The retry is the read's own `refetch` / `retry` unless `onRetry` is given.\n */\nexport function readOf(read: ReadLike, options: { what?: string; onRetry?: () => void } = {}): ReadOutcome {\n const again = options.onRetry ?? read.refetch ?? read.retry;\n return {\n status: readStatusOf(read),\n error: read.error ?? (read.isError ? true : undefined),\n ...(again ? { onRetry: () => void again() } : {}),\n ...(options.what ? { what: options.what } : {}),\n hasData: readHasData(read),\n };\n}\n\nexport function ReadGate({\n read,\n status: statusProp,\n error: errorProp,\n what: whatProp,\n isEmpty,\n empty,\n loading,\n onRetry: onRetryProp,\n children,\n}: {\n /**\n * The read's outcome in one value — what a list primitive's `read` prop\n * carries. Absent (and no `status`), the gate is \"ready\": a primitive whose\n * caller passed no read renders exactly as before.\n */\n read?: ReadOutcome | undefined;\n status?: ReadStatus;\n error?: unknown;\n what?: string;\n isEmpty: boolean;\n empty: ReactNode;\n loading?: ReactNode;\n onRetry?: (() => void) | undefined;\n children: ReactNode;\n}) {\n const status = statusProp ?? read?.status ?? \"ready\";\n const error = errorProp ?? read?.error;\n const what = whatProp ?? read?.what ?? \"this list\";\n const onRetry = onRetryProp ?? read?.onRetry;\n if (status === \"error\") {\n if (isEmpty) return <ReadFailure error={error ?? true} what={what} onRetry={onRetry} />;\n // Rows from an earlier read stay; the notice says they may be out of date.\n return (\n <>\n {onRetry ? (\n <StaleDataNotice hasData what={what} onRetry={onRetry} className=\"mb-2\" />\n ) : (\n <ReadFailure error={error ?? true} what={what} />\n )}\n {children}\n </>\n );\n }\n if (status === \"loading\" && isEmpty) {\n return (\n loading ?? (\n <div className=\"flex items-center justify-center gap-2 p-4 text-xs text-muted-foreground\" role=\"status\" aria-busy=\"true\">\n <Loader2 className=\"h-4 w-4 matrx-spin\" /> Loading {what}…\n </div>\n )\n );\n }\n if (isEmpty) return <>{empty}</>;\n return <>{children}</>;\n}\n\n/**\n * A list primitive's EMPTY branch (RC-B12 round 13): the failure while its read\n * failed, the wait while it loads, and the primitive's own empty view only\n * after a read that succeeded. No `read` → the empty view, as before.\n *\n * if (items.length === 0) return <ReadEmpty read={read}>{emptyState}</ReadEmpty>;\n */\nexport function ReadEmpty({ read, loading, children }: { read?: ReadOutcome | undefined; loading?: ReactNode; children?: ReactNode }) {\n return (\n <ReadGate read={read} isEmpty empty={children ?? null} {...(loading === undefined ? {} : { loading })}>\n {null}\n </ReadGate>\n );\n}\n\n/**\n * Above a primitive's ROWS: when the latest read failed, the rows on screen are\n * from an earlier read — say so (StaleDataNotice with its retry), never blank them.\n */\nexport function ReadStaleNotice({ read, className }: { read?: ReadOutcome | undefined; className?: string }) {\n if (read?.status !== \"error\") return null;\n const what = read.what ?? \"this list\";\n if (!read.onRetry) return <ReadFailure error={read.error ?? true} what={what} {...(className ? { className } : {})} />;\n return <StaleDataNotice hasData what={what} onRetry={read.onRetry} {...(className ? { className } : {})} />;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAsGM,cA4BM,YA5BN;AAxBC,SAAS,YAAY;AAAA,EAC1B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;A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AS,MAAM,MAAY;AAAA,MAEhD;AAAA,OACH;AAAA,EAEJ;AACA,MAAI,WAAW,aAAa,SAAS;AACnC,WACE,WACE,gBAAAC,MAAC,SAAI,WAAU,4EAA2E,MAAK,UAAS,aAAU,QAChH;AAAA,sBAAAD,KAAC,eAAQ,WAAU,sBAAqB;AAAA,MAAE;AAAA,MAAU;AAAA,MAAK;AAAA,OAC3D;AAAA,EAGN;AACA,MAAI,QAAS,QAAO,gBAAAA,KAAAD,WAAA,EAAG,iBAAM;AAC7B,SAAO,gBAAAC,KAAAD,WAAA,EAAG,UAAS;AACrB;AASO,SAAS,UAAU,EAAE,MAAM,SAAS,SAAS,GAAkF;AACpI,SACE,gBAAAC,KAAC,YAAS,MAAY,SAAO,MAAC,OAAO,YAAY,MAAO,GAAI,YAAY,SAAY,CAAC,IAAI,EAAE,QAAQ,GAChG,gBACH;AAEJ;AAMO,SAAS,gBAAgB,EAAE,MAAM,UAAU,GAA2D;AAC3G,MAAI,MAAM,WAAW,QAAS,QAAO;AACrC,QAAM,OAAO,KAAK,QAAQ;AAC1B,MAAI,CAAC,KAAK,QAAS,QAAO,gBAAAA,KAAC,eAAY,OAAO,KAAK,SAAS,MAAM,MAAa,GAAI,YAAY,EAAE,UAAU,IAAI,CAAC,GAAI;AACpH,SAAO,gBAAAA,KAAC,mBAAgB,SAAO,MAAC,MAAY,SAAS,KAAK,SAAU,GAAI,YAAY,EAAE,UAAU,IAAI,CAAC,GAAI;AAC3G;","names":["jsx","jsxs","jsx","jsxs","jsx","jsxs","Fragment","jsx","jsxs"]}
|
|
@@ -46,6 +46,16 @@ function errorSentenceOf(error) {
|
|
|
46
46
|
}
|
|
47
47
|
var TIMED_OUT_SENTENCE = "That took too long. Nothing was lost; try again.";
|
|
48
48
|
var FALLBACK_ERROR_SENTENCE = "Something went wrong. Try again.";
|
|
49
|
+
var CARD_ERROR_LINE = {
|
|
50
|
+
OFFLINE: "No connection",
|
|
51
|
+
TIMEOUT: "Took too long. Nothing was lost.",
|
|
52
|
+
UNAUTHORIZED: "Signed out. Sign in again.",
|
|
53
|
+
FORBIDDEN: "Not allowed for this account",
|
|
54
|
+
NOT_FOUND: "Not found. Refresh and retry.",
|
|
55
|
+
RATE_LIMIT: "Too many requests. Wait a moment.",
|
|
56
|
+
SERVER: "Server problem. Try again soon.",
|
|
57
|
+
FALLBACK: "Something went wrong"
|
|
58
|
+
};
|
|
49
59
|
function isTimedOutError(error, message, code) {
|
|
50
60
|
if (code === "57014" || code === "timed_out") return true;
|
|
51
61
|
if (error && typeof error === "object") {
|
|
@@ -70,8 +80,9 @@ function isRawErrorText(text) {
|
|
|
70
80
|
return MACHINE_PREFIX.test(text) || RAW_TEXT.test(text);
|
|
71
81
|
}
|
|
72
82
|
function peopleErrorSentence(error, message, options = {}) {
|
|
73
|
-
|
|
74
|
-
|
|
83
|
+
const card = options.card === true;
|
|
84
|
+
if (isTimedOutError(error, message, options.code)) return card ? CARD_ERROR_LINE.TIMEOUT : TIMED_OUT_SENTENCE;
|
|
85
|
+
const fallback = options.fallback ?? (card ? CARD_ERROR_LINE.FALLBACK : FALLBACK_ERROR_SENTENCE);
|
|
75
86
|
const raw = message?.trim() || errorSentenceOf(error).trim();
|
|
76
87
|
if (!raw) return fallback;
|
|
77
88
|
let text = raw;
|
|
@@ -79,90 +90,21 @@ function peopleErrorSentence(error, message, options = {}) {
|
|
|
79
90
|
if (!text) return fallback;
|
|
80
91
|
if (offlineText(text) || RAW_TEXT.test(text) || text !== raw) {
|
|
81
92
|
const said = describeError(text, fallback);
|
|
82
|
-
|
|
93
|
+
if (!said.code || !ANY_HOST_CODES.has(said.code)) return fallback;
|
|
94
|
+
return card ? CARD_ERROR_LINE[said.code] : said.cause;
|
|
83
95
|
}
|
|
84
96
|
return text;
|
|
85
97
|
}
|
|
86
98
|
|
|
87
|
-
// src/error-box.tsx
|
|
88
|
-
import * as React from "react";
|
|
89
|
-
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
90
|
-
var CONTEXT_KEY = /* @__PURE__ */ Symbol.for("@ai-matrx/design-system/error-actions");
|
|
91
|
-
var registry = globalThis;
|
|
92
|
-
var ErrorActionsContext = registry[CONTEXT_KEY] ?? (registry[CONTEXT_KEY] = React.createContext(null));
|
|
93
|
-
function ErrorActionsProvider({
|
|
94
|
-
render,
|
|
95
|
-
children
|
|
96
|
-
}) {
|
|
97
|
-
return /* @__PURE__ */ jsx(ErrorActionsContext.Provider, { value: render, children });
|
|
98
|
-
}
|
|
99
|
-
var MENUS_KEY = /* @__PURE__ */ Symbol.for("@ai-matrx/design-system/error-card-menus");
|
|
100
|
-
var menusRegistry = globalThis;
|
|
101
|
-
var ErrorCardMenusContext = menusRegistry[MENUS_KEY] ?? (menusRegistry[MENUS_KEY] = React.createContext(null));
|
|
102
|
-
function ErrorCardMenusProvider({
|
|
103
|
-
menus,
|
|
104
|
-
children
|
|
105
|
-
}) {
|
|
106
|
-
return /* @__PURE__ */ jsx(ErrorCardMenusContext.Provider, { value: menus, children });
|
|
107
|
-
}
|
|
108
|
-
function useErrorCardMenus() {
|
|
109
|
-
return React.useContext(ErrorCardMenusContext);
|
|
110
|
-
}
|
|
111
|
-
function useErrorActions() {
|
|
112
|
-
return React.useContext(ErrorActionsContext);
|
|
113
|
-
}
|
|
114
|
-
function ErrorActions(props) {
|
|
115
|
-
const render = useErrorActions();
|
|
116
|
-
if (!render) return null;
|
|
117
|
-
return /* @__PURE__ */ jsx(Fragment, { children: render(props) });
|
|
118
|
-
}
|
|
119
|
-
function sayable(body, error) {
|
|
120
|
-
if (typeof body === "string") return peopleErrorSentence(error, body);
|
|
121
|
-
if (Array.isArray(body)) return body.map((b) => typeof b === "string" && b.trim() ? peopleErrorSentence(error, b) : b);
|
|
122
|
-
return body;
|
|
123
|
-
}
|
|
124
|
-
var ErrorBox = React.forwardRef(function ErrorBox2({
|
|
125
|
-
as = "p",
|
|
126
|
-
message,
|
|
127
|
-
title,
|
|
128
|
-
error,
|
|
129
|
-
operation,
|
|
130
|
-
records,
|
|
131
|
-
unsavedInput,
|
|
132
|
-
origin,
|
|
133
|
-
children,
|
|
134
|
-
...rest
|
|
135
|
-
}, ref) {
|
|
136
|
-
const Tag = as;
|
|
137
|
-
const facts = {
|
|
138
|
-
...message !== void 0 ? { message } : {},
|
|
139
|
-
...title !== void 0 ? { title } : {},
|
|
140
|
-
...error !== void 0 ? { error } : {},
|
|
141
|
-
...operation !== void 0 ? { operation } : {},
|
|
142
|
-
...records !== void 0 ? { records } : {},
|
|
143
|
-
...unsavedInput !== void 0 ? { unsavedInput } : {},
|
|
144
|
-
...origin !== void 0 ? { origin } : {}
|
|
145
|
-
};
|
|
146
|
-
return /* @__PURE__ */ jsxs(Tag, { ref, role: "alert", "data-error-box": "", ...rest, children: [
|
|
147
|
-
sayable(children ?? message, error),
|
|
148
|
-
/* @__PURE__ */ jsx(ErrorActions, { ...facts })
|
|
149
|
-
] });
|
|
150
|
-
});
|
|
151
|
-
|
|
152
99
|
export {
|
|
153
100
|
describeError,
|
|
154
101
|
errorSentenceOf,
|
|
155
102
|
TIMED_OUT_SENTENCE,
|
|
156
103
|
FALLBACK_ERROR_SENTENCE,
|
|
104
|
+
CARD_ERROR_LINE,
|
|
157
105
|
isTimedOutError,
|
|
158
106
|
isOfflineError,
|
|
159
107
|
isRawErrorText,
|
|
160
|
-
peopleErrorSentence
|
|
161
|
-
ErrorActionsProvider,
|
|
162
|
-
ErrorCardMenusProvider,
|
|
163
|
-
useErrorCardMenus,
|
|
164
|
-
useErrorActions,
|
|
165
|
-
ErrorActions,
|
|
166
|
-
ErrorBox
|
|
108
|
+
peopleErrorSentence
|
|
167
109
|
};
|
|
168
|
-
//# sourceMappingURL=chunk-
|
|
110
|
+
//# sourceMappingURL=chunk-HS6GMHKZ.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/desktop/errors.ts","../src/error-sentence.ts"],"sourcesContent":["/**\n * THE error-wording layer. A failure is shown as a cause the person can act on (\"A program it\n * needs isn't installed\"), never as the raw text a process threw (\"spawn uv ENOENT\"). The raw text\n * is kept, whole, as `detail` — the banner offers it behind Copy details and a tooltip, for a bug\n * report or an agent. One table, so every screen and every service says the same thing.\n */\n\nexport interface DescribedError {\n /** One plain sentence: what went wrong and, where it helps, what to do. */\n cause: string;\n /** The raw text, unedited (empty when it would only repeat `cause`). */\n detail: string;\n /** A short machine code when one was recognized (\"ENOENT\", \"TIMEOUT\"). */\n code?: string;\n}\n\ninterface Rule {\n code: string;\n test: RegExp;\n cause: string;\n}\n\n/** Ordered: the first rule whose pattern matches the raw text wins. */\nconst RULES: ReadonlyArray<Rule> = [\n { code: \"ENOENT\", test: /\\b(spawn\\s+\\S+\\s+)?ENOENT\\b|command not found|no such file or directory/i, cause: \"A program or file it needs isn't on this computer. Install it or update Matrx, then try again.\" },\n { code: \"EACCES\", test: /\\bEACCES\\b|\\bEPERM\\b|permission denied|operation not permitted|not authori[sz]ed by the user/i, cause: \"Matrx isn't allowed to do that. Grant access in System Settings › Privacy & Security, then try again.\" },\n { code: \"EADDRINUSE\", test: /\\bEADDRINUSE\\b|address already in use|port .* (is )?(already )?in use/i, cause: \"Another program is already using that port. Stop it, or choose another port.\" },\n { code: \"ECONNREFUSED\", test: /\\bECONNREFUSED\\b|connection refused/i, cause: \"The service isn't answering. It may have stopped; start it again.\" },\n { code: \"OFFLINE\", test: /\\bENOTFOUND\\b|\\bEAI_AGAIN\\b|\\bENETUNREACH\\b|getaddrinfo|network (is )?unreachable|failed to fetch|offline/i, cause: \"Can't reach the internet. Check the connection and try again.\" },\n { code: \"TIMEOUT\", test: /\\bETIMEDOUT\\b|timed? ?out|\\bTIMEOUT\\b|deadline exceeded/i, cause: \"It took too long to answer. Try again in a moment.\" },\n { code: \"ENOSPC\", test: /\\bENOSPC\\b|no space left/i, cause: \"The disk is full. Free some space, then try again.\" },\n { code: \"ENOMEM\", test: /\\bENOMEM\\b|out of memory|cannot allocate memory/i, cause: \"The computer ran out of memory. Close something and try again.\" },\n { code: \"UNAUTHORIZED\", test: /\\b401\\b|unauthori[sz]ed|invalid (api )?key|not signed in|jwt expired|session expired/i, cause: \"You're signed out, or the key was refused. Sign in again.\" },\n { code: \"FORBIDDEN\", test: /\\b403\\b|forbidden/i, cause: \"This account isn't allowed to do that.\" },\n { code: \"NOT_FOUND\", test: /\\b404\\b|not found/i, cause: \"It isn't there any more. Refresh and try again.\" },\n { code: \"RATE_LIMIT\", test: /\\b429\\b|rate.?limit|too many requests/i, cause: \"Too many requests just now. Wait a moment and try again.\" },\n { code: \"SERVER\", test: /\\b5\\d\\d\\b|internal server error|bad gateway|service unavailable/i, cause: \"The server had a problem. Try again in a moment.\" },\n { code: \"EXITED\", test: /exited with code|process exited|crashed|SIGKILL|SIGSEGV|SIGTERM/i, cause: \"The service stopped unexpectedly. Start it again; Copy details if it keeps happening.\" },\n];\n\nconst RAW = /\\b[A-Z]{2,}[A-Z_]*\\b|[\\\\/][\\w.-]+[\\\\/]|\\bat \\S+ \\(|\\{|\\}|errno|stack|undefined|null|\\bspawn\\b/;\n\nfunction rawText(error: unknown): string {\n if (error instanceof Error) return error.message || error.name;\n if (typeof error === \"string\") return error;\n if (error && typeof error === \"object\" && \"message\" in error && typeof (error as { message: unknown }).message === \"string\") {\n return (error as { message: string }).message;\n }\n return \"\";\n}\n\n/**\n * Turn any thrown or returned error into words a person can act on. Already-humane text (a full\n * sentence the app wrote itself, with no codes, paths or stack) passes through unchanged.\n */\nexport function describeError(error: unknown, fallback = \"Something went wrong. Try again.\"): DescribedError {\n const detail = rawText(error).trim();\n if (!detail) return { cause: fallback, detail: \"\" };\n for (const rule of RULES) {\n if (rule.test.test(detail)) return { cause: rule.cause, detail, code: rule.code };\n }\n if (!RAW.test(detail) && detail.length <= 160) return { cause: detail, detail: \"\" };\n return { cause: fallback, detail };\n}\n","/**\n * THE SENTENCE A PERSON READS FOR AN ERROR — the one funnel every error surface draws through\n * (ErrorNotice, ErrorBox, the desktop Banner). Raw error text never reaches the screen: no\n * \"TypeError: Failed to fetch\", no `sidebar_conversations:` RPC prefix, no stack frame or file\n * path (Arman, 2026-10-24: notices are small and plain). The raw error still travels to the\n * Alchemy Menu / AI payload through the `error` prop; only the screen gets the sentence.\n *\n * The wording table is desktop/errors.ts `describeError` (one table for every screen); this file\n * adds what decides WHEN a sentence must go through it, narrow enough that an app's own sentence\n * (\"PDF too large\") passes untouched.\n */\nimport { describeError } from \"./desktop/errors\";\n\n/**\n * The sentence an error carries: its own message (string, Error, or any\n * object with a `message`). Empty when it has none.\n */\nexport function errorSentenceOf(error: unknown): string {\n if (error == null || error === true || error === false) return \"\";\n if (typeof error === \"string\") return error;\n if (typeof error !== \"object\") return String(error);\n const message = (error as { message?: unknown }).message;\n return typeof message === \"string\" ? message : \"\";\n}\n\n/**\n * What a person reads when the store cancelled a call at its statement timeout\n * (SQLSTATE 57014). Postgres' own \"canceling statement due to statement\n * timeout\" is about the database, not the person; the cancelled call rolled\n * back, so nothing was written (lane AT-SLOW, 2026-10-19). The same sentence\n * @ai-matrx/records' `TIMED_OUT_MESSAGE` gives.\n */\nexport const TIMED_OUT_SENTENCE = \"That took too long. Nothing was lost; try again.\";\n\n/** What a person reads when an error says nothing a person can use. */\nexport const FALLBACK_ERROR_SENTENCE = \"Something went wrong. Try again.\";\n\n/**\n * A notice CARD's words (the web toast, Matrx 2's floating card): a card is ~22 rem at most and its\n * action shares the row, so a line is a few words (notice-stack.ts NOTICE_TEXT_BUDGET). The same\n * causes as the sentences above, said short enough to fit at the smallest window, never cut by \"…\".\n */\nexport const CARD_ERROR_LINE = {\n OFFLINE: \"No connection\",\n TIMEOUT: \"Took too long. Nothing was lost.\",\n UNAUTHORIZED: \"Signed out. Sign in again.\",\n FORBIDDEN: \"Not allowed for this account\",\n NOT_FOUND: \"Not found. Refresh and retry.\",\n RATE_LIMIT: \"Too many requests. Wait a moment.\",\n SERVER: \"Server problem. Try again soon.\",\n FALLBACK: \"Something went wrong\",\n} as const;\n\n/** True when an error, its code, or its sentence is the store's statement timeout. */\nexport function isTimedOutError(error: unknown, message?: string | null, code?: string | number): boolean {\n if (code === \"57014\" || code === \"timed_out\") return true;\n if (error && typeof error === \"object\") {\n const o = error as { code?: unknown; sqlstate?: unknown };\n if (o.code === \"57014\" || o.code === \"timed_out\" || o.sqlstate === \"57014\") return true;\n }\n const text = `${message ?? \"\"} ${errorSentenceOf(error)}`;\n return /canceling statement due to statement timeout/i.test(text);\n}\n\n/** True when the call failed because the device is offline or the network never answered. */\nexport function isOfflineError(error: unknown, message?: string | null): boolean {\n if (typeof navigator !== \"undefined\" && navigator.onLine === false) return true;\n return offlineText(`${message ?? \"\"} ${errorSentenceOf(error)}`);\n}\n\nfunction offlineText(text: string): boolean {\n const t = text.trim();\n return t !== \"\" && (describeError(t).code === \"OFFLINE\" || /networkerror|network request failed|load failed/i.test(t));\n}\n\n/** describeError's causes that hold on every host (its process codes — ENOENT, EACCES, ports — are\n * the desktop's words for a local program and would mislead on a database refusal). */\nconst ANY_HOST_CODES = new Set([\"OFFLINE\", \"TIMEOUT\", \"UNAUTHORIZED\", \"FORBIDDEN\", \"NOT_FOUND\", \"RATE_LIMIT\", \"SERVER\"]);\n\n/** A leading machine label: `sidebar_conversations: …`, `chat.rpc_name: …`, `[chat-sidebar] …`. */\nconst MACHINE_PREFIX = /^\\s*(?:\\[[\\w./-]+\\]\\s*|[a-z][\\w]*(?:[._][\\w]+)+:\\s+)/;\n/** Text no person should read: JS error class names, stack frames, source paths. */\nconst RAW_TEXT =\n /\\b(?:Type|Reference|Syntax|Range|Internal|Eval|URI)Error\\b|\\bat\\s+[\\w$.<>]+\\s*\\(|\\.(?:[cm]?[jt]sx?|py):\\d+|(?:^|[\\s(])(?:\\/[\\w.@-]+){2,}|\\bundefined is not\\b|\\bcannot read propert(?:y|ies)\\b|\\bis not a function\\b|\\bunexpected token\\b/i;\n\n/** True when a sentence carries raw error text or a code path (what the guard refuses on screen). */\nexport function isRawErrorText(text: string): boolean {\n return MACHINE_PREFIX.test(text) || RAW_TEXT.test(text);\n}\n\n/**\n * `card: true` = the short CARD_ERROR_LINE words for a notice card. Otherwise:\n * the sentence for the screen: the timeout sentence for a statement timeout; a caller's plain\n * sentence as is; a machine label stripped from the front; anything raw or offline worded by\n * `describeError` (its table, else `fallback`).\n */\nexport function peopleErrorSentence(\n error: unknown,\n message?: string | null,\n options: { code?: string | number | undefined; fallback?: string | undefined; card?: boolean | undefined } = {},\n): string {\n const card = options.card === true;\n if (isTimedOutError(error, message, options.code)) return card ? CARD_ERROR_LINE.TIMEOUT : TIMED_OUT_SENTENCE;\n const fallback = options.fallback ?? (card ? CARD_ERROR_LINE.FALLBACK : FALLBACK_ERROR_SENTENCE);\n const raw = message?.trim() || errorSentenceOf(error).trim();\n if (!raw) return fallback;\n let text = raw;\n for (let i = 0; i < 3 && MACHINE_PREFIX.test(text); i++) text = text.replace(MACHINE_PREFIX, \"\").trim();\n if (!text) return fallback;\n if (offlineText(text) || RAW_TEXT.test(text) || text !== raw) {\n const said = describeError(text, fallback);\n if (!said.code || !ANY_HOST_CODES.has(said.code)) return fallback;\n return card ? CARD_ERROR_LINE[said.code as keyof typeof CARD_ERROR_LINE] : said.cause;\n }\n return text;\n}\n"],"mappings":";;;AAuBA,IAAM,QAA6B;AAAA,EACjC,EAAE,MAAM,UAAU,MAAM,4EAA4E,OAAO,iGAAiG;AAAA,EAC5M,EAAE,MAAM,UAAU,MAAM,iGAAiG,OAAO,6GAAwG;AAAA,EACxO,EAAE,MAAM,cAAc,MAAM,0EAA0E,OAAO,+EAA+E;AAAA,EAC5L,EAAE,MAAM,gBAAgB,MAAM,wCAAwC,OAAO,oEAAoE;AAAA,EACjJ,EAAE,MAAM,WAAW,MAAM,8GAA8G,OAAO,gEAAgE;AAAA,EAC9M,EAAE,MAAM,WAAW,MAAM,4DAA4D,OAAO,qDAAqD;AAAA,EACjJ,EAAE,MAAM,UAAU,MAAM,6BAA6B,OAAO,qDAAqD;AAAA,EACjH,EAAE,MAAM,UAAU,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AAO,SAAS,QAAQ,IAAI,EAAG,QAAO,OAAO,gBAAgB,UAAU;AAC3F,QAAM,WAAW,QAAQ,aAAa,OAAO,gBAAgB,WAAW;AACxE,QAAM,MAAM,SAAS,KAAK,KAAK,gBAAgB,KAAK,EAAE,KAAK;AAC3D,MAAI,CAAC,IAAK,QAAO;AACjB,MAAI,OAAO;AACX,WAAS,IAAI,GAAG,IAAI,KAAK,eAAe,KAAK,IAAI,GAAG,IAAK,QAAO,KAAK,QAAQ,gBAAgB,EAAE,EAAE,KAAK;AACtG,MAAI,CAAC,KAAM,QAAO;AAClB,MAAI,YAAY,IAAI,KAAK,SAAS,KAAK,IAAI,KAAK,SAAS,KAAK;AAC5D,UAAM,OAAO,cAAc,MAAM,QAAQ;AACzC,QAAI,CAAC,KAAK,QAAQ,CAAC,eAAe,IAAI,KAAK,IAAI,EAAG,QAAO;AACzD,WAAO,OAAO,gBAAgB,KAAK,IAAoC,IAAI,KAAK;AAAA,EAClF;AACA,SAAO;AACT;","names":[]}
|
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
} from "./chunk-YRF22M5S.js";
|
|
27
27
|
import {
|
|
28
28
|
ErrorActions
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-5Z5GTXKL.js";
|
|
30
30
|
import {
|
|
31
31
|
HostLink
|
|
32
32
|
} from "./chunk-TH6DDCWF.js";
|
|
@@ -36,7 +36,7 @@ import {
|
|
|
36
36
|
DialogDescription,
|
|
37
37
|
DialogHeader,
|
|
38
38
|
DialogTitle
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-2BQAHLU3.js";
|
|
40
40
|
import {
|
|
41
41
|
useIsMobile
|
|
42
42
|
} from "./chunk-U24MOJWK.js";
|
|
@@ -49,7 +49,7 @@ import {
|
|
|
49
49
|
import {
|
|
50
50
|
Button as Button2,
|
|
51
51
|
Chip
|
|
52
|
-
} from "./chunk-
|
|
52
|
+
} from "./chunk-WVEDW5VO.js";
|
|
53
53
|
import {
|
|
54
54
|
Tooltip,
|
|
55
55
|
TooltipContent,
|
|
@@ -66,7 +66,7 @@ import {
|
|
|
66
66
|
DropdownMenuSubContent,
|
|
67
67
|
DropdownMenuSubTrigger,
|
|
68
68
|
DropdownMenuTrigger
|
|
69
|
-
} from "./chunk-
|
|
69
|
+
} from "./chunk-T57DLONB.js";
|
|
70
70
|
import {
|
|
71
71
|
Select,
|
|
72
72
|
SelectChevron,
|
|
@@ -4007,4 +4007,4 @@ export {
|
|
|
4007
4007
|
TileCard,
|
|
4008
4008
|
TileCardGrid
|
|
4009
4009
|
};
|
|
4010
|
-
//# sourceMappingURL=chunk-
|
|
4010
|
+
//# sourceMappingURL=chunk-K3XWUACX.js.map
|
|
@@ -3,16 +3,16 @@ import {
|
|
|
3
3
|
MENU_LOOK_CLASS,
|
|
4
4
|
MenuLookPanelItem,
|
|
5
5
|
MenuLookRowBody
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-42GFQMLA.js";
|
|
7
7
|
import {
|
|
8
8
|
ARCHIVE_LABEL
|
|
9
9
|
} from "./chunk-VQQ3O7J5.js";
|
|
10
10
|
import {
|
|
11
11
|
ConfirmDialog
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-QTPW44IJ.js";
|
|
13
13
|
import {
|
|
14
14
|
ErrorBox
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-5Z5GTXKL.js";
|
|
16
16
|
import {
|
|
17
17
|
Skeleton
|
|
18
18
|
} from "./chunk-DRSBLHOF.js";
|
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
} from "./chunk-TDMVH77G.js";
|
|
22
22
|
import {
|
|
23
23
|
Button
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-WVEDW5VO.js";
|
|
25
25
|
import {
|
|
26
26
|
Tooltip,
|
|
27
27
|
TooltipContent,
|
|
@@ -778,4 +778,4 @@ export {
|
|
|
778
778
|
CanvasLayout,
|
|
779
779
|
ModeSwitch
|
|
780
780
|
};
|
|
781
|
-
//# sourceMappingURL=chunk-
|
|
781
|
+
//# sourceMappingURL=chunk-K5ZQROWN.js.map
|
|
@@ -1,16 +1,19 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
Button
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-WVEDW5VO.js";
|
|
5
5
|
import {
|
|
6
6
|
Tooltip,
|
|
7
7
|
TooltipContent,
|
|
8
8
|
TooltipProvider,
|
|
9
9
|
TooltipTrigger
|
|
10
10
|
} from "./chunk-PIQJULQB.js";
|
|
11
|
+
import {
|
|
12
|
+
peopleErrorSentence
|
|
13
|
+
} from "./chunk-HS6GMHKZ.js";
|
|
11
14
|
import {
|
|
12
15
|
useMatrxDataTableHost
|
|
13
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-B5D3VIMC.js";
|
|
14
17
|
import {
|
|
15
18
|
Lightbulb,
|
|
16
19
|
ShieldOff
|
|
@@ -56,13 +59,14 @@ function useTableNotice() {
|
|
|
56
59
|
const [message, setMessage] = useState(null);
|
|
57
60
|
const notify = useMemo(
|
|
58
61
|
() => ({
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
+
// A card is a short title and an optional line (NOTICE_TEXT_BUDGET); the inline fallback joins them.
|
|
63
|
+
success(text, options) {
|
|
64
|
+
if (host.notify) host.notify.success(text, options);
|
|
65
|
+
else setMessage({ text: options?.description ? `${text}. ${options.description}` : text, error: false });
|
|
62
66
|
},
|
|
63
|
-
error(text) {
|
|
64
|
-
if (host.notify) host.notify.error(text);
|
|
65
|
-
else setMessage({ text, error: true });
|
|
67
|
+
error(text, options) {
|
|
68
|
+
if (host.notify) host.notify.error(text, options);
|
|
69
|
+
else setMessage({ text: options?.description ? `${text}. ${options.description}` : text, error: true });
|
|
66
70
|
}
|
|
67
71
|
}),
|
|
68
72
|
[host]
|
|
@@ -137,7 +141,7 @@ function RecordId({
|
|
|
137
141
|
e.preventDefault();
|
|
138
142
|
void copyText(value).then((ok) => {
|
|
139
143
|
if (!ok) {
|
|
140
|
-
notify?.error(
|
|
144
|
+
notify?.error("Not copied", { description: copyLabel });
|
|
141
145
|
return;
|
|
142
146
|
}
|
|
143
147
|
setCopied(true);
|
|
@@ -153,12 +157,10 @@ function RecordId({
|
|
|
153
157
|
try {
|
|
154
158
|
const result = await onOpen(value);
|
|
155
159
|
if (result === "forbidden") {
|
|
156
|
-
notify?.error("
|
|
160
|
+
notify?.error("No access", { description: "This account can't open this record" });
|
|
157
161
|
}
|
|
158
162
|
} catch (err) {
|
|
159
|
-
notify?.error(
|
|
160
|
-
`Couldn't open: ${err instanceof Error ? err.message : String(err)}`
|
|
161
|
-
);
|
|
163
|
+
notify?.error("Not opened", { description: peopleErrorSentence(err, null, { card: true }) });
|
|
162
164
|
} finally {
|
|
163
165
|
setOpening(false);
|
|
164
166
|
}
|
|
@@ -293,4 +295,4 @@ export {
|
|
|
293
295
|
displayId,
|
|
294
296
|
RecordId
|
|
295
297
|
};
|
|
296
|
-
//# sourceMappingURL=chunk-
|
|
298
|
+
//# sourceMappingURL=chunk-KSCSH7AO.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/record-id-format.ts","../src/record-id.tsx","../src/data-table/useTableNotice.tsx"],"sourcesContent":["// THE id's formatting — what RecordId shows for an id — as plain functions with no React, so a\n// Server Component (a page title, metadata) shortens an id exactly as the component does.\n// Server-safe entry: `@ai-matrx/design-system/record-id-format`.\n\nimport { isUuidShape } from \"@ai-matrx/kit/uuid\";\n\nconst SHORT_LEN = 8;\n\nexport function shortUuid(id: string, len = SHORT_LEN): string {\n return id.slice(0, len);\n}\n\n/** Up to this many characters an id reads whole; longer ones show their start. */\nconst WHOLE_MAX = 16;\n\n/** A record id the database minted (a UUID) — what a peek shows on its own. */\nexport function isRecordUuid(id: string | null | undefined): boolean {\n return Boolean(id && isUuidShape(id));\n}\n\n/** What RecordId shows for an id: a UUID's (or any long id's) first 8 characters, a short id whole. */\nexport type RecordIdShow = \"auto\" | \"short\" | \"full\";\n\nexport function displayId(id: string, show: RecordIdShow = \"auto\"): string {\n if (show === \"full\") return id;\n if (show === \"short\" || isUuidShape(id) || id.length > WHOLE_MAX) return shortUuid(id);\n return id;\n}\n","\"use client\";\n\n/**\n * RecordId — THE way to show a record's id, anywhere (Arman, 2026-10-18: \"anything with an id …\n * we need to use a simple canonical id component that automatically handles several things,\n * including allowing for easy copy\"). Never `{row.id.slice(0, 8)}`, never a hand-built copy button.\n *\n * What it handles, once:\n * - display: a UUID shows its first 8 characters, a short id (a model id, a video id) shows whole;\n * the full id is always the tooltip;\n * - copy: one click copies the FULL id, a check confirms it, a failure says so;\n * - doors (THE DOOR LAW, \"never render an id you can't open\"): pass `token` (the entity token the\n * id points at) and the route, new tab and quick look resolve from the host registries; or pass\n * `href` / `onOpen`. `forbidden`: copyable, not openable;\n * - looks: `plain` (dense rows, tables — the default) or `chip` (headers, cards, detail panels);\n * `labelled` puts the kind of id in front (\"Agent ID\").\n * Prefer `EntityRef` when the record's NAME is on hand — this is the id itself.\n *\n * The data table's id column (`MatrxUuidCell`) is this component.\n */\n\nimport {\n useEffect,\n useRef,\n useState,\n type MouseEvent,\n type ReactNode,\n} from \"react\";\nimport { Lightbulb, ShieldOff } from \"./data-table/icons\";\nimport { CheckIcon, CopyIcon, ExternalLinkIcon, PanelRightIcon } from \"./icons\";\nimport { useTableNotice } from \"./data-table/useTableNotice\";\nimport { useMatrxDataTableHost } from \"./data-table/host\";\nimport {\n Tooltip,\n TooltipContent,\n TooltipProvider,\n TooltipTrigger,\n} from \"./tooltip\";\nimport { copyText } from \"@ai-matrx/kit/clipboard\";\nimport { cn } from \"./cn\";\nimport { Button as ControlButton } from \"./controls/controls\";\nimport { OutboundLink } from \"@ai-matrx/kit/outbound-react\";\n\nexport { shortUuid, isRecordUuid, displayId, type RecordIdShow } from \"./record-id-format\";\nimport { displayId, type RecordIdShow } from \"./record-id-format\";\nimport { peopleErrorSentence } from \"./error-sentence\";\nexport type RecordIdLook = \"plain\" | \"chip\" | \"icon\";\n\n\nexport type RecordIdOpenResult = void | \"forbidden\";\n\nexport interface RecordIdProps {\n value: string | null | undefined;\n /** What kind of id it is (\"Agent\", \"Chat\", a column name): the tooltip, the copy label and, with `labelled`, the visible prefix. */\n label?: string | undefined;\n /** `auto` (default): a UUID or long id shows its first 8 characters, a short id shows whole. */\n show?: RecordIdShow;\n /**\n * `plain` (default): dense mono text. `chip`: a quiet bordered pill for headers, cards and panels.\n * `icon`: the copy button alone, header-sized (a record's own header, where the id is shown elsewhere);\n * the full id is its tooltip.\n */\n look?: RecordIdLook;\n /** Show the kind of id in front of it (\"Agent ID 1a2b3c4d\"). */\n labelled?: boolean;\n /** A short note added to the tooltip under the id (\"Not a member of this organization\"). */\n hint?: string;\n /**\n * Inside another control (a button, a select trigger, a door): the id as text only, full id and\n * hint as its native tooltip, no buttons of its own — the control around it owns the click.\n */\n inert?: boolean;\n /**\n * Open the referenced record in-app (prefer WindowPanel).\n * Return `\"forbidden\"` to block navigation and show a muted state.\n */\n onOpen?: (id: string) => RecordIdOpenResult | Promise<RecordIdOpenResult>;\n /** Optional real href (new tab / cmd-click). Used when navigation is allowed. */\n href?: string | null | undefined;\n /**\n * Canonical entity token this id points at (`agent`, `note`, `task`, …).\n * Supplies the route and the peek automatically — THE DOOR LAW, resolved\n * from the registries instead of wired per callsite. An explicit `href` /\n * `onOpen` still wins.\n */\n token?: string | null | undefined;\n /** Force non-navigable (still copyable). */\n forbidden?: boolean;\n className?: string;\n trailing?: ReactNode;\n}\n\nexport function RecordId({\n value,\n label,\n show = \"auto\",\n look = \"plain\",\n labelled = false,\n hint,\n inert = false,\n onOpen,\n href,\n token,\n forbidden = false,\n className,\n trailing,\n}: RecordIdProps) {\n const { resolveEntityDoors, ResourcePeek } = useMatrxDataTableHost();\n const { notify, notice } = useTableNotice();\n const [copied, setCopied] = useState(false);\n const [opening, setOpening] = useState(false);\n const [peekOpen, setPeekOpen] = useState(false);\n const timer = useRef<ReturnType<typeof setTimeout> | null>(null);\n\n useEffect(\n () => () => {\n if (timer.current) clearTimeout(timer.current);\n },\n [],\n );\n\n if (!value) {\n return <span className=\"text-disabled-foreground\">—</span>;\n }\n\n const doors = token ? resolveEntityDoors?.(token, value, href) ?? null : null;\n const resolvedHref = doors?.href ?? href ?? null;\n const canPeek = Boolean(doors?.canPeek) && !forbidden;\n const display = displayId(value, show);\n\n // A label that already names the id (\"Execution ID\", \"run_id\", a table's \"… Id\" header) is used as\n // written; any other kind of record gains \" ID\" (\"Agent\" → \"Agent ID\").\n const named = label ? /\\b(id|uuid)$/i.test(label.trim()) || /_id$/i.test(label.trim()) : false;\n const copyLabel = label ? (named ? label.trim() : `${label} ID`) : \"ID\";\n const tip = `${label ? `${copyLabel}: ${value}` : value}${hint ? ` — ${hint}` : \"\"}`;\n if (inert) {\n return (\n <span\n data-matrx-record-id=\"\"\n title={tip}\n className={cn(\"min-w-0 truncate font-mono text-xs tabular-nums\", className)}\n >\n {labelled ? `${copyLabel} ` : \"\"}\n {display}\n </span>\n );\n }\n\n const stop = (e: MouseEvent) => {\n e.stopPropagation();\n };\n\n const onCopy = (e: MouseEvent) => {\n stop(e);\n e.preventDefault();\n void copyText(value).then((ok) => {\n if (!ok) {\n notify?.error(\"Not copied\", { description: copyLabel });\n return;\n }\n setCopied(true);\n if (timer.current) clearTimeout(timer.current);\n timer.current = setTimeout(() => setCopied(false), 1500);\n });\n };\n\n const handleOpen = async (e: MouseEvent) => {\n stop(e);\n e.preventDefault();\n if (!onOpen || forbidden || opening) return;\n setOpening(true);\n try {\n const result = await onOpen(value);\n if (result === \"forbidden\") {\n // access-errors: ok — relays the onOpen contract's explicit verdict: the caller's opener returns \"forbidden\" only after ITS OWN access check; the cell performs no read and never guesses\n notify?.error(\"No access\", { description: \"This account can't open this record\" });\n }\n } catch (err) {\n notify?.error(\"Not opened\", { description: peopleErrorSentence(err, null, { card: true }) });\n } finally {\n setOpening(false);\n }\n };\n\n const idNode = (() => {\n if (forbidden) {\n return (\n <span className=\"inline-flex min-w-0 items-center gap-1 font-mono text-xs text-disabled-foreground tabular-nums\">\n <span className=\"min-w-0 truncate\">{display}</span>\n <ShieldOff className=\"h-3 w-3 shrink-0\" aria-hidden />\n </span>\n );\n }\n\n if (onOpen) {\n return (\n <ControlButton\n type=\"button\"\n variant=\"link\"\n iconEnd={<PanelRightIcon className=\"h-3 w-3 shrink-0 text-muted-foreground\" />}\n aria-label={`Open ${label ?? \"record\"} ${display}`}\n onClick={(e) => void handleOpen(e)}\n disabled={opening}\n className=\"min-w-0 font-mono\"\n >\n <span className=\"min-w-0 truncate tabular-nums\">{display}</span>\n </ControlButton>\n );\n }\n\n if (resolvedHref) {\n return (\n <OutboundLink\n href={resolvedHref}\n aria-label={`Open ${label ?? \"record\"} ${display} in a new tab`}\n onClick={stop}\n className=\"inline-flex min-w-0 items-center gap-1 font-mono text-xs text-primary hover:underline\"\n >\n <span className=\"min-w-0 truncate tabular-nums\">{display}</span>\n <ExternalLinkIcon className=\"h-3 w-3 shrink-0 text-muted-foreground\" />\n </OutboundLink>\n );\n }\n\n return (\n <span className=\"min-w-0 truncate font-mono text-xs text-muted-foreground tabular-nums select-all\">\n {display}\n </span>\n );\n })();\n\n return (\n <TooltipProvider delayDuration={200}>\n <span\n data-matrx-cell-control\n data-matrx-record-id=\"\"\n className={cn(\n \"inline-flex min-w-0 max-w-full items-center gap-0.5 whitespace-nowrap\",\n look === \"chip\" && \"h-5 rounded border border-border bg-muted pl-1.5 pr-0.5\",\n className,\n )}\n onClick={stop}\n >\n {labelled && look !== \"icon\" ? <span className=\"mr-1 shrink-0 text-xs text-muted-foreground\">{copyLabel}</span> : null}\n {look === \"icon\" ? null : (\n <Tooltip>\n <TooltipTrigger asChild>\n <span className=\"inline-flex min-w-0 max-w-full items-center\">\n {idNode}\n </span>\n </TooltipTrigger>\n <TooltipContent side=\"top\" className=\"max-w-sm break-all font-mono\">\n {forbidden ? `No access · ${tip}` : tip}\n </TooltipContent>\n </Tooltip>\n )}\n <Tooltip>\n <TooltipTrigger asChild>\n <ControlButton\n type=\"button\"\n variant=\"quiet\"\n icon={copied ? <CheckIcon className={look === \"icon\" ? \"h-3.5 w-3.5\" : \"h-3 w-3\"} /> : <CopyIcon className={look === \"icon\" ? \"h-3.5 w-3.5\" : \"h-3 w-3\"} />}\n onClick={onCopy}\n aria-label={copied ? \"Copied\" : `Copy ${copyLabel}`}\n className=\"shrink-0\"\n />\n </TooltipTrigger>\n <TooltipContent side=\"top\">{copied ? \"Copied\" : `Copy ${copyLabel}: ${value}`}</TooltipContent>\n </Tooltip>\n {canPeek && look !== \"icon\" ? (\n <Tooltip>\n <TooltipTrigger asChild>\n <ControlButton\n type=\"button\"\n variant=\"quiet\"\n icon={<Lightbulb className=\"h-3 w-3\" />}\n onClick={(e) => {\n stop(e);\n setPeekOpen(true);\n }}\n aria-label={`Quick look at ${label ?? \"record\"}`}\n className=\"shrink-0\"\n >\n </ControlButton>\n </TooltipTrigger>\n <TooltipContent side=\"top\">Quick look at {label ?? \"record\"}</TooltipContent>\n </Tooltip>\n ) : null}\n {onOpen && resolvedHref && !forbidden && look !== \"icon\" ? (\n <Tooltip>\n <TooltipTrigger asChild>\n <OutboundLink\n href={resolvedHref}\n onClick={stop}\n aria-label={`Open ${label ?? \"record\"} in a new tab`}\n className=\"inline-flex h-4 w-4 shrink-0 items-center justify-center rounded text-muted-foreground transition-colors hover:text-foreground focus:outline-none\"\n >\n <ExternalLinkIcon className=\"h-3 w-3\" />\n </OutboundLink>\n </TooltipTrigger>\n <TooltipContent side=\"top\">Open {label ?? \"record\"} in a new tab</TooltipContent>\n </Tooltip>\n ) : null}\n {trailing}\n {notice}\n {canPeek && peekOpen && ResourcePeek ? (\n <ResourcePeek\n kind={doors?.peekKind ?? token ?? \"record\"}\n id={value}\n onClose={() => setPeekOpen(false)}\n // Same contract as `EntityDoorControls`: forward the CALLER's raw\n // `href` so the peek's \"Open\" cannot send the user somewhere this\n // cell's own link does not go. `doors.ts` names EntityRef and this\n // cell as the two presentations that must not drift — the peek\n // override shipped on one of them first, which is exactly the drift\n // that file warns about.\n {...(href == null ? {} : { href })}\n />\n ) : null}\n </span>\n </TooltipProvider>\n );\n}\n","\"use client\";\nimport { useMemo, useState } from \"react\";\nimport { useMatrxDataTableHost } from \"./host\";\n\n/** Every portable async action has visible feedback even without a host toast system. */\nexport function useTableNotice() {\n const host = useMatrxDataTableHost();\n const [message, setMessage] = useState<{ text: string; error: boolean } | null>(null);\n // One `notify` per host, so a memoised toolbar that holds it never holds a stale one (RENDER-3).\n const notify = useMemo(\n () => ({\n // A card is a short title and an optional line (NOTICE_TEXT_BUDGET); the inline fallback joins them.\n success(text: string, options?: { description?: string }) { if (host.notify) host.notify.success(text, options); else setMessage({ text: options?.description ? `${text}. ${options.description}` : text, error: false }); },\n error(text: string, options?: { description?: string }) { if (host.notify) host.notify.error(text, options); else setMessage({ text: options?.description ? `${text}. ${options.description}` : text, error: true }); },\n }),\n [host],\n );\n const notice = message ? <span role={message.error ? \"alert\" : \"status\"} className={message.error ? \"text-xs text-destructive-ink\" : \"text-xs text-muted-foreground\"}>{message.text}<button type=\"button\" aria-label=\"Dismiss notification\" className=\"ml-2 underline\" onClick={() => setMessage(null)}>Dismiss</button></span> : null;\n return { notify, notice };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,SAAS,mBAAmB;AAE5B,IAAM,YAAY;AAEX,SAAS,UAAU,IAAY,MAAM,WAAmB;AAC7D,SAAO,GAAG,MAAM,GAAG,GAAG;AACxB;AAGA,IAAM,YAAY;AAGX,SAAS,aAAa,IAAwC;AACnE,SAAO,QAAQ,MAAM,YAAY,EAAE,CAAC;AACtC;AAKO,SAAS,UAAU,IAAY,OAAqB,QAAgB;AACzE,MAAI,SAAS,OAAQ,QAAO;AAC5B,MAAI,SAAS,WAAW,YAAY,EAAE,KAAK,GAAG,S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A,QACA;AAAA,QACA,WAAW,YAAY,eACtB,gBAAAD;AAAA,UAAC;AAAA;AAAA,YACC,MAAM,OAAO,YAAY,SAAS;AAAA,YAClC,IAAI;AAAA,YACJ,SAAS,MAAM,YAAY,KAAK;AAAA,YAO/B,GAAI,QAAQ,OAAO,CAAC,IAAI,EAAE,KAAK;AAAA;AAAA,QAClC,IACE;AAAA;AAAA;AAAA,EACN,GACF;AAEJ;","names":["useState","jsx","jsxs","useState"]}
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
} from "./chunk-OPF265PU.js";
|
|
7
7
|
import {
|
|
8
8
|
Button
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-WVEDW5VO.js";
|
|
10
10
|
import {
|
|
11
11
|
AlertTriangleIcon,
|
|
12
12
|
ChevronDownIcon,
|
|
@@ -605,4 +605,4 @@ export {
|
|
|
605
605
|
ConfigurationTable,
|
|
606
606
|
ConfigurationTableRow
|
|
607
607
|
};
|
|
608
|
-
//# sourceMappingURL=chunk-
|
|
608
|
+
//# sourceMappingURL=chunk-NFJ63LIH.js.map
|
|
@@ -17,14 +17,14 @@ import {
|
|
|
17
17
|
DialogContent,
|
|
18
18
|
DialogHeader,
|
|
19
19
|
DialogTitle
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-2BQAHLU3.js";
|
|
21
21
|
import {
|
|
22
22
|
DataRowInspector,
|
|
23
23
|
columnId
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-P56Y43RL.js";
|
|
25
25
|
import {
|
|
26
26
|
useMatrxDataTableHost
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-B5D3VIMC.js";
|
|
28
28
|
import {
|
|
29
29
|
Eye
|
|
30
30
|
} from "./chunk-4JAYMFQO.js";
|
|
@@ -305,4 +305,4 @@ export {
|
|
|
305
305
|
withMacLookDefaults,
|
|
306
306
|
DataRowWindow
|
|
307
307
|
};
|
|
308
|
-
//# sourceMappingURL=chunk-
|
|
308
|
+
//# sourceMappingURL=chunk-OUQT72UL.js.map
|
|
@@ -7,23 +7,23 @@ import {
|
|
|
7
7
|
} from "./chunk-PTYKILZE.js";
|
|
8
8
|
import {
|
|
9
9
|
CopyButtons
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-CZGZV35G.js";
|
|
11
11
|
import {
|
|
12
12
|
PropertyRow
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-NFJ63LIH.js";
|
|
14
14
|
import {
|
|
15
15
|
completeLayeredFilterRules,
|
|
16
16
|
layeredFilterMatchesValue
|
|
17
17
|
} from "./chunk-7ZCD4AZS.js";
|
|
18
18
|
import {
|
|
19
19
|
RecordId
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-KSCSH7AO.js";
|
|
21
21
|
import {
|
|
22
22
|
Button
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-WVEDW5VO.js";
|
|
24
24
|
import {
|
|
25
25
|
useMatrxDataTableHost
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-B5D3VIMC.js";
|
|
27
27
|
import {
|
|
28
28
|
cn
|
|
29
29
|
} from "./chunk-M6KA5EHN.js";
|
|
@@ -671,4 +671,4 @@ export {
|
|
|
671
671
|
isUuidValue,
|
|
672
672
|
DataRowInspector
|
|
673
673
|
};
|
|
674
|
-
//# sourceMappingURL=chunk-
|
|
674
|
+
//# sourceMappingURL=chunk-P56Y43RL.js.map
|