Skip to content

refactor: retire Express handler bridge for learning actions - #77

Merged
sarthakagrawal927 merged 1 commit into
mainfrom
refactor/retire-express-bridge
Aug 16, 2026
Merged

refactor: retire Express handler bridge for learning actions#77
sarthakagrawal927 merged 1 commit into
mainfrom
refactor/retire-express-bridge

Conversation

@sarthakagrawal927

Copy link
Copy Markdown
Member

Summary

Production learning requests no longer go through an Express (req, res) adapter. dispatchLearningAction now calls Fetch-style handlers directly.

  • Converted every handlers/*.mjs default export to handler({ request, user, json }).
  • Deleted shared/api/express-bridge.mjs.
  • api/learning.mjs is a leftover local dispatcher that wraps the same dispatchLearningAction path (no second Express handler stack).
  • /api/learning?action= URLs, PUBLIC_NO_AUTH, and dispatcher 401s are unchanged. Auth-required handlers use user from ctx; public actions (gaps, critique, understanding, tag) do not re-run Express requireAuth.
  • Wars routes, Socratic prompts, and deploy are untouched.

Closes #76

Converted handlers

  • activity
  • artifacts
  • concepts
  • critique
  • drills
  • elo
  • feynman
  • gaps
  • imported-reviews
  • notes (learning-notes.mjs)
  • profile
  • projects
  • review-mastery
  • tag
  • understanding
  • weekly

Checks

  • pnpm test — 479 passed
  • pnpm typecheck
  • pnpm docs:validate

Convert handlers/*.mjs to Fetch-style ({ request, user, json }), call them
directly from dispatchLearningAction, and delete express-bridge.mjs.
api/learning.mjs is now a thin wrapper around the same dispatcher.

Closes #76
@sarthakagrawal927
sarthakagrawal927 merged commit 7841100 into main Aug 16, 2026
3 checks passed
@sarthakagrawal927
sarthakagrawal927 deleted the refactor/retire-express-bridge branch August 16, 2026 22:53
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.

Retire the Express handler bridge for learning actions

1 participant