Commit graph

368 commits

Author SHA1 Message Date
juancarlos.cavero
101a467c34 feat(reframe): TransNetV2 neural scene detection with PySceneDetect fallback
New scene_detection module: TransNetV2 (small 3D-CNN, runs on 48x27 frames)
as the primary shot-boundary detector — far more accurate than the fixed
ContentDetector threshold on fast motion, flashes and gradual transitions.
Adds a min-scene-length merge (SCENE_MIN_SEC, default 1s) to stop camera-snap
bursts. Legacy PySceneDetect path is preserved untouched as automatic
fallback and selectable via SCENE_ENGINE=pyscenedetect.
2026-07-18 03:49:01 +02:00
juancarlos.cavero
927ee09ffc feat(projects): reopen archived projects from history for further editing
- New projects table (job_id, metadata_r2_key, state JSONB) — created via create_all
- archive_job also uploads the metadata JSON (transcript) and upserts the
  Project row + user_videos (no more duplicate rows on re-archive)
- archive_clip_edit re-archives a clip after each server-side edit, keeping
  only the pristine original + current version per clip in R2
- fix /api/edit: persist new video_url in job result + metadata.json (the
  other edit endpoints already did)
- POST /api/projects/{job_id}/restore re-hydrates R2 files into output/{job_id}
  (per-job lock, temp-dir download, .owner sidecar, idempotent fast path)
- GET /api/projects + PUT /api/projects/{job_id}/state (debounced Remotion
  layer sync from the frontend)
- History tab groups clips by project with a reopen button; App restores
  jobId/results/project state; ResultCard seeds serverVideoFile/activeLayers
  from the restored state and reports changes upward
2026-07-18 03:42:17 +02:00
juancarlos.cavero
abf43c60b7 Merge reframe-speedup: 4.2x faster reframing (quick wins + v2 ffmpeg-native engine + parallel clips) 2026-07-18 03:19:02 +02:00
juancarlos.cavero
dd867f098a feat(reframe): parallel clip processing (CLIP_WORKERS, default 3) with detector lock; fix v2 Fraction fps 2026-07-18 03:08:34 +02:00
juancarlos.cavero
7ff41735a6 feat(reframe): v2 engine — downscaled analysis pass + native ffmpeg render (sendcmd dynamic crop, per-scene segments, stream-copy concat), auto-fallback to v1 2026-07-18 03:05:36 +02:00
juancarlos.cavero
aeca9dbf98 perf(cut): stream-copy remux in passthrough finalize — the cut is already freshly encoded, re-encoding only added time and generation loss 2026-07-18 02:57:39 +02:00
juancarlos.cavero
402e585af7 perf(reframe): downscaled detection (640px), stride 2->4, throttled YOLO fallback, linear resize, quarter-res background blur, per-stage timing 2026-07-18 02:48:53 +02:00
juancarlos.cavero
b9aeaac692 security: never print cookie-file content; scrub credential URLs from worker-appended error log lines 2026-07-18 02:38:16 +02:00
juancarlos.cavero
6430819dac fix(progress): force the 100% transcription line (VAD trims trailing silence) 2026-07-18 02:27:25 +02:00
juancarlos.cavero
8160fc6465 feat(cloud): user-friendly job logs + transcription progress; hide auto profile id in header
- log_view.py: whitelist-based cloud log view — transcription percentage,
  clip counters, errors; no file paths, model names or pipeline internals.
  Self-host (BILLING off) and DEBUG_LOGS keep the full raw output.
- transcribe_backends: emit '🎙️ Transcribing… NN% (Xs)' at 25% steps from
  both parakeet and whisper paths.
- dashboard: profile selector shows connected networks instead of the
  auto-generated os_<hash> id.
2026-07-18 02:20:31 +02:00
juancarlos.cavero
913c461b9b fix(nvenc): force yuv420p output — RGB pipe input made nvenc emit GBR-colorspace H.264 that web players render with swapped colors 2026-07-18 02:00:18 +02:00
juancarlos.cavero
79e1ef707d Merge gpu-migration: Parakeet ASR + NVENC + GPU Dockerfile 2026-07-18 01:48:53 +02:00
juancarlos.cavero
7bdaf8208b docker: pre-create /app/.cache/huggingface so the HF cache volume mounts appuser-writable 2026-07-18 01:40:46 +02:00
juancarlos.cavero
719d444139 feat: GPU pipeline — Parakeet ASR backend with whisper fallback + NVENC encoder helper
- transcribe_backends.py: parakeet-tdt-0.6b-v3 (onnx-asr, VAD+timestamps) as
  selectable backend (TRANSCRIBE_BACKEND), token->word reconstruction keeping
  the leading-space convention, absolute timestamps, native floats, language
  detection via py3langid, and automatic whisper fallback (errors, empty
  output, or language outside parakeet's 25).
- whisper singleton + ASR GPU semaphore (model stays resident; GPU decodes
  serialized; CPU path behavior unchanged).
- ffmpeg_utils.py: central encoder args (FFMPEG_ENCODER=x264|nvenc|auto with
  cached probe + fallback); migrated the 9 hardcoded libx264 call sites.
- saasshorts now honors WHISPER_* config instead of hardcoded base/cpu/int8.
- Dockerfile: ARG GPU=1 installs CUDA user-space libs (cuBLAS/cuDNN9) +
  onnx-asr/onnxruntime-gpu; LD_LIBRARY_PATH + NVIDIA_DRIVER_CAPABILITIES.
- Validated on prod GPU (RTX 4000 Ada, driver 580): 94s clip transcribed in
  6.5s, word timestamps within ~0.1s of whisper, fallback path exercised.
2026-07-18 01:38:11 +02:00
juancarlos.cavero
5bcdda38f6 cloud: also hide AI model/provider, cost and pipeline internals from client logs
Extend the sensitive-log filter so cloud users don't see which model powers
the app (gemini/flash), token/cost lines, or the 2-pass window/shortlist
internals — just clean transcription + clip progress. DEBUG_LOGS still shows
everything locally.
2026-07-18 00:36:14 +02:00
juancarlos.cavero
29fed21495 cloud: hide ingest plumbing (proxy/download/cookies) from client logs
Cloud users don't need the YouTube downloader internals, proxy usage or
cookie handling in the System Logs panel — just analysis + rendering
progress. Drop lines matching those keywords from the client view even when
emoji-prefixed. DEBUG_LOGS (local dev) still shows everything.
2026-07-18 00:34:24 +02:00
juancarlos.cavero
afe320ca04 ui: aspect-ratio glyph + use hint under each output-format option
Each format button now shows a little rectangle in its real proportion
(tall 9:16, square 1:1, wide 16:9) plus what it's for, so the choice reads
at a glance instead of needing a hover tooltip.
2026-07-17 22:41:55 +02:00
juancarlos.cavero
b3e44643cc feat: 2-pass Gemini clip pipeline (score windows -> detail shortlist)
Replaces the single whole-transcript call with windowed scoring + focused
detailing (from PR #50), for better clip coverage on long videos:

- clip_selection.py: build_transcript_windows (sentence-aligned overlapping
  windows), snap_clip_to_words (cuts land in pauses, not mid-word), model
  price table.
- gemini_worker.py: score/detail prompts + Pydantic response schemas + robust
  JSON parsing and multi-stage cost accounting (incl. thinking tokens).
- main.py get_viral_clips: pass 1 scores windows in batches and shortlists the
  top (scaled by duration); pass 2 details the shortlist; every clip is snapped
  to word boundaries. Cost is summed across both passes. Falls back to
  whole-video conversion (caller) if it yields nothing.
- 13 clip_selection unit tests (63 total).
2026-07-17 22:32:04 +02:00
juancarlos.cavero
861134f8fe feat: quality gate, output-format selection, whisper small (PR #50)
- Quality gate: quality_probe.py probes the offered YouTube resolution before
  starting; /api/process returns needs_confirmation below QUALITY_GATE_MIN_HEIGHT
  (720p) and the UI shows a 'process anyway' modal that resends with
  force_low_quality. Fail-open on any probe error. URL sources only.
- Output format: MediaInput picks 9:16 / 1:1 / 16:9; threaded through
  /api/process -> main.py --format. render_clip() routes vertical/square to the
  reframe (aspect_ratio param) and horizontal to a passthrough (keep landscape).
- Whisper: main pipeline defaults to 'small' (better non-English) with
  vad_filter + no cross-segment conditioning; env-overridable.
2026-07-17 22:21:46 +02:00
juancarlos.cavero
9693543f2d fix(ui): fall back to backend source preview on recovery when media is missing
The save-side fix only helps sessions saved after it; already-recovered
sessions (and any older ones) had processingMedia=null and stayed null. On
recovery, when no media is stored, point the preview at /api/source/{jobId}
so existing upload sessions get their original-video preview back too.
2026-07-17 22:01:10 +02:00
juancarlos.cavero
97378ab102 feat: restore original-video preview for uploads after reload
The live-analysis preview above the logs used a blob URL for uploaded
sources, which dies on page reload — so a recovered upload session showed an
empty preview (YouTube-URL jobs were fine, their URL persists).

- GET /api/source/{job_id} streams the job's original upload (FileResponse,
  unauthenticated like /videos, UUID job_id is the capability).
- ProcessingAnimation: new 'server' media type -> <video src> from the backend.
- Session save persists uploads as { type:'server', payload:/api/source/id }
  instead of null, so the recovered preview plays the real source.
2026-07-17 21:57:37 +02:00
juancarlos.cavero
ff38a9d7ee fix(cloud): compare job owner as string so recovered jobs pass the guard
User.id is a uuid.UUID; live jobs store that object, but jobs recovered from
the .owner sidecar store its string form. 'UUID(x) != str(x)' is always True,
so after a restart the legitimate owner got 404 on /status, /transcript,
/hook etc. for their own recovered jobs. Compare str(user.id) != str(owner).
2026-07-17 21:46:23 +02:00
juancarlos.cavero
be3dc665a3 feat(logs): DEBUG_LOGS env to force full pipeline logs under billing
83b0649 hides raw yt-dlp/ffmpeg/debug spew from paid users. In local dev you
run with BILLING_ENABLED to test paid features but still want the debug logs,
so DEBUG_LOGS=true bypasses the filter regardless of billing.
2026-07-17 21:36:21 +02:00
juancarlos.cavero
880efb4d12 fix(gemini): force JSON output + rescue parse for clip detection
gemini-3.1-flash-lite intermittently emitted JSON the manual fence-strip +
json.loads couldn't parse ('Expecting value: line 16 ...'), so clip
detection failed and fell back to whole-video conversion -> 'No metadata
file generated'. Request response_mime_type=application/json so the API
guarantees a JSON body, and on a parse miss rescue the outermost {...}
object before giving up.
2026-07-17 21:26:04 +02:00
juancarlos.cavero
80a3e2fda7 fix(ui): pristine preview base + sync cards after bulk subtitles
Two bugs, one root cause: the Remotion preview base was derived from
clip.video_url, which mutates to subtitled_/hook_ files after server burns.

- originalVideoUrl now strips subtitled_<ts>_/hook_ prefixes back to the
  pristine clip, so the preview composites new subtitles over the clean clip
  instead of stacking them on an already-subtitled file (the 'subtitles on
  top for a few seconds' double-render when opening another clip's modal).
- currentVideoUrl inits to the actual current file (not pristine), and a new
  effect adopts clip.video_url when an external refresh (bulk apply from
  another card) changes it — so every card shows its freshly subtitled video
  instead of a stale/blank one.
2026-07-17 21:26:04 +02:00
juancarlos.cavero
7162667bbf fix(ui): keep subtitle preview playable for karaoke presets
Selecting a karaoke preset swapped the playable RemotionPreview for a static
CSS mock, so the preview video couldn't be played/scrubbed. Instead, teach
the Remotion Subtitles component to render dim (baseOpacity, opaque scaled
color like the backend) and uppercase, and pass those from the modal — so
the preview stays a live, playable Player that also reflects the karaoke
look. Drops the static mock.
2026-07-17 21:26:04 +02:00
juancarlos.cavero
f683dc66df refactor(ui): move 'apply to all' into the subtitle modal itself
Instead of a separate header button + bulk modal, the per-clip subtitle
editor now has a second action: 'apply this style to all N clips'. Same
bulk loop, but you pick and preview the look on the clip you opened, then
one click applies it everywhere (progress shown inline). Header keeps only
'download all' + 'schedule week'.
2026-07-17 21:26:04 +02:00
juancarlos.cavero
82dcd0af89 feat: bulk subtitles + download-all-as-ZIP (PR #50 block 2)
- app.py: GET /api/jobs/{job_id}/download-all bundles every clip's current
  file into one ZIP (stored, not deflated — already compressed), streamed
  via FileResponse and cleaned up after send; owner-guarded in cloud mode.
- App.jsx: 'subtitle all' opens the SubtitleModal in bulk mode and applies
  the chosen style to every clip sequentially (progress in the button),
  then refreshes results so each card shows its subtitled file. 'download
  all' fetches the ZIP and triggers a browser download.
- SubtitleModal: bulkCount prop -> 'apply to N clips' label.
2026-07-17 21:26:04 +02:00
juancarlos.cavero
d94e126e0f feat(hook): 6 hook styles (classic/dark/yellow/red/outline/outline+)
Previously a single look (white card, black serif). Add a style parameter
end to end:
- hooks.py: HOOK_STYLES table drives box fill / text color / optional text
  outline; box-less 'outline' styles (caption/MrBeast look) use a stroke.
- HookOverlay.tsx: same looks mirrored so the Remotion preview and the
  browser burn match the server FFmpeg output.
- HookModal: visual style picker; ResultCard + /api/hook thread style through.

Note on t=0: the server FFmpeg burn shows the hook immediately (enable
between t,0,dur); the Remotion preview fades it in per the entrance
animation, so at exactly 0:00 the preview is mid-fade (pick 'None' for an
instant-on preview).
2026-07-17 21:26:04 +02:00
juancarlos.cavero
8e8c6afaae fix(ui): edit chaining — server-burned subtitles/hooks survive later edits
The browser (Remotion) render paths compose layers over the ORIGINAL clip,
so running Auto Edit (or a hook / classic subs) after a server-side karaoke
burn silently produced a video without the subtitles.

- Track serverVideoFile: the latest file that exists on the server; all
  server operations chain from it (blob: preview URLs never leak into
  input_filename anymore).
- When the server file has burned-in content (subtitled_/hook_), skip the
  browser-render paths and chain through the server FFmpeg endpoints, which
  preserve the file and enable caption-safe Auto-Edit.
- After a karaoke burn, re-compose any remaining browser layers (hook/
  effects) over the new server file instead of dropping them.
2026-07-17 21:26:04 +02:00
juancarlos.cavero
eb7504f00a fix(ui): live karaoke preview (dim/uppercase/effects) + no local Gemini key required for managed users
- SubtitleModal: karaoke styles burn server-side, so the Remotion preview
  never reflected dim/uppercase/effect controls. Show a CSS mock that
  mirrors the burned ASS look (opaque scaled dim color, uppercase, glow/
  pop/box on the active word) using the clip's own first words.
- ResultCard: auto-edit demanded a local Gemini key even for managed
  (paid) users whose key resolves server-side; only BYOK needs one now.
2026-07-17 21:26:04 +02:00
juancarlos.cavero
459c062851 feat: recover completed jobs from disk on startup (issue #46/#18)
Jobs live in memory, so any backend restart orphaned finished clips still on
disk (frontend keeps the job_id but every endpoint 404s with Job not found).
On startup, rebuild a completed record per output dir with a metadata JSON.
Managed jobs persist their owner in a .owner sidecar so the multi-tenant
guard survives the restart; BYOK jobs recover unowned, as before.
2026-07-17 21:26:04 +02:00
juancarlos.cavero
6a3b1e58ab fix(cost): price table with prefix match instead of hardcoded 2.5-flash rates 2026-07-17 21:26:04 +02:00
juancarlos.cavero
e5d88999cf config: default all Gemini text/analysis calls to gemini-3.1-flash-lite
Unified via GEMINI_MODEL (plus per-task overrides GEMINI_MODEL_EDITOR /
GEMINI_MODEL_SAAS / GEMINI_MODEL_THUMBNAIL). The thumbnail image model stays
on gemini-3.1-flash-image-preview — flash-lite cannot generate images.
2026-07-17 21:26:04 +02:00
juancarlos.cavero
61954a7f28 fix(auth): OAUTH_REDIRECT_URI override for local login through the Vite proxy
Through the dev proxy the backend sees Host backend:8000, so url_for built
redirect_uri=https://backend:8000/... which Google rejects with 400
invalid_request. Allow pinning the callback via OAUTH_REDIRECT_URI; the
Host-derived behavior is unchanged when the variable is unset (prod).
2026-07-17 21:26:04 +02:00
juancarlos.cavero
40151e1708 feat: karaoke subtitles, deterministic Auto-Edit v2, emoji hooks, retries (PR #50 block 1)
Ported from PR #50 (Themegaindex) onto current main, adapted to the
billing-mode app.py and the Lumen dashboard:

- subtitles.py: karaoke ASS generation (word-level highlight, glow/pop/box
  effects, dim/uppercase), whisper continuation-word merging, env-configurable
  whisper model, ASS/font input sanitization, faststart
- editor.py + edit_builder.py: Auto-Edit v2 — Gemini returns a structured
  edit-decision list and the FFmpeg filter is built deterministically with
  hard caps (no raw filter strings from the LLM), 2s dry-run + one
  self-repair round, caption-safe mode blocks zooms on subtitled clips
- app.py: /api/subtitle karaoke fields + re-subtitle prefix walk-back
  (fixes double subtitles), has_captions passed to Auto-Edit
- hooks.py: emoji rendering (color-emoji font with strip fallback),
  char-level hard wrap, unique temp PNGs, ffmpeg timeouts; keeps the
  duration/enable overlay from b1113d7
- translate.py: exponential-backoff retries for transient ElevenLabs errors
- dashboard: 11 caption presets in SubtitleModal; karaoke burns server-side
- tests/: 50 pytest tests; .github/workflows/ci.yml runs them + fe build

Encode settings kept at CRF 18 (medium for post-process steps) per f791a74.

Co-authored-by: Themegaindex <themegaindex@users.noreply.github.com>
2026-07-17 21:26:04 +02:00
juancarlos.cavero
83b0649b20 fix(cloud): precise proxy alerts, scrub proxy creds from logs, hide system logs from paid users
- alerts.py: _looks_like_proxy_error only matches genuine proxy/download-stage
  signatures (407, ProxyError, tunnel failed, 402/out-of-credits) instead of a
  bare "proxy"/"credit"/"balance" substring — a job that failed in processing (or
  a video titled with one of those words) no longer fires a false "out of credits"
  alert. Real proxy failures still alert.
- app.py: _scrub_secrets() masks user:pass in any URL before a subprocess line is
  printed or stored, so the residential proxy URL yt-dlp echoes in verbose debug
  never lands in the server console or job log.
- app.py: _visible_logs() — cloud (BILLING on) surfaces only the pipeline's own
  friendly progress lines (emoji-prefixed + worker start/finish) and hides the raw
  yt-dlp/ffmpeg/debug spew from paying users; self-host still shows everything.
2026-07-17 21:23:54 +02:00
juancarlos.cavero
f791a74807 quality: CRF 18 on all encode steps, Lanczos resampling on resizes
Re-encode passes (vertical render, hooks, subtitles, AI effects) ran at
CRF 22-23, stacking visible generation loss across steps (#13). Bump all
of them to CRF 18; post-process steps also move preset fast -> medium
(the realtime reframe pipe keeps fast to not slow the streamed encode).
OpenCV resizes now use INTER_LANCZOS4 for sharper scaling.

Adopted from PR #14 review (the good parts, rebased on current main).
2026-07-17 17:11:14 +02:00
juancarlos.cavero
b1113d7a3f fix: Gemini retry with backoff, hook overlay duration, configurable job retention
- Retry transient Gemini errors (503/429/500) up to 3x with exponential
  backoff before falling back to whole-video conversion (#27)
- Thread the hook Duration slider through /api/hook down to the FFmpeg
  overlay enable filter so hooks can end after N seconds (#2)
- Read JOB_RETENTION_SECONDS from env so self-hosters can keep finished
  jobs longer than the 1h default (#46)
2026-07-17 16:47:38 +02:00
juancarlos.cavero
3bc51e1f7c ui: remove 9:16 crop-window overlay from pricing demo 2026-07-17 12:43:25 +02:00
juancarlos.cavero
e50db9f607 seo: keyword-rich h1, clipping/clipper terms, FAQ schema sync + remove crop overlay
- H1 restores 'free open source ai clip generator' keeping the redesign tagline
- Hero subline recovers the AI UGC keyword and adds 'online'
- Add clipping/clipper mentions (top non-brand GSC queries with zero on-page presence)
- FAQ schema: dual pricing answer synced with visible FAQ, dateModified bumped
- Remove orange crop-window overlay from the Smart Crop demo
2026-07-17 12:25:14 +02:00
victormanuel.caverogracia
7ea3ad5308 seo: keyword phrase back in hero subline
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-17 10:14:24 +02:00
victormanuel.caverogracia
aa676a7814 redesign: Lumen design system across landing, app and paywall
Full visual rework to a single locked design system (design.md, Lumen
Night Foundry): dark violet canvas, molten-brass accent, Instrument
Serif + Geist + JetBrains Mono, hairline cards, zero gradients and
zero glassmorphism.

- Landing: marquee hero with real vertical demo clip in an instrument
  bezel, meter strip, smart-crop before/after section, cloud-first
  copy (start free trial primary, self-host demoted to secondary),
  text density cut, SEO surfaces preserved (single h1, ids, FAQs,
  comparison table intact)
- App: workbench restyle — sidebar with mono ordinals, unified header,
  settings/ai-agent/dashboard views on shared tokens; per-feature
  gradient identities retired
- Shared UI: new Modal, SegmentedControl and StepIndicator replace 8+
  duplicated modal shells and 2 wizard steppers
- New pricing paywall page (#/pricing): demo proof strip, honest trust
  signals, billing FAQ
- Routing: app logo links back to landing via #landing without
  resetting the skip-landing preference
- Responsive: audited and fixed at 320/375/414/768px (no horizontal
  scroll, tables scroll in-container, single-line CTAs)
- ScheduleWeekModal translated to English; ProcessingAnimation comment
  noise removed

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-17 02:41:22 +02:00
victormanuel.caverogracia
54bb701b83 fix(social): stop 'Error fetching User Profiles' alert loop
fetchUserProfiles used a raw fetch without the bearer token, so managed
users always got a 400 from /api/social/user, and the mount effect fired
an alert() on every page load. Use apiFetch (auth attached), let managed
users fetch without a local key, and make the background auto-fetch
silent — only the manual Settings button alerts now.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-17 00:24:16 +02:00
victormanuel.caverogracia
0311b6143d fix(social): let managed users post without BYOK Upload-Post key
The Post modal and Schedule Week modal gated on the localStorage
uploadPostKey, so managed (plan/trial) users saw 'Configure API Keys'
even though the backend already posts with the server-side managed key.
Gate on isManaged || BYOK keys instead.

Fixes #3559

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-17 00:10:47 +02:00
juancarlos.cavero
687412a860 fix(cloud): preview falls back to durable R2 url when local clip is gone
After a reload the ephemeral /videos/ files may be cleaned up (1h retention),
leaving black previews on the results screen. For managed users, fetch the job's
clips from /api/history (now includes clip_index) and fall back to the durable R2
url on video error (with a retry for the load race).
2026-07-16 19:44:26 +02:00
juancarlos.cavero
3f6ee50b86 feat(cloud): hide Gemini token cost from managed users on the results screen 2026-07-16 19:39:43 +02:00
juancarlos.cavero
0373c8571b feat(social): keep scheduling calendar + add Content calendar button in dashboard
- revert showCalendar to true (calendar stays available in the white-label page)
- add a 'Content calendar' button (opens the Upload-Post page in a new tab) so users
  can consult/manage scheduled posts from the dashboard
2026-07-16 19:26:51 +02:00
juancarlos.cavero
8ce4d3c5d9 feat(social): auto-connect socials after paying, same-tab redirect, hide calendar
- social connect JWT: showCalendar=false (hide scheduling calendar in white-label page)
- connect opens in the same tab so the page's redirectUrl returns the user to the app
- after the first plan activation (checkout success), take the user straight to the
  social-connect flow; guarded so top-up checkouts don't re-trigger it
2026-07-16 19:24:49 +02:00
juancarlos.cavero
1f7ec835db fix(oauth): force https on Google redirect_uri for public hosts
Proxy-header trust alone wasn't enough in prod (still built http://). Build the
redirect_uri and force https for non-localhost hosts so it matches the registered
Google URI regardless of how the reverse proxy forwards the scheme.
2026-07-16 18:52:39 +02:00