Commit Graph

18 Commits

Author SHA1 Message Date
0cdb2e96b1 FRE-588: Complete tRPC/Clerk integration with database schema updates
- Updated router.ts middleware for Clerk authentication
- Modified test contexts to use clerkUserId
- Added team tables to test schema
- Updated WaitlistForm and waitlist page
- Created src/server/trpc/ parallel structure

All 258 tests pass. Ready for Security Reviewer.
2026-04-28 16:13:55 -04:00
55552fd79b FRE-4414: Unblock and update ShieldAI status
- Cleared cancelled blocker FRE-4428
- Updated to in_progress
- Added status comment documenting delegated work to CTO/CMO

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-04-28 14:25:30 -04:00
Paperclip Agent
408d94f731 FRE-622: Wire analytics services to tRPC API layer with comprehensive router
Create analytics-router.ts with ~30 tRPC endpoints for KPI management, alert
rules, scheduled reports, cohort analysis, and NPS survey integration.
Register router in index.ts under 'analytics' namespace. Fix pre-existing
bugs in service files: snake_case to camelCase conversion, missing non-null
assertions, and incorrect DB access patterns.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-04-27 22:55:15 -04:00
9583c06473 FRE-696 Wire up API client to mail/contact/attachment endpoints
- Create ProtonMail API client (src/lib/mail/protonmail-client.ts)
- Add tRPC mail router with 8 endpoints (server/trpc/mail-router.ts)
- Wire mail router into appRouter (server/trpc/index.ts)
- Add module exports (src/lib/mail/index.ts)

Endpoints:
- mail.messages, mail.message, mail.send
- mail.contact, mail.contacts, mail.addContact
- mail.attachment, mail.attachmentDownload

Router uses Zod validation and includes placeholders for ProtonMail API calls.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-04-27 14:35:07 -04:00
bef1d7f829 FRE-750: Break infinite recovery cascade, reassign FRE-620 to Founding Engineer
- Cancelled 700+ runaway recovery issues (FRE-767 through FRE-2000+)
- Reassigned FRE-620 (analytics setup) from error-state Senior Engineer to available Founding Engineer
- Removed blocker chain that was preventing FRE-620 from progressing
- Documented system bug: recovery system creates recovery issues for cancelled recovery issues

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-04-27 01:22:34 -04:00
0ff6c74871 FRE-709: Document duplicate recovery wake - FRE-635 already recovered via FRE-708 2026-04-26 20:23:14 -04:00
ec215ae426 Implement waitlist landing page FRE-656
- Add waitlist tRPC router with signup mutation and count query
- Add referral code generation and tracking
- Register waitlist router in app router
- Add useWaitlistSignup, useWaitlistCount, useReferralCount hooks
- Update landing page with email capture form, live waitlist counter, referral sharing
- Add waitlist and referral CSS styles

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-04-26 07:57:29 -04:00
67c3881dcf Add waitlist schema for marketing (FRE-635)
- Created waitlist_signups and waitlist_events tables
- Supports email, name, source tracking, and status management
- Enables VIP supporter list for Product Hunt launch
- Migration 0002_chemical_shocker.sql generated
- Fixed brand color in product-hunt-assets-brief.md (#518ac8)
2026-04-26 06:21:20 -04:00
754fce269f fix: implement critical security remediation for authentication and authorization
- Add Clerk token verification to tRPC context (server/trpc/index.ts)
- Remove client-controlled authorId/reviewedById from revisions router
- Require JWT_SECRET environment variable, remove hardcoded fallback
- Add table name validation to prevent SQL injection in backup logic
- Fix TRPCContext type to use better-sqlite3 instead of LibSQL
- Update revisions router tests to use proper tRPC v11+ API
- Add resetInMemoryState function for test isolation

Security fixes address:
- Critical: Authentication bypass via missing token verification
- Critical: User impersonation via client-controlled IDs
- High: Insecure WebSocket defaults with hardcoded secrets
- High: SQL injection vulnerability in backup logic

All tests passing (24/24).
2026-04-25 08:24:45 -04:00
7c684a42cc FRE-600: Fix code review blockers
- Consolidated duplicate UndoManagers to single instance
- Fixed connection promise to only resolve on 'connected' status
- Fixed WebSocketProvider import (WebsocketProvider)
- Added proper doc.destroy() cleanup
- Renamed isPresenceInitialized property to avoid conflict

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-04-25 00:08:01 -04:00
65b552bb08 Complete FRE-574 technical specifications
- Marked FRE-574 as done
- Unblocked FRE-588 (Database schema)
- All 12 child issues assigned to Founding Engineer
- 6/13 MVP subtasks complete (46%)

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-04-24 18:07:15 -04:00
0ba20e5b31 FRE-592: Fix 4 code review blockers (security + correctness)
- Add project ownership verification to relationship mutations (createRelationship,
  updateRelationship, deleteRelationship, getRelationshipsForCharacter)
- Add project ownership verification to getCharacter and getScene
- Add ownership check to projectProcedure middleware (hasProjectAccess)
- Fix searchCharacters filter combination bug (accumulate conditions instead of
  overwriting)

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-04-24 10:13:49 -04:00
79d153f75a FRE-592: Fix remaining code review blockers and add tests
- Replace in-memory Maps with Drizzle ORM queries for all CRUD operations
- Use integer IDs matching SQLite schema instead of UUIDs
- Fix scriptId to projectId inconsistency in characters and scenes
- Add project ownership verification on all mutation procedures
- Make getCharacter/getScene procedures protected (not public)
- Proper JWT-based userId validation via context
- Add cascade delete for characters/relationships/scenes on project deletion
- Add verifyProjectOwnership helper for authorization checks
- Rewrite tests with createCallerFactory pattern for tRPC v11
- Use better-sqlite3 for in-memory test database
- Split vitest config into separate file from vite config
2026-04-24 08:31:42 -04:00
4d9b4ecf2a FRE-592: Address code review feedback
Fixes from review:
- Add DB-level unique constraint on character relationships
- Fix character stats to use sceneCharacters join table instead of text matching
- Add loading/error states to CharacterList, CharacterSearch, CharacterStatsPanel
- Add delete confirmation dialogs to CharacterProfile and CharacterRelationships

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-04-24 07:23:50 -04:00
ccbf3039d9 FRE-594: Implement revision tracking and version history system
Add complete revision tracking system for scripts with:
- Database schema for revisions and revision_changes tables
- Diff engine with color-coded change types (addition/deletion/modification)
- tRPC router with 14 endpoints (create/list/compare/rollback/branch/merge)
- SolidJS components: RevisionTimeline, DiffViewer, RevisionReview
- Unit tests for diff engine and router

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-04-24 05:54:06 -04:00
FrenoCorp Agent
8dc4827597 FRE-592: Implement character database and relationship mapping
Add full character management system with enriched profiles (bio, traits,
arcs, motivation, conflict, secrets), relationship mapping between
characters with types and strength, character search/filter by role and
arc type, and character statistics (scene count, dialogue, screen time).

Includes database schema, tRPC router procedures, SolidJS components,
API hooks, and unit tests.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-04-24 02:24:31 -04:00
1c74a082e5 FRE-603: Add Presence & Visibility Layer UI components
- CollaboratorList: Display connected users with presence state
- RemoteCursorOverlay: Render remote cursors in editor
- EditingIndicator: Show active editors and their context
- Component index for clean imports
- Tests for CollaboratorList

Architecture:
- Polling-based presence updates (100ms for cursors, 500ms for editors)
- Color-coded user indicators
- Line:column cursor positioning
- Selection highlighting with transparency

Files:
- src/components/collaboration/collaborator-list.tsx
- src/components/collaboration/remote-cursor-overlay.tsx
- src/components/collaboration/editing-indicator.tsx
- src/components/collaboration/index.ts
- src/components/collaboration/collaborator-list.test.tsx

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-04-23 06:37:21 -04:00
ef1b15c9ea FRE-600: Implement Phase 1 WebSocket + Yjs CRDT foundation
- Create TypeScript and Vite configuration for SolidJS
- Implement Yjs document structure for screenplay collaboration
- Build WebSocket connection manager with exponential backoff reconnection
- Create CRDT document manager with undo/redo support
- Set up WebSocket sync server with JWT authentication
- Add SolidJS reactive bindings for Yjs shared types
- Build collaborative editor component
- Write unit tests for CRDT operations
- Document implementation in analysis/fre600_websocket_foundation.md

Architecture: Yjs chosen over Automerge for better ecosystem and
Tauri compatibility. WebSocket for sync, WebRTC for video.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-04-22 23:08:27 -04:00