Commit Graph

98 Commits

Author SHA1 Message Date
bfd1924897 fix: update forms pages to use proper page layout
- Remove EntityView wrapper, use standard space-y-6 pattern
- Full page width instead of container max-w
- Consistent with experiments/participants pages
2026-03-22 18:09:01 -04:00
0827a791c6 fix: standardize MinIO bucket name to hristudio-data
- Update docker-compose to create hristudio-data bucket instead of hristudio
- Fix files.ts, storage.ts, trials.ts, lib/storage/minio.ts to use consistent bucket name
- All now default to hristudio-data matching compose bucket creation
2026-03-22 17:57:34 -04:00
ecf0ab9103 feat: add form templates
- Add isTemplate and templateName fields to forms
- Add listTemplates and createFromTemplate API endpoints
- Add template selection to new form page UI
- Add sample templates and forms to seed script:
  - Informed Consent template
  - Post-Session Survey template
  - Demographics questionnaire template
2026-03-22 17:53:16 -04:00
49e0df016a feat: complete forms system overhaul
- Add new forms table with type (consent/survey/questionnaire)
- Add formResponses table for submissions
- Add forms API router with full CRUD:
  - list, get, create, update, delete
  - setActive, createVersion
  - getResponses, submitResponse
- Add forms list page with card-based UI
- Add form builder with field types (text, textarea, multiple_choice, checkbox, rating, yes_no, date, signature)
- Add form viewer with edit mode and preview
- Add responses viewing with participant info
2026-03-22 17:43:12 -04:00
8529d0ef89 fix: add role-based permissions to forms page
- Hide Generate Default Template and Save Changes buttons for wizard/observer
- Backend already enforces owner/researcher for mutations
- UI now provides cleaner experience for read-only roles
2026-03-22 17:26:52 -04:00
67ad904f62 feat: add role-based permissions and profile page improvements
- Add getMyMemberships API endpoint for user role lookup
- Add getMemberRole helper for profile page display
- Add role-based UI controls to study page (owner/researcher only)
- Add canManage checks to experiments, participants, trials pages
- Hide management actions for wizard/observer roles

Backend already enforces permissions; UI now provides cleaner UX
2026-03-22 17:25:04 -04:00
519e6a2606 ui: complete profile page redesign
- Modern card-based layout with large avatar
- Inline editing for name/email with save/cancel
- Password change dialog with validation
- Security section with danger zone
- Studies access quick link
- Consistent teal theme colors
- Uses PageHeader pattern
- Better loading states
2026-03-22 17:08:50 -04:00
b353ef7c9f ui: dashboard redesign, member management, dark mode fixes
- Simplified dashboard using PageHeader/page-layout
- Fixed dark mode live session banner
- Added AddMemberDialog component for study team management
- Study page now has working member add/remove
- Fixed toast imports to use sonner
2026-03-22 17:05:28 -04:00
cbd31e9aa4 ui: complete dashboard redesign
- New modern dashboard layout with gradient background
- Quick action cards with teal glow effects
- Live trials banner with pulsing indicator
- Stats grid with colored icons
- Study list with bot icons
- Quick links sidebar
- Recent trials section with status badges
- Proper null safety and type checking
2026-03-22 16:55:41 -04:00
37feea8df3 ui: fix dead links in dashboard, update theme to teal/cyan
- Fix broken /trials links to use study-scoped routes
- Fix /wizard/ link to proper wizard URL with studyId
- Add studyId to getLiveTrials API response
- Update theme colors to teal/cyan sci-fi style
- Add custom CSS utilities for glow effects and chamfered corners
- Consolidate docs and archive outdated files
2026-03-22 16:49:20 -04:00
cf3597881b docs: consolidate and archive documentation
- Move 30+ outdated docs to docs/_archive/
- Move obsolete root files to _archive/
- Update README.md (Better Auth, current features)
- Update docs/README.md (new architecture diagram)
- Update docs/quick-reference.md (consolidated)
- Update docs/project-status.md (March 2026 state)
- Update docs/nao6-quick-reference.md (14 actions, Docker services)
- Update docs/implementation-guide.md (Better Auth, git submodule)
- Update docs/proposal.tex (timeline updates)
- Archive errors.txt, plugin_dump.json, test HTML files
2026-03-22 16:38:28 -04:00
Sean O'Connor
add3380307 fix: upgrade to Next.js 16.2.1 and resolve bundling issues
- Fixed client bundle contamination by moving child_process-dependent code
- Created standalone /api/robots/command route for SSH robot commands
- Created plugins router to replace robots.plugins for plugin management
- Added getStudyPlugins procedure to studies router
- Fixed trial.studyId references to trial.experiment.studyId
- Updated WizardInterface to use REST API for robot commands
2026-03-22 01:08:13 -04:00
Sean O'Connor
79bb298756 revert: stay on Next.js 16.1.6 due to bundling issues in 16.2.1 2026-03-22 00:50:29 -04:00
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
4bed537943 Update docs: add March 2026 session summary, NAO6 Docker integration docs, and quick reference updates
- Add MARCH-2026-SESSION.md with complete summary of work done
- Update nao6-quick-reference.md for Docker-based deployment
- Update quick-reference.md with NAO6 Docker integration section
2026-03-21 20:51:08 -04:00
73f70f6550 Add nextStepId conditions to Branch A and B to jump to Story Continues 2026-03-21 20:44:47 -04:00
3fafd61553 Fix onClick handlers passing event object to handleNextStep
The issue was that onClick={onNextStep} passes the click event as the first argument,
making targetIndex an object instead of undefined. This caused handleNextStep to fall
through to linear progression instead of properly checking branching logic.

Fixed by wrapping with arrow function: onClick={() => onNextStep()}
2026-03-21 20:35:54 -04:00
3491bf4463 Add debug logging for branching flow 2026-03-21 20:26:55 -04:00
cc58593891 Update robot-plugins submodule 2026-03-21 20:21:38 -04:00
bbbe397ba8 Various improvements: study forms, participant management, PDF generator, robot integration 2026-03-21 20:21:18 -04:00
bbc34921b5 Fix branching logic and robot action timing
- Remove onCompleted() call after branch selection to prevent count increment
- Add proper duration estimation for speech actions (word count + emotion overhead)
- Add say_with_emotion and wave_goodbye to built-in actions
- Add identifier field to admin.ts plugin creation
2026-03-21 20:15:39 -04:00
8e647c958e Fix seed script to include identifier for system plugins 2026-03-21 20:04:46 -04:00
4e86546311 Add identifier column to plugins table for cleaner plugin lookup
- Added 'identifier' column (unique) for machine-readable plugin ID
- 'name' now used for display name only
- Updated trial-execution to look up by identifier first, then name
- Added migration script for existing databases
2026-03-21 20:03:33 -04:00
e84c794962 Load plugin from local file first (not remote) 2026-03-21 19:32:13 -04:00
70064f487e Fix say_with_emotion with proper NAOqi markup, add transform functions, update seed script for linear branching 2026-03-21 19:29:28 -04:00
91d03a789d Redesign experiment structure and add pending trial
- Both branch choices now jump to Story Continues (convergence point)
- Add Story Continues step with expressive actions
- Add pre-seeded pending trial for immediate testing
- Fix duplicate comments in seed script
- Update step ordering (Conclusion now step6)
2026-03-21 19:15:41 -04:00
31d2173703 Fix branching and add move_arm builtin
- Branching: mark source step as completed when jumping to prevent revisiting
- Add move_arm as builtin for arm control
2026-03-21 19:09:26 -04:00
4a9abf4ff1 Restore builtins for standard ROS actions
- Re-add say_text, walk_forward, walk_backward, turn_left, turn_right, move_head, turn_head as builtins
- These use standard ROS topics (/speech, /cmd_vel, /joint_angles) that work with most robots
- Plugin-specific actions should still be defined in plugin config
2026-03-21 19:04:51 -04:00
487f97c5c2 Update robot-plugins submodule 2026-03-21 18:58:29 -04:00
db147f2294 Update robot-plugins submodule 2026-03-21 18:57:00 -04:00
a705c720fb Make wizard-ros-service robot-agnostic
- Remove NAO-specific hardcoded action handlers
- Remove helper methods (executeMovementAction, executeTurnHead, executeMoveArm)
- Keep only generic emergency_stop as builtin
- All robot-specific actions should be defined in plugin config
2026-03-21 18:55:52 -04:00
e460c1b029 Update robot-plugins submodule 2026-03-21 18:54:18 -04:00
eb0d86f570 Clean up debug logs 2026-03-21 18:52:16 -04:00
e40c37cfd0 Fix branching logic and add combo robot actions
- Fix handleNextStep to handle both string and object options in conditions
- Add say_with_emotion, bow, wave, nod, shake_head, point combo actions
- Update seed data with nextStepId in wizard_wait_for_response options
2026-03-21 18:51:27 -04:00
f8e6fccae3 Update robot-plugins submodule 2026-03-21 18:28:07 -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
18e5aab4a5 feat: Convert robot-plugins to proper git submodule
- Removes nested .git directory from robot-plugins
- Adds robot-plugins as a proper submodule of hristudio
- Points to main branch of soconnor0919/robot-plugins repository
- This enables proper version tracking and updates of robot plugins
2026-03-21 17:57:54 -04:00
c16d0d2565 feat: Add uuid package and its types to dependencies. 2026-03-19 17:40:39 -04:00
c37acad3d2 feat: Enforce study membership access for file uploads and integrate live system statistics. 2026-03-06 00:22:22 -05:00
0051946bde feat: Implement digital signatures for participant consent and introduce study forms management. 2026-03-02 10:51:20 -05:00
61af467cc8 feat: enhance experiment designer action definitions, refactor trial analysis UI, and update video playback controls 2026-03-01 19:00:23 -05:00
60d4fae72c feat: Enhance trial event display with improved formatting and icons, refine trial wizard panels, and update dashboard page layouts. 2026-02-20 00:37:33 -05:00
72971a4b49 feat(analytics): refine timeline visualization and add print support 2026-02-17 21:17:11 -05:00
568d408587 feat: Add guided tour functionality for analytics and wizard components, including new tour steps and triggers. 2026-02-12 00:53:28 -05:00
93de577939 feat: Add a new onboarding tour for participant creation and refactor consent form uploads to use sonner for toasts and XMLHttpRequest for progress tracking. 2026-02-11 23:49:51 -05:00
85b951f742 refactor: restructure study and participant forms into logical sections with separators and enhance EntityForm's layout flexibility for sidebar presence. 2026-02-10 16:31:43 -05:00
a8c868ad3f feat: Implement trial event logging, archiving, experiment soft deletion, and new analytics/event data tables. 2026-02-10 16:14:31 -05:00
0f535f6887 feat: introduce conditional steps and branching logic to the experiment wizard and designer, along with new core and WoZ plugins. 2026-02-10 10:24:09 -05:00
388897c70e feat: Implement collapsible left and right panels with dynamic column spanning, updated styling, and integrated a bottom status bar in the DesignerRoot. 2026-02-03 13:58:47 -05:00