The backend's upload_url embeds the request host; behind the dev proxy that is the Docker-internal backend:8000, which the browser cannot resolve, so the ZIP PUT died as a bare 'Failed to fetch' and aborted the job. Use /api/uploads/<id> via the app's own base instead, and label handoff failures clearly so they are not mistaken for a process error.
The per-clip download button now fetches a new
GET /api/jobs/{job_id}/clip/{clip_index}/download endpoint that packages the
saved clip as a ZIP shaped like a folder named after the clip title:
<title>/clip.mp4
<title>/description.txt
Titles are sanitized into a single filesystem-safe path segment, and the
archive is named <title>.zip. File resolution mirrors download-all (live
record, then metadata URL, then canonical derived name). The frontend keeps
its streaming progress UI and derives the filename from Content-Disposition.
Reviewed-on: #7
Co-authored-by: pedro-bento <mail@pbento.pt>
Co-committed-by: pedro-bento <mail@pbento.pt>
- Remove the watermark feature end to end (watermarked.py, apply_watermark/
mark_delivery/watermark_filter, WATERMARK env, assets/) and its tests; self-host
delivery is now unconditionally clean.
- Delete the unused cli/ package and .github/workflows/publish-cli.yml.
- Delete docs/ (compliance) and design.md; drop the dangling references in the
legal page and the design-token/ui comments.
- Consolidate requirements: requirements.txt (runtime) + requirements-test.txt
(unit + E2E); remove requirements-e2e.txt and requirements-ml-e2e.txt and
point both CI jobs at the single test file. Add libgl1 to the unit job
(scenedetect -> opencv-python links libGL).
Verified in the CI container: unit 701 passed; API E2E 209; pipeline E2E 127;
Playwright 19 passed / 1 skipped.
Reviewed-on: #6
Co-authored-by: pedro-bento <mail@pbento.pt>
Co-committed-by: pedro-bento <mail@pbento.pt>
- Postiz publishing now selects exact channels by integration id; identifier
mapping fixes instagram-standalone (was 'not connected') and multiple channels
per network (was first-only); settings.__type uses the real identifier
- Publish modal lists all channels, DD/MM/YYYY + HH:MM scheduling with validation,
surfaces backend errors and a success confirmation
- Remove AWS/S3 clip backup and ElevenLabs voice dubbing (server, UI, tests, docs)
- Boot straight into the app; remove the landing/launch screen
- CI backend-tests runs in a python:3.11-slim container (Forgejo has no 3.11 cache)
Reviewed-on: #1
Co-authored-by: pedro-bento <mail@pbento.pt>
Co-committed-by: pedro-bento <mail@pbento.pt>
- Postiz URL is now required (no built-in host); a key can never be sent to a default instance
- /api/postiz/scheduled normalizes scheduled_date and widens the default window
- Disabled channels are refused for posting; frontend excludes them from connected platforms
- 4xx instead of 500 on missing clip URL / bad schedule date; Postiz error bodies truncated
- Add tests/test_postiz.py (24 tests); fix remaining cloud-removal test drift
- CLI defaults to localhost:8000; n8n workflows fixed against the real routes
- Remove dead media-token auth code, stale copy (download_url/402) and doc drift
- Replace Upload-Post with a self-hosted Postiz client (postiz.py) and /api/postiz/* endpoints
- Remove AI Shorts, UGC gallery, AI Agent tab, Autopilot, MCP/agent layer, and their UIs
- Fix YouTube Studio thumbnail generation (google-genai >=2 Interactions API) and blocking download
- Make the video upload size cap configurable/unlimited (MAX_FILE_SIZE_MB, default 0)
- Update SEO/marketing/docs to the single-product self-hosted reality; lint+build green
/api/subtitle takes a named preset (subtitles.CAPTION_PRESETS, the same
looks the dashboard offers); fields sent alongside it override that part.
The MCP add_subtitles tool exposes preset, effect, reveal, one_word, shadow
and border_width, and gives a resized line the budget that keeps it on one
line, as the dashboard does. A test keeps the server and dashboard preset
ids in sync.
The subtitle modal had no size control: the font size was pinned at 24
while clips ship at 44, so re-applying captions from the modal halved them.
It now opens on the shipped look and offers S/M/L/XL, with fewer characters
per line as the text grows so a line still fits the 9:16 frame.
New in generate_ass: a "highlight" effect (opaque box behind the active
word via a second BorderStyle 3 style, black text on light boxes), "reveal"
(words appear as they are spoken), a drop shadow, and an outline of 0 when
a shadow carries the contrast. /api/subtitle takes reveal, shadow,
max_chars (1 = one word at a time) and max_duration.
Presets added: Default, Hormozi, Pill, Lime box, One word, Clean. Anton and
Montserrat are selectable, and the preview uses the burn's scale and line
budget so what plays in the modal is what gets burned.
Every file the pipeline and the clip editor write is now clean. On the free
plan the served file is a wm_<final> copy with the mark burned in
(main.mark_delivery, last step after captions; app._deliver for the editor
endpoints, decided from the caller's plan), and both twins go to R2. An
upgrade re-points the user's library at the clean twins from the Stripe
webhook (cloud.videos.unmark_user_library): no render, no source video,
and the dashboard chases the job result until no served URL carries wm_.
Before, the mark rode the reframe encode, so every derivative inherited it
and the upgrade modal's "upgrade to remove the watermark" was false for the
clips already made. The first cancellation for "clip quality" (29-sep) was a
user who paid 15 minutes after their first job and kept the mark on every
download and restyle.
- /videos guard refuses a marked job's clean deliverables (.marked dotfile),
so the twin cannot be fetched by stripping the prefix off a URL; editor
scratch files stay servable. Re-checked after an R2 restore.
- Walk-backs treat wm_ as the outermost layer; _canonical_clip_file globs it.
- Jobs from before this scheme (mark burned into the canonical) never get a
second copy; a failed mark still serves under the wm_ name.
- Watermark notice once per job when the clips land on a free account, and
before the first download if skipped; tracked with source=results|download.
Upsell/banner/win-back copy now promise the instant removal.
The Stripe portal stops cancelling (its config, 2026-09-28), so the dashboard
flow is the only way out and carries the portal's retention coupon:
- GET /api/billing/retention-offer: live monthly plan, no discount on it, never
offered before (retention_offer in the Stripe sub metadata). Any Stripe error
means no offer, never a stuck flow. Coupon id from RETENTION_COUPON_ID.
- POST /api/billing/retention-offer/accept: applies the coupon, stores the
feedback with outcome=retained, alerts "Cancel saved".
- POST /api/billing/resume + "Keep my subscription": undo a scheduled cancel,
which the portal did with the cancel feature now off.
- cancellation_feedback.outcome (additive column).
- POST /api/billing/cancel: closed-list reason, optional detail, 1-5 rating and
review; cancels at period end in Stripe with cancellation_details, then stores
cancellation_feedback. Account page opens CancelPlanModal (3 steps).
- Portal cancellations: churn alert now carries Stripe's feedback value.
- POST /api/onboarding/survey + /api/me onboarding_survey_pending: accounts under
7 days get one skippable screen before the clip tutorial (what they want to
make, where they heard of us, who they are). Stored in onboarding_surveys and
tracked as SignupSurveyAnswered with per-goal props.
- Both new tables are user-owned and erased with the account.
Hero trust line, cloud card, pricing header, final CTA, pricing page, tool
gate, the crawler fallback, the default SEO CTA and the Cloud summary in
seo/data.js.
- Free source past the balance: first video (<= 60 min) clipped whole for the
balance, any other clipped to the first N minutes. No 402 wall for free
accounts with >= PARTIAL_MIN_MINUTES left.
- cloud/lifecycle.py: welcome, first-clip nudge, win-back (optional
WINBACK_PROMO_CODE from env) and abandoned-checkout recovery via
after_expiration.recovery + checkout.session.expired.
- Commercial emails go through send_commercial_email: opt-out honoured,
unsubscribe footer and List-Unsubscribe headers (out-of-minutes too).
- The clip button and modal are "edit hook" (was "viral hook"), and the
submit says "update hook" when the clip already has one.
- Typeface picker: Montserrat, Anton, Serif, all bundled so the server
render (hooks.HOOK_FONTS, /api/hook `font`) and the Remotion preview
(HOOK_FONTS in remotion/lib/fonts.ts) use the same file and size.
Unset keeps each style's own typeface, so existing styles render as
before.
- The preview box is a true 9:16 (it was taller than the video, so the
hook sat off where it lands); style swatches are larger, drawn in the
real typeface, and "Pills" shows pills.
- Entrance options are hidden when they cannot apply (server re-render)
instead of shown greyed out.
- Autopilot: skipped videos can be clipped again by hand (private videos
used to be misread as Shorts).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- The connected channel (YouTube's own OAuth) is the proof the content is
the user's: the "I own the content" checkbox is gone, and switching
Autopilot on records rights_ack_at by itself. "Clip it" no longer
requires it either.
- Private videos read as "already a short": /shorts/<id> answers 200 for
them too. is_youtube_private (oEmbed 401/403) runs first; a manual clip
says "private on YouTube, set it to Unlisted", and the automatic poll
leaves the video unclaimed so it is picked up once it goes public
(scheduled uploads are private until then). They cannot be clipped:
the YouTube Data API lists the owner's uploads but never serves the file.
- A pasted private video stops downloading as soon as yt-dlp says so
(before the per-GB proxy) and tells the user why, instead of "YouTube
blocked the request".
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Without the rights confirmation the button only set the page notice,
which renders at the top of the tab, far above the video list: the click
looked like it did nothing. The confirmation checkbox and the button's
feedback (started, not clipped and why, errors) now sit right above the
list.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Every line of the hook gets its own white rounded box with black bold
sans (Montserrat ExtraBold, SIL OFL, bundled in fonts/ with its license),
the look short-form viewers know from TikTok. It replaces the serif
white card as the default for auto hooks, the editor's hook modal and
the /api/hook default; the other six styles stay selectable.
- hooks.py: _draw_pills renders the stack for the FFmpeg path.
- Remotion HookOverlay mirrors it (box-decoration-break: clone), so the
editor preview matches the burned result.
- The generate form says the hook text, style, position and size can be
changed per clip afterwards; the saved style preference moves to a v2
key so the old stored default does not pin people to the serif card.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Logs
- Each job log line records when it arrived (app._TimedLog) and
/api/status returns log_times; the dashboard showed new Date() on every
render, so every line had the same, moving clock.
- The cloud log view shows every stage: download %, early audio,
transcription %, finding moments, layout, clips found, and per clip
creating / framed / ready. Progress updates its own line instead of
adding one per step. Lines glued to yt-dlp's \r progress bar (the
parallel transcription prints onto it) are split, so its % shows again.
"Found N clips" matched the old "viral clips" wording only.
Result cards
- The results grid only goes to two columns when each card gets ~600px
(auto-fill) instead of at the xl breakpoint, where the side panel was
squeezed and the copy buttons spilled out of the card.
- Card actions take as many per row as fit.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Uploads under 45 s (MIN_SOURCE_SECONDS) were only rejected by the server after
the whole file went up. The browser now reads the file's duration on select,
explains why it cannot be clipped, keeps Generate disabled, and the drop zone
states the minimum. A file the browser cannot read is left to the server.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A new user in the first-clips tutorial who submitted a 30 s video saw only
'That run failed. Try another video'; the server's actual reason ('this video
is only 30s long, clip generation needs at least 45s') was hidden, and outside
the tutorial it landed in the log panel as raw JSON. The FastAPI detail is now
read into plain text and shown in the tutorial card and the logs.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Transcript: a finished live stream answers with a duration and no formats,
and was being reported as "YouTube is blocking us". The degraded-route test
now keys on the missing duration (watch page served without its player
response, seen anonymously on two of the three statics), so real
no-caption videos get the honest no-captions answer. Global daily cap
1,500.
- 9:16 converter: request AAC for MP4 output when the browser can encode it
(Opus-in-MP4 does not play in Safari) and only trim when the video is over
the 5 minute cap; show a frame in the preview instead of a black box.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- security_utils: accept only is_global addresses (100.64.0.0/10, the
Tailscale range, went through is_private), judging IPv4-mapped / 6to4 /
Teredo / NAT64 IPv6 by the IPv4 inside.
- /api/process validates the URL (public host, one YouTube video) before
anything fetches it, and the quality probe now runs after the metering
step (balance, job limit, hourly probe cap); a low-quality confirm or a
too-short source hands the reservation back. quality_probe.py checks the
same itself, passes noplaylist and no longer disables TLS verification.
- Metered whole-video URL jobs carry SOURCE_CAP_MINUTES = reserved minutes
(job env + resume manifest); main.py cuts a download clearly longer than
that, so a server cannot answer the probe short and the download long.
- main.py / quality_probe.py get child_env(): the server secrets (Stripe,
JWT, DB, SMTP, Telegram, R2, AgentLedger, managed keys) are dropped; a
test fails if the pipeline ever reads one.
- /api/social/user no longer logs the whole Upload-Post profile list.
- Owner checks on /api/thumbnail/generate, /api/thumbnail/publish/status
(dashboard now polls with apiFetch) and /api/render/{id}; /video/{id}
and /gallery escape every interpolated value and drop non-http URLs.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Free tools (no login), linked from nav and footer via /tools:
- /youtube-transcript-generator: reads the captions a video already has on
YouTube (free_tools.py, yt-dlp over the flat-rate static proxies only, never
the per-GB proxy, never the GPU). Per-IP limits, global daily cap, 24 h
cache, honest "no captions" answer with a CTA to the clip generator.
Copy / TXT / SRT export in the browser.
- /youtube-tag-generator: tags, 10 titles or a description from a brief, one
Gemini text call, rules taken from YouTube's own docs (sourced on the page).
- /video-aspect-ratio-converter: 16:9 to 9:16 in the browser with mediabunny
and WebCodecs (blur / crop / bars), nothing uploaded.
Tool pages keep the form in the static HTML; the behaviour is a Vite entry
(dashboard/tools) that vite-plugin-seo resolves by name.
New pages /auto-clip and /youtube-automation with real, blurred screenshots
of the Autopilot tab and the connect-an-agent card, Autopilot rules from
cloud/autopilot.py, plan prices from the billing API and aggregate usage
from the ledger (dated).
SEO fixes: titles/metas for /how-openshorts-works, /podcast-to-shorts, /mcp
and /free-ai-clip-generator (brand queries at pos 1-2 with <1% CTR); a free
AI clipper / free clipping website section and FAQ, and contextual "free AI
clip generator" anchors from sibling pages and the homepage.
Attribution: static pages now write the same first-touch os_attrib key the
app writes, so the signup is credited to the page the visit started on
(7,481 of 7,481 signups in 30 days said "/"). Signup, CheckoutStarted and
Subscribed carry landing_path / referrer_host / utm props in OpenPanel.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- A job that fails for a reason on our side (CUDA/OOM, NVENC, cublas,
Gemini 5xx, no clip rendered) is re-queued once after 30 s, keeping its
reservation and transcript checkpoint. Content failures stay final.
- main.py renders clips best-score first and retries each failed clip once.
- A deploy's drain timeout no longer fails and refunds running jobs: the
child is killed, the manifest kept, and the next instance resumes it
(22-sep-2026: 6 jobs failed at once this way). Mid-render manifests are
resumed instead of being recovered as completed.
- /api/status returns the queue position and an ETA; the dashboard shows
it with a 'paid plans skip the line' upsell.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Most subscribers use OpenShorts on one day and cancel. Autopilot makes the
value recur: once switched on, every new upload on the user's YouTube channel
(listed through the existing Upload-Post connection, no scraping) is sent
through the normal /api/process pipeline, the user gets an email when the
clips are ready, and with autopublish on the best clips are scheduled on
their socials, one a day.
- cloud/autopilot.py: poller, in-process job submission as the user,
completion hook, autopublish, and /api/autopilot{,/videos,/run}
- guard rails: only videos published after switching on, max 3 days old,
1 automatic job per user per day, first N minutes per video, Shorts skipped,
paid plans only, dedupe by (user, video) across the deploy handover
- dashboard: new Autopilot tab (sidebar + mobile menu, #app?tab=autopilot)
- connect page can return to the Autopilot tab
- analytics: ClipsDelivered/JobFailed now report source=url and the plan
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The line is clamped to two lines so cards in a row stay level; a long
sentence then reads as '...how easily audiences...' with the rest only in
the native title tooltip. When the text actually overflows, hovering
(desktop) or tapping (touch) now floats the whole sentence over the card,
so nothing grows and the grid stays aligned.
The detail pass now returns a one-sentence `why` per clip (what makes this
moment a clip, not the topic), stored in the metadata and shown under the
title in the dashboard card: the score said how much, nothing said why.
Defaulted in the schema so a small local model that skips it keeps the clip.
After the word snap, clips overlapping an already-kept clip by half the
shorter one are dropped in favour of the higher predicted_score. The prompt's
DIVERSITY rule was the only thing preventing the same moment twice; in ~330
clips over 8 talks it never fired, so this is a guard, not a fix.
Each clip also keeps the model's raw `proposed` boundaries before the snap,
which is what made boundary accuracy measurable: p90 0.4-0.5 s from a word
on 8 talks (21-sep-2026), inside snap_clip_to_words' 1.5 s reach.
Two ideas borrowed from AutoClip were measured with a blind judge on the
same corpus and NOT adopted: quoting per-sentence timestamps in the detail
pass lost 24%/23% (p<0.001, two seeds — it shortens clips and drops the
payoff), and an "end on the reaction, not the line" rule was inert
(47%/53%, p=0.71).
* feat(seo): measure the SEO pages, convert from them, and widen the cluster
The audit of 17-sep-2026 found the static SEO surface ranking at positions
1.8-4 with a 0.2-1.6% CTR while leaking every click it earned: the pages
carried no analytics at all (~424 clicks/month invisible, confirmed with
curl), the only link into the app was the fixed nav button, ten internal
links pointed at /cdn-cgi/l/email-protection, thirteen titles and
twenty-one descriptions were past the length Google renders, and every URL
in the sitemap claimed the same lastmod.
What changes, and how it is verified:
- Analytics (render.js). The shim, the %VITE_OPENPANEL_*% gate and
ANALYTICS_HOSTS are ported verbatim from index.html, plus the init call
the SPA makes from lib/consent.js — first-party measurement is exempt
from prior consent and always on, so there is nothing to ask here. Vite
only rewrites index.html and these files are emitted assets, so the
plugin substitutes the placeholders itself; unset still yields an inert
page. Verified by building with and without the variables.
- Body CTA (render.js, per-page copy in pages.js). Rendered between the
TL;DR and the body, with the text that fits each page's argument, and
never on legal pages or the 404. The link carries utm_* so
lib/attribution.js can post the click with the signup, and fires a
SeoCtaClick event so the CTA can be told apart from the nav button.
- Broken mailto links (legal.js). 46 plain-text addresses rewritten as
<a href="mailto:...">. Cloudflare Scrape Shield turns the bare address
into a /cdn-cgi/l/email-protection link, which is a 404 for crawlers.
- Titles and descriptions. Every title is now <=60 characters and every
description <=160, measured across all 35 emitted pages rather than
eyeballed (/gta-5-clips, merged the same week, was over on both). The
check is part of the verification, not a one-off.
- Resume the job after sign-in (App.jsx). Pressing "get free clips" with no
session opened the login modal and dropped the request: the magic link
lands on a fresh document, so the pasted URL was gone. The request is now
written down before the redirect and replayed after it, through the same
handleProcess, so the isSignedIn -> isManaged -> keysMissing gate that
decides billing is untouched: an unentitled account still lands on
#/pricing, with the request parked until it pays. Files cannot be
serialised, so those resume only within the same document.
- Gallery surface (app.py). The gallery head had no canonical; the JSON-LD
was built from html.escape() output, producing &amp;/&quot; and
valid-JSON-but-wrong names; the video page's nav and CTAs were relative
hrefs on the api host, where "/" is a 404 (the app is on www). JSON-LD is
now serialised as JSON with <> and & escaped as unicode, both pages carry
their canonical, and cross-host links are absolute. Verified by rendering
both routes with a monkeypatched gallery: the JSON parses and a title
with quotes, an ampersand and markup survives round-trip.
- New comparison pages (pages.js): /opus-clip-pricing, /opus-clip-free-
alternative, /opus-ai, /opus-pro, /vizard-ai-video-to-text,
/submagic-reviews and a Spanish index at /alternativas. They target
buying-intent variants (opus clips pricing, opus clip free trial, opus ai,
opus pro, is vizard ai free) that the existing pages do not answer, read
every price from data.js, and join the related-page ring, the footer and
the landing links. /alternatives/vizard also gained the brand Q&A ("Is
Vizard AI free?"), since "vizard ai" is how its volume is spelled.
Build: npm run build green (35 HTML files, all metadata in range, all
JSON-LD parseable). Tests: pytest tests/ -q, 777 passed, 19 skipped.
* fix(seo): CTA sin UTM interno, tutorial no pisa el job reanudado, mailto en el agente DMCA
- El CTA de las paginas SEO enlazaba al mismo origen con utm_*, lo que
sobrescribia la atribucion real del visitante en lib/attribution.js y
partia la sesion en OpenPanel. El evento SeoCtaClick sigue midiendo el clic.
- Alta nueva con un enlace aparcado: no abrir el tutorial intro encima del
job que se reanuda solo.
- LoginModal solo promete 'tu video esta guardado' cuando el payload es una
URL; un File no sobrevive al magic link en otra pestana.
- Los dos info@upload-post.com del agente DMCA tambien en mailto.
---------
Co-authored-by: victormanuel.caverogracia <>
93 of the 99 quota walls sampled on 16-sep-2026 were shown to accounts with
their 20 free minutes untouched that had pasted a 21-90 min video: asked to
pay before seeing one clip, most left Stripe without paying.
The 402 now carries partial_minutes (the floored balance, at least
PARTIAL_MIN_MINUTES and shorter than the source). The wall shows 'clip the
first N min' next to the plans and resubmits with max_minutes; the server
reserves min(asked, balance) and sets MAX_SOURCE_MINUTES, and main.py cuts
the source in place before anything reads it, so every later stage and the
editor see a short video. The cut travels in the resume manifest so a
redeploy cannot re-run the whole video on a partial reservation. Status and
the results view say which part of the video the clips came from.
It said a stream with no commentary 'gives the picker nothing to score'
and that no amount of tuning fixes it. That is not what the code does.
main.py switches to a vision pass by itself in two cases: NoAudioError,
and speech_is_sparse() coming back true (under MIN_SPEECH_WORDS=8 total
or MIN_SPEECH_WORDS_PER_MIN=5). Gemini then watches the footage and
returns the same 3 to 15 moments in the same duration band, and every
stage after it, layouts and inset detection included, is identical.
So the section becomes a differentiator rather than a disclaimer, since
a transcript-only clipper simply cannot do this. The real constraint is
moved with it and stated plainly: the vision pass is the one stage that
uploads the footage instead of sampling frames, Gemini bills video at
~300 tokens/second, and nothing guards the length, so a silent
multi-hour VOD fails at the model. Clips from that path have no
captions, which is correct and now said out loud.
Gaming is the biggest clip-producing category on the vertical platforms and
the one the generic pipeline pages describe worst: the source is a multi-hour
stream VOD, the gameplay fills the whole 16:9 frame, and the only face on
screen is a webcam box in a corner that a centre crop throws away.
The page is built on the two code paths that actually answer that (the
geometric webcam-inset detector and the WIDE layout) plus the arithmetic that
decides the category: per-minute credits against a source measured in hours.
It states the hard limit up front too, that moments are scored from the
transcript, so silent gameplay has nothing to score.
Emits a HowTo node alongside the Article, since the head query here is a
procedure and extraNodes was already supported but unused.
Sitemap lastmod becomes per-page while I am here: the new page is dated
2026-09-15 and stamping every other URL with that date because one page
changed is the fastest way to have a crawler stop trusting the field.
The browser's `Subscribed` event is an intent signal: it misses renewals,
is eaten by ad-blockers and never sees a refund. The Stripe webhook is the
only place money is known for certain, so every invoice.paid (new /
renewal / upgrade), one-off top-up and charge.refunded (negative) is now
mirrored as OpenPanel's native `revenue` event, keyed by the user uuid the
browser and the job events already use.
Each event carries the acquisition channel read back from
signup_attribution (utm_source > referrer host > direct) plus plan,
interval, billing_reason and the Stripe id — so revenue is sliceable by
where the buyer came from. Fire-and-forget: never touches the webhook path.
The dashboard now `identify`s the signed-in user on every boot (OpenPanel
keeps the profile in memory only) and clears it on sign-out, so pageviews
and the server-side events share one profile.
Also fixes GET /api/billing/invoices, which called the non-existent
`database.SessionLocal` and 500'd for every user with a Stripe customer.
Claude-Session: https://claude.ai/code/session_01GPZmS33ubmHxHEc84X7sQy
Minutes are reserved when a job starts, not when it finishes. Re-fetch
/api/me on start, complete, fail, quota, bulk subtitles and clip re-render
so the pill in the header moves without a reload.
The coach chip stacked three step labels on top of each other. Walk Clip
Generator control by control instead, and park the tooltip inside the
viewport on small screens.
GET /api/billing/invoices lists the AgentLedger-issued Spanish invoices for
the signed-in user's Stripe customer (public View/PDF links), backfilling the
customer's history on demand when AgentLedger has nothing yet. New env:
AGENTLEDGER_API_KEY (+ optional AGENTLEDGER_API_URL / AGENTLEDGER_TREASURY_ID).
InvoicesCard renders under the plan card for accounts with a billing relationship.
Claude-Session: https://claude.ai/code/session_01Chec1RKALL2v8V4GsDfPCW
Cards were mounting every mp4 with preload=metadata, so the grid stalled,
and click did nothing except a hidden View link that opened another tab.
Posters only until click; playback stays on the same screen.
Self-hosters asked for a pipeline that never calls Google. LLM_BASE_URL (+
LLM_MODEL, LLM_API_KEY) routes the transcript scoring and detail passes of
get_viral_clips to a /chat/completions endpoint; the answer is validated with
the same pydantic schemas Gemini enforces server-side, so main.py sees one
shape. json_schema is requested first and the request falls back to
json_object and then to free text when a server rejects the field.
Scoring batches drop from 8 to 3 windows on the local path: Ollama's default
4k context truncates silently and a truncated prompt scores garbage.
Self-host /api/process now accepts a request without X-Gemini-Key when the
backend is configured, /api/config exposes localLlm and the dashboard stops
demanding the key. Frame-based stages (layout picker, on-screen content,
silent videos) stay on Gemini and degrade as before without a key; the
silent-video path says so instead of failing generically.
Verified end to end with Ollama 0.13.5 + qwen2.5:7b on an M1 Pro: a 15-min
talk, 14 windows, 6 clips with usable hooks and titles, six local calls and
zero requests to Google.
Claude-Session: https://claude.ai/code/session_014i9z6mLTy978uRCfSsMfBq