fix: DS indexing now runs with correct context#2367
Conversation
This reverts commit 6d78115.
|
Here's a visual recap of what changed: Open the full interactive recap |
|
@builderio-bot look at latest PR feedback and fix anything you agree with. Be skeptical. Reply to every comment (directly on the comment thread of each comment) if you fixed it or not and why |
…ntext - Slides: stop passing session.orgId as preResolvedContext, which bypassed resolveSlidesRequestAuthContext's live org-switch resolution. - Design: resolve the live org via getOrgContext (with a session.orgId fallback) before establishing the request context and persisting the proxy record, matching the pattern used elsewhere in the app.
|
Both review comments addressed and replied to, changes committed and pushed to the PR branch. Summary: Both flagged issues were real bugs and I fixed them:
Updated both handler tests accordingly, verified all tests in both templates pass (unrelated Playwright browser-launch failures in ⠀ |
There was a problem hiding this comment.
Builder reviewed your changes — looks good ✅
Review Details
Code Review Summary
This incremental review covers the latest 120-line update to the Design and Slides Builder-backed design-system indexing handlers. The previously reported organization-scoping issues are fixed: Design now resolves the live organization with getOrgContext before establishing AsyncLocalStorage, and Slides now allows withSlidesRequestContext to perform its normal live-org resolution instead of supplying stale session context. Both the Builder indexing request and the proxy persistence remain inside the request context, preserving credential and tenant scoping.
The current changes are consistent with the existing handler behavior and error paths. Targeted tests reported by the review pass, and no new confirmed actionable bugs were found. One review agent raised concerns about pre-existing differences in Slides upload validation and the new test's mocking boundary; these are not regressions caused by the current functional change and were not submitted as findings.
Risk assessment: Standard risk (server-side request context, authentication, and organization scoping).
🧪 Browser testing: Skipped — PR only modifies backend/server handlers and tests, with no user-facing browser UI impact.

Previously the AsyncLocalStorage was not defined when making these requests. As a result, Builder credentials were not being resolved, and the request failed.