Skip to content

feat: post-logout redirect override + keep LoQE engine warm across previews#238

Merged
v-kessler merged 3 commits into
mainfrom
feat/post-logout-override-and-loqe-grace
Jul 12, 2026
Merged

feat: post-logout redirect override + keep LoQE engine warm across previews#238
v-kessler merged 3 commits into
mainfrom
feat/post-logout-override-and-loqe-grace

Conversation

@v-kessler

@v-kessler v-kessler commented Jul 12, 2026

Copy link
Copy Markdown
Contributor

What

Two independent changes:

  1. Post-logout redirect override (auth.ts) — adds optional idpPostLogoutRedirectUrl (absolute override) and idpDisablePostLogoutRedirect (omit the post_logout_redirect_uri param entirely) to AuthConfig, for IdPs whose allowed post-logout URLs are fixed or which reject any non-registered URL. Precedence: disable > absolute URL > derived default. Fully backward compatible (both fields optional).

  2. Keep LoQE DuckDB engine warm (LoQEEngine.ts) — release() now defers teardown by a 60s grace period instead of destroying the engine the instant refCount hits 0; acquire() cancels the pending teardown. Preview open/close and table-to-table navigation reuse the warm engine, so the DuckDB WASM is not re-fetched/re-instantiated and extensions are not reloaded each time. forceDestroy()/resetDatabase() still tear down immediately.

BEGIN_COMMIT_OVERRIDE
feat(ui): add post-logout redirect override and disable options to auth config
fix(ui): keep LoQE DuckDB engine warm across previews with grace-period teardown
END_COMMIT_OVERRIDE

Summary by CodeRabbit

  • New Features

    • Added configurable post-logout redirect behavior, including custom redirect URLs or the option to disable redirects.
  • Bug Fixes

    • Improved preview lifecycle handling so the query engine remains available during brief transitions, reducing unnecessary reinitialization and improving responsiveness.

v-kessler and others added 2 commits July 12, 2026 15:42
Adds optional idpPostLogoutRedirectUrl (absolute override) and
idpDisablePostLogoutRedirect (omit the parameter entirely) to AuthConfig
for IdPs whose allowed post-logout URLs are fixed or which reject any
non-registered URL. Precedence: disable > absolute URL > derived default.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
release() now defers teardown by a 60s grace period instead of destroying
the engine the moment refCount hits 0; acquire() cancels the pending
teardown. Preview open/close and table-to-table navigation reuse the warm
engine, so the WASM is not re-fetched/re-instantiated and extensions are
not reloaded each time. forceDestroy()/resetDatabase() still tear down now.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jul 12, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@v-kessler, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 33 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: cebe9532-6b9a-4004-b4fd-01bbd98eac97

📥 Commits

Reviewing files that changed from the base of the PR and between a94a58d and 7aecf50.

📒 Files selected for processing (1)
  • src/plugins/auth.ts

Walkthrough

The PR defers LoQE engine destruction across brief idle periods and adds configurable OIDC post-logout redirect behavior through new authentication settings.

Changes

LoQE engine lifecycle

Layer / File(s) Summary
Deferred engine teardown
src/composables/loqe/LoQEEngine.ts
The engine cancels pending teardown when reacquired, schedules destruction after an idle grace period when unused, and clears the timer during forced destruction.

OIDC logout redirect configuration

Layer / File(s) Summary
Post-logout redirect resolution
src/plugins/auth.ts
AuthConfig supports disabling or overriding the logout redirect URI, and createAuth passes the resolved value to UserManagerSettings.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Poem

I’m a bunny with a timer to spare,
Keeping warm engines hopping with care.
A logout path may bend or disappear,
With redirects chosen crystal-clear.
Hop, hop—configuration blooms this year!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes both main changes: logout redirect override and keeping the LoQE engine warm across previews.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/post-logout-override-and-loqe-grace

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/plugins/auth.ts`:
- Around line 39-42: Update the Cognito branch in signOut to honor
config.idpDisablePostLogoutRedirect instead of falling back to
window.location.origin when post_logout_redirect_uri is undefined. Preserve the
existing logout_uri behavior when the flag is false, and ensure the disabled
state omits or otherwise avoids supplying a redirect URI.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: c9ca0ca2-0195-4786-a41e-c937fc18fb7e

📥 Commits

Reviewing files that changed from the base of the PR and between 762773a and a94a58d.

📒 Files selected for processing (2)
  • src/composables/loqe/LoQEEngine.ts
  • src/plugins/auth.ts

Comment thread src/plugins/auth.ts
The Cognito branch fell back to window.location.origin for logout_uri when
post_logout_redirect_uri was undefined, so idpDisablePostLogoutRedirect was
ignored for Cognito. Now omit logout_uri entirely when the redirect is
disabled; keep the existing behavior (client_id + logout_uri) otherwise.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@v-kessler
v-kessler merged commit 4750067 into main Jul 12, 2026
5 checks passed
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.

1 participant