clear the remaining type errors

- DiscordAccount seeded DiscordStatus without its two nullable fields.
- bug-report typed reporter.name as string, but users.name is nullable; and the
  Discord upload wrapped a Buffer directly in a Blob.
- Lucide icons take no `title` prop, so the sync spinner's tooltip moved to a
  wrapping span.
- DesktopView cast its dynamic import to a type that included `| null`.
- dock PUT cast the request body straight to string[]; it now rejects anything
  that is not an array of strings instead of writing it to the database.
- buildZodSchema assembles a mutable record, since z.ZodRawShape is readonly in
  zod v4.
- The dev-server proxy forwards Bun's `string | Buffer` frames through a helper
  that satisfies WebSocket.send without copying.

bunx tsgo is now clean.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
brunorezio
2026-07-25 23:30:20 +01:00
co-authored by Claude Opus 5
parent 0041fcbd47
commit 0d67e2af26
7 changed files with 197 additions and 79 deletions
@@ -25,11 +25,13 @@ type RFBInstance = {
addEventListener: (type: string, listener: (ev: CustomEvent) => void) => void;
};
let rfbModulePromise: Promise<{ default: new (target: HTMLElement, url: string, options?: { credentials?: { password?: string } }) => RFBInstance }> | null = null;
let rfbModulePromise: Promise<{
default: new (target: HTMLElement, url: string, options?: { credentials?: { password?: string } }) => RFBInstance;
}> | null = null;
const loadRFB = () => {
if (!rfbModulePromise) {
rfbModulePromise = import(/* @vite-ignore */ NOVNC_URL) as typeof rfbModulePromise;
rfbModulePromise = import(/* @vite-ignore */ NOVNC_URL) as NonNullable<typeof rfbModulePromise>;
}
return rfbModulePromise!;
};
@@ -116,14 +118,21 @@ export const DesktopView = ({ className, style }: DesktopViewProps) => {
return () => {
disposed = true;
if (rfbRef.current) {
try { rfbRef.current.disconnect(); } catch { /* ignore */ }
try {
rfbRef.current.disconnect();
} catch {
/* ignore */
}
rfbRef.current = null;
}
};
}, [isMounted, client]);
return (
<div className={className} style={{ backgroundColor: '#1a1a2e', overflow: 'hidden', position: 'relative', ...style }}>
<div
className={className}
style={{ backgroundColor: '#1a1a2e', overflow: 'hidden', position: 'relative', ...style }}
>
{status === 'connecting' && (
<div className="absolute inset-0 flex items-center justify-center text-sm text-muted-foreground">
Connecting to desktop...