Repository navigation
feat(content): new carousel posts are drawn by the template, and Instagram gets them at 4:5 - #664
Merged
Merged
Conversation
…agram gets them at 4:5 Phase 1 of #657 done: a new carousel post publishes to TikTok at 9:16 and to Instagram at 4:5 from one set of slides. Which posts. A post now names the carousel template that draws it (content_posts.carousel_template). Every post that exists reads "" and stays on the old slide engine, so a post that went out never redraws differently from what was sent; the model gives new posts the current template. A post holding a slide the agent laid out itself (kind "design") also stays on the engine: the template cannot draw it. drawn_by_template (backend) and drawnByTemplate (app) decide, and say the same. The agent's slides do not change. lib/carouselRun.js maps the stored slides onto the template's run, once, for the preview and for render_slide, and every run it makes passes the template's contract. No prompt changed. Drawing: - The post view draws a template post in the stage player (TemplateSlides), with 9:16 and 4:5 in the slide header, and falls back to the old carousel when this app has no version of the post's template. - render_slide draws a template post's slide at every frame the template has, in one framing of it, and sends the 4:5 with the 9:16. The tool files each render under its size, and keeps one only if it is a PNG of exactly that size. - The template's page loads nothing, so pictures reach it as data: URLs: GET /content/posts/{id}/pictures, one slide at a time, and /content/slide-run for render_slide. Only files the project holds are read: a slide's image_url is the agent's to write, so any other url (an address inside the network, another project's file) is never fetched. Publishing: - pick_media picks renders per frame and offers the 4:5 set only when every slide has one: some slides at 4:5 and the rest at 9:16 would be cut unevenly in the feed. - A scheduler that takes media per platform (Zernio, `customMedia`) gets the 4:5 set for Instagram in the same post; the 4:5 set is uploaded only when an Instagram account is among the targets. PostBridge sends every platform the 9:16, as before. A 4:5 set that cannot be read back is left out and Instagram takes the 9:16; the post still goes. - A post's card keeps showing its 9:16 render. Checked: 3311 backend tests and 635 app tests; the post view and the one-pass capture in Chromium and WebKit, every slide kind at both sizes. Brand versions (phase 2) and video (phase 3) remain on the issue. Refs #657 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The picture routes read a slide's image_url, which the agent writes, and read a /static/references/ url from disk. The resolver already dropped ".." and "." segments, so no url could name a file outside the library, but a link inside the library that points out of it would have been followed. It now refuses a path whose resolved location leaves the library. Raised by an automated review of #664. Refs #657 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Dec 2, 2026
…ts-on-stage No conflicts. The backend's artifact bundle is rebuilt, and the stage doc's date moves to the day it last changed, which the docs check wants. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What and why
Phase 1 of #657 is done: a new carousel post publishes to TikTok at 9:16 and to Instagram at 4:5, from one set of slides.
flowchart LR A[Agent writes slides] --> B[carouselRun maps them] B --> C[Template draws 9:16 and 4:5] C --> D[render_slide saves both] D --> E{Publish via} E -->|Zernio| F[TikTok 9:16 + Instagram 4:5, one post] E -->|PostBridge| G[Every platform 9:16]The agent's slides and prompts don't change. One module (
lib/carouselRun.js) maps stored slides onto the template, for the preview and forrender_slide.Refs #657
Area
backend/— FastAPI / Pythonapp/— Next.jsdesktop/— Tauri shell / sidecarsite/— static marketing siteLaunch: changelog only, because it changes what an existing feature sends rather than adding one to find.
Verification
In Chromium and WebKit through
/preview(scenepost-template): every slide kind in the post view at 9:16 and 4:5, no console errors; the one-pass capturerender_slideuses draws all 14 pictures.AGENTS.mdfor each directory I editedagainst the code around it (STYLE.md)
on the whole screen (not just the part I touched), and attached
before and after shots at 390, 1100 and 1440
Things that need a second look
get_current_userplus a membership check, and returns 404 (not 403)for a non-member
downgradewritten and tested (3d9035ded97d, one column; the legacy-install test walks it back)Where to look hardest:
GET /content/posts/{id}/picturesand/content/slide-runread pictures server-side and return them as data: URLs, because the template may load nothing. A slide'simage_urlis the agent's to write, so only files the project holds (aContentAssetrow, or the bundled reference library) are ever read. Tested with a cloud-metadata address, a path traversal and another project's file.customMediaon Zernio is how Instagram gets the 4:5 set in the same post. I read it from Zernio's own client types; it is not yet tried against the live API.render_slidekeeps a 4:5 render only if it is a PNG of exactly 1080×1350: one filed under the wrong size would publish cut.AI assistance
🤖 Generated with Claude Code