Skip to content

feat(design): Design Studio preset for micro-branch - #49

Merged
thecolormaroun merged 1 commit into
mainfrom
feat/micro-branch-design-studio
Nov 7, 2026
Merged

thecolormaroun merged 1 commit into
mainfrom
feat/micro-branch-design-studio

Conversation

@thecolormaroun

Copy link
Copy Markdown
Owner

What

stack:micro-branch now works inside any Design Studio install, and each frame opens on one prototype view with no studio chrome around it.

Change Detail
init --preset design-studio Fast frame build (manifest + Vite, ~10 s), takes link the main checkout's node_modules and each src/systems/*/node_modules, root paths on, Excalidraw scrub on
--view / --entry per 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 repo
views Lists Design Studio views on trunk or in a take
--localize <hosts>, --localize-fonts Copies remote fonts and images into each snapshot (cached, https only, 15 MB cap) so Twombly's network gate passes
excalidraw-public-config scrub Rewrites two bundled Excalidraw strings that trip Twombly's secret check: its public Firebase client key and a storage key name
Board Serves each frame at r<N>-t<M>.localhost when the build uses root paths
Fix Setup symlinks (a linked node_modules) were committed into takes, because node_modules/ only matches folders. They now go into the local info/exclude

Tested

  • 5 new tests (17 in test_micro_branch.py); full suite 510 pass.
  • End to end on a local clone of a real Design Studio install with Twombly 0.4.10: two takes on one view, both placed with no warnings, posters show each change, board checked in Chromium, pick and archive.

🤖 Generated with Claude Code

- `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>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 7, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-07T03:24:15.671487Z 39e08f7 PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@thecolormaroun
thecolormaroun merged commit 4d77754 into main Nov 7, 2026
3 checks passed

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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"),

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant