Skip to content

fix: DS indexing now runs with correct context#2367

Open
liamdebeasi wants to merge 12 commits into
mainfrom
ld/creds-request
Open

fix: DS indexing now runs with correct context#2367
liamdebeasi wants to merge 12 commits into
mainfrom
ld/creds-request

Conversation

@liamdebeasi

@liamdebeasi liamdebeasi commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

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

@github-actions

github-actions Bot commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Here's a visual recap of what changed:

Visual recap

Open the full interactive recap

@liamdebeasi
liamdebeasi marked this pull request as ready for review July 23, 2026 19:53
builder-io-integration[bot]

This comment was marked as outdated.

@liamdebeasi

Copy link
Copy Markdown
Contributor Author

@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.
@builder-io-integration

Copy link
Copy Markdown
Contributor

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:

  • Design template (templates/design/server/handlers/index-design-system-with-builder.ts): was passing the stale sign-in-time session.orgId into the new request context and to the proxy write. Now resolves the live active org via getOrgContext (falling back to session.orgId if org tables aren't available).
  • Slides template (templates/slides/server/handlers/index-design-system-with-builder.ts): was passing session.orgId as preResolvedContext, which bypassed resolveSlidesRequestAuthContext's live-org resolution entirely. Removed that argument so it resolves live.

Updated both handler tests accordingly, verified all tests in both templates pass (unrelated Playwright browser-launch failures in design are pre-existing environment issues, not caused by this change), replied to both PR review threads explaining the fix, and pushed the commit.



🟢 Fixed both org-resolution bugs flagged in PR review, tests pass, replies posted, and changes pushed.


Edit in Builder  Preview

@builder-io-integration builder-io-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Base automatically changed from ld/debugger to main July 23, 2026 21:06
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.

3 participants