Repository navigation
refactor(web): move findUserById out of lib/user - #6914
Merged
Merged
Conversation
Request authentication only needs findUserById, but importing it from lib/user also loads user creation, account linking and account deletion, with their WorkOS, Impact, MCP gateway, R2 and Discord dependencies. The function moves unchanged to lib/user/find-user-by-id, and importers and Jest mocks point at the new module.
Contributor
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Executive SummaryThe follow-up commit re-adds a Files Reviewed (1 file)
Previous Review Summary (commit e0cf85c)Current summary above is authoritative. Previous snapshots are kept for context only. Previous review (commit e0cf85c)Status: 1 Issue Found | Recommendation: Address before merge Executive SummaryThe Overview
Issue Details (click to expand)CRITICAL
Files Reviewed (45 files)
Reviewed by deepseek-v4.1-flash · Input: 0 · Output: 0 · Cached: 0 Review guidance: REVIEW.md from base branch |
iscekic
approved these changes
Sep 29, 2026
lib/user/server still imports lib/user, so dropping the stub loaded the real module, whose Stripe client throws because the test mocks the env lookup.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
findUserByIdmoves unchanged fromlib/user/index.tstolib/user/find-user-by-id.ts. Request authentication only needs this function, but importing it fromlib/useralso loaded user creation, account linking and account deletion, with their WorkOS, Impact, MCP gateway, R2 and Discord dependencies.The importers and the Jest mocks that stubbed
findUserByIdthrough@/lib/usernow point at the new module.Verification
Tests are left to CI. No manual checks are listed.
Visual Changes
N/A
Reviewer Notes
Split out of #6894, which prepares #6806 (the
ai-gatewayapp and theweb-sharedpackage). The move is verbatim; usegit show --color-movedto confirm it.