Repository navigation
feat(design): Design Studio preset for micro-branch - #49
Conversation
- `init --preset design-studio` fills in a fast build (manifest + Vite), linked dependencies for each take, root paths and the Excalidraw scrub. - Rounds and takes take `--view <prototype>/<path>` (Design Studio) or `--entry` (anything). Design Studio frames open on one view through the studio's own preview address. `views` lists them. - Snapshots can copy assets from listed hosts (`--localize`, `--localize-fonts`) so Twombly's network gate passes, with a cache. - The board serves each frame at r<N>-t<M>.localhost when a build uses root paths. - Fix: symlinks made by setup (a linked node_modules) went into take commits, because `node_modules/` in .gitignore only matches folders. They now go into the repo's local info/exclude. Tested end to end on a Design Studio clone with Twombly 0.4.10: two takes placed, posters checked, board checked in Chromium, pick and archive. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 39e08f7e10
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| "id": rid, "n": n, "slug": slugify(slug), "question": question, "base": base, "base_ref": base_ref, | ||
| "id": rid, "n": n, "slug": slug, "question": args.question, "base": base, "base_ref": base_ref, | ||
| "built_on": built_on, "status": "open", "picked": None, "created_at": now(), "takes": {}, | ||
| "entry": args.entry or inherit.get("entry"), "view": args.view or inherit.get("view"), |
There was a problem hiding this comment.
Inherit the effective entry or view as a single choice
When a Design Studio round specifies --view and a take overrides it with --entry, round next inherits both fields independently. Because frame_entry() checks the view first, the next round silently switches back to the original round's view instead of retaining the take's entry. Similarly, an explicit round next --entry cannot override an inherited view. Resolve the source's effective selection before inheriting it, and clear the inherited alternative when an explicit override is supplied.
Useful? React with 👍 / 👎.
| return "/" + target | ||
| if source.suffix in MARKUP_SUFFIXES: | ||
| return os.path.relpath(snapshot / target, source.parent).replace(os.sep, "/") | ||
| return target # scripts resolve against the page, which sits at the snapshot root |
There was a problem hiding this comment.
Resolve localized script assets relative to the selected entry
When root paths are disabled and the selected entry is nested, such as pages/index.html, a remote image URL in JavaScript is rewritten to mb-assets/<hash>.png, but the copy is stored at the snapshot root. Assigning that string to an image source makes the browser request pages/mb-assets/<hash>.png, which does not exist, so localization breaks an image that previously loaded. Pass the resolved frame entry into localization and calculate document-relative references from its directory rather than assuming every entry sits at the snapshot root.
Useful? React with 👍 / 👎.
What
stack:micro-branchnow works inside any Design Studio install, and each frame opens on one prototype view with no studio chrome around it.init --preset design-studionode_modulesand eachsrc/systems/*/node_modules, root paths on, Excalidraw scrub on--view/--entryper round and take--view <prototype>/<path>resolves against the take's build manifest and opens Design Studio's preview address.--entry "index.html?variant=b"works in any repoviews--localize <hosts>,--localize-fontsexcalidraw-public-configscrubr<N>-t<M>.localhostwhen the build uses root pathsnode_modules) were committed into takes, becausenode_modules/only matches folders. They now go into the localinfo/excludeTested
test_micro_branch.py); full suite 510 pass.🤖 Generated with Claude Code