Commit Graph

17 Commits

Author SHA1 Message Date
Sean O'Connor
a5762ec935 feat: implement WebSocket for real-time trial updates
- Create standalone WebSocket server (ws-server.ts) on port 3001 using Bun
- Add ws_connections table to track active connections in database
- Create global WebSocket manager that persists across component unmounts
- Fix useWebSocket hook to prevent infinite re-renders and use refs
- Fix TrialForm Select components with proper default values
- Add trialId to WebSocket URL for server-side tracking
- Update package.json with dev:ws script for separate WS server
2026-03-22 00:48:43 -04:00
Sean O'Connor
20d6d3de1a migrate: replace NextAuth.js with Better Auth
- Install better-auth and @better-auth/drizzle-adapter
- Create src/lib/auth.ts with Better Auth configuration using bcrypt
- Update database schema: change auth table IDs from uuid to text
- Update route handler from /api/auth/[...nextauth] to /api/auth/[...all]
- Update tRPC context and middleware for Better Auth session handling
- Update client components to use Better Auth APIs (signIn, signOut)
- Update seed script with text-based IDs and correct account schema
- Fix type errors in wizard components (robotId, optional chaining)
- Fix API paths: api.robots.initialize -> api.robots.plugins.initialize
- Update auth router to use text IDs for Better Auth compatibility

Note: Auth tables were reset - users will need to re-register.
2026-03-21 23:03:55 -04:00
bbbe397ba8 Various improvements: study forms, participant management, PDF generator, robot integration 2026-03-21 20:21:18 -04:00
3f87588fea fix: Update ROS topics and robot configuration
ROS Topic Fixes:
- wizard-ros-service.ts: Use correct ROS topics (/cmd_vel, /joint_angles, /speech)
- ros-bridge.ts: Update subscriptions to match naoqi_driver topics
- Fixes action execution (movement, speech, head control)

Robot Configuration:
- robots.ts: Use NAO_IP/NAO_ROBOT_IP env vars instead of hardcoded 'nao.local'
- robots.ts: Use NAO_PASSWORD env var for SSH authentication
- Improves Docker integration with NAO6

Wizard Interface:
- useWizardRos.ts: Enhanced wizard interface for robot control
- WizardInterface.tsx: Updated wizard controls
- Add comprehensive event listeners for robot actions
2026-03-21 17:58:29 -04:00
0051946bde feat: Implement digital signatures for participant consent and introduce study forms management. 2026-03-02 10:51:20 -05:00
72971a4b49 feat(analytics): refine timeline visualization and add print support 2026-02-17 21:17:11 -05:00
d83c02759a feat: Introduce dedicated participant, experiment, and trial detail/edit pages, enable MinIO, and refactor dashboard navigation. 2025-12-11 20:04:52 -05:00
5be4ff0372 refactor: simplify wizard UI by removing trial monitoring and robot control tabs, and streamlining monitoring panel props. 2025-11-20 14:52:08 -05:00
1108f4d25d fix: prevent auto-connect from getting stuck in connecting state
Added comment to clarify that connection state updates happen via
event handlers. Auto-connect now properly handles failures without
retrying automatically, allowing users to manually connect if needed.
2025-11-19 22:56:24 -05:00
18fa6bff5f fix: migrate wizard from polling to WebSocket and fix duplicate ROS connections
- Removed non-functional trial WebSocket (no server exists)
- Kept ROS WebSocket for robot control via useWizardRos
- Fixed duplicate ROS connections by passing connection as props
- WizardMonitoringPanel now receives ROS connection from parent
- Trial status uses reliable tRPC polling (5-15s intervals)
- Updated connection badges to show 'ROS Connected/Offline'
- Added loading overlay with fade-in to designer
- Fixed hash computation to include parameter values
- Fixed incremental hash caching for parameter changes

Fixes:
- WebSocket connection errors eliminated
- Connect button now works properly
- No more conflicting duplicate connections
- Accurate connection status display
2025-11-19 22:51:38 -05:00
86b5ed80c4 nao6 ros2 integration updated 2025-11-13 10:58:45 -05:00
816b2b9e31 Add ROS2 bridge 2025-10-16 16:08:49 -04:00
4acbec6288 Pre-conf work 2025 2025-09-02 08:25:41 -04:00
779c639465 chore: clean diagnostics and prepare for designer structural refactor (stub legacy useActiveStudy) 2025-08-11 16:38:29 -04:00
1ac8296ab7 chore: commit full workspace changes (designer modularization, diagnostics fixes, docs updates, seed script cleanup) 2025-08-08 00:37:35 -04:00
3a443d1727 Begin plugins system 2025-08-07 01:12:58 -04:00
433c1c4517 docs: consolidate and restructure documentation architecture
- Remove outdated root-level documentation files
  - Delete IMPLEMENTATION_STATUS.md, WORK_IN_PROGRESS.md, UI_IMPROVEMENTS_SUMMARY.md, CLAUDE.md

- Reorganize documentation into docs/ folder
  - Move UNIFIED_EDITOR_EXPERIENCES.md → docs/unified-editor-experiences.md
  - Move DATATABLE_MIGRATION_PROGRESS.md → docs/datatable-migration-progress.md
  - Move SEED_SCRIPT_README.md → docs/seed-script-readme.md

- Create comprehensive new documentation
  - Add docs/implementation-status.md with production readiness assessment
  - Add docs/work-in-progress.md with active development tracking
  - Add docs/development-achievements.md consolidating all major accomplishments

- Update documentation hub
  - Enhance docs/README.md with complete 13-document structure
  - Organize into logical categories: Core, Status, Achievements
  - Provide clear navigation and purpose for each document

Features:
- 73% code reduction achievement through unified editor experiences
- Complete DataTable migration with enterprise features
- Comprehensive seed database with realistic research scenarios
- Production-ready status with 100% backend, 95% frontend completion
- Clean documentation architecture supporting future development

Breaking Changes: None - documentation restructuring only
Migration: Documentation moved to docs/ folder, no code changes required
2025-08-04 23:54:47 -04:00