Commit Graph

6 Commits

Author SHA1 Message Date
Thomas Hallock bda5bc6c0e fix: prevent database imports from being bundled into client code
**Problem:**
- player-ownership.ts imported drizzle-orm and @/db at top level
- When RoomMemoryPairsProvider imported client-safe utilities, Webpack bundled ALL imports including database code
- This caused hydration error: "The 'original' argument must be of type Function"
- Node.js util.promisify was being called in browser context

**Solution:**
1. Created player-ownership.client.ts with ONLY client-safe utilities
   - No database imports
   - Safe to import from 'use client' components
   - Contains: buildPlayerOwnershipFromRoomData(), buildPlayerMetadata(), helper functions

2. Updated player-ownership.ts to re-export client utilities and add server-only functions
   - Re-exports everything from .client.ts
   - Adds buildPlayerOwnershipMap() (async, database-backed)
   - Safe to import from server components/API routes

3. Updated RoomMemoryPairsProvider to import from .client.ts

**Result:**
- No more hydration errors on /arcade/room
- Client bundle doesn't include database code
- Server code can still use both client and server utilities

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-10 11:40:46 -05:00
Thomas Hallock 31df87d3fc fix: restore workspace dependencies and fix TypeScript errors
- Restore @soroban/core and @soroban/client dependencies in apps/web
- Correct workspace configuration to include all existing packages
- Disable problematic example-server.ts to fix TypeScript build
- Update Dockerfile to copy all required package.json files

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-27 09:08:46 -05:00
Thomas Hallock 39526eb496 fix: correct workspace configuration and remove non-existent packages
- Fix pnpm-workspace.yaml to use packages/* pattern
- Remove references to non-existent @soroban/core and @soroban/client packages
- Update Dockerfile to only copy existing package.json files
- Clean up dependencies after workspace changes

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-27 09:06:57 -05:00
Thomas Hallock 77dc4702d4 feat: optimize showNumbers layout with three modes and visual improvements
- Add showNumbers prop with 'never', 'always', 'toggleable' modes for layout optimization
- Fix SVG height calculation to eliminate extra space when showNumbers='never'
- Reposition NumberFlow components within SVG bounds to prevent overflow
- Add colored borders to size comparison story for visual clarity
- Restore keyboard editing functionality for NumberFlow components
- Maintain NumberFlow requirement while ensuring proper layout constraints

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-18 16:32:03 -05:00
Thomas Hallock 7da0123a84 feat: create @soroban/templates package with dual Node.js/Python interface
- Add dedicated templates package in packages/templates/
- Provide clean exports for both Node.js/TypeScript and Python
- Include flashcards.typ and single-card.typ templates
- Add webpack-safe dynamic path resolution
- Configure PNPM workspace integration
- Support both direct paths and getTemplatePath() function

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-16 09:38:08 -05:00
Thomas Hallock 62e941e1c0 feat: set up monorepo structure with pnpm workspaces and Turborepo
- Configure pnpm workspace for apps/* and packages/*
- Add Turborepo for build optimization and caching
- Set up TypeScript, ESLint, and Prettier at monorepo level
- Include development scripts and package management

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-14 08:01:36 -05:00