Beautiful, AI-native markdown IDE and LLM wiki
TypeScript 2nd-brainagent-skillsclaudecodexcompany-braindocsknowledge-knowledge-baseknowledge-managementllmllm-wikillm-wiki-karpathymarkdownmarkdown-editormdmdxnotespkmsecond-brainskills
Lint the feedback-surfaces guide's display bans (PRD-9630) (#6785)
Andrew Mikofalvy81cace5cbbe2
diff --git a/lint-plugins/ok-rules/README.md b/lint-plugins/ok-rules/README.mdindex 13fa3500f..1f8b0e2fc 100644--- a/lint-plugins/ok-rules/README.md+++ b/lint-plugins/ok-rules/README.md@@ -728,6 +728,61 @@ Included: `packages/app/src/**/*.ts`, `packages/app/src/**/*.tsx`, `packages/desRule: [`no-fixed-palette-color.mjs`](rules/no-fixed-palette-color.mjs). Fixture: [`no-fixed-palette-color.fixture.tsx`](__fixtures__/no-fixed-palette-color.fixture.tsx). Test: [`no-fixed-palette-color.uncached.test.mjs`](tests/no-fixed-palette-color.uncached.test.mjs).+### `no-native-renderer-dialog`++Feedback-surface discipline, from the display guide at [`plugins/ok/skills/feedback-surfaces/SKILL.md`][feedback-surfaces-guide]. Renderer code never opens the browser's native `confirm`, `alert` or `prompt` dialog. The native dialog has no title, no destructive button, no app theme and no focus handling, and its button labels come from the browser, so Lingui cannot translate them. Confirmations use `AlertDialog` from `@/components/ui/alert-dialog`, or `DeleteConfirmationDialog` for a delete.++The rule fires on a call of `window.confirm`, `window.alert` or `window.prompt` (also through `globalThis` or `self`), and on a bare `confirm(...)`, `alert(...)` or `prompt(...)` call whose name resolves to the global. Resolution walks the scope chain from the call: an import, a parameter, or a function or variable declared in any enclosing scope is a local binding, so `consentStore.confirm(...)`, `threadClient.prompt(...)`, an imported `prompt` and a local `function confirm` stay silent. A parameter named `window` is local too, so `window.confirm` on it is not flagged.++The scope is the renderer packages, `packages/app/src` and `packages/plugin/src`. `packages/desktop/src` is left out: it holds the Electron main process, the preload bridge, the utility process and shared modules, none of which renders UI, and the desktop renderer is `packages/app` itself (the desktop build sets `root: ../app`). Native Electron dialogs in the main process are a different surface that the guide limits separately and `no-blocking-error-box` partly gates.++The rule does NOT catch a dialog function taken by reference and called later (`const ask = window.confirm; ask(...)`), a computed member (`window['confirm']`), or a call through another alias of the global object.++Included: `packages/app/src/**/*.ts`, `packages/app/src/**/*.tsx`, `packages/plugin/src/**/*.ts`, `packages/plugin/src/**/*.tsx`, `lint-plugins/ok-rules/__fixtures__/no-native-renderer-dialog.fixture.tsx`. Excluded: `**/*.test.ts`, `**/*.test.tsx`, `**/*.dom.test.tsx`, `**/*.test-helper.ts`, `**/*.test-helper.tsx`.++Rule: [`no-native-renderer-dialog.mjs`](rules/no-native-renderer-dialog.mjs). Fixture: [`no-native-renderer-dialog.fixture.tsx`](__fixtures__/no-native-renderer-dialog.fixture.tsx). Test: [`no-native-renderer-dialog.uncached.test.mjs`](tests/no-native-renderer-dialog.uncached.test.mjs).++### `no-custom-toast`++Toast discipline, from the display guide at [`plugins/ok/skills/feedback-surfaces/SKILL.md`][feedback-surfaces-guide]. App code calls the typed sonner functions (`toast.success`, `toast.error`, `toast.warning`, `toast.info`, `toast.loading`), never `toast.custom`. The app's `<Toaster richColors closeButton />` styles the typed toasts with their color, icon, width and close button. Sonner leaves a custom toast unstyled: it sizes to its content, renders no close button, and in a collapsed stack the toast behind keeps its content visible, so a mixed stack overlaps.++The rule resolves `toast` from the file's own `sonner` imports: a named `toast` import under any local name (`import { toast as sonnerToast } from 'sonner'`) and `toast` read off a namespace import (`sonner.toast.custom`). The name must resolve to that import: a `toast` imported from another module, or a local declaration that shadows the import, is not flagged. A `custom` method on any other object is not flagged, and neither is a `toast.custom` reference that is never called.++**Pre-rule backlog.** The three existing custom toasts, in `packages/app/src/lib/install-bug-report-send-toasts.ts`, `install-server-drift-listener.ts` and `install-stale-tab-reload-prompt.ts`, carry a file-level `// oxlint-disable ok/no-custom-toast -- pre-rule backlog: ...` header. Delete the header in the change that moves the file to a typed toast. A toast that truly needs custom content keeps an inline `// oxlint-disable-next-line ok/no-custom-toast -- <reason>` and follows the guide: `width: var(--width)`, its own close button, and a check stacked behind and in front of a typed toast.++Included: `packages/app/src/**/*.ts`, `packages/app/src/**/*.tsx`, `lint-plugins/ok-rules/__fixtures__/no-custom-toast.fixture.tsx`. Excluded: `**/*.test.ts`, `**/*.test.tsx`, `**/*.dom.test.tsx`, `**/*.test-helper.ts`, `**/*.test-helper.tsx`.++Rule: [`no-custom-toast.mjs`](rules/no-custom-toast.mjs). Fixture: [`no-custom-toast.fixture.tsx`](__fixtures__/no-custom-toast.fixture.tsx). Test: [`no-custom-toast.uncached.test.mjs`](tests/no-custom-toast.uncached.test.mjs).++### `no-raw-error-toast`++Error-copy discipline, from the display guide at [`plugins/ok/skills/feedback-surfaces/SKILL.md`][feedback-surfaces-guide]. A toast never shows raw error text. Raw text is untranslatable, often an internal message, and frequently wrong for the user; the guide asks for the failure to be mapped to a reason with copy written for it ("Couldn't {verb} {thing}."), and for raw detail to go behind a "Show details" disclosure or into Report a bug.++The rule checks the message argument and the options object's `description` of a sonner `toast(...)`, `toast.error`, `toast.warning`, `toast.info`, `toast.success`, `toast.loading` or `toast.message` call, with `toast` resolved from the file's `sonner` imports as in `no-custom-toast`. It fires when that value is raw error text, which it recognizes syntactically:++- `<x>.message`, `String(<x>)` and `<x>.toString()`, where `<x>` is an error value;+- an error value used directly (`toast.error(result.error)`, `description: res.error`);+- any `errorText(...)` call, since that helper exists to stringify an unknown error;+- a template literal, or a Lingui `t` template, that interpolates any of the above;+- either branch of a conditional, either side of `||`, `??` or `+`, and the right side of `&&`, holding any of the above, so the common ``err instanceof Error ? err.message : t`...` `` fires.++**The error-value heuristic.** The rule runs on the untyped AST, so it cannot ask whether a value is an `Error`. It decides by name instead: an identifier, or the last property of a member chain, named `err`, `error`, `e`, `ex`, `cause` or `reason`, or ending in `Error` or `Err` after a lowercase letter or digit (`saveError`, `cloneError`, `result.error`, `lastErr`). A predicate such as `isError` also matches, which is harmless because a condition is never the rendered value: only the right side of `&&` and the branches of a conditional are read, not its test. A `message` field on anything else is not flagged, because a result or protocol object's `message` cannot be told apart from user-facing copy without types.++The rule does NOT catch:++- **`message` on a non-error name.** `toast.error(result.message)` and ``t`Message not sent: ${frame.message}` `` are raw text from a result or a server frame, but the name says nothing about it. Five such toasts exist today (`RestartServerButton`, `DocumentErrorBoundary`, `NetworkAccessSection`, `presence/use-sync-toasts.ts`, `lib/acp/thread-client.ts`).+- **Raw text under another name.** `description: detail` or `description: result.detail` where `detail` came from an error, and a variable assigned from `err.message` on an earlier line and then passed to the toast. The rule reads the call's own arguments only.+- **Formatting helpers other than `errorText`.** `humanFormat(result.error)` is treated as mapped copy, not raw text.+- **`toast.promise`** and its `error` callback, and toasts built from a JSX element.++Read the heuristic in both directions: an error-named variable that already holds written, translated copy is still flagged when it is passed straight through. Rename it (`errorCopy` does not end in `Error`), or suppress the line with a reason.++**Pre-rule backlog.** Forty-two files under `packages/app/src` that predate the rule carry a file-level `// oxlint-disable ok/no-raw-error-toast -- pre-rule backlog: ...` header over their 73 existing raw-error toasts. The headers are the visible backlog. Drain a file by mapping each failure to written copy, then deleting its header; the rule fires again at once, so a partial migration fails the gate.++Included: `packages/app/src/**/*.ts`, `packages/app/src/**/*.tsx`, `lint-plugins/ok-rules/__fixtures__/no-raw-error-toast.fixture.tsx`. Excluded: `**/*.test.ts`, `**/*.test.tsx`, `**/*.dom.test.tsx`, `**/*.test-helper.ts`, `**/*.test-helper.tsx`.++Rule: [`no-raw-error-toast.mjs`](rules/no-raw-error-toast.mjs). Fixture: [`no-raw-error-toast.fixture.tsx`](__fixtures__/no-raw-error-toast.fixture.tsx). Test: [`no-raw-error-toast.uncached.test.mjs`](tests/no-raw-error-toast.uncached.test.mjs).+## SuppressionInline `// oxlint-disable-next-line` comments silence individual diagnostics. The form names the plugin, the rule and the reason:@@ -756,8 +811,10 @@ Current production suppressions:| `microcopy-ellipsis` | 2 | 0 || `no-unwrapped-user-facing-string` | 1 | 0 || `no-hand-rolled-spinner` | 1 | 0 |+| `no-raw-error-toast` | 0 | 42 |+| `no-custom-toast` | 0 | 3 |-Every other rule has zero. The file-level counts above are the visible migration backlogs for the logical-property pass and shadcn migration.+Every other rule has zero. The file-level counts above are the visible migration backlogs for the logical-property pass, the shadcn migration and the feedback-surfaces guide.**Where an inline suppression can and cannot sit.** A suppression comment needs a line of its own directly above the reported span, which is a property of the *formatting* rather than of the rule. On a JSX attribute that means the attribute must already be on its own line. A `{/* oxlint-disable-next-line */}` child covers the element that follows it, not a text node that starts after that element.@@ -883,3 +940,5 @@ Add a `### \`<rule-name>\`` section: what it catches, what it deliberately does- [oxlint custom JS plugins](https://oxc.rs/docs/guide/usage/linter/plugins.html)- [PRECEDENTS.md #42](../../PRECEDENTS.md#custom-lint-enforcement-precedent-42) — the custom-lint-enforcement convention- [`lint-plugins/no-comments/README.md`](../no-comments/README.md) — the sibling oxlint plugin and the comment policy that governs these modules++[feedback-surfaces-guide]: ../../plugins/ok/skills/feedback-surfaces/SKILL.mddiff --git a/lint-plugins/ok-rules/__fixtures__/no-custom-toast.fixture.tsx b/lint-plugins/ok-rules/__fixtures__/no-custom-toast.fixture.tsxnew file mode 100644index 000000000..b394b3ddf--- /dev/null+++ b/lint-plugins/ok-rules/__fixtures__/no-custom-toast.fixture.tsx@@ -0,0 +1,32 @@+import * as sonner from 'sonner';+import { toast } from 'sonner';+import { toast as sonnerToast } from 'sonner';+import { toast as appToast } from '@/lib/app-toast';+import * as appToasts from '@/lib/app-toasts';++declare const ui: { custom: (render: () => null) => void };++export function positives(): void {+ toast.custom(() => null);+ sonnerToast.custom(() => null, { id: 'p2-aliased-import' });+ sonner.toast.custom(() => null);+}++export function negatives(): void {+ toast('n1 base call');+ toast.success('n2 typed success');+ toast.error('n3 typed error');+ toast.warning('n4 typed warning');+ toast.info('n5 typed info');+ toast.loading('n6 typed loading');+ ui.custom(() => null);+ const n7 = toast.custom;+ void n7;+ appToast.custom(() => null);+ appToasts.toast.custom(() => null);+}++export function localToast(): void {+ const toast = { custom: (render: () => null) => render() };+ toast.custom(() => null);+}diff --git a/lint-plugins/ok-rules/__fixtures__/no-native-renderer-dialog.fixture.tsx b/lint-plugins/ok-rules/__fixtures__/no-native-renderer-dialog.fixture.tsxnew file mode 100644index 000000000..1e2168c4c--- /dev/null+++ b/lint-plugins/ok-rules/__fixtures__/no-native-renderer-dialog.fixture.tsx@@ -0,0 +1,45 @@+import { prompt } from '@/lib/acp/agent-prompt';++declare const consentStore: { confirm: (request: string) => Promise<boolean> };+declare const threadClient: { prompt: (threadId: string, content: string) => void };+declare const dialogHost: { alert: (message: string) => void };++export function positives(): void {+ window.confirm('p1 window member');+ window.alert('p2 window member');+ window.prompt('p3 window member');+ confirm('p4 bare global');+ alert('p5 bare global');+ globalThis.confirm('p6 globalThis member');+ self.confirm('p8 self member');+ self.alert('p9 self member');+ self.prompt('p10 self member');+ if (!window.confirm('p7 negated inside a condition')) return;+}++export async function negatives(): Promise<void> {+ await consentStore.confirm('n1 method on a store');+ threadClient.prompt('thread', 'n2 method on a client');+ dialogHost.alert('n3 method on an injected host');+ prompt('n4 imported binding named like the global');+}++export function localFunction(): boolean {+ function confirm(message: string): boolean {+ return message.length > 0;+ }+ return confirm('n5 local function declaration');+}++export function localParameter(alert: (message: string) => void): void {+ alert('n6 parameter shadows the global');+}++export function localWindow(window: { confirm: (message: string) => boolean }): boolean {+ return window.confirm('n7 parameter named window');+}++export function references(): void {+ const n8 = window.confirm;+ void n8;+}diff --git a/lint-plugins/ok-rules/__fixtures__/no-raw-error-toast.fixture.tsx b/lint-plugins/ok-rules/__fixtures__/no-raw-error-toast.fixture.tsxnew file mode 100644index 000000000..be7c40dd7--- /dev/null+++ b/lint-plugins/ok-rules/__fixtures__/no-raw-error-toast.fixture.tsx@@ -0,0 +1,73 @@+import { t } from '@lingui/core/macro';+import * as sonner from 'sonner';+import { toast } from 'sonner';+import { toast as sonnerToast } from 'sonner';+import { toast as appToast } from '@/lib/app-toast';+import * as appToasts from '@/lib/app-toasts';++declare function errorText(value: unknown): string;+declare function humanFormat(value: unknown): string;+declare const err: Error;+declare const error: Error;+declare const e: Error;+declare const cause: unknown;+declare const saveError: Error;+declare const ex: Error;+declare const reason: Error;+declare const lastErr: Error;+declare const failed: boolean;+declare const result: { ok: false; error: string; message: string; detail: string };+declare const frame: { message: string };+declare const message: string;+declare const name: string;+declare const isError: boolean;+declare const ui: { error: (message: string) => void };++export function positives(): void {+ toast.error(err.message);+ toast.error(err instanceof Error ? err.message : t`Couldn't save the page.`);+ toast.error(String(cause));+ toast.error(errorText(cause));+ toast.error(e.toString());+ toast.error(t`Couldn't save ${name}: ${error.message}`);+ toast.error(t`Couldn't save ${name}: ${errorText(err)}`);+ toast.error(`Couldn't save: ${saveError}`);+ toast.error(t`Couldn't move the skill: ${result.error}`);+ toast.error(result.error);+ toast.warning(err?.message ?? t`Couldn't sync.`);+ toast.info('Sync stopped: ' + err.message);+ toast(err.message);+ toast.success(err.message);+ toast.loading(err.message);+ toast.message(err.message);+ toast.error(t`Couldn't save the page.`, { description: err.message });+ toast.error(t`Couldn't import the template.`, { description: result.error });+ sonnerToast.error(err.message);+ sonner.toast.error(err.message);+ toast.error(failed && err.message);+ toast.error(ex.message);+ toast.error(reason.message);+ toast.error(lastErr.message);+ toast.error(t`Couldn't save the page.`, { 'description': err.message });+}++export function negatives(): void {+ toast.error(t`Couldn't save the page.`);+ toast.error(t`Couldn't save ${name}.`);+ toast.error(message);+ toast.error(result.message);+ toast.error(frame.message);+ toast.error(t`Couldn't save the page.`, { description: result.detail });+ toast.error(t`Couldn't save the page.`, { description: humanFormat(result.error) });+ toast.error(isError && t`Couldn't save the page.`);+ toast.error(String(name));+ ui.error(err.message);+ toast.custom(() => null, { description: err.message });+ appToast.error(err.message);+ appToasts.toast.error(err.message);+}++export function localToast(): void {+ const toast = { error: (text: string) => text };+ toast.error(err.message);+}diff --git a/lint-plugins/ok-rules/__fixtures__/oxlint.fixtures.json b/lint-plugins/ok-rules/__fixtures__/oxlint.fixtures.jsonindex 52519abfe..93f417b25 100644--- a/lint-plugins/ok-rules/__fixtures__/oxlint.fixtures.json+++ b/lint-plugins/ok-rules/__fixtures__/oxlint.fixtures.json@@ -7,6 +7,7 @@"ok/no-app-core-barrel-import": "error","ok/no-blind-agent-host-fanout": "error","ok/no-blocking-error-box": "error",+ "ok/no-custom-toast": "error","ok/no-demoted-dialog-confirm": "error","ok/no-fixed-palette-color": "error","ok/no-hand-rolled-branch-validation": "error",@@ -14,7 +15,9 @@"ok/no-hand-rolled-spinner": "error","ok/no-inline-tolerance-class": "error","ok/no-loosely-typed-webcontents-ipc": "error",+ "ok/no-native-renderer-dialog": "error","ok/no-physical-direction-utility": "error",+ "ok/no-raw-error-toast": "error","ok/no-raw-html-interactive-element": "error","ok/no-raw-route-hash-construction": "error","ok/no-resolved-value-theme-source": "error",diff --git a/lint-plugins/ok-rules/binding.mjs b/lint-plugins/ok-rules/binding.mjsnew file mode 100644index 000000000..3b2f6cd45--- /dev/null+++ b/lint-plugins/ok-rules/binding.mjs@@ -0,0 +1,7 @@+export function resolveVariable(sourceCode, identifier) {+ for (let scope = sourceCode.getScope(identifier); scope; scope = scope.upper) {+ const variable = scope.set.get(identifier.name);+ if (variable && variable.defs.length > 0) return variable;+ }+ return null;+}diff --git a/lint-plugins/ok-rules/index.mjs b/lint-plugins/ok-rules/index.mjsindex 58ee937e5..0e6d8a47a 100644--- a/lint-plugins/ok-rules/index.mjs+++ b/lint-plugins/ok-rules/index.mjs@@ -6,6 +6,7 @@ import { microcopyEllipsis } from './rules/microcopy-ellipsis.mjs';import { noAppCoreBarrelImport } from './rules/no-app-core-barrel-import.mjs';import { noBlindAgentHostFanout } from './rules/no-blind-agent-host-fanout.mjs';import { noBlockingErrorBox } from './rules/no-blocking-error-box.mjs';+import { noCustomToast } from './rules/no-custom-toast.mjs';import { noDemotedDialogConfirm } from './rules/no-demoted-dialog-confirm.mjs';import { noFixedPaletteColor } from './rules/no-fixed-palette-color.mjs';import { noHandRolledBranchValidation } from './rules/no-hand-rolled-branch-validation.mjs';@@ -13,7 +14,9 @@ import { noHandRolledSpinner } from './rules/no-hand-rolled-spinner.mjs';import { noHandRolledTestFileSuffix } from './rules/no-hand-rolled-test-file-suffix.mjs';import { noInlineToleranceClass } from './rules/no-inline-tolerance-class.mjs';import { noLooselyTypedWebcontentsIpc } from './rules/no-loosely-typed-webcontents-ipc.mjs';+import { noNativeRendererDialog } from './rules/no-native-renderer-dialog.mjs';import { noPhysicalDirectionUtility } from './rules/no-physical-direction-utility.mjs';+import { noRawErrorToast } from './rules/no-raw-error-toast.mjs';import { noRawHtmlInteractiveElement } from './rules/no-raw-html-interactive-element.mjs';import { noRawRouteHashConstruction } from './rules/no-raw-route-hash-construction.mjs';import { noResolvedValueThemeSource } from './rules/no-resolved-value-theme-source.mjs';@@ -42,6 +45,7 @@ const declared = {'no-app-core-barrel-import': noAppCoreBarrelImport,'no-blind-agent-host-fanout': noBlindAgentHostFanout,'no-blocking-error-box': noBlockingErrorBox,+ 'no-custom-toast': noCustomToast,'no-demoted-dialog-confirm': noDemotedDialogConfirm,'no-fixed-palette-color': noFixedPaletteColor,'no-hand-rolled-branch-validation': noHandRolledBranchValidation,@@ -49,7 +53,9 @@ const declared = {'no-hand-rolled-spinner': noHandRolledSpinner,'no-inline-tolerance-class': noInlineToleranceClass,'no-loosely-typed-webcontents-ipc': noLooselyTypedWebcontentsIpc,+ 'no-native-renderer-dialog': noNativeRendererDialog,'no-physical-direction-utility': noPhysicalDirectionUtility,+ 'no-raw-error-toast': noRawErrorToast,'no-raw-html-interactive-element': noRawHtmlInteractiveElement,'no-raw-route-hash-construction': noRawRouteHashConstruction,'no-resolved-value-theme-source': noResolvedValueThemeSource,diff --git a/lint-plugins/ok-rules/rules/no-custom-toast.mjs b/lint-plugins/ok-rules/rules/no-custom-toast.mjsnew file mode 100644index 000000000..39eb98f15--- /dev/null+++ b/lint-plugins/ok-rules/rules/no-custom-toast.mjs@@ -0,0 +1,28 @@+import { docsUrl } from '../docs.mjs';+import { sonnerToastBindings, toastCallMethod } from '../toast.mjs';++const URL = docsUrl('no-custom-toast');++const MESSAGE = `Custom sonner toast. \`toast.custom\` renders unstyled: it sizes to its content, draws no close button, and overlaps the toast stacked behind it. Use the typed toast functions (\`toast.success\`, \`toast.error\`, \`toast.warning\`, \`toast.info\`, \`toast.loading\`) so the Toaster supplies the color, icon, width and close button. See ${URL}`;++export const noCustomToast = {+ meta: {+ type: 'problem',+ docs: {+ description: 'App code must use the typed sonner toast functions, not toast.custom.',+ url: URL,+ },+ },+ create(context) {+ let bindings = { direct: new Set(), namespaces: new Set() };+ return {+ Program(node) {+ bindings = sonnerToastBindings(node);+ },+ CallExpression(node) {+ if (toastCallMethod(node, bindings, context.sourceCode) !== 'custom') return;+ context.report({ node, message: MESSAGE });+ },+ };+ },+};diff --git a/lint-plugins/ok-rules/rules/no-native-renderer-dialog.mjs b/lint-plugins/ok-rules/rules/no-native-renderer-dialog.mjsnew file mode 100644index 000000000..b439039cf--- /dev/null+++ b/lint-plugins/ok-rules/rules/no-native-renderer-dialog.mjs@@ -0,0 +1,43 @@+import { resolveVariable } from '../binding.mjs';+import { docsUrl } from '../docs.mjs';++const URL = docsUrl('no-native-renderer-dialog');++const MESSAGE = `Native browser dialog in the renderer. \`confirm\`, \`alert\` and \`prompt\` open a dialog with no title, no destructive button, no app theme or focus handling, and button labels the app cannot translate. Use \`AlertDialog\` from \`@/components/ui/alert-dialog\` (or \`DeleteConfirmationDialog\` for a delete). See ${URL}`;++const DIALOGS = new Set(['confirm', 'alert', 'prompt']);+const GLOBAL_OBJECTS = new Set(['window', 'globalThis', 'self']);++function isLocallyBound(sourceCode, identifier) {+ return resolveVariable(sourceCode, identifier) !== null;+}++function dialogMember(callee) {+ if (callee?.type !== 'MemberExpression' || callee.computed) return false;+ if (callee.property?.type !== 'Identifier' || !DIALOGS.has(callee.property.name)) return false;+ return callee.object?.type === 'Identifier' && GLOBAL_OBJECTS.has(callee.object.name);+}++export const noNativeRendererDialog = {+ meta: {+ type: 'problem',+ docs: {+ description: 'Renderer code must not open a native confirm, alert or prompt dialog.',+ url: URL,+ },+ },+ create(context) {+ const sourceCode = context.sourceCode;+ return {+ CallExpression(node) {+ const callee = node.callee;+ if (callee?.type === 'Identifier') {+ if (!DIALOGS.has(callee.name) || isLocallyBound(sourceCode, callee)) return;+ } else if (!dialogMember(callee) || isLocallyBound(sourceCode, callee.object)) {+ return;+ }+ context.report({ node, message: MESSAGE });+ },+ };+ },+};diff --git a/lint-plugins/ok-rules/rules/no-raw-error-toast.mjs b/lint-plugins/ok-rules/rules/no-raw-error-toast.mjsnew file mode 100644index 000000000..1002a256a--- /dev/null+++ b/lint-plugins/ok-rules/rules/no-raw-error-toast.mjs@@ -0,0 +1,123 @@+import { docsUrl } from '../docs.mjs';+import { sonnerToastBindings, toastCallMethod } from '../toast.mjs';++const URL = docsUrl('no-raw-error-toast');++const MESSAGE = `Raw error text in a toast. An error's \`message\` or string form is untranslatable, often an internal message, and frequently wrong for the user. Map the failure to a reason and write translated copy for it ("Couldn't {verb} {thing}."); put the raw detail behind a Show details disclosure or in Report a bug instead. See ${URL}`;++const TYPED = new Set(['', 'error', 'warning', 'info', 'success', 'loading', 'message']);+const ERROR_NAMES = new Set(['err', 'error', 'e', 'ex', 'cause', 'reason']);+const ERROR_SUFFIX = /[a-z0-9_](?:Error|Err)$/;+const WRAPPERS = new Set([+ 'ChainExpression',+ 'ParenthesizedExpression',+ 'TSAsExpression',+ 'TSNonNullExpression',+ 'TSSatisfiesExpression',+ 'TSTypeAssertion',+]);++function unwrap(node) {+ let current = node;+ while (current && WRAPPERS.has(current.type)) current = current.expression;+ return current;+}++function isErrorName(name) {+ return ERROR_NAMES.has(name) || ERROR_SUFFIX.test(name);+}++function isErrorValue(node) {+ const value = unwrap(node);+ if (value?.type === 'Identifier') return isErrorName(value.name);+ return (+ value?.type === 'MemberExpression' &&+ !value.computed &&+ value.property?.type === 'Identifier' &&+ isErrorName(value.property.name)+ );+}++function memberName(node) {+ if (node?.type !== 'MemberExpression' || node.computed) return '';+ return node.property?.type === 'Identifier' ? node.property.name : '';+}++function interpolatesRawError(template) {+ return template.expressions.some(isRawErrorText);+}++function isRawErrorText(node) {+ const value = unwrap(node);+ if (!value) return false;+ if (isErrorValue(value)) return true;+ switch (value.type) {+ case 'ConditionalExpression':+ return isRawErrorText(value.consequent) || isRawErrorText(value.alternate);+ case 'LogicalExpression':+ if (value.operator === '&&') return isRawErrorText(value.right);+ return isRawErrorText(value.left) || isRawErrorText(value.right);+ case 'BinaryExpression':+ if (value.operator !== '+') return false;+ return isRawErrorText(value.left) || isRawErrorText(value.right);+ case 'TemplateLiteral':+ return interpolatesRawError(value);+ case 'TaggedTemplateExpression':+ return value.tag?.type === 'Identifier' && value.tag.name === 't'+ ? interpolatesRawError(value.quasi)+ : false;+ case 'MemberExpression':+ return memberName(value) === 'message' && isErrorValue(value.object);+ case 'CallExpression': {+ const callee = value.callee;+ if (callee?.type === 'Identifier' && callee.name === 'errorText') return true;+ if (callee?.type === 'Identifier' && callee.name === 'String') {+ return value.arguments.length === 1 && isErrorValue(value.arguments[0]);+ }+ return (+ memberName(callee) === 'toString' &&+ value.arguments.length === 0 &&+ isErrorValue(callee.object)+ );+ }+ default:+ return false;+ }+}++function descriptionOf(options) {+ const value = unwrap(options);+ if (value?.type !== 'ObjectExpression') return null;+ for (const property of value.properties) {+ if (property.type !== 'Property' || property.computed) continue;+ const key = property.key;+ const name = key?.type === 'Identifier' ? key.name : key?.value;+ if (name === 'description') return property.value;+ }+ return null;+}++export const noRawErrorToast = {+ meta: {+ type: 'problem',+ docs: {+ description: "A toast's message and description must not be raw error text.",+ url: URL,+ },+ },+ create(context) {+ let bindings = { direct: new Set(), namespaces: new Set() };+ return {+ Program(node) {+ bindings = sonnerToastBindings(node);+ },+ CallExpression(node) {+ if (!TYPED.has(toastCallMethod(node, bindings, context.sourceCode))) return;+ const [message, options] = node.arguments;+ if (isRawErrorText(message)) context.report({ node: message, message: MESSAGE });+ const description = descriptionOf(options);+ if (isRawErrorText(description)) context.report({ node: description, message: MESSAGE });+ },+ };+ },+};diff --git a/lint-plugins/ok-rules/scope.mjs b/lint-plugins/ok-rules/scope.mjsindex 01fc723af..ddcbfde07 100644--- a/lint-plugins/ok-rules/scope.mjs+++ b/lint-plugins/ok-rules/scope.mjs@@ -210,6 +210,38 @@ export const RULE_SCOPES = {'!**/*.dom.test.tsx','lint-plugins/ok-rules/__fixtures__/no-demoted-dialog-confirm.fixture.tsx',],+ 'no-native-renderer-dialog': [+ 'packages/app/src/**/*.ts',+ 'packages/app/src/**/*.tsx',+ 'packages/plugin/src/**/*.ts',+ 'packages/plugin/src/**/*.tsx',+ '!**/*.test.ts',+ '!**/*.test.tsx',+ '!**/*.dom.test.tsx',+ '!**/*.test-helper.ts',+ '!**/*.test-helper.tsx',+ 'lint-plugins/ok-rules/__fixtures__/no-native-renderer-dialog.fixture.tsx',+ ],+ 'no-custom-toast': [+ 'packages/app/src/**/*.ts',+ 'packages/app/src/**/*.tsx',+ '!**/*.test.ts',+ '!**/*.test.tsx',+ '!**/*.dom.test.tsx',+ '!**/*.test-helper.ts',+ '!**/*.test-helper.tsx',+ 'lint-plugins/ok-rules/__fixtures__/no-custom-toast.fixture.tsx',+ ],+ 'no-raw-error-toast': [+ 'packages/app/src/**/*.ts',+ 'packages/app/src/**/*.tsx',+ '!**/*.test.ts',+ '!**/*.test.tsx',+ '!**/*.dom.test.tsx',+ '!**/*.test-helper.ts',+ '!**/*.test-helper.tsx',+ 'lint-plugins/ok-rules/__fixtures__/no-raw-error-toast.fixture.tsx',+ ],'no-roundtrip-identity-oracle': ['packages/**/*.test.ts','packages/**/*.test.tsx',diff --git a/lint-plugins/ok-rules/tests/no-custom-toast.uncached.test.mjs b/lint-plugins/ok-rules/tests/no-custom-toast.uncached.test.mjsnew file mode 100644index 000000000..57dfcc84c--- /dev/null+++ b/lint-plugins/ok-rules/tests/no-custom-toast.uncached.test.mjs@@ -0,0 +1,51 @@+import { fileURLToPath } from 'node:url';+import { describe, expect, test } from 'vitest';+import {+ lintOkRulesFixture,+ readEnabledRuleIds,+ readRegisteredRuleNames,+ readRuleScope,+} from '../../../test-support/read-ok-rules-config.test-helper.ts';++const REPO_ROOT = fileURLToPath(new URL('../../..', import.meta.url));+const RULE = 'no-custom-toast';+const CODE = `ok(${RULE})`;+const FIXTURE = `lint-plugins/ok-rules/__fixtures__/${RULE}.fixture.tsx`;+const DOCS = `lint-plugins/ok-rules/README.md#${RULE}`;++function fires() {+ return lintOkRulesFixture(FIXTURE).filter((d) => d.code === CODE);+}++describe(`${RULE} oxlint rule`, () => {+ test('fires at exactly its 3 toast.custom calls, by its own code, and on no negative case', () => {+ const found = fires();+ expect(found.map((fire) => fire.position)).toEqual(['10:3', '11:3', '12:3']);+ for (const fire of found) {+ expect(fire.message).toContain('Custom sonner toast');+ expect(fire.message).toContain('Use the typed toast functions');+ expect(fire.message).toMatch(/https?:\/\/[^\s]+/);+ expect(fire.message).toContain(DOCS);+ }+ });++ test('rule is registered and enabled', async () => {+ expect(await readRegisteredRuleNames(REPO_ROOT)).toContain(RULE);+ expect(await readEnabledRuleIds(REPO_ROOT)).toContain(`ok/${RULE}`);+ });++ test('its scope table still carries every include and exclude the rule depends on', () => {+ expect(readRuleScope(REPO_ROOT, RULE).sort()).toEqual(+ [+ 'packages/app/src/**/*.ts',+ 'packages/app/src/**/*.tsx',+ '!**/*.test.ts',+ '!**/*.test.tsx',+ '!**/*.dom.test.tsx',+ '!**/*.test-helper.ts',+ '!**/*.test-helper.tsx',+ FIXTURE,+ ].sort(),+ );+ });+});diff --git a/lint-plugins/ok-rules/tests/no-native-renderer-dialog.uncached.test.mjs b/lint-plugins/ok-rules/tests/no-native-renderer-dialog.uncached.test.mjsnew file mode 100644index 000000000..001c57910--- /dev/null+++ b/lint-plugins/ok-rules/tests/no-native-renderer-dialog.uncached.test.mjs@@ -0,0 +1,64 @@+import { fileURLToPath } from 'node:url';+import { describe, expect, test } from 'vitest';+import {+ lintOkRulesFixture,+ readEnabledRuleIds,+ readRegisteredRuleNames,+ readRuleScope,+} from '../../../test-support/read-ok-rules-config.test-helper.ts';++const REPO_ROOT = fileURLToPath(new URL('../../..', import.meta.url));+const RULE = 'no-native-renderer-dialog';+const CODE = `ok(${RULE})`;+const FIXTURE = `lint-plugins/ok-rules/__fixtures__/${RULE}.fixture.tsx`;+const DOCS = `lint-plugins/ok-rules/README.md#${RULE}`;++function fires() {+ return lintOkRulesFixture(FIXTURE).filter((d) => d.code === CODE);+}++describe(`${RULE} oxlint rule`, () => {+ test('fires at exactly its 10 global dialog calls, by its own code, and on no negative case', () => {+ const found = fires();+ expect(found.map((fire) => fire.position)).toEqual([+ '8:3',+ '9:3',+ '10:3',+ '11:3',+ '12:3',+ '13:3',+ '14:3',+ '15:3',+ '16:3',+ '17:8',+ ]);+ for (const fire of found) {+ expect(fire.message).toContain('Native browser dialog in the renderer');+ expect(fire.message).toContain('Use `AlertDialog`');+ expect(fire.message).toMatch(/https?:\/\/[^\s]+/);+ expect(fire.message).toContain(DOCS);+ }+ });++ test('rule is registered and enabled', async () => {+ expect(await readRegisteredRuleNames(REPO_ROOT)).toContain(RULE);+ expect(await readEnabledRuleIds(REPO_ROOT)).toContain(`ok/${RULE}`);+ });++ test('its scope table still carries every include and exclude the rule depends on', () => {+ expect(readRuleScope(REPO_ROOT, RULE).sort()).toEqual(+ [+ 'packages/app/src/**/*.ts',+ 'packages/app/src/**/*.tsx',+ 'packages/plugin/src/**/*.ts',+ 'packages/plugin/src/**/*.tsx',+ '!**/*.test.ts',+ '!**/*.test.tsx',+ '!**/*.dom.test.tsx',+ '!**/*.test-helper.ts',+ '!**/*.test-helper.tsx',+ FIXTURE,+ ].sort(),+ );+ });+});diff --git a/lint-plugins/ok-rules/tests/no-raw-error-toast.uncached.test.mjs b/lint-plugins/ok-rules/tests/no-raw-error-toast.uncached.test.mjsnew file mode 100644index 000000000..15e9a1eac--- /dev/null+++ b/lint-plugins/ok-rules/tests/no-raw-error-toast.uncached.test.mjs@@ -0,0 +1,77 @@+import { fileURLToPath } from 'node:url';+import { describe, expect, test } from 'vitest';+import {+ lintOkRulesFixture,+ readEnabledRuleIds,+ readRegisteredRuleNames,+ readRuleScope,+} from '../../../test-support/read-ok-rules-config.test-helper.ts';++const REPO_ROOT = fileURLToPath(new URL('../../..', import.meta.url));+const RULE = 'no-raw-error-toast';+const CODE = `ok(${RULE})`;+const FIXTURE = `lint-plugins/ok-rules/__fixtures__/${RULE}.fixture.tsx`;+const DOCS = `lint-plugins/ok-rules/README.md#${RULE}`;++function fires() {+ return lintOkRulesFixture(FIXTURE).filter((d) => d.code === CODE);+}++describe(`${RULE} oxlint rule`, () => {+ test('fires at exactly its 25 raw-error toast arguments, by its own code, and on no negative case', () => {+ const found = fires();+ expect(found.map((fire) => fire.position)).toEqual([+ '27:15',+ '28:15',+ '29:15',+ '30:15',+ '31:15',+ '32:15',+ '33:15',+ '34:15',+ '35:15',+ '36:15',+ '37:17',+ '38:14',+ '39:9',+ '40:17',+ '41:17',+ '42:17',+ '43:58',+ '44:64',+ '45:21',+ '46:22',+ '47:15',+ '48:15',+ '49:15',+ '50:15',+ '51:60',+ ]);+ for (const fire of found) {+ expect(fire.message).toContain('Raw error text in a toast');+ expect(fire.message).toContain('Map the failure to a reason');+ expect(fire.message).toMatch(/https?:\/\/[^\s]+/);+ expect(fire.message).toContain(DOCS);+ }+ });++ test('rule is registered and enabled', async () => {+ expect(await readRegisteredRuleNames(REPO_ROOT)).toContain(RULE);+ expect(await readEnabledRuleIds(REPO_ROOT)).toContain(`ok/${RULE}`);+ });++ test('its scope table still carries every include and exclude the rule depends on', () => {+ expect(readRuleScope(REPO_ROOT, RULE).sort()).toEqual(+ [+ 'packages/app/src/**/*.ts',+ 'packages/app/src/**/*.tsx',+ '!**/*.test.ts',+ '!**/*.test.tsx',+ '!**/*.dom.test.tsx',+ '!**/*.test-helper.ts',+ '!**/*.test-helper.tsx',+ FIXTURE,+ ].sort(),+ );+ });+});diff --git a/lint-plugins/ok-rules/toast.mjs b/lint-plugins/ok-rules/toast.mjsnew file mode 100644index 000000000..518825a6b--- /dev/null+++ b/lint-plugins/ok-rules/toast.mjs@@ -0,0 +1,64 @@+import { resolveVariable } from './binding.mjs';++const SONNER = 'sonner';++function importedName(specifier) {+ const imported = specifier.imported;+ if (!imported) return '';+ return imported.type === 'Identifier' ? imported.name : String(imported.value ?? '');+}++export function sonnerToastBindings(program) {+ const direct = new Set();+ const namespaces = new Set();+ for (const statement of program.body ?? []) {+ if (statement.type !== 'ImportDeclaration') continue;+ if (statement.source?.value !== SONNER || statement.importKind === 'type') continue;+ for (const specifier of statement.specifiers ?? []) {+ if (specifier.type === 'ImportNamespaceSpecifier') {+ namespaces.add(specifier.local.name);+ } else if (+ specifier.type === 'ImportSpecifier' &&+ specifier.importKind !== 'type' &&+ importedName(specifier) === 'toast'+ ) {+ direct.add(specifier.local.name);+ }+ }+ }+ return { direct, namespaces };+}++function resolvesToImport(sourceCode, identifier) {+ const variable = resolveVariable(sourceCode, identifier);+ return variable?.defs.every((def) => def.type === 'ImportBinding') ?? false;+}++function isImportedAs(node, names, sourceCode) {+ return node?.type === 'Identifier' && names.has(node.name) && resolvesToImport(sourceCode, node);+}++function isToastObject(node, bindings, sourceCode) {+ if (node?.type === 'Identifier') return isImportedAs(node, bindings.direct, sourceCode);+ return (+ node?.type === 'MemberExpression' &&+ !node.computed &&+ node.property?.type === 'Identifier' &&+ node.property.name === 'toast' &&+ isImportedAs(node.object, bindings.namespaces, sourceCode)+ );+}++export function toastCallMethod(call, bindings, sourceCode) {+ const callee = call.callee;+ if (isToastObject(callee, bindings, sourceCode)) return '';+ if (+ callee?.type === 'MemberExpression' &&+ !callee.computed &&+ callee.property?.type === 'Identifier' &&+ isToastObject(callee.object, bindings, sourceCode)+ ) {+ return callee.property.name;+ }+ return null;+}diff --git a/oxlint.config.ts b/oxlint.config.tsindex fbc64db2c..8dfc1f8ae 100644--- a/oxlint.config.ts+++ b/oxlint.config.ts@@ -55,6 +55,7 @@ export default defineConfig({'ok/no-app-core-barrel-import': 'error','ok/no-blind-agent-host-fanout': 'error','ok/no-blocking-error-box': 'error',+ 'ok/no-custom-toast': 'error','ok/no-demoted-dialog-confirm': 'error','ok/no-fixed-palette-color': 'error','ok/no-hand-rolled-branch-validation': 'error',@@ -62,7 +63,9 @@ export default defineConfig({'ok/no-hand-rolled-spinner': 'error','ok/no-inline-tolerance-class': 'error','ok/no-loosely-typed-webcontents-ipc': 'error',+ 'ok/no-native-renderer-dialog': 'error','ok/no-physical-direction-utility': 'error',+ 'ok/no-raw-error-toast': 'error','ok/no-raw-html-interactive-element': 'error','ok/no-raw-route-hash-construction': 'error','ok/no-resolved-value-theme-source': 'error',diff --git a/packages/app/src/App.tsx b/packages/app/src/App.tsxindex dfb9d990d..2949942da 100644--- a/packages/app/src/App.tsx+++ b/packages/app/src/App.tsx@@ -1,3 +1,4 @@+// oxlint-disable ok/no-raw-error-toast -- pre-rule backlog: toasts here show raw error text; delete this line once the file maps each failure to written copy. See https://github.com/inkeep/open-knowledge/blob/main/lint-plugins/ok-rules/README.md#no-raw-error-toastimport { SHOW_INSTALL_SKILL } from '@inkeep/open-knowledge-core/constants/feature-flags';import { mediaKindForSidebarAssetExtension } from '@inkeep/open-knowledge-core/constants/upload';import {diff --git a/packages/app/src/comments/store.ts b/packages/app/src/comments/store.tsindex 0f09c50af..e5b6e5154 100644--- a/packages/app/src/comments/store.ts+++ b/packages/app/src/comments/store.ts@@ -1,3 +1,4 @@+// oxlint-disable ok/no-raw-error-toast -- pre-rule backlog: toasts here show raw error text; delete this line once the file maps each failure to written copy. See https://github.com/inkeep/open-knowledge/blob/main/lint-plugins/ok-rules/README.md#no-raw-error-toastimport { t } from '@lingui/core/macro';import { useSyncExternalStore } from 'react';import { toast } from 'sonner';diff --git a/packages/app/src/components/CloneDialog.tsx b/packages/app/src/components/CloneDialog.tsxindex ced3a8372..521d28d16 100644--- a/packages/app/src/components/CloneDialog.tsx+++ b/packages/app/src/components/CloneDialog.tsx@@ -1,3 +1,4 @@+// oxlint-disable ok/no-raw-error-toast -- pre-rule backlog: toasts here show raw error text; delete this line once the file maps each failure to written copy. See https://github.com/inkeep/open-knowledge/blob/main/lint-plugins/ok-rules/README.md#no-raw-error-toastimport type { MessageDescriptor } from '@lingui/core';import { msg } from '@lingui/core/macro';import { Trans, useLingui } from '@lingui/react/macro';diff --git a/packages/app/src/components/FileTree.tsx b/packages/app/src/components/FileTree.tsxindex 88ce1e375..a375d49d3 100644--- a/packages/app/src/components/FileTree.tsx+++ b/packages/app/src/components/FileTree.tsx@@ -1,3 +1,4 @@+// oxlint-disable ok/no-raw-error-toast -- pre-rule backlog: toasts here show raw error text; delete this line once the file maps each failure to written copy. See https://github.com/inkeep/open-knowledge/blob/main/lint-plugins/ok-rules/README.md#no-raw-error-toast// oxlint-disable ok/no-physical-direction-utility -- pre-rule backlog — physical margin/padding/inset utilities predate the rule; drain by swapping ml/mr → ms/me, pl/pr → ps/pe, left/right → start/end, then deleting this line. See https://github.com/inkeep/open-knowledge/blob/main/lint-plugins/ok-rules/README.md#no-physical-direction-utilityimport type { OkignoreBinding } from '@inkeep/open-knowledge-core/config/bind-okignore-doc';diff --git a/packages/app/src/components/FolderPropertiesCard.tsx b/packages/app/src/components/FolderPropertiesCard.tsxindex 7a5220e39..f0e213ff0 100644--- a/packages/app/src/components/FolderPropertiesCard.tsx+++ b/packages/app/src/components/FolderPropertiesCard.tsx@@ -1,3 +1,4 @@+// oxlint-disable ok/no-raw-error-toast -- pre-rule backlog: toasts here show raw error text; delete this line once the file maps each failure to written copy. See https://github.com/inkeep/open-knowledge/blob/main/lint-plugins/ok-rules/README.md#no-raw-error-toastimport {type FrontmatterType,type FrontmatterValue,diff --git a/packages/app/src/components/ImportSkillForm.tsx b/packages/app/src/components/ImportSkillForm.tsxindex f4ef091de..82e575d62 100644--- a/packages/app/src/components/ImportSkillForm.tsx+++ b/packages/app/src/components/ImportSkillForm.tsx@@ -1,3 +1,4 @@+// oxlint-disable ok/no-raw-error-toast -- pre-rule backlog: toasts here show raw error text; delete this line once the file maps each failure to written copy. See https://github.com/inkeep/open-knowledge/blob/main/lint-plugins/ok-rules/README.md#no-raw-error-toast// oxlint-disable ok/no-physical-direction-utility -- pre-rule backlog — physical margin/padding/inset utilities predate the rule; drain by swapping ml/mr → ms/me, pl/pr → ps/pe, left/right → start/end, then deleting this line. See https://github.com/inkeep/open-knowledge/blob/main/lint-plugins/ok-rules/README.md#no-physical-direction-utilityimport type { SkillScope } from '@inkeep/open-knowledge-core/schemas/api';diff --git a/packages/app/src/components/LinksPanel.tsx b/packages/app/src/components/LinksPanel.tsxindex cf7d9799c..604a80c7c 100644--- a/packages/app/src/components/LinksPanel.tsx+++ b/packages/app/src/components/LinksPanel.tsx@@ -1,3 +1,4 @@+// oxlint-disable ok/no-raw-error-toast -- pre-rule backlog: toasts here show raw error text; delete this line once the file maps each failure to written copy. See https://github.com/inkeep/open-knowledge/blob/main/lint-plugins/ok-rules/README.md#no-raw-error-toast// oxlint-disable ok/no-raw-html-interactive-element -- pre-rule backlog — file uses raw <button>/<input>/<textarea> awaiting shadcn migration; tracked at https://github.com/inkeep/open-knowledge/blob/main/lint-plugins/ok-rules/README.md#no-raw-html-interactive-element// oxlint-disable ok/no-physical-direction-utility -- pre-rule backlog — physical margin/padding/inset utilities predate the rule; drain by swapping ml/mr → ms/me, pl/pr → ps/pe, left/right → start/end, then deleting this line. See https://github.com/inkeep/open-knowledge/blob/main/lint-plugins/ok-rules/README.md#no-physical-direction-utilityimport {diff --git a/packages/app/src/components/ManagedArtifactProperties.tsx b/packages/app/src/components/ManagedArtifactProperties.tsxindex abf5c0a05..91dbcf58c 100644--- a/packages/app/src/components/ManagedArtifactProperties.tsx+++ b/packages/app/src/components/ManagedArtifactProperties.tsx@@ -1,3 +1,4 @@+// oxlint-disable ok/no-raw-error-toast -- pre-rule backlog: toasts here show raw error text; delete this line once the file maps each failure to written copy. See https://github.com/inkeep/open-knowledge/blob/main/lint-plugins/ok-rules/README.md#no-raw-error-toastimport type { HocuspocusProvider } from '@hocuspocus/provider';import {isExternalSkillDocName,diff --git a/packages/app/src/components/ProblemsPanel.tsx b/packages/app/src/components/ProblemsPanel.tsxindex 3c8008de2..36cefe09e 100644--- a/packages/app/src/components/ProblemsPanel.tsx+++ b/packages/app/src/components/ProblemsPanel.tsx@@ -1,3 +1,4 @@+// oxlint-disable ok/no-raw-error-toast -- pre-rule backlog: toasts here show raw error text; delete this line once the file maps each failure to written copy. See https://github.com/inkeep/open-knowledge/blob/main/lint-plugins/ok-rules/README.md#no-raw-error-toast// oxlint-disable ok/no-raw-html-interactive-element -- matches sibling OutlinePanel — positional list of <button> rows awaiting a shared shadcn list primitive; tracked at https://github.com/inkeep/open-knowledge/blob/main/lint-plugins/ok-rules/README.md#no-raw-html-interactive-element// oxlint-disable ok/no-physical-direction-utility -- pre-rule backlog — physical margin/padding/inset utilities predate the rule; drain by swapping ml/mr → ms/me, pl/pr → ps/pe, left/right → start/end, then deleting this line. See https://github.com/inkeep/open-knowledge/blob/main/lint-plugins/ok-rules/README.md#no-physical-direction-utilitydiff --git a/packages/app/src/components/ShareReceiveDialog.tsx b/packages/app/src/components/ShareReceiveDialog.tsxindex 677cc0c18..e2ab1d538 100644--- a/packages/app/src/components/ShareReceiveDialog.tsx+++ b/packages/app/src/components/ShareReceiveDialog.tsx@@ -1,3 +1,4 @@+// oxlint-disable ok/no-raw-error-toast -- pre-rule backlog: toasts here show raw error text; delete this line once the file maps each failure to written copy. See https://github.com/inkeep/open-knowledge/blob/main/lint-plugins/ok-rules/README.md#no-raw-error-toast// oxlint-disable ok/no-raw-html-interactive-element -- pre-rule backlog — Q2 card grid uses raw <button> awaiting shadcn migration; tracked at https://github.com/inkeep/open-knowledge/blob/main/lint-plugins/ok-rules/README.md#no-raw-html-interactive-element// oxlint-disable ok/no-physical-direction-utility -- pre-rule backlog — physical margin/padding/inset utilities predate the rule; drain by swapping ml/mr → ms/me, pl/pr → ps/pe, left/right → start/end, then deleting this line. See https://github.com/inkeep/open-knowledge/blob/main/lint-plugins/ok-rules/README.md#no-physical-direction-utilitydiff --git a/packages/app/src/components/SkillBulkDeleteDialog.tsx b/packages/app/src/components/SkillBulkDeleteDialog.tsxindex 4c4d757d8..bb90dbdbe 100644--- a/packages/app/src/components/SkillBulkDeleteDialog.tsx+++ b/packages/app/src/components/SkillBulkDeleteDialog.tsx@@ -1,3 +1,4 @@+// oxlint-disable ok/no-raw-error-toast -- pre-rule backlog: toasts here show raw error text; delete this line once the file maps each failure to written copy. See https://github.com/inkeep/open-knowledge/blob/main/lint-plugins/ok-rules/README.md#no-raw-error-toastimport type { SkillsListEntry } from '@inkeep/open-knowledge-core/schemas/api';import { useLingui } from '@lingui/react/macro';import { useState } from 'react';diff --git a/packages/app/src/components/SkillDeleteDialog.tsx b/packages/app/src/components/SkillDeleteDialog.tsxindex 0f41394a9..08f11c8d6 100644--- a/packages/app/src/components/SkillDeleteDialog.tsx+++ b/packages/app/src/components/SkillDeleteDialog.tsx@@ -1,3 +1,4 @@+// oxlint-disable ok/no-raw-error-toast -- pre-rule backlog: toasts here show raw error text; delete this line once the file maps each failure to written copy. See https://github.com/inkeep/open-knowledge/blob/main/lint-plugins/ok-rules/README.md#no-raw-error-toastimport type { SkillsListEntry } from '@inkeep/open-knowledge-core/schemas/api';import { useLingui } from '@lingui/react/macro';import { useState } from 'react';diff --git a/packages/app/src/components/SkillFileCreateDialog.tsx b/packages/app/src/components/SkillFileCreateDialog.tsxindex e052f7e83..a1a65e0ba 100644--- a/packages/app/src/components/SkillFileCreateDialog.tsx+++ b/packages/app/src/components/SkillFileCreateDialog.tsx@@ -1,3 +1,4 @@+// oxlint-disable ok/no-raw-error-toast -- pre-rule backlog: toasts here show raw error text; delete this line once the file maps each failure to written copy. See https://github.com/inkeep/open-knowledge/blob/main/lint-plugins/ok-rules/README.md#no-raw-error-toastimport type { SkillsListEntry } from '@inkeep/open-knowledge-core/schemas/api';import { t } from '@lingui/core/macro';import { Trans, useLingui } from '@lingui/react/macro';diff --git a/packages/app/src/components/SkillFileDeleteDialog.tsx b/packages/app/src/components/SkillFileDeleteDialog.tsxindex 18b0e284e..5838bf551 100644--- a/packages/app/src/components/SkillFileDeleteDialog.tsx+++ b/packages/app/src/components/SkillFileDeleteDialog.tsx@@ -1,3 +1,4 @@+// oxlint-disable ok/no-raw-error-toast -- pre-rule backlog: toasts here show raw error text; delete this line once the file maps each failure to written copy. See https://github.com/inkeep/open-knowledge/blob/main/lint-plugins/ok-rules/README.md#no-raw-error-toastimport type { SkillsListEntry } from '@inkeep/open-knowledge-core/schemas/api';import { useLingui } from '@lingui/react/macro';import { useState } from 'react';diff --git a/packages/app/src/components/SkillFileRenameDialog.tsx b/packages/app/src/components/SkillFileRenameDialog.tsxindex e11e76774..147395913 100644--- a/packages/app/src/components/SkillFileRenameDialog.tsx+++ b/packages/app/src/components/SkillFileRenameDialog.tsx@@ -1,3 +1,4 @@+// oxlint-disable ok/no-raw-error-toast -- pre-rule backlog: toasts here show raw error text; delete this line once the file maps each failure to written copy. See https://github.com/inkeep/open-knowledge/blob/main/lint-plugins/ok-rules/README.md#no-raw-error-toastimport type { SkillsListEntry } from '@inkeep/open-knowledge-core/schemas/api';import { Trans, useLingui } from '@lingui/react/macro';import { useEffect, useId, useState } from 'react';diff --git a/packages/app/src/components/SkillForkDialog.tsx b/packages/app/src/components/SkillForkDialog.tsxindex 8917f5380..7f9400cfd 100644--- a/packages/app/src/components/SkillForkDialog.tsx+++ b/packages/app/src/components/SkillForkDialog.tsx@@ -1,3 +1,4 @@+// oxlint-disable ok/no-raw-error-toast -- pre-rule backlog: toasts here show raw error text; delete this line once the file maps each failure to written copy. See https://github.com/inkeep/open-knowledge/blob/main/lint-plugins/ok-rules/README.md#no-raw-error-toastimport { SKILL_NAME_REGEX, type SkillsListEntry } from '@inkeep/open-knowledge-core/schemas/api';import { Trans, useLingui } from '@lingui/react/macro';import { MultiFileDiff } from '@pierre/diffs/react';diff --git a/packages/app/src/components/SkillInstallMenu.tsx b/packages/app/src/components/SkillInstallMenu.tsxindex 5f75898dc..55481dd94 100644--- a/packages/app/src/components/SkillInstallMenu.tsx+++ b/packages/app/src/components/SkillInstallMenu.tsx@@ -1,3 +1,4 @@+// oxlint-disable ok/no-raw-error-toast -- pre-rule backlog: toasts here show raw error text; delete this line once the file maps each failure to written copy. See https://github.com/inkeep/open-knowledge/blob/main/lint-plugins/ok-rules/README.md#no-raw-error-toastimport { EDITOR_LABELS } from '@inkeep/open-knowledge-core/constants/editors';import { AGENTS_SKILLS_ROOT } from '@inkeep/open-knowledge-core/constants/skills';import type { SkillsListEntry } from '@inkeep/open-knowledge-core/schemas/api';diff --git a/packages/app/src/components/SkillPluginBundleDialog.tsx b/packages/app/src/components/SkillPluginBundleDialog.tsxindex 749174078..73b388956 100644--- a/packages/app/src/components/SkillPluginBundleDialog.tsx+++ b/packages/app/src/components/SkillPluginBundleDialog.tsx@@ -1,3 +1,4 @@+// oxlint-disable ok/no-raw-error-toast -- pre-rule backlog: toasts here show raw error text; delete this line once the file maps each failure to written copy. See https://github.com/inkeep/open-knowledge/blob/main/lint-plugins/ok-rules/README.md#no-raw-error-toastimport { EDITOR_LABELS } from '@inkeep/open-knowledge-core/constants/editors';import type { SkillScope } from '@inkeep/open-knowledge-core/schemas/api';import type { SkillTargetEditor } from '@inkeep/open-knowledge-core/skill-targets/schema';diff --git a/packages/app/src/components/SkillTrackInGitDialog.tsx b/packages/app/src/components/SkillTrackInGitDialog.tsxindex 7b7562a5d..8a570a5ef 100644--- a/packages/app/src/components/SkillTrackInGitDialog.tsx+++ b/packages/app/src/components/SkillTrackInGitDialog.tsx@@ -1,3 +1,4 @@+// oxlint-disable ok/no-raw-error-toast -- pre-rule backlog: toasts here show raw error text; delete this line once the file maps each failure to written copy. See https://github.com/inkeep/open-knowledge/blob/main/lint-plugins/ok-rules/README.md#no-raw-error-toastimport { Trans, useLingui } from '@lingui/react/macro';import { useEffect, useState, useSyncExternalStore } from 'react';import { toast } from 'sonner';diff --git a/packages/app/src/components/SkillsSidebarSection.tsx b/packages/app/src/components/SkillsSidebarSection.tsxindex f02387366..58dbfd55b 100644--- a/packages/app/src/components/SkillsSidebarSection.tsx+++ b/packages/app/src/components/SkillsSidebarSection.tsx@@ -1,3 +1,4 @@+// oxlint-disable ok/no-raw-error-toast -- pre-rule backlog: toasts here show raw error text; delete this line once the file maps each failure to written copy. See https://github.com/inkeep/open-knowledge/blob/main/lint-plugins/ok-rules/README.md#no-raw-error-toastimport type { ConfigBinding } from '@inkeep/open-knowledge-core/config/bind-config-doc';import { humanFormat } from '@inkeep/open-knowledge-core/config/errors';import { externalSkillLiveDocName } from '@inkeep/open-knowledge-core/constants/cc1';diff --git a/packages/app/src/components/SkillsTree.tsx b/packages/app/src/components/SkillsTree.tsxindex f3219b26c..2fd789570 100644--- a/packages/app/src/components/SkillsTree.tsx+++ b/packages/app/src/components/SkillsTree.tsx@@ -1,3 +1,4 @@+// oxlint-disable ok/no-raw-error-toast -- pre-rule backlog: toasts here show raw error text; delete this line once the file maps each failure to written copy. See https://github.com/inkeep/open-knowledge/blob/main/lint-plugins/ok-rules/README.md#no-raw-error-toastimport type {SkillMoveFailureOutcome,SkillScope,diff --git a/packages/app/src/components/TemplateDeleteDialog.tsx b/packages/app/src/components/TemplateDeleteDialog.tsxindex 84e893f33..9bb44a211 100644--- a/packages/app/src/components/TemplateDeleteDialog.tsx+++ b/packages/app/src/components/TemplateDeleteDialog.tsx@@ -1,3 +1,4 @@+// oxlint-disable ok/no-raw-error-toast -- pre-rule backlog: toasts here show raw error text; delete this line once the file maps each failure to written copy. See https://github.com/inkeep/open-knowledge/blob/main/lint-plugins/ok-rules/README.md#no-raw-error-toastimport { useLingui } from '@lingui/react/macro';import { useState } from 'react';import { toast } from 'sonner';diff --git a/packages/app/src/components/TemplateForm.tsx b/packages/app/src/components/TemplateForm.tsxindex 0871e08ec..5ae04f350 100644--- a/packages/app/src/components/TemplateForm.tsx+++ b/packages/app/src/components/TemplateForm.tsx@@ -1,3 +1,4 @@+// oxlint-disable ok/no-raw-error-toast -- pre-rule backlog: toasts here show raw error text; delete this line once the file maps each failure to written copy. See https://github.com/inkeep/open-knowledge/blob/main/lint-plugins/ok-rules/README.md#no-raw-error-toastimport {stripFrontmatter,unwrapFrontmatterFences,diff --git a/packages/app/src/components/TerminalGate.tsx b/packages/app/src/components/TerminalGate.tsxindex 27ff66650..99cebf801 100644--- a/packages/app/src/components/TerminalGate.tsx+++ b/packages/app/src/components/TerminalGate.tsx@@ -1,3 +1,4 @@+// oxlint-disable ok/no-raw-error-toast -- pre-rule backlog: toasts here show raw error text; delete this line once the file maps each failure to written copy. See https://github.com/inkeep/open-knowledge/blob/main/lint-plugins/ok-rules/README.md#no-raw-error-toastimport { useLingui } from '@lingui/react/macro';import { Suspense, useEffect, useId, useState } from 'react';import { ErrorBoundary, type FallbackProps } from 'react-error-boundary';diff --git a/packages/app/src/components/acp/ThreadView.tsx b/packages/app/src/components/acp/ThreadView.tsxindex a19e1fcbd..b07003a0a 100644--- a/packages/app/src/components/acp/ThreadView.tsx+++ b/packages/app/src/components/acp/ThreadView.tsx@@ -1,3 +1,4 @@+// oxlint-disable ok/no-raw-error-toast -- pre-rule backlog: toasts here show raw error text; delete this line once the file maps each failure to written copy. See https://github.com/inkeep/open-knowledge/blob/main/lint-plugins/ok-rules/README.md#no-raw-error-toast// oxlint-disable ok/no-physical-direction-utility -- pre-rule backlog — physical margin/padding/inset utilities predate the rule; drain by swapping ml/mr → ms/me, pl/pr → ps/pe, left/right → start/end, then deleting this line. See https://github.com/inkeep/open-knowledge/blob/main/lint-plugins/ok-rules/README.md#no-physical-direction-utilityimport { deriveAgentPosture } from '@inkeep/open-knowledge-core/acp/agent-posture';diff --git a/packages/app/src/components/settings/BuiltInSkillsSection.tsx b/packages/app/src/components/settings/BuiltInSkillsSection.tsxindex 2532021e9..489c2048b 100644--- a/packages/app/src/components/settings/BuiltInSkillsSection.tsx+++ b/packages/app/src/components/settings/BuiltInSkillsSection.tsx@@ -1,3 +1,4 @@+// oxlint-disable ok/no-raw-error-toast -- pre-rule backlog: toasts here show raw error text; delete this line once the file maps each failure to written copy. See https://github.com/inkeep/open-knowledge/blob/main/lint-plugins/ok-rules/README.md#no-raw-error-toastimport { Trans, useLingui } from '@lingui/react/macro';import { useEffect, useState } from 'react';import { toast } from 'sonner';diff --git a/packages/app/src/components/settings/LintingSection.tsx b/packages/app/src/components/settings/LintingSection.tsxindex 872ef1b61..88ba79bdb 100644--- a/packages/app/src/components/settings/LintingSection.tsx+++ b/packages/app/src/components/settings/LintingSection.tsx@@ -1,3 +1,4 @@+// oxlint-disable ok/no-raw-error-toast -- pre-rule backlog: toasts here show raw error text; delete this line once the file maps each failure to written copy. See https://github.com/inkeep/open-knowledge/blob/main/lint-plugins/ok-rules/README.md#no-raw-error-toastimport type { ConfigBinding } from '@inkeep/open-knowledge-core/config/bind-config-doc';import { humanFormat } from '@inkeep/open-knowledge-core/config/errors';import type { ConfigPatch } from '@inkeep/open-knowledge-core/config/schema';diff --git a/packages/app/src/components/settings/OkCliPathRow.tsx b/packages/app/src/components/settings/OkCliPathRow.tsxindex d2d199cf6..c6a2b3ee1 100644--- a/packages/app/src/components/settings/OkCliPathRow.tsx+++ b/packages/app/src/components/settings/OkCliPathRow.tsx@@ -1,3 +1,4 @@+// oxlint-disable ok/no-raw-error-toast -- pre-rule backlog: toasts here show raw error text; delete this line once the file maps each failure to written copy. See https://github.com/inkeep/open-knowledge/blob/main/lint-plugins/ok-rules/README.md#no-raw-error-toastimport { Trans, useLingui } from '@lingui/react/macro';import { Info } from 'lucide-react';import { useEffect, useState } from 'react';diff --git a/packages/app/src/components/settings/OkignoreSection.tsx b/packages/app/src/components/settings/OkignoreSection.tsxindex a8a9d7cd9..b34336304 100644--- a/packages/app/src/components/settings/OkignoreSection.tsx+++ b/packages/app/src/components/settings/OkignoreSection.tsx@@ -1,3 +1,4 @@+// oxlint-disable ok/no-raw-error-toast -- pre-rule backlog: toasts here show raw error text; delete this line once the file maps each failure to written copy. See https://github.com/inkeep/open-knowledge/blob/main/lint-plugins/ok-rules/README.md#no-raw-error-toast// oxlint-disable ok/no-raw-html-interactive-element -- pre-rule backlog — file uses raw <button>/<input>/<textarea> awaiting shadcn migration; tracked at https://github.com/inkeep/open-knowledge/blob/main/lint-plugins/ok-rules/README.md#no-raw-html-interactive-element// oxlint-disable ok/no-physical-direction-utility -- pre-rule backlog — physical margin/padding/inset utilities predate the rule; drain by swapping ml/mr → ms/me, pl/pr → ps/pe, left/right → start/end, then deleting this line. See https://github.com/inkeep/open-knowledge/blob/main/lint-plugins/ok-rules/README.md#no-physical-direction-utilitydiff --git a/packages/app/src/components/settings/ProjectSkillSection.tsx b/packages/app/src/components/settings/ProjectSkillSection.tsxindex 10e1dffda..47dc23a6f 100644--- a/packages/app/src/components/settings/ProjectSkillSection.tsx+++ b/packages/app/src/components/settings/ProjectSkillSection.tsx@@ -1,3 +1,4 @@+// oxlint-disable ok/no-raw-error-toast -- pre-rule backlog: toasts here show raw error text; delete this line once the file maps each failure to written copy. See https://github.com/inkeep/open-knowledge/blob/main/lint-plugins/ok-rules/README.md#no-raw-error-toastimport { Trans, useLingui } from '@lingui/react/macro';import { useState } from 'react';import { toast } from 'sonner';diff --git a/packages/app/src/components/settings/SharingSection.tsx b/packages/app/src/components/settings/SharingSection.tsxindex 7e6b8bfce..c8b415fec 100644--- a/packages/app/src/components/settings/SharingSection.tsx+++ b/packages/app/src/components/settings/SharingSection.tsx@@ -1,3 +1,4 @@+// oxlint-disable ok/no-raw-error-toast -- pre-rule backlog: toasts here show raw error text; delete this line once the file maps each failure to written copy. See https://github.com/inkeep/open-knowledge/blob/main/lint-plugins/ok-rules/README.md#no-raw-error-toast// oxlint-disable ok/no-physical-direction-utility -- pre-rule backlog — physical margin/padding/inset utilities predate the rule; drain by swapping ml/mr → ms/me, pl/pr → ps/pe, left/right → start/end, then deleting this line. See https://github.com/inkeep/open-knowledge/blob/main/lint-plugins/ok-rules/README.md#no-physical-direction-utilityimport { Trans, useLingui } from '@lingui/react/macro';diff --git a/packages/app/src/components/settings/SkillTargetsPicker.tsx b/packages/app/src/components/settings/SkillTargetsPicker.tsxindex 567822402..ad2a1e637 100644--- a/packages/app/src/components/settings/SkillTargetsPicker.tsx+++ b/packages/app/src/components/settings/SkillTargetsPicker.tsx@@ -1,3 +1,4 @@+// oxlint-disable ok/no-raw-error-toast -- pre-rule backlog: toasts here show raw error text; delete this line once the file maps each failure to written copy. See https://github.com/inkeep/open-knowledge/blob/main/lint-plugins/ok-rules/README.md#no-raw-error-toast// oxlint-disable ok/no-physical-direction-utility -- pre-rule backlog — physical margin/padding/inset utilities predate the rule; drain by swapping ml/mr → ms/me, pl/pr → ps/pe, left/right → start/end, then deleting this line. See https://github.com/inkeep/open-knowledge/blob/main/lint-plugins/ok-rules/README.md#no-physical-direction-utilityimport { AGENTS_SKILLS_ROOT } from '@inkeep/open-knowledge-core/constants/skills';diff --git a/packages/app/src/components/settings/TerminalSection.tsx b/packages/app/src/components/settings/TerminalSection.tsxindex 2a3fa858a..b0ec51c52 100644--- a/packages/app/src/components/settings/TerminalSection.tsx+++ b/packages/app/src/components/settings/TerminalSection.tsx@@ -1,3 +1,4 @@+// oxlint-disable ok/no-raw-error-toast -- pre-rule backlog: toasts here show raw error text; delete this line once the file maps each failure to written copy. See https://github.com/inkeep/open-knowledge/blob/main/lint-plugins/ok-rules/README.md#no-raw-error-toastimport { humanFormat } from '@inkeep/open-knowledge-core/config/errors';import { useLingui } from '@lingui/react/macro';import { useEffect, useState } from 'react';diff --git a/packages/app/src/components/skill-actions.tsx b/packages/app/src/components/skill-actions.tsxindex d99ea7396..a08379561 100644--- a/packages/app/src/components/skill-actions.tsx+++ b/packages/app/src/components/skill-actions.tsx@@ -1,3 +1,4 @@+// oxlint-disable ok/no-raw-error-toast -- pre-rule backlog: toasts here show raw error text; delete this line once the file maps each failure to written copy. See https://github.com/inkeep/open-knowledge/blob/main/lint-plugins/ok-rules/README.md#no-raw-error-toastimport { EDITOR_LABELS } from '@inkeep/open-knowledge-core/constants/editors';import type {SkillInstallWarningCode,diff --git a/packages/app/src/editor/components/PropPanel.tsx b/packages/app/src/editor/components/PropPanel.tsxindex 9540c3831..4b88f8104 100644--- a/packages/app/src/editor/components/PropPanel.tsx+++ b/packages/app/src/editor/components/PropPanel.tsx@@ -1,3 +1,4 @@+// oxlint-disable ok/no-raw-error-toast -- pre-rule backlog: toasts here show raw error text; delete this line once the file maps each failure to written copy. See https://github.com/inkeep/open-knowledge/blob/main/lint-plugins/ok-rules/README.md#no-raw-error-toastimport type { PropDef } from '@inkeep/open-knowledge-core/registry/types';import { t } from '@lingui/core/macro';import { Trans } from '@lingui/react/macro';diff --git a/packages/app/src/editor/extensions/InternalLinkPropPanel.tsx b/packages/app/src/editor/extensions/InternalLinkPropPanel.tsxindex 44b5b708c..1209cf7a7 100644--- a/packages/app/src/editor/extensions/InternalLinkPropPanel.tsx+++ b/packages/app/src/editor/extensions/InternalLinkPropPanel.tsx@@ -1,3 +1,4 @@+// oxlint-disable ok/no-raw-error-toast -- pre-rule backlog: toasts here show raw error text; delete this line once the file maps each failure to written copy. See https://github.com/inkeep/open-knowledge/blob/main/lint-plugins/ok-rules/README.md#no-raw-error-toastimport {type ClassifiedLinkTarget,classifyMarkdownHref,diff --git a/packages/app/src/editor/extensions/WikiLinkPropPanel.tsx b/packages/app/src/editor/extensions/WikiLinkPropPanel.tsxindex 6c62e0544..e66708a25 100644--- a/packages/app/src/editor/extensions/WikiLinkPropPanel.tsx+++ b/packages/app/src/editor/extensions/WikiLinkPropPanel.tsx@@ -1,3 +1,4 @@+// oxlint-disable ok/no-raw-error-toast -- pre-rule backlog: toasts here show raw error text; delete this line once the file maps each failure to written copy. See https://github.com/inkeep/open-knowledge/blob/main/lint-plugins/ok-rules/README.md#no-raw-error-toastimport {getWikiLinkText,normalizeNullableString,diff --git a/packages/app/src/hooks/use-create-blank-skill.ts b/packages/app/src/hooks/use-create-blank-skill.tsindex cc7214496..f1f9d00f7 100644--- a/packages/app/src/hooks/use-create-blank-skill.ts+++ b/packages/app/src/hooks/use-create-blank-skill.ts@@ -1,3 +1,4 @@+// oxlint-disable ok/no-raw-error-toast -- pre-rule backlog: toasts here show raw error text; delete this line once the file maps each failure to written copy. See https://github.com/inkeep/open-knowledge/blob/main/lint-plugins/ok-rules/README.md#no-raw-error-toastimport type { SkillScope } from '@inkeep/open-knowledge-core/schemas/api';import { useLingui } from '@lingui/react/macro';import { useState } from 'react';diff --git a/packages/app/src/hooks/use-explore-preview-install.ts b/packages/app/src/hooks/use-explore-preview-install.tsindex dd3416f0e..e5e3ae53d 100644--- a/packages/app/src/hooks/use-explore-preview-install.ts+++ b/packages/app/src/hooks/use-explore-preview-install.ts@@ -1,3 +1,4 @@+// oxlint-disable ok/no-raw-error-toast -- pre-rule backlog: toasts here show raw error text; delete this line once the file maps each failure to written copy. See https://github.com/inkeep/open-knowledge/blob/main/lint-plugins/ok-rules/README.md#no-raw-error-toastimport { AGENTS_SKILLS_ROOT } from '@inkeep/open-knowledge-core/constants/skills';import type { SkillScope } from '@inkeep/open-knowledge-core/schemas/api';import { isSkillInstallTarget } from '@inkeep/open-knowledge-core/skill-targets/schema';diff --git a/packages/app/src/hooks/use-move-skill-scope.ts b/packages/app/src/hooks/use-move-skill-scope.tsindex 464794ae2..94bc15a1b 100644--- a/packages/app/src/hooks/use-move-skill-scope.ts+++ b/packages/app/src/hooks/use-move-skill-scope.ts@@ -1,3 +1,4 @@+// oxlint-disable ok/no-raw-error-toast -- pre-rule backlog: toasts here show raw error text; delete this line once the file maps each failure to written copy. See https://github.com/inkeep/open-knowledge/blob/main/lint-plugins/ok-rules/README.md#no-raw-error-toastimport type { SkillScope } from '@inkeep/open-knowledge-core/schemas/api';import { useLingui } from '@lingui/react/macro';import { toast } from 'sonner';diff --git a/packages/app/src/hooks/use-open-skill.ts b/packages/app/src/hooks/use-open-skill.tsindex 074c453c2..0b3122d36 100644--- a/packages/app/src/hooks/use-open-skill.ts+++ b/packages/app/src/hooks/use-open-skill.ts@@ -1,3 +1,4 @@+// oxlint-disable ok/no-raw-error-toast -- pre-rule backlog: toasts here show raw error text; delete this line once the file maps each failure to written copy. See https://github.com/inkeep/open-knowledge/blob/main/lint-plugins/ok-rules/README.md#no-raw-error-toastimport type { SkillScope } from '@inkeep/open-knowledge-core/schemas/api';import { t } from '@lingui/core/macro';import { toast } from 'sonner';diff --git a/packages/app/src/hooks/use-skill-origin.ts b/packages/app/src/hooks/use-skill-origin.tsindex ac9ba2d33..b3a8bab50 100644--- a/packages/app/src/hooks/use-skill-origin.ts+++ b/packages/app/src/hooks/use-skill-origin.ts@@ -1,3 +1,4 @@+// oxlint-disable ok/no-raw-error-toast -- pre-rule backlog: toasts here show raw error text; delete this line once the file maps each failure to written copy. See https://github.com/inkeep/open-knowledge/blob/main/lint-plugins/ok-rules/README.md#no-raw-error-toastimport type { SkillOrigin, SkillScope } from '@inkeep/open-knowledge-core/schemas/api';import {isLocalSkillSource,diff --git a/packages/app/src/lib/install-bug-report-send-toasts.ts b/packages/app/src/lib/install-bug-report-send-toasts.tsindex 3afc2e23f..ac9625e3a 100644--- a/packages/app/src/lib/install-bug-report-send-toasts.ts+++ b/packages/app/src/lib/install-bug-report-send-toasts.ts@@ -1,3 +1,4 @@+// oxlint-disable ok/no-custom-toast -- pre-rule backlog: this toast.custom awaits a typed toast; delete this line once it is replaced. See https://github.com/inkeep/open-knowledge/blob/main/lint-plugins/ok-rules/README.md#no-custom-toastimport { createElement } from 'react';import { toast } from 'sonner';import {diff --git a/packages/app/src/lib/install-server-drift-listener.ts b/packages/app/src/lib/install-server-drift-listener.tsindex af7c7f302..7df0946af 100644--- a/packages/app/src/lib/install-server-drift-listener.ts+++ b/packages/app/src/lib/install-server-drift-listener.ts@@ -1,3 +1,4 @@+// oxlint-disable ok/no-custom-toast -- pre-rule backlog: this toast.custom awaits a typed toast; delete this line once it is replaced. See https://github.com/inkeep/open-knowledge/blob/main/lint-plugins/ok-rules/README.md#no-custom-toastimport { t } from '@lingui/core/macro';import { createElement } from 'react';import { toast } from 'sonner';diff --git a/packages/app/src/lib/install-stale-tab-reload-prompt.ts b/packages/app/src/lib/install-stale-tab-reload-prompt.tsindex 235cc13ef..5a46e5368 100644--- a/packages/app/src/lib/install-stale-tab-reload-prompt.ts+++ b/packages/app/src/lib/install-stale-tab-reload-prompt.ts@@ -1,3 +1,4 @@+// oxlint-disable ok/no-custom-toast -- pre-rule backlog: this toast.custom awaits a typed toast; delete this line once it is replaced. See https://github.com/inkeep/open-knowledge/blob/main/lint-plugins/ok-rules/README.md#no-custom-toastimport { i18n } from '@lingui/core';import { plural, t } from '@lingui/core/macro';import { createElement } from 'react';