06 · Studio: framework selection and app shell #7
Labels
No labels
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
cmoriarty/trog#7
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Choose the front-end stack against these requirements, then build the shell with panes wired to Aegra streams:
Deliverable: framework decision recorded (short ADR) + running app shell.
Studio: framework selection and app shellto 06 · Studio: framework selection and app shellDone — framework decided, shell live on :2027
ADR:
docs/studio-framework.md(commit7f64319). Decision: React 19 + Vite + TypeScript SPA instudio/, dockview docking panes,@langchain/langgraph-sdk'suseStreamconsuming Aegra's Agent Protocol SSE natively, Monaco earmarked for ticket 09.OpenCode frame: evaluated, rejected. OpenCode is its own agent runtime — an embedded frame renders OpenCode sessions, not our LangGraph runs; wiring trog through its data plane inverts "the graph is the process." Its embeddable web story is also immature (
opencode webload bugs; usable web UIs are third-party rebuilds). We build the feed native and keep the look; the Agent Protocol stream makes it nearly free.Why React: the stream layer is first-party (
useStreamhandles chunk reassembly, reconnect, interrupts against anyapiUrl— verified against our Aegra 0.9.24), Monaco + dockview have the mature wrappers, and the README's training-data argument applies to the studio itself.The shell, running:
hellograph end to end: browser → proxy → Agent Protocol run → brain → SSE tokens → transcript (verified live; run visible flipping busy → idle)threads/search, real status chips (idle/busy/error), seed of ticket 08's graph map:3923/games/…)phaseDeploy:
trog-studioimage (nginx serves the SPA, proxies/api→aegra:2026— same-origin everywhere, zero CORS config). In compose on :2027, added tomake build push, stack 92 redeployed withpullImage: true— http://trogdor:2027 is serving now,/api/infoanswering through the proxy.Dev loop:
npm run devinstudio/(Vite proxy →AEGRA_URL, defaulthttp://trogdor:2026).Review feedback applied (commit
66aff63, redeployed to :2027)--theme=2, trogdor-files redeployed); real fix is native panes — ticket 08 points play at the game URL directly, ticket 09 replaces asset browsing with the native galleryThe observability goal is understood as the studio's spine: every long operation gets visible, textual progress, and 07/08 are where the "understand what it is doing at every point" depth arrives (tool calls, todos, graph position, vitals).
Review round 2 applied (deployed to :2027)
show idle (N)toggle brings history back/assistants/{id}/graph, nodes in execution order, gates' backward edges called out (↩ preproduction ?in ember), and the node a busy run is about to execute lit with◀ now(3s state poll). Ticket 08 still owns the full version — known gap: thenowhighlight watches the newest busy thread regardless of graph until run metadata carries graph identityphasewalkorhellofrom the same boxAlso this round: layouts saved before a new pane shipped now auto-add it on load.
Top-bar status readout shipped (deployed): the aegra dot stays — it's a real
/infohealth poll — and next to it, top right, the feed's working-pulse animation now narrates system activity:run · <node>from the busy thread's next node, plus warm orchestrator seats (image gen/audio gen/animate), dim staticidleotherwise. Orchestrator reached same-origin via a new/orchnginx+Vite proxy. Verified live through a phasewalk run:run · gate_funpulsing amber →idleat ship.Status sync fixed (deployed): all status widgets now render from one shared snapshot taken on a single 3s heartbeat — top bar, map, and runs pane can no longer disagree about the same fact. Animations too: every pulse and the stream cursor share a 0.9s period phase-locked to a global epoch via negative
animation-delay, so everything blinks on the same beat no matter when it mounted.Runs pane folded into the map (deployed): the standalone table duplicated the map for the single-run case, so the run list now lives at the top of the map pane as its selector — this graph's non-idle threads (idle behind the toggle), click to pin the map to a run, unpin to auto-follow the newest busy one. Busy runs light
◀ now; errored runs light red✕ died herewith the run's error message (verified on the Jul 23 brain-loading 503); finished runs light their terminal phase green■ ended. Threads carrygraph_idmetadata, so the list and highlight are graph-filtered — the cross-graph gap from the earlier round is closed.Copyparty out of the chrome (deployed): play pane no longer iframes the directory listing — empty state until a build URL (ticket 08 auto-wires the active run's build). Assets pane deleted: ticket 09's files pane absorbs the gallery — one tree, type-aware viewer (code editor / pixel-scale images / audio player). Scope recorded on #10. Toggle row is now feed · map · play · files.
Closing summary
Deliverables: framework ADR (
docs/studio-framework.md, amended with all review rounds) + the running shell at http://trogdor:2027, deployed via the standard build→push→Portainer path, running image verified equal to latest.Decided: React 19 + Vite + TS SPA · dockview panes ·
@langchain/langgraph-sdkuseStreamon Aegra's Agent Protocol · native feed (OpenCode embed rejected — wrong data plane) · same-origin proxies/api→aegra,/orch→orchestrator (zero CORS) · VSCode-class files surface at #10.Shipped shell (after 5 review rounds): feed · map · play · files
◀ now/ error✕ died here+ message / finished■ ended), graph-filteredphasewalktest graph (+ structural test; suite 118 passed) for exercising it all GPU-freeFollow-ups filed: #25 new-game wizard (v2) · #10 scope: VSCode-class tree + type-aware viewer · #8/#9 fill the feed/map/play depth (incl. thread↔run metadata for multi-run watching, auto-wiring play to the active build, brain-warmup guard noted for #11).