Commit Graph

25 Commits

Author SHA1 Message Date
Alexej Wolff 68c2b129fa Major refactor: security, performance, and code organization
Security:
- DeepSeek API moved to server-side proxy with rate limiting (20 req/min)
- Whitelist validation for all POST/PUT routes
- Cookie security (secure, sameSite, httpOnly in production)
- Input validation for messages, tokens, temperature
- Sanitized hasOwnProperty to prevent prototype pollution

Performance:
- Lazy loading for chat messages (sliding window of 20)
- Streaming response throttling (50ms batches)
- Scroll optimization (only scroll on new messages)
- AbortController fix for stop button

Code organization:
- GamePage refactored from ~1170 to ~750 lines
- New hooks: useGameSession, useStreamingResponse, useCharacterDetection, useLazyMessages
- New components: MessageList, ChatInput, SessionSelector, CharacterPanel
- Fixed ESLint errors

Features:
- OOC mode button for direct AI instructions
- Message versions (aiResponse) now persist to DB
- playerId saved in sessions
2026-05-05 23:41:52 +02:00
Alexej Wolff bbefa114f8 feat: Show character avatar in chat - split view on desktop, background on mobile 2026-05-05 00:48:39 +02:00
Alexej Wolff f52c86b049 Increase mobile chat font size 2026-02-11 21:38:51 +01:00
Alexej Wolff 1a3f9af9c3 Add session delete button 2026-02-11 21:12:58 +01:00
Alexej Wolff c1fe0eaeba Fix mobile font size and enable smart keyboard features 2026-02-11 21:05:16 +01:00
Alexej Wolff c01f4780c9 feat: increase mobile chat font to 19px 2026-02-11 17:13:19 +01:00
Alexej Wolff d2b95d4ca4 fix: remove delete buttons from story cards and game page 2026-02-11 16:56:50 +01:00
Alexej Wolff 764c8c9e9f feat: move delete session to settings with confirmation, increase mobile font 2026-02-11 16:51:17 +01:00
Alexej Wolff f0e8a947ba fix: save AI response before switching versions, increase mobile font to 17px 2026-02-11 16:48:46 +01:00
Alexej Wolff 2933225d59 feat: increase chat font size for mobile 2026-02-11 16:45:39 +01:00
Alexej Wolff dccc94132e feat: sync AI responses with message versions, increase font size 2026-02-11 16:43:44 +01:00
Alexej Wolff a0827caabd feat: message editing with version history and AI regeneration 2026-02-11 16:34:25 +01:00
Alexej Wolff dae3c88020 feat: add scroll to bottom button and auto-scroll on session load 2026-02-11 16:29:50 +01:00
Alexej Wolff e5c7bd1b0d fix: attempt to disable iOS QuickType bar with form wrapper 2026-02-11 16:26:15 +01:00
Alexej Wolff da98a7f6b1 fix: fixed header on desktop PWA with flex-shrink and min-height 2026-02-11 16:22:46 +01:00
Alexej Wolff a0f1d9709b fix: disable zoom in game chat with touch-action 2026-02-11 16:20:34 +01:00
Alexej Wolff ae595ca8ce design: floating input container like DeepSeek 2026-02-11 16:18:50 +01:00
Alexej Wolff 0383a568fe fix: fixed header, disable zoom, prevent overscroll bounce 2026-02-11 16:13:44 +01:00
Alexej Wolff f6e2ef5dcb design: mobile-friendly DeepSeek-style chat UI 2026-02-11 16:08:54 +01:00
Alexej Wolff 863cf7f6b6 feat: auto-resize textarea, persistent token stats 2026-02-11 02:05:28 +01:00
Alexej Wolff 8c6d6591f8 feat: multiple sessions per story with streaming AI responses 2026-02-11 01:47:24 +01:00
Alexej Wolff 161ecd661e feat: streaming AI responses with stop button 2026-02-11 01:30:56 +01:00
Alexej Wolff f452dc0674 fix: iOS safe area for game page 2026-02-11 01:14:14 +01:00
Alexej Wolff 2bfe8d95cc fix: input alignment 2026-02-11 01:07:43 +01:00
Alexej Wolff cc003ffbd5 first commit 2026-02-11 00:15:59 +01:00