Q198: connector errors are shown whole and can be copied

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
ZacharyZhang-NYandClaude Opus 5.5 committed 2026-10-09 09:49:42 -04:00
1 parent 9aa9a2aee7
commit 27d4ec3be3
10 files changed
+52 -65

No files matched your search

+1
View File
@@ -15,6 +15,7 @@ export const IPC_CONTRACTS: { [K in InvokedMethod]: z.ZodType<InputOf<K>> } = {
loadSnapshot: noInput,
relaunchApp: noInput,
reportUnsaved: z.strictObject({ unsaved: z.boolean() }),
copyText: z.strictObject({ text: z.string().max(100_000) }),
saveViewState: z.strictObject({ key: z.string().min(1).max(200), value: z.json().refine((value) => JSON.stringify(value).length <= 4_000, "View state value is too large.") }),
runningSessionCount: noInput,
pickDirectory: noInput,
+5 -1
View File
@@ -1,6 +1,6 @@
import { bumpDataVersion, currentDataVersion } from "../services/data-version";
import { createIpcGate } from "./ipc-gate";
import { app, dialog, shell, type BrowserWindow } from "electron";
import { app, dialog, shell, type BrowserWindow, clipboard } from "electron";
import type { DatabaseConnection } from "../database/connection";
import { IPC_CHANNELS } from "../../shared/ipc";
import { fail, ok, type DesktopResult } from "../../shared/result";
@@ -159,6 +159,10 @@ export function registerIpcHandlers(deps: IpcDeps): void {
}
});
handle("completeSetup", (input) => mutate(() => completeSetup(deps.connection.db, input.orgId)));
handle("copyText", (input) => {
clipboard.writeText(input.text);
return ok(null);
});
handle("saveViewState", (input) => {
try {
saveViewState(deps.connection.db, input.key, input.value);