09 · Studio: file browser, editor, and asset gallery #10

Closed
opened 2026-07-23 00:07:14 -04:00 by cmoriarty · 6 comments
Owner
  • File browser + editor for the game repo with minimal-IDE features (tree, tabs, syntax highlighting, search)
  • Shows all generated assets on disk: view images/sprites, play audio
  • Reference any asset for tweaks/changes — select it and feed an updated prompt back into the asset pipeline
- File browser + editor for the game repo with minimal-IDE features (tree, tabs, syntax highlighting, search) - Shows **all generated assets on disk**: view images/sprites, play audio - Reference any asset for tweaks/changes — select it and feed an updated prompt back into the asset pipeline
cmoriarty changed title from Studio: file browser, editor, and asset gallery to 09 · Studio: file browser, editor, and asset gallery 2026-07-23 00:10:10 -04:00
Author
Owner

Gallery seed exists (2026-07-24): the asset-review page pattern (user-approved) is now auto-generated per game — scripts/asset-review.py, committed as assets/review.html after every drain. Pattern to absorb into the studio gallery: pixel-true CSS upscales + native-scale specks, sprite sheets animated via steps() from their JSON manifests, audio players, spec Briefs as per-asset "why", the style block as header, findings called out. The studio can render the committed page directly or reimplement the pattern with live data.

**Gallery seed exists (2026-07-24):** the asset-review page pattern (user-approved) is now auto-generated per game — `scripts/asset-review.py`, committed as `assets/review.html` after every drain. Pattern to absorb into the studio gallery: pixel-true CSS upscales + native-scale specks, sprite sheets animated via steps() from their JSON manifests, audio players, spec Briefs as per-asset "why", the style block as header, findings called out. The studio can render the committed page directly or reimplement the pattern with live data.
Author
Owner

Note from #20 (user direction, 2026-07-25): model switcher for asset generation.

When the gallery grows regenerate/tweak controls, add a model selector per asset-gen request — with a short context hint per option so the choice is informed, e.g.:

Image seats (all weights + graphs on the RAID / in server/trog_lib/workflows/, kept on disk deliberately):

  • FLUX.2-dev + craft prompt — default; best overall look (won the #20 eye vote), ~4 min
  • Z-Image-Turbo + pixel LoRA — fine detail: crisp glyphs, card indices, intricate small grids, ~75s (already routable: fine flag on /jobs)
  • klein-4B + pixel LoRA — speed: ~15s, chunky cartoon style, Apache-2.0 (graph on disk, currently unrouted)

Audio seats (same treatment):

  • ACE-Step — music/themes
  • stable-audio-open — sfx/foley transients
  • HeartMuLa-oss-3B — vocals (seat split pending #19)

Backend note: the orchestrator already routes by spec flags (fine, workflow keyed prompts). A generalized optional model/workflow hint on JobRequest + a small GET /seats catalog endpoint (id, label, hint, est. time) would give the UI everything it needs — the per-model context strings above can live in that catalog so UI and CLI stay in sync.

Bench evidence for the hints: trog-games/sprite-bench review page + docs/asset-gen-research.md 05.7, audio equivalents in docs/audio-gen-research.md.

**Note from #20 (user direction, 2026-07-25): model switcher for asset generation.** When the gallery grows regenerate/tweak controls, add a model selector per asset-gen request — with a short context hint per option so the choice is informed, e.g.: **Image seats** (all weights + graphs on the RAID / in `server/trog_lib/workflows/`, kept on disk deliberately): - **FLUX.2-dev + craft prompt** — default; best overall look (won the #20 eye vote), ~4 min - **Z-Image-Turbo + pixel LoRA** — fine detail: crisp glyphs, card indices, intricate small grids, ~75s (already routable: `fine` flag on /jobs) - **klein-4B + pixel LoRA** — speed: ~15s, chunky cartoon style, Apache-2.0 (graph on disk, currently unrouted) **Audio seats** (same treatment): - **ACE-Step** — music/themes - **stable-audio-open** — sfx/foley transients - **HeartMuLa-oss-3B** — vocals (seat split pending #19) Backend note: the orchestrator already routes by spec flags (`fine`, workflow keyed prompts). A generalized optional `model`/`workflow` hint on `JobRequest` + a small `GET /seats` catalog endpoint (id, label, hint, est. time) would give the UI everything it needs — the per-model context strings above can live in that catalog so UI and CLI stay in sync. Bench evidence for the hints: trog-games/sprite-bench review page + `docs/asset-gen-research.md` 05.7, audio equivalents in `docs/audio-gen-research.md`.
Author
Owner

Scope note from studio review (2026-07-25): "file editor" means a full-fledged VSCode-class experience — file tree, tabs, search, familiar keybindings — not a lone Monaco widget.

Two candidate shapes when this ticket starts:

  1. Embed openvscode-server (MIT, self-hosted, real VS Code) as a studio pane — full IDE for free, one more container in the stack; auth/scoping to the game repo checkout needs thought
  2. Monaco + custom chrome — lighter, same-origin, but file tree/search/git all hand-built to reach "vscode-like"

Leaning (1) given the expectation level; decide here.

Scope note from studio review (2026-07-25): **"file editor" means a full-fledged VSCode-class experience** — file tree, tabs, search, familiar keybindings — not a lone Monaco widget. Two candidate shapes when this ticket starts: 1. **Embed openvscode-server** (MIT, self-hosted, real VS Code) as a studio pane — full IDE for free, one more container in the stack; auth/scoping to the game repo checkout needs thought 2. **Monaco + custom chrome** — lighter, same-origin, but file tree/search/git all hand-built to reach "vscode-like" Leaning (1) given the expectation level; decide here.
Author
Owner

Second scope update from studio review (2026-07-25): this pane is the studio's only file surface — the copyparty iframes are retired and the assets pane is deleted from the shell.

Shape: VSCode-class file hierarchy over the game repo; the selection opens in a type-aware viewer:

  • code → the editor (Monaco / openvscode-server per the earlier note)
  • images → viewer at honest pixel scale (image-rendering: pixelated, the review-page patterns)
  • audio → player (<audio controls>)
  • sprite sheets → the steps() animation treatment where a manifest exists

So this ticket absorbs the asset-gallery role entirely — gallery-ish browsing IS the tree + viewer. Copyparty stays as backing storage/serving only, never as user-facing chrome.

Second scope update from studio review (2026-07-25): **this pane is the studio's only file surface** — the copyparty iframes are retired and the assets pane is deleted from the shell. Shape: VSCode-class file hierarchy over the game repo; the selection opens in a **type-aware viewer**: - code → the editor (Monaco / openvscode-server per the earlier note) - images → viewer at honest pixel scale (`image-rendering: pixelated`, the review-page patterns) - audio → player (`<audio controls>`) - sprite sheets → the `steps()` animation treatment where a manifest exists So this ticket absorbs the asset-gallery role entirely — gallery-ish browsing IS the tree + viewer. Copyparty stays as backing storage/serving only, never as user-facing chrome.
Author
Owner

Relevance review + remaining work implemented (b79c15a, 209f766)

Nothing of this ticket existed yet (the pane was a placeholder). All three bullets now implemented:

  • File browser + editor: the game repo as a collapsible tree with tabs; CodeMirror 6 editor (syntax highlighting for the languages trog produces, built-in search via ⌘F, oneDark) — save is a commit to main through new same-origin orchestrator endpoints (GET /repo/{slug}/tree · GET /repo/{slug}/raw/{path} · PUT /repo/{slug}/file/{path} + GET /config), so the Forgejo token never reaches the browser and the org is resolved server-side.
  • All generated assets on disk: images render at honest pixel scale with the true-size speck (review-page convention), audio gets a player.
  • Reference an asset for tweaks: every image asset carries a tweak bar — type an updated prompt and it queues an i2i job through the pipeline with the same asset name, so the result recommits over the original; the note reports the queue ref.

Verified user-level in a real browser against the live fixture and cycle-test repos: tree, tabs, editor round-trip (committed 35c2796 to cycle-test, then reverted), knight.png viewer, tweak intake. e2e specs added (they self-skip on a stack that predates /orch/config). Unit tests cover the endpoint contracts.

Deploy note: needs a make deploy (server + studio images) to go live on the stack.

# Relevance review + remaining work implemented (b79c15a, 209f766) Nothing of this ticket existed yet (the pane was a placeholder). All three bullets now implemented: - **File browser + editor**: the game repo as a collapsible tree with tabs; CodeMirror 6 editor (syntax highlighting for the languages trog produces, built-in search via ⌘F, oneDark) — **save is a commit to main** through new same-origin orchestrator endpoints (GET /repo/{slug}/tree · GET /repo/{slug}/raw/{path} · PUT /repo/{slug}/file/{path} + GET /config), so the Forgejo token never reaches the browser and the org is resolved server-side. - **All generated assets on disk**: images render at honest pixel scale with the true-size speck (review-page convention), audio gets a player. - **Reference an asset for tweaks**: every image asset carries a tweak bar — type an updated prompt and it queues an i2i job through the pipeline with the same asset name, so the result recommits over the original; the note reports the queue ref. Verified user-level in a real browser against the live fixture and cycle-test repos: tree, tabs, editor round-trip (committed 35c2796 to cycle-test, then reverted), knight.png viewer, tweak intake. e2e specs added (they self-skip on a stack that predates /orch/config). Unit tests cover the endpoint contracts. **Deploy note:** needs a `make deploy` (server + studio images) to go live on the stack.
Author
Owner

Closing — all three parts delivered and live

  • File browser + editor collapsible repo tree with tabs; CodeMirror 6 (syntax highlighting for trog's languages, in-file ⌘F search, oneDark); save is a commit to main through same-origin orchestrator endpoints — the Forgejo token never reaches the browser.
  • All generated assets on disk images at honest pixel scale with the true-size speck, audio with a player.
  • Tweak flow every image asset carries a prompt bar that queues an i2i job under the same asset name, so the result recommits over the original.

Deployed and verified against the real fixture/cycle-test repos (an editor round-trip committed and was reverted); e2e-covered.

Named residuals — global cross-file search, animated sheet preview in the viewer, tweak for animate/audio (the audio half blocked upstream on seat routes) — are tracked in #28.

# Closing — all three parts delivered and live - **File browser + editor** ✅ collapsible repo tree with tabs; CodeMirror 6 (syntax highlighting for trog's languages, in-file ⌘F search, oneDark); **save is a commit to main** through same-origin orchestrator endpoints — the Forgejo token never reaches the browser. - **All generated assets on disk** ✅ images at honest pixel scale with the true-size speck, audio with a player. - **Tweak flow** ✅ every image asset carries a prompt bar that queues an i2i job under the same asset name, so the result recommits over the original. Deployed and verified against the real fixture/cycle-test repos (an editor round-trip committed and was reverted); e2e-covered. Named residuals — global cross-file search, animated sheet preview in the viewer, tweak for animate/audio (the audio half blocked upstream on seat routes) — are tracked in **#28**.
Sign in to join this conversation.
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
cmoriarty/trog#10
No description provided.