eslint.config.js was written for ESLint 9's flat config but package.json
pinned ESLint 8 and the script still passed --ext, so lint had not run in
months. Upgrade to ESLint 9 with @eslint/js and globals, keep
eslint-plugin-react-hooks on v5 (v7 ships the React Compiler rules, which
flag 21 places that would be a refactor, not a lint fix), drop the unused
eslint-plugin-react, and tune the rules to the house style: ignored catch
bindings, constant exports next to components, node globals for the build
scripts, and the entry point exempt from fast-refresh checks.
The findings that remained were fixed at the source: two unused Icon
destructures, an unused footer argument, two dead state pairs, one
useCallback dependency memoised, and six run-once effects marked as such.
- Advanced options gain "vertical layout": auto (server default, AI picks
per video), two speakers stacked, screen over presenter, or single crop
only. Only a deliberate choice travels as `layouts`; remembered in
localStorage like the hook settings.
- `layouts=none` switches the picker off for one job even though the
deployment runs AUTO_LAYOUT=1.
- The fast rerender (cut without reframe) wrote no layout sidecar, so a
stacked clip fell back to bottom captions after a trim. It now carries the
canonical clip's ranges through the new cut (layout_ranges.remap).
- PROXY_DRAIN_SECONDS (20): after the jobs are drained, keep the socket
open with /health/ready at 503 so Traefik pulls the instance out of
rotation while it can still answer. Coolify builds the container's
HEALTHCHECK from its own interval*retries, so closing earlier was up to
60 s of alternating 502/200 per deploy (retries lowered to 3 as well).
- HARD_EXIT_SECONDS (30): uvicorn finishing does not end the interpreter
while an executor thread hangs in a network probe (a /api/process cut
off mid-shutdown left yt-dlp running), which kept a drained container
alive for the full 900 s grace and the deploy in "Removing old
containers". Exit outright a little after handing uvicorn the signal.
On a stacked two-shot the seam between the halves is the one place the
text covers nobody (OpusClip does the same), so every word event inside a
SPLIT stretch is anchored mid-frame with an inline \an5; other layouts keep
the style's alignment, and the text moves with the cut.
The render records which stretches use which layout in a <clip>.layout.json
sidecar (layout_ranges.py). The job pipeline, rerender and manual reframe
copy it into the clip's metadata as layout_ranges, so /api/subtitle finds it
on a restyle too. auto_caption_clip reads the sidecar when not told, which
is how recut hands it over.
Only the ASS path can do this; SRT burns keep one alignment per file.
Checked on the 45-clip corpus with SPLIT on: 45/45 render, 0 caption
errors, 42 with no split at all, and the 3 that split are real two-shots.
With health checks enabled Coolify swaps the Dockerfile HEALTHCHECK for its
own curl/wget probe; without either binary deploy 10856 reported unhealthy
on every attempt and rolled back.
- uvicorn --timeout-graceful-shutdown 15: after the drain, stop waiting
forever on open range downloads. The old container lived the full 900 s
stop grace with its port already closed, so Traefik alternated 502/200
for 15 minutes on 2026-08-25.
- /health/ready answers 503 once SIGTERM arrives, and a Dockerfile
HEALTHCHECK on it lets Traefik drop the instance within ~10 s while it
can still serve. Coolify's health check now waits on the same path
before stopping the old container. The marker drain does not flip it:
the new container is still booting at that point.
- ignore .worktrees
Coolify starts the new container before stopping the old one and both share
output/, so the new one used to re-enqueue at startup the very jobs the old
one was still rendering, and the old one had 30 s to live regardless.
- Each instance stamps output/.instance; an instance that sees another id
drains: finishes what it runs, starts nothing, leaves queued manifests.
- A running job heartbeats its manifest every 10 s; the resume scan (startup
and every 30 s) adopts only manifests nobody heartbeated for 60 s, so no
job runs twice and none is lost. Reservations of live-elsewhere jobs are
kept out of the orphan refund; poison jobs stay refundable.
- SIGTERM drains too (up to DRAIN_TIMEOUT_SECONDS, default 840) before the
signal reaches uvicorn, so the socket stays open and Traefik keeps getting
answers. The app's Coolify stop grace period is now 900 s.
- /api/status answers from disk for a job this instance never held, so a
poll landing on either container during the handover works.
Verified in the local stack: SIGTERM mid-job -> job finished its clips,
'Drained', exit 0; status polled 200 throughout an 8 min drain; a job
submitted during the drain was left for, and resumed by, the next instance.
The vision path only fired when the source had no audio track. A nursery
rhyme or a dashcam drive has audio, so it went through transcription, came
back as one segment, built one scoring window and Gemini returned no clips:
three failed jobs on 25-aug-2026, one user twice. Below 8 words or 5 words
per minute the transcript cannot drive selection, so route it like a silent
video (vision, no captions). Thresholds env-overridable.
A job interrupted by a container restart is re-enqueued from its resume
manifest and re-run from scratch in the same output directory. Transcription
is the slow, paid stage that had already finished, so main.py now leaves it
there as .transcript_checkpoint.json and the re-run picks it up (same shape
and validation as --transcript). Removed when the job completes so a later
run in a reused directory never inherits it.
Verified locally: run killed after transcription, re-run in the same
directory logged 'Reusing the transcript from the interrupted run' and
delivered both clips.
At every scene boundary the tracker kept the previous shot's speaker (sticky
bonus + 30-frame cooldown returning None) and the cameraman's jump damping
held the new face for JUMP_CONFIRM_FRAMES detections, so the frame started
on the old subject and slid across at pan speed. Seen on a two-camera
podcast as a headless torso for 1.5s after each cut.
Reset both at the cut, force a detection on the cut frame, and snap the
camera to the first target accepted in the new shot. SCENE_CUT_RESET=0
restores the old behaviour.
Measured on the 45-clip corpus plus the reported clip (123 TRACK scenes):
first-frame framing error 97 -> 34 px, frames to settle 18.9 -> 3.8,
in-scene reversals unchanged (0.02/s), camera travel 12 -> 7 px/s.
Eight findings from re-reading the erasure path, each one something that would
have shown up in production rather than in a test:
- The local purge missed two stores. SaaSShorts outputs (output/saas_<id>) and
generated thumbnails record ownership in their own in-memory dicts, not in
the .owner file, so neither was erased. Thumbnails are the serious half: the
hourly sweep deliberately skips their directory, so a deleted user's
generated images stayed on disk forever, publicly served at /thumbnails/.
- The purge ran on the event loop. rmtree over gigabytes of video stalled every
other request on the process; it goes through asyncio.to_thread now.
- Paths from those dicts are now resolved through _safe_under, so a session id
or output_dir containing ".." deletes nothing.
- Deleting a user made a webhook path reachable that never was: _apply_topup
takes the user id from Stripe metadata, so a top-up completing around the
deletion inserted a row pointing at a user that no longer exists. The FK
violation 500s the webhook, and since the event is only recorded after
handle_event returns, Stripe retries the same doomed insert for three days.
It confirms the row exists first.
- The "why are you leaving" box was free text stored in a record that
deliberately outlives the account, which is how personal data ends up in one
by accident. It is a closed list now, which also makes twenty deletions a
month countable instead of readable.
- Two concurrent deletes wrote two erasure records and sent two goodbye emails.
The DELETE's rowcount now decides which call is the real one; the UI holds a
ref so a double click doesn't fire a second Stripe cancel and R2 purge.
- The delete button armed itself when the confirm box was empty, if the page
ever rendered before /api/me resolved.
- The goodbye email claimed we keep "a one-way hash of your email and nothing
else", which was not true of the Stripe reference beside it. Fixed in the
email and in the privacy policy, EN and ES.
Also: skip the Upload-Post call when no managed key is configured, and say
plainly in the in-flight comment that it covers metered work only.
tests/test_account_local_purge.py covers tenant isolation across all three
stores and both traversal attempts; test_account_erasure.py gains the
confirmation gate, the API-key refusal, and the already-cancelled-at-Stripe
case that would otherwise trap a user forever.
The privacy policy already told users that "deleting your account from the
dashboard removes your content" — there was no way to do it. This adds one:
Account -> Delete account in the dashboard, DELETE /api/account on the server.
The endpoint refuses API-key auth (a leaked osk_ must not destroy the account
it was issued from) and requires the caller to retype the account email; the UI
does the same, collapsed behind a danger zone that itemises what actually goes.
Erasure is immediate and irreversible, because after it there is nothing left
to authenticate a recovery request against.
The order of the steps is the design, each one a failure mode:
- Stripe cancel first, aborting everything if it fails, so we never erase a
user we are still billing. An InvalidRequestError is treated as already
cancelled: a portal cancellation whose webhook never landed leaves our row
reading "active" forever, and the one account that could not be deleted
would be the one Stripe already stopped charging.
- R2 before the database, because those rows are the only index of which
objects belong to the user; dropping them first turns a failed purge into
permanent orphans.
- The DB delete is one transaction over an explicit table list, not the
declared ON DELETE CASCADEs: create_all never ALTERs an existing table, so a
constraint added after a table shipped lives in the models and not in
production. tests/test_account_erasure.py fails if a new table references
users.id without joining that list.
- A reserved usage_ledger row blocks the delete: erasing under a running job
would pull the output from beneath it and leave the reservation unsettled.
What survives, and why: the Stripe customer and its invoices (six years,
Spanish commercial law) and one account_deletions row holding a sha256 of the
email as proof the erasure happened, itself purged after five years by the
retention sweeper. app.py registers a callback so the working files in output/
and uploads/ go too instead of waiting for the hourly sweep.
Privacy policy sections 6 (EN + ES) now point at the button and name both
survivors; the Legal hub summary says the same in one line.
Brings the phone navigation shell (bottom tab bar + drawer in place of the
80px icon rail, safe areas, touch targets, bottom-sheet modals) and the fix
for the clip-generation view, whose two HUD pills overlapped and interleaved
their letters on any box narrower than their combined width.
The skill published in 78deea2 has drifted from the code. It lists six
tools (recut_clip landed since), documents output_format as "1080p" when
it is an aspect enum, promises 3-15 clips when the model usually returns
2-6, and tells agents to poll every 10s against the MCP server's own
30-60s guidance.
Adds what an agent needs and cannot infer from the endpoints:
needs_confirmation arrives with HTTP 200, so an agent that does not know
it believes a job started when none did; the 402 and 429 shapes; when
each layout is wrong rather than only what it is; and the clip-length
and target_clips bounds.
reference.md carries the exact payloads and error shapes, README.md the
per-platform install.
The "generating" screen was the one the user singled out, and the scan box
was the reason. Interface only; no pipeline, request or data changes.
The visible defect: two HUD pills were pinned to opposite corners of the
preview, ~150px and ~170px wide. Any box narrower than their combined width
made them overlap and interleave their letters — "SCANNING CO|VIRAL_DETECTION:
ACTIVE". That is every phone, and the md tablet width too, where this panel is
only 55% of the viewport. They are now one flex row with justify-between and a
truncating left pill, so they degrade instead of colliding, and the right-hand
pill (which says nothing the left one doesn't) waits for lg.
The rest of the box was desktop flourish that turns to noise at phone scale,
so below sm it drops the blueprint grid, the dashed thirds guides, the ping
ring and the scissors, and the bottom telemetry bar — which was spending a
third of a 175px box on two lines that are always true. The box itself goes
2:1 instead of 16:9 (object-cover crops rather than shrinks, so no picture is
lost) and loses 16px of the margin under it.
Removing the invented telemetry leaves a phone with nothing to read, since the
log terminal starts collapsed there, so the panel now shows the real log tail
under the preview: "Transcribing with faster-whisper", "Asking Gemini to pick
the viral moments". Between that and the tighter box, "Generated Shorts" is
now on the first screen instead of a full scroll down, and its empty state
gets a min-height and a line saying clips appear one by one.
Verified at 360/390/640/768/1024/1440: no pill overlap and no horizontal
scroll at any width; the full HUD is intact from lg up.
The dashboard was a desktop layout that merely survived a narrow viewport.
The changes below are interface only; no backend behaviour, request shape or
data changes.
Navigation. Below md the 80px icon rail is gone. It cost a fifth of a 360px
screen to show seven unlabelled glyphs. In its place: a bottom tab bar with
the four everyday destinations plus "more", and a drawer behind the header's
menu button carrying the full list. All three surfaces read one `navItems`
array, so they cannot drift. The tab bar is a flex sibling of the scrolling
pane rather than a fixed overlay, so no pane needs compensating padding and
nothing hides behind it. The header gains the section name the rail used to
carry, so a phone still knows where it is.
Shell. h-dvh where supported (100vh hides its own bottom bar behind mobile
browser chrome), body overflow-x hidden, and safe-area padding for the iOS
home indicator via viewport-fit=cover.
Touch and legibility. Inputs render at 16px below sm so iOS stops zooming on
focus and never zooming back; the shared button pills get a 44px floor on
coarse pointers; the 10.5px mono labels come up to 11.5px on phones.
Density. The clip-generator hero no longer fills the fold on its own. The log
terminal starts collapsed on phones. Result cards cap the 9:16 preview so the
title, captions and actions stay on the same screen as the clip. Modals become
bottom sheets below sm — a centred dialog with 4px side margins was wasting the
only width there was. Banners, the results toolbar and the social nudge stack
instead of crushing.
Also fixes three <div>-inside-<p> blocks in Settings that the browser was
silently tearing apart.
A job in flight published every clip as the clean reframe name, guessed by the
status poller. The hook and the captions live in derived files
(hooked_<ts>_<clean>, subtitled_<ts>_hooked_<ts>_<clean>), and only when the
WHOLE job finished did the result get rebuilt through _canonical_clip_file and
resolve to them. So a six-clip job showed clip 1 hook-less for the five clips
after it, which reads as the hook feature being broken.
main.py now prints CLIP_READY <index> <filename> at the end of each clip's
chain, after the caption step and carrying its result, so the name is the file
that will actually be delivered. app.py consumes the marker the way it already
consumes PROXY_BYTES: intercepted in enqueue_output, never shown as a log line.
The poller now serves only announced clips. That also closes the older hazard
in the code it replaces, whose own comment admitted it was guessing: presence
on disk was treated as done, so a clip could be served while ffmpeg was still
writing it. A clip whose marker never arrives (it failed) stays hidden until
the job ends and the result is rebuilt from disk, as before.
The stdio reconfigure only covers the API process. main.py prints an
emoji on its first line and configures nothing, so on a cp1252 console
the server now starts but every job dies before rendering.
"canción" has two Unicode spellings: a precomposed ó, or an o followed by a
combining acute. yt-dlp hands over titles in either, and sanitize_filename let
the decomposed form through into the clip file, the R2 key and the URL path.
Measured against prod on 24-ago-2026, on a clip whose title carried the
combining form: a <video> element loads it fine, and fetch() of the very same
URL comes back 503, while curl gets 206 with the identical headers. So the
download button, which fetches, was broken on effectively every Spanish title,
and playback hid it.
Normalising at sanitize_filename fixes the whole chain at its source: one name
for both spellings, and a no-op for the ASCII names that already worked. Clips
already archived keep their decomposed name and still play.
Measured 22-ago-2026 against prod, on one 46 MB / 52 s clip:
origin -> itself through Traefik 130 MB/s
origin -> a datacenter client 838 KB/s
origin -> the author's browser 90 KB/s (8.5 min for one clip)
R2 S3 endpoint -> the server 11 MB/s, 206
R2 S3 endpoint -> that browser 503, every single request
So the API process is not the bottleneck (it serves the file at 130 MB/s while
the box sits at 0.01 MB/s of egress); the long path out of Hetzner is. And the
fix for that, R2, is unreachable from a browser: *.r2.cloudflarestorage.com is
an S3 endpoint, and a presigned GET that curl fetches at 11 MB/s with identical
headers returns 503 to Chrome.
R2_PUBLIC_BASE points presigned_get() at a custom domain bound to the bucket
instead, which serves the same objects through the normal Cloudflare edge.
Unset, everything keeps signing S3 URLs exactly as before, so this is inert
until the domain exists. Switched at that one choke point because every caller
hands the URL to a browser.
The download button streamed nothing to the screen while it buffered tens of MB
into a blob, which on a slow link is minutes of a button that looks dead. It now
reports percentage, which needs Content-Length readable from JS, which needs the
CORS middleware to name it in expose_headers.
Every log line in app.py is emoji-prefixed and a Windows console is cp1252
by default, so _recover_jobs_from_disk() kills the server during startup:
print(f"♻️ Recovered {recovered} completed job(s) from disk.")
UnicodeEncodeError: 'charmap' codec can't encode characters in 0-1
ERROR: Application startup failed. Exiting.
It never binds a port, so the dashboard is simply unreachable on a stock
Windows box. PYTHONIOENCODING=utf-8 works around it, but that has to be
known before the first run, and the traceback does not suggest it.
subtitles._configure_stdio already does exactly this for the transcription
path. The server needs it too, and needs it before the first print, so it
runs at module scope rather than in the lifespan hook.
Verified: uvicorn with no PYTHONIOENCODING, and an import under a stdout
forced to cp1252/strict. Both start and log the emoji correctly.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QiYkHKB7Tp7X6NdnEutda2
The job runner built its command as ["python", "-u", "main.py"], which
resolves against PATH. Inside the Docker image there is exactly one
interpreter so it works, but in the documented non-Docker install --
a venv -- PATH points at whatever Python came first, not the one running
the server. Every job then dies immediately:
ModuleNotFoundError: No module named 'cv2'
The CLI works fine in the same checkout, so it presents as "the dashboard
is broken" rather than anything to do with interpreters.
_run_quality_probe five hundred lines up already uses sys.executable for
exactly this reason; this makes the two agree.
Verified: same job, same venv, failed before and completed after.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QiYkHKB7Tp7X6NdnEutda2
reframe_v2 built its filtergraph as sendcmd=f='<abs path>' with the path
interpolated raw. On Windows tempfile.mkdtemp() returns C:\Users\..., and
the drive colon terminates the filter option, so ffmpeg exits non-zero and
every TRACK scene silently falls back to the v1 Python frame loop. GENERAL
and SPLIT hide the bug because only the TRACK branch emits a sendcmd.
subtitles._escape_ffmpeg_filter_value already solved exactly this for the
ass/fontsdir filter three modules away, so this moves it to ffmpeg_utils as
escape_filter_value() and uses it in both places. subtitles keeps its
wrapper and its docstring; behaviour there is unchanged (verified equal
output on absolute, relative and space/comma paths).
Measured on a 12s 1280x720 clip with one face, Windows 10 + ffmpeg 9:
before 53.5s "Reframe v2 failed (CalledProcessError ...)" -> v1 loop
after 30.8s v2 native, same framing
Also: `-o <dir>` crashed with PermissionError [WinError 5] because
--skip-analysis passed the directory straight through as the output
filename and it reached os.remove(). --output is documented as "directory
or file", so derive the filename when it names a directory, and guard the
stale-file sweep with isfile() so a directory can never be handed to
os.remove().
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QiYkHKB7Tp7X6NdnEutda2
Each result card streamed its clip from /videos, which is served by the
same single-worker API process that is running the renders, while the
same clip was already archived to R2 (free egress, edge-served). The
durable URL was in the browser the whole time and was only used as an
error fallback.
It becomes the playback source, but only while R2 holds exactly the file
the server considers current: a server-side edit rewrites the clip and the
re-archive behind it is fire-and-forget, so preferring the durable copy
blindly would show the clip from BEFORE the edit. /api/history therefore
returns the archived filename, and the card compares it against its own
serverVideoFile.
The map is chased after each edit and again once the job completes, since
a job is marked completed before _archive_managed_job finishes uploading
and the first read otherwise lands empty and never retries. The effect
that reads it is keyed on the clip count instead of the results object, so
it no longer re-reads the history on every status poll. The durable copy
is never adopted under a player the user already started, because swapping
src restarts playback.
Display only: currentVideoUrl still drives the download button and every
server operation (all of which pass input_filename, never a URL), so no
edit can be routed to the wrong file by this.
The finished-clips banner made it two asks for the same job, and the old
wording put the word "free" next to the product name for anyone who missed
the pun, which is the one thing this copy must never do.
Open source is the one claim no competing clipper can make, and the
guidelines want the main services named. Attached to the tool name
rather than left as a standalone boast, which is the pattern the
already-published templates on this account follow.
The guidelines ask for the main nodes in the title, and the highest
performing template on this account (20k views) names the destination
and the word viral. The previous title said neither, and it also buried
the one thing no competing template does: it fires on every new upload
rather than on a video you hand it.
Read the guidelines properly (n8n.notion.site/Template-submission-guidelines)
and the template failed three of them.
A single sticky explaining the whole template is mandatory and there
wasn't one, only per-stage notes; the overview sticky now carries the
full description in the sections reviewers expect (who it's for, what it
does, setup, requirements, customising), and the stage notes drop to the
neutral colour the guidelines ask for so the overview is the one that
stands out.
The title now follows the required 'action verb + object + destination'
shape instead of a product name plus a slogan.
Configuration is grouped into Set nodes, which the guidelines ask for and
which fixes a genuinely bad bit of design: pasting the same Telegram chat
id into six separate nodes. Each trigger branch gets its own Settings
node because a branch cannot read a node another branch ran, so it is
three edit points now, all named and in one place per branch.
Re-tested end to end after the restructure: the webhook branch still
splits the clips and delivers them to Telegram, which is the path the new
Set node sits in.
The static ISP pool (dfa3124) moved downloads off the paid proxy but never
touched cloud/metering.py, so probe_url_minutes kept reading PROXY_URL alone.
Every managed YouTube submission still paid DataImpulse for 0.2-1 MB of yt-dlp
metadata (measured through a counting proxy) while the download itself went out
free over Decodo — and invisibly, because PROXY_BYTES only counts the bytes of
the winning download attempt.
The probe now walks the same cheapest-first chain as the download: direct when
DIRECT_FIRST=1, then the statics rotated per probe, then the paid proxy as the
last resort. Proxies are the outer loop and extractor strategies the inner one,
so the paid route is only reached after every free one has failed on both.
That also stops a drained paid proxy from taking YouTube ingest down on its own
("Could not determine the video duration") while the statics are healthy.
Two smaller cuts on the same path: a user with no minutes left now gets its 402
before the probe instead of after it, and a failed route no longer dumps a
yt-dlp ERROR block per proxy per strategy into the API log (the watcher is what
reports a dead route).
The page opened with a TL;DR box, which is the wrong lead for a page
whose subject is a workflow: the canvas shows in one glance what four
paragraphs were describing. Screenshot in, summary box out, and the
TL;DR block in render.js is now optional so other pages can make the
same call.
Two nodes in act 3 sat on identical coordinates after the queue node
landed, so the template opened with overlapping labels on import.
The landing named n8n in the hero without linking anywhere; it now
points at the workflow page, in the app and in the crawler fallback
that has to mirror it.
Cloud keeps every user's connected accounts as profiles inside one
Upload-Post account, so the profile string is the only thing separating
'schedule to my TikTok' from 'schedule to a stranger's'. All three call
sites read `forced_profile or <client-supplied profile>`, which honours
the client's value whenever the server fails to resolve its own — one
resolver bug away from a cross-tenant write, and invisible in review
because the happy path looks identical.
resolve_post_profile() now refuses in cloud mode instead of falling
back, and never consults the client value there; self-host keeps
picking its own profile, since it owns the account behind the key.
Tests pin both behaviours and the profile filter on the scheduled-post
list, which is what stops one tenant reading or cancelling another's
queue.
/n8n-youtube-shorts-automation answers the two loudest unanswered asks
in the n8n community (a free/self-hostable clipper callable from a
workflow, and why posting video to TikTok/Instagram is so painful), and
gives the Reddit and forum posts a stable URL of ours to point at
instead of a raw file on GitHub.
Also drops the now-false 'there is no official n8n template yet' from
the automation page's body and FAQ, and links the two.
GET /api/social/scheduled lists the caller's pending posts and
DELETE /api/social/scheduled/{job_id} cancels one. Upload-Post's own
schedule endpoint takes no profile filter and returns the whole managed
account, so both filter by the caller's profile server-side — the same
multi-tenant trap as the impressions endpoint, and the reason cancel
404s instead of 403s on someone else's job.
The template picked its next daily slot from n8n workflow static data,
which two approvals tapped seconds apart both read before either wrote,
booking the same slot and publishing together (seen in a live run). It
now derives the slot from the server-held queue, which is shared state
and cannot race with itself that way.
Upload-Post's /total-impressions/{profile} echoes the requested profile
but returns account-wide numbers — a profile with zero posts got 85K
Instagram impressions — which for managed users leaks other tenants'
aggregates into the dashboard card and the analytics API. Aggregate the
post-analytics cache instead, which is correctly scoped by ?user=, and
keep the same response shape (total_impressions + per_platform).
Account page gains a 'Your posts' card: last-30-days impressions with
per-platform split and the top 3 posts by views, backed by the new
analytics endpoints. Hidden for free users (402) and until data loads.
The header profile selector was a no-op for managed users (exactly one
profile, nothing to switch) while displaying greyed-out networks with
no way to connect them — it now ends in a Connect / manage accounts
action that opens the branded Upload-Post connection page.
New openshorts-content-machine.json: daily channel-RSS watcher (one
video per day, new upload first then back catalog), clips delivered to
Telegram with approve/skip buttons, approved clips drip-scheduled via
/api/social/post, weekly analytics digest from the new endpoints. A 402
pauses the machine with a Telegram notice and leaves the video
unmarked so the next day retries it.
Both templates now carry webhookId on webhook-based trigger nodes:
without it n8n imports the node but never registers the webhook, so
every incoming call 404s. Found by importing and executing the
workflow against a live n8n.
GET /api/social/analytics (profile totals), /analytics/posts (per-post
cached metrics) and /analytics/impressions (windowed totals). Managed
users are locked to their own profile and rate-limited to 60/h in a
bucket separate from the metering probes; cloud without a plan gets a
clean 402 no_plan instead of a misleading missing-header 400. BYOK
keeps its own key and picks the profile with ?user=.
Found while browser-testing the editor: a clip without a start yet makes
ResultCard emit onPlay(NaN), and assigning that to currentTime throws in
a mount effect, taking the whole tree down to a black screen.
Only 2.7% of cloud users who pass through the social flow ever connect a
network (146 of 5,406 Upload-Post profiles), yet publishing from the app
is the strongest retention loop we have. Show a dismissible banner right
when the clips appear - the moment with the best odds - prompting managed
users with no connected network to open the hosted connect page.
Instrumented like the other conversion moments: SocialNudgeSeen (once per
job), SocialNudgeConnect, SocialNudgeDismissed (persisted in localStorage,
never shown again). Hidden automatically once any network is linked.
- The clip track's scale is now the rendered length instead of the
current total, so trimming a segment visibly shortens its bar; before,
a single-segment clip always filled 100% of the track and dragging its
handle appeared to move nothing.
- Playback boundaries are enforced by a per-frame rAF loop instead of
timeupdate (~4Hz), which let the preview overshoot a trimmed endpoint
by up to 250ms — the exact frame is what an end trim is judged
against. Hitting an edge also snaps currentTime back onto it.
- The transcript header now offers 'segment starts/ends here' actions on
the selected word, where the eye already is when choosing a cut point
from the text.
- Closing the editor mid-render is allowed and explained: the request
keeps running and onRerendered (functional setState in App) updates
the clip card after the editor is gone.
Prod 20-ago, 5 of 12 managed jobs failed and the alert said 'youtube
download' — no download had terminally failed. Three fixes:
- The quality probe now reports source duration, and /api/process rejects
sources under MIN_SOURCE_SECONDS (default 45, 0 disables) on all three
ingest paths with a clear message. A 24s YouTube Short cannot yield
15-60s clips; Gemini returns nothing and the job burns managed minutes
to die with 'no usable clips' (3 of the 5 failures, one user retrying
the same cat video).
- _job_error_text drops per-attempt download warnings when a later
attempt succeeded (HD-direct fails on every job since the server IP
ban; static proxies recover it), and gained an 'Error:' marker so
raised exceptions (RuntimeError:, GeminiBlockedError:) reach the alert
instead of a bare 'Traceback ... exit code 1'. The classifier names
'no clips found (user video)' as its own content-shaped category.
- (env, no code) DIRECT_FIRST=0 in prod: with the server IP banned the
direct attempt only added ~10s and the noise behind these alerts.
Issue #68: publishing a video to YouTube from the Studio now offers
'create clips from this video'. /api/process accepts a
thumbnail_session_id, hardlinks the session's source under the job's
name (so /api/source, the clip editor and retention treat it like a
normal upload) and forwards the session's transcript via a new
main.py --transcript flag, so the pipeline skips a second Whisper pass.
Any problem with the forwarded transcript (missing file, no segments,
silent source) falls back to transcribing normally, and empty
transcripts are not forwarded at all. Contract pinned by six endpoint
tests plus a fallback case; verified end to end locally against the
running app (speech video: 'Reusing precomputed transcript (4
segments)' in the job log).
Issue #46 round two: the 1h sweep kept deleting finished projects under
self-hosters who never touched their env. The disk is already bounded by
OUTPUT_MAX_GB / UPLOADS_MAX_GB, so age can afford to be generous. Cloud
keeps the tight default because clips are archived to R2 on completion.
The results panel now tells self-host users how long their clips live
and which env var controls it, and the restorable-session window follows
the new default.