Skip to content

fix(chat): clear 4 pre-existing TypeScript errors so tsc -b is green - #277

Open
sebbsssss wants to merge 1 commit into
stagingfrom
claude/mystifying-swartz-ea01e5
Open

fix(chat): clear 4 pre-existing TypeScript errors so tsc -b is green#277
sebbsssss wants to merge 1 commit into
stagingfrom
claude/mystifying-swartz-ea01e5

Conversation

@sebbsssss

Copy link
Copy Markdown
Owner

What

Clears the 4 pre-existing TypeScript errors in apps/chat so pnpm -C apps/chat exec tsc -b (and the build script, tsc -b && vite build) is green again.

These errors did not block production: the Docker deploy builds chat with vite build only (esbuild, ignores type errors). But they made the local build script red and masked real drift.

Changes

Removed apps/chat/src/components/PersistentMemoryModal.tsx (dead code). Fixes errors 1-3. The persistent-memory feature (PR #81) was reverted in 7d26a7f5, deleting the server route (persistent-memory.routes.ts), the PersistentMemory type, and the listPersistentMemories/deletePersistentMemory ChatAPI methods. Commit 87b728c8 later re-added only the modal component as a new file (the old unanchored chat/ gitignore glob had been swallowing it under apps/chat/). It was imported nowhere and called a deleted backend route, so removing the orphan is correct rather than reviving reverted functionality.

Reconciled @solana/kit RPC types in main.tsx. Fixes error 4. createSolanaRpc(url: string) widens to a union that includes Rpc<SolanaRpcApiForAllClusters> (no requestAirdrop), while Privy's solana.rpcs config field is typed Rpc<SolanaRpcApi>. Chat and Privy 3.18 resolve the same @solana/kit@6.5.0, so I assert the precise type Privy expects at the boundary. The cast is honest: at runtime createSolanaRpc produces a full RPC; only TS is conservative about the non-literal string URL.

No runtime behavior change

Type-only edits plus dead-code removal.

Verification

  • pnpm -C apps/chat exec tsc -b --force exits 0
  • pnpm -C apps/chat build (tsc -b && vite build) builds clean
  • pnpm -C apps/chat exec vitest run 2/2 passing
  • pnpm-lock.yaml untouched

🤖 Generated with Claude Code

Remove orphaned PersistentMemoryModal.tsx and reconcile the @solana/kit
RPC types in main.tsx. Both are type-only / dead-code changes with no
runtime behavior change; the deploy already builds chat with vite only,
so production was unaffected.

PersistentMemoryModal: the persistent-memory feature (PR #81) was
reverted in 7d26a7f, deleting the server route, the PersistentMemory
type, and the listPersistentMemories/deletePersistentMemory ChatAPI
methods. Commit 87b728c re-added only the modal component as a new
file. It was imported nowhere and called a deleted backend route, so it
was dead code; remove it rather than revive reverted functionality.

main.tsx: createSolanaRpc(url: string) widens to a union including
Rpc<SolanaRpcApiForAllClusters> (no requestAirdrop), while Privy's
solana.rpcs config field is typed Rpc<SolanaRpcApi>. Both resolve the
same @solana/kit 6.5.0, so assert the precise type at the boundary.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@vercel

vercel Bot commented Jun 18, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
cluude Ready Ready Preview, Comment Jun 18, 2026 3:44pm

Request Review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant