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
@@ -20,7 +20,12 @@ export const DiscordAccount = () => {
const client = useClient();
const [isLoading, setIsLoading] = useState(true);
const [connection, setConnection] = useState<DiscordConnection>({ linked: false });
const [botStatus, setBotStatus] = useState<DiscordStatus>({ configured: false, running: false });
const [botStatus, setBotStatus] = useState<DiscordStatus>({
configured: false,
running: false,
serverInvite: null,
botHandle: null,
});
const [pairingCode, setPairingCode] = useState<string | null>(null);
const [isGenerating, setIsGenerating] = useState(false);
@@ -116,12 +121,7 @@ export const DiscordAccount = () => {
<p className="text-xs text-duck-dark/40 dark:text-foreground/40">
You can send direct messages to the bot on Discord and they will be handled by your PI agent.
</p>
<Button
type="button"
variant="outline"
onClick={handleDisconnect}
className="w-full h-11 cursor-pointer"
>
<Button type="button" variant="outline" onClick={handleDisconnect} className="w-full h-11 cursor-pointer">
Unlink Discord
</Button>
</div>
@@ -142,7 +142,13 @@ export const DiscordAccount = () => {
<code className="text-2xl font-mono font-bold tracking-[0.3em] text-duck-dark dark:text-foreground">
{pairingCode}
</code>
<Button type="button" variant="ghost" size="icon" onClick={handleCopyCode} className="cursor-pointer shrink-0">
<Button
type="button"
variant="ghost"
size="icon"
onClick={handleCopyCode}
className="cursor-pointer shrink-0"
>
<Copy className="h-4 w-4" />
</Button>
</div>