Skip to content

Fix bugs and refactor unused QuizActor messages#113

Merged
bitbacchus merged 4 commits into
ecomod-code:crash-fixfrom
bitbacchus:crash-fix
May 13, 2026
Merged

Fix bugs and refactor unused QuizActor messages#113
bitbacchus merged 4 commits into
ecomod-code:crash-fixfrom
bitbacchus:crash-fix

Conversation

@bitbacchus
Copy link
Copy Markdown
Member

No description provided.

claude and others added 4 commits May 12, 2026 14:26
- BUG-1/2: Fix Maybe.map(async fn) anti-pattern in QuizActor (AddTeacher,
  AddStudent, RemoveUser, Delete) and CurrentQuizActor (AddComment) — async
  callbacks inside Maybe.map were fire-and-forget; DB writes and subscriber
  notifications never completed
- BUG-3: Move JSON.parse inside try/catch in QuizActor Import handler to
  prevent actor crash on malformed upload
- BUG-4: Add rehype-sanitize to markdown pipeline in useRendered.ts to close
  XSS via dangerouslySetInnerHTML; KaTeX class/style attributes preserved
- BUG-5: Require API_KEYS env var at startup; remove hardcoded fallback key
- BUG-6: Replace arbitrary 500ms setTimeout for quiz state change with a
  ref-gated effect that fires once quiz data has loaded
- BUG-7: Replace full-collection scan in UserStore.Find with a MongoDB query
- BUG-8: Guard quiz.teachers array access in Delete; use .includes() instead
  of index 0 for owner check
- BUG-9: Roll back orphaned question in AddQuestion when target group is not
  found
- BUG-10: Add .catch() to session-role update promise chain in UserStore
- IMP-1: Replace console.log/error/warn in UserStore and CurrentQuizActor
  with structured logger calls or remove debug-only output
- IMP-7: Replace `any` filter type in unstallQuestionsInDb with Filter<Question>
- IMP-8: Fix error serialization in afterEntityWasCached (JSON.stringify on
  Error produces {}; use e.stack instead)

https://claude.ai/code/session_017qKGaxUoFSuyp6zpKhhYda
These three QuizActorMessages were defined in models and handled in
QuizActor but never called from the frontend. The frontend uses the
generic Update message for all teacher/student list modifications.
Dead code identified during codebase analysis.

https://claude.ai/code/session_017qKGaxUoFSuyp6zpKhhYda
Fix bugs and refactor unused QuizActor messages
@bitbacchus bitbacchus merged commit f95c68a into ecomod-code:crash-fix May 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants