feat(editor): finish the quick/advanced editor handoff
CI / build (push) Has been cancelled

Reopen advanced edits from their saved recipe, seed or take over the quick
editor from them, refresh thumbnails after a save, and add an edited-only
download. Also fixes the Lumenroom library collapsing to slivers on large
shoots and documents deploying both containers on a new host.

🤖 Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
This commit is contained in:
2026-11-21 06:35:24 +00:00
parent ab4a07a40f
commit ebe0c77f7e
35 changed files with 1844 additions and 150 deletions
+14 -2
View File
@@ -24,6 +24,12 @@ export interface BridgeTokenPayload {
kind: "login" | "service";
/** Unix seconds. */
exp: number;
/**
* Browser-facing URL to return to after editing. Captured from the request
* that opened the editor, because the server-to-server origin is not the
* address the user's browser used.
*/
ret?: string;
}
export const BRIDGE_LOGIN_TTL_SECONDS = 10 * 60;
@@ -108,9 +114,15 @@ export function verifyBridgeToken(
return payload as BridgeTokenPayload;
}
/** Where the advanced editor sends a user back to after finishing. */
/**
* Where the advanced editor sends a user back to after finishing. Prefer the
* configured public origin; `NEXTAUTH_URL` is only a fallback because compose
* defaults it to localhost.
*/
export function bridgeReturnUrl(eventId: string): string | null {
const origin = process.env.NEXTAUTH_URL?.trim();
const origin = (
process.env.PUBLIC_ORIGIN?.trim() || process.env.NEXTAUTH_URL?.trim()
);
if (!origin) return null;
return `${origin.replace(/\/+$/, "")}/events/${eventId}`;
}