Skip to content

armgit / fuobe

Public Imported from GitHub
0

The open creative studio on ComfyUI: images, video, 3D and audio on open weights, on your own GPU or the cloud. Camera motions, effects, apps, Cinema, Layers, Image to 3D and an AI agent.

Handoff: idol-4 report

Claude78c9ffa76af3
diff --git a/docs/handoff/reports/idol-4.json b/docs/handoff/reports/idol-4.json
new file mode 100644
index 00000000..a1566744
--- /dev/null
+++ b/docs/handoff/reports/idol-4.json
@@ -0,0 +1,138 @@
+{
+ "key": "idol-4",
+ "impl": {
+ "branch": "o/idol-4 (worktree /home/user/wt/o-idol-4, cut from claude/fuobe-parity-4 at 03e49f2d; 2 commits, cd7af656 and cff844dd, pushed to origin/o/idol-4; commits SSH-signed)",
+ "summary": "People can now look around Gaussian splats inside Fuobe. They no longer have to download them to SuperSplat. I chose Spark 2.3.1 (@sparkjsdev/spark, MIT, World Labs) as the renderer and load it only through a dynamic import. The new SplatViewer works on result cards ('View in 3D' plus a '3D' choice in the card's radio row). It also works in the full-screen viewer, which the Library's 3D tab and the 'View in 3D' output action both open through ModelViewer and the new SplatPanel. It has drag to orbit, pinch and wheel zoom, keyboard controls, Reset view, Turn it over, a light / grey / dark background, the 'Hide faint haze' opacity cut-off (0.05 for Idol 3D on both engines, 0 for TripoSplat) and 'Save a still', which saves a PNG to Library Uploads (hidden for guests). The orbit video or picture stays as the poster while loading. It is also the fallback when there is no WebGL2, when the file is over the size limit (48 MB on touch screens, 160 MB elsewhere), and in the full-screen viewer under prefers-reduced-motion until the user picks 'Look around in 3D'. The download buttons are kept. Demo mode now returns real splats: an .spz with the orbit video on the open engine and a .ply on the cloud. Nothing existed for this before; the plan's pieces were all gaps. What was already there and reused: splatFormatOf, model3dView's splat field, the storage MIME types for ply/spz/ksplat, and the card's splat radio row.",
+ "built": [
+ {
+ "feature": "src/lib/av/splat-view.ts (pure)",
+ "status": "built",
+ "verifiedHow": "src/lib/av/splat-view.ts (pure): viewerFor (splat vs GLB), hazeCutoffFor / IDOL_HAZE_CUTOFF 0.05, SPLAT_BACKGROUNDS, SPLAT_MAX_BYTES / splatTooBig, splatFallback (no-webgl2 / too-big / reduced-motion), FALLBACK_TEXT, stillFileName"
+ },
+ {
+ "feature": "src/components/model3d/splat-engine.ts",
+ "status": "built",
+ "verifiedHow": "src/components/model3d/splat-engine.ts: three.js scene + OrbitControls + Spark SparkRenderer/SplatMesh. Fetches the file itself (abortable, refuses past maxBytes using Content-Length and the streamed byte count), frames the camera to the splat's bounds, applies the haze cut-off as a live dyno objectModifier, has orbit and zoom for keys, reset, flip, and capture (PNG). Draws only on demand, and keeps drawing for a moment after a change so Spark can finish sorting."
+ },
+ {
+ "feature": "src/components/model3d/splat-viewer.tsx",
+ "status": "built",
+ "verifiedHow": "src/components/model3d/splat-viewer.tsx: the SplatViewer component (role=application with a screen-reader description, arrow keys / + / - / 0 / Home, a labelled toolbar, a background radiogroup, the haze slider in a popover on cards and inline on the panel, Save a still, the poster plus a progress badge while loading, touch events kept from the studio viewer's swipe-to-next, useReducedMotion and hasWebgl2 exported)"
+ },
+ {
+ "feature": "src/components/model3d/model-card.tsx",
+ "status": "built",
+ "verifiedHow": "src/components/model3d/model-card.tsx: 'View in 3D' and the '3D' radio choice open the splat viewer in place. The 'Fuobe doesn't draw splats yet' note is gone; only a fallback note shows when the viewer can't open. useReducedMotion moved to splat-viewer.tsx. The GLB / model-viewer path is unchanged."
+ },
+ {
+ "feature": "src/components/studio/result-media.tsx",
+ "status": "built",
+ "verifiedHow": "src/components/studio/result-media.tsx: SplatPanel replaces SplatPreview (the viewer, the download, and the fallback with 'Look around in 3D' under reduced motion)"
+ },
+ {
+ "feature": "src/server/providers/mock.ts",
+ "status": "built",
+ "verifiedHow": "src/server/providers/mock.ts: a demo splat on the open engine (comfyui route, meta.openSplat) returns sample:demo-splat.spz plus demo-turntable.mp4; on the cloud it returns sample:demo-splat.ply"
+ },
+ {
+ "feature": "scripts/gen-demo-splat.mjs plus public/samples/demo-splat.ply (279 KB) and demo-splat.spz (50 KB)",
+ "status": "built",
+ "verifiedHow": "scripts/gen-demo-splat.mjs plus public/samples/demo-splat.ply (279 KB) and demo-splat.spz (50 KB): the demo crystal as 4,096 Gaussians, 1,280 of them haze under 0.05. The script is deterministic; --gaussians=N --out=dir writes bigger ones for timing (not committed)."
+ },
+ {
+ "feature": "package.json / pnpm-lock.yaml",
+ "status": "built",
+ "verifiedHow": "package.json / pnpm-lock.yaml: @sparkjsdev/spark 2.3.1 (exact; published 2026-10-01; 2.4.0 was only 14 days old)"
+ },
+ {
+ "feature": "docs/research/idol-9.md \u00a79 idol-4 (plus notes in \u00a77.1, \u00a710, \u00a711) and idol-9.json splatViewer",
+ "status": "built",
+ "verifiedHow": "docs/research/idol-9.md \u00a79 idol-4 (plus notes in \u00a77.1, \u00a710, \u00a711) and idol-9.json splatViewer: the renderer decision table and the measured numbers"
+ }
+ ],
+ "tests": "Verified by unit tests (tests/splat-view.test.ts, new): which viewer opens which format; the haze default per model; the fallback rules; size limits at 262,144 and 1,048,576 Gaussians; the still's file name; the fixture's .ply and .spz structure. Spark's own decoder (transcodeSpz, in Node) reads both fixtures as 4,096 Gaussians and keeps the 2,816 solid ones at opacityThreshold 0.05. A source scan checks that only splat-engine.ts imports Spark, and only through import(). tests/demo-ops.test.ts was updated: a cloud demo splat is now a real model/ply. Targeted Vitest run passed (13 files): splat-view, model3d, demo-ops, idol, account-idol, outputs, hi3d-refine, fly-around, licences, canvas, cloud-catalog-4, comfy-library-notes, comfy-library-4. No full suite and no pnpm build, as the stage prompt says. tsc --noEmit is clean (needs NODE_OPTIONS=--max-old-space-size=8192 here; the default heap ran out of memory). eslint is clean on every touched file. Verified in the browser with the new script tests/e2e/splat-viewer.mjs in demo mode (pnpm dev -p 3412, Chromium with SwiftShader WebGL2), at 1440 and 390 px, light and dark; it passed. On the cards it opened open-engine Idol 3D (.spz, haze starts at 5%) and cloud TripoSplat (.ply, haze starts Off), confirmed from a screenshot that the splat is drawn, and checked focus, keyboard, toolbar labels, background radios, the slider, and Save a still (a new upload appears). It opened the Library's 3D tab in the full-screen panel (inline slider, download, splat drawn) and checked that nothing scrolls sideways. Bundle check: /image and the cards fetch no Spark until a splat opens, and a GLB result opens model-viewer without fetching Spark. The detection matches the WASM glue's module name, so it holds for production chunks too. Reduced motion: the panel keeps the orbit video until 'Look around in 3D'. No page errors or console errors were seen. tests/e2e/exact-orbits.mjs still passes (the GLB card path, Film it photoreal) Measured: the 262,144-Gaussian .ply is 17.8 MB and the .spz 2.77 MB. Loading it at 390 px takes 1.6 s. SwiftShader takes about 8 s per frame at that size, which says nothing about a phone's GPU; phone frame time was not measured. The dev server was stopped with fuser -k and .next was deleted",
+ "left": [
+ "Phone frame time on a real phone with a 262,144-Gaussian splat. There is no device here, and SwiftShader is not a proxy.",
+ "Real Idol 3D and TripoSplat outputs (GPU or fal key) were never opened in the viewer. Only the synthetic demo splats were. Orientation is the open question: Idol's .ply is documented y-up, but the orientation of ComfyUI SplatToFile3D's .spz and fal's .ply is unverified. 'Turn it over' is there in case either shows upside down.",
+ "The viewer flips to visible as soon as Spark has initialised. On slow (software) GPUs the canvas can stay empty for a moment before the first sorted frame. The e2e waits until the splat is drawn.",
+ "Share pages still show splats only as a download (not changed; the viewer could go there later).",
+ "Idea, not built: Spark's transcodeSpz takes opacityThreshold. A 'Download without haze' (.spz) button could be built in the browser with no ComfyUI pack. That overlaps idol-2.",
+ "Brief out of date. Line numbers: model-card's note was at L324, result-media's panel at L246, splatFormatOf at L281, mock's splat case at L324, and the 'View in 3D' action at output-actions L199. Two other points: 'There is no Idol cloud route' no longer holds, because idol-1 added fal speridlabs/idol (idol-3d), so the 0.05 default covers both engines. And the Library's 3D tab has no viewer of its own: it opens the studio Viewer, so the change in ModelViewer covers it and 'View in 3D'."
+ ],
+ "docsNotes": "ARCHITECTURE.md line ~148 (mock provider): the sentence 'Splat and rig jobs get the demo GLB too (meta.format glb), so a demo run never shows the splat card' is now wrong for splats. A demo splat is a real .spz with demo-turntable.mp4 on the open engine (meta.openSplat: route op splat on comfyui) and a real .ply on the cloud (scripts/gen-demo-splat.mjs). Rig jobs still get the GLB. ARCHITECTURE.md (Studios \u2192 Image to 3D / UI): add the splat viewer. SplatViewer (src/components/model3d/splat-viewer.tsx) loads splat-engine.ts (Spark 2.3.1 on three.js) by dynamic import only. Rules in src/lib/av/splat-view.ts: the haze cut-off starts at 0.05 for Idol 3D and 0 otherwise; the size limit is 48 MB on touch screens and 160 MB elsewhere; the fallback is the orbit video or picture with no WebGL2, over the limit, or under reduced motion in the full-screen viewer. Save a still uploads a PNG to Uploads (hidden for guests). STATUS.md / DEVELOPMENT.md generators list: node scripts/gen-demo-splat.mjs regenerates public/samples/demo-splat.ply and .spz (--gaussians=N --out=dir for timing files). STATUS.md: Image to 3D splat results open in the 3D splat viewer on cards, in the full-screen viewer and in the Library. Phone performance is unmeasured. CREDITS.md 'Elsewhere' could list Spark (@sparkjsdev/spark, MIT, World Labs) if it lists front-end libraries. It doesn't list three or model-viewer today, so I left it alone. Research correction made: docs/research/idol-9.md \u00a79 idol-4 now holds the renderer decision and numbers. \u00a77.1, \u00a710 and \u00a711 have dated notes. idol-9.json has a splatViewer entry."
+ },
+ "review": {
+ "findings": [
+ {
+ "file": "src/components/studio/result-media.tsx",
+ "line": 270,
+ "severity": "minor",
+ "summary": "The full-screen SplatPanel always passes autoFocus, so keyboard browsing through results (ArrowLeft/ArrowRight in the studio Viewer) stops at every splat. The focused splat stage takes the arrows and calls preventDefault, and the Viewer's window handler ignores events that were already handled (ignoreKey: e.defaultPrevented). The GLB model-viewer path never takes focus, so this is new behaviour.",
+ "failureScenario": "In the Library's 3D tab, open a splat and press ArrowRight. Focus is on 'Look around the splat' (role=application), and the key orbits the splat instead of going to the next result. Browsing to another splat grabs focus again. I checked this in demo mode with Chromium/SwiftShader: after ArrowRight the same .ply was still open. Blurring and pressing ArrowRight moved to the next result (the .spz). Fix: drop autoFocus in the panel, or only auto-focus when the panel was opened by 'View in 3D' / 'Look around in 3D'. Another option is to let ArrowLeft/Right through when the stage was focused programmatically and the user hasn't interacted with it yet.",
+ "verified": true
+ },
+ {
+ "file": "src/components/model3d/splat-engine.ts",
+ "line": 180,
+ "severity": "minor",
+ "summary": "dispose() calls renderer.dispose() but not renderer.forceContextLoss(). Every card that opens and closes the splat viewer leaves a live WebGL2 context until GC, and nothing handles webglcontextlost.",
+ "failureScenario": "On the Image to 3D feed, someone opens '3D' on many splat cards one after another (the canvas is recreated on each toggle). Chrome's limit of about 16 contexts makes it drop the oldest with 'Too many active WebGL contexts', and the viewer that is open can then go blank with no fallback note. I traced this from the code but did not reproduce the exhaustion. Fix: call this.renderer.forceContextLoss() in dispose(), and optionally show the fallback note on webglcontextlost.",
+ "verified": false
+ },
+ {
+ "file": "tests/demo-ops.test.ts",
+ "line": 212,
+ "severity": "minor",
+ "summary": "The demo-ops test covers only the cloud demo splat (.ply). The open-engine branch (meta.openSplat: sample:demo-splat.spz plus demo-turntable.mp4, route op splat on comfyui) has no unit test. Only the e2e and a hand-built model3dView object cover it, so a regression in the new mock condition would go unnoticed in CI.",
+ "failureScenario": "If someone changes openSplat's condition (route.op / route.provider) or renames the sample, open-engine demo runs go back to a .ply with no orbit video and Vitest stays green. Add a case that runs a demo splat on oss-triposplat / the Idol open graph and asserts model/x-spz, meta.format spz and a turntable video.",
+ "verified": true
+ },
+ {
+ "file": "src/components/model3d/splat-viewer.tsx",
+ "line": 296,
+ "severity": "nit",
+ "summary": "'Save a still' is hidden with useIsGuest(), which is false until the viewer query has loaded (`!!v && ...`). A guest who opens a splat before /api/viewer answers sees the button for a moment, and clicking it gives a 401 error toast.",
+ "failureScenario": "On a public sign-up install with a slow first viewer fetch, a guest opens a splat on a card and clicks Save a still before the viewer data arrives. The upload is refused with 401 and shows an error toast. Low impact because the server refuses it, but the button could stay hidden until the viewer is known.",
+ "verified": true
+ },
+ {
+ "file": "src/lib/av/model3d.ts",
+ "line": 257,
+ "severity": "nit",
+ "summary": "Two doc comments are stale. L257 still says the splat is a format 'which the page doesn't draw', and L279 says 'the demo's \"splat\" is a GLB the viewer shows'. Both stopped being true with this package.",
+ "failureScenario": "A later builder reads these comments, believes splats aren't drawn and the demo splat is a GLB, and builds on that.",
+ "verified": true
+ },
+ {
+ "file": "docs/ARCHITECTURE.md",
+ "line": 148,
+ "severity": "nit",
+ "summary": "The mock provider's description still says 'Splat and rig jobs get the demo GLB too (meta.format glb), so a demo run never shows the splat card'. The implementer flagged this for the docs stage. It is listed here so it isn't missed.",
+ "failureScenario": "The docs describe demo behaviour that no longer matches (a demo splat is now a real .spz with an orbit video on the open engine, or a .ply on the cloud).",
+ "verified": true
+ }
+ ],
+ "checks": "Read the review prompt and binding rules, then the whole diff claude/fuobe-parity-4...o/idol-4 (16 files) with the code around it: studio viewer.tsx key and swipe handling, ModelCard choices and radio row, persistOutput's sample: handling, splatFormatOf / model3dView, storage MIME map, the CSP in next.config.ts, useIsGuest, and Cinema's capture for comparison. Verified Spark at npm: 2.3.1 is MIT, published 2026-10-01 (more than two weeks old; 2.4.0 is 2026-10-20), peer three >=0.180.0. The WASM and workers are inlined (data:/blob: workers, no import.meta.url asset), and the CSP sets no script-src or worker-src, so they are not blocked. Spark is imported only by splat-engine.ts through import() from splat-viewer.tsx. The Spark API used (objectModifier, updateGenerator, updateVersion, getBoundingBox) exists in its types. No new route, table, server file path, ComfyUI graph, model or LoRA, so public sign-up, tenant/account-inputs, ASSET_REFS, pre-flight and licence data are not affected. Accounts can't start 3D models, and Save a still is an ordinary own upload through POST /api/uploads. No hot files touched, no Higgsfield code, media or API. The visitor copy is plain. scripts/gen-demo-splat.mjs is deterministic: regenerating byte-for-byte matches the committed .ply (278,942 B) and .spz (49,745 B). npx next typegen plus tsc --noEmit (8 GB heap): clean. eslint on all touched files: clean. Full Vitest (FUOBE_ACCOUNT_DISK_FREE_GB=1, --maxWorkers=2): 340/346 files and 5483/5494 tests passed. All 7 failures are known from main: comfy-reuse, dop-originals, preset-featured, soul-runs (2), split-soundtrack, plus moderation-hook, which timed out under load and passes alone. splat-view, demo-ops, model3d and moderation-hook rerun alone: 66/66 passed. Browser check in demo mode (FUOBE_DEMO_MODE=on, pnpm dev -p 3471, Chromium/SwiftShader): the implementer's tests/e2e/splat-viewer.mjs passed in all 14 steps (1440 and 390 px, light and dark, cards, the Library panel, the bundle check, the GLB path, reduced motion). A separate script confirmed the arrow-key trap in the full-screen viewer. Server stopped with fuser -k, .next deleted, worktree clean. Nothing edited, committed or pushed.",
+ "verdict": "Approve with minor fixes. The splat viewer works on cards, in the full-screen viewer and in the Library on both engines' demo outputs. The GLB/model-viewer path, Cinema and turntables are untouched, and typecheck, lint and tests are clean apart from failures already known on main. No blocker or major issue. Worth fixing before merge: the full-screen panel's autoFocus stops arrow-key browsing at every splat (verified in the browser). Cheap hardening: forceContextLoss on dispose, and a unit test for the open-engine demo splat. Stale comments and ARCHITECTURE.md L148 go to the docs stage."
+ },
+ "fix": {
+ "applied": [
+ "result-media.tsx:270 (minor, confirmed in the browser): arrow-key browsing no longer stops at every splat. Dropping autoFocus was not enough on its own. The browser check showed the full-screen dialog focuses the stage itself on open, because it is the first tabbable element. So SplatViewer now takes ArrowLeft/ArrowRight only after the user has reached for the stage: tabbed to it, pressed on it, used one of its keys, or opened it on purpose (autoFocus). The panel passes autoFocus={asked}, so it takes focus only after 'Look around in 3D'. ArrowUp/Down, +/-, 0 and Home still work at once. A unit source check was added in tests/splat-view.test.ts. tests/e2e/splat-viewer.mjs now checks that ArrowRight moves to the next result after the panel opens, that it turns the splat once the user presses on it, and that the viewer takes focus after 'Look around in 3D' under reduced motion.",
+ "splat-engine.ts:180 (minor, from reading the code): dispose() now calls renderer.forceContextLoss() and removes its listener. The engine also listens for webglcontextlost. If the browser takes the context away while the viewer is showing, SplatViewer shows the fallback note through onUnavailable: the card goes back to its preview and the panel to its fallback. A unit source check was added.",
+ "tests/demo-ops.test.ts (minor): new test. An open-engine demo splat on oss-triposplat and on oss-idol (routed to comfyui, so meta.openSplat) returns model/x-spz with format spz and role splat, plus a demo-turntable.mp4 with turntable:true, and the served .spz is gzip.",
+ "splat-viewer.tsx:296 (nit): 'Save a still' now shows only after the viewer query has loaded and the viewer is not a guest. It no longer appears for a moment for a guest before /api/auth/me answers.",
+ "src/lib/av/model3d.ts L257/L279 (nit): corrected two out-of-date comments. Splats are drawn by the splat viewer, and today's demo splat is a real .spz/.ply; a GLB marked as a splat (older demo results) stays a GLB.",
+ "docs/ARCHITECTURE.md L148 (nit): the mock provider sentence now says a demo splat is a real .spz with demo-turntable.mp4 on the open engine and a .ply on the cloud. Rig jobs still get the GLB."
+ ],
+ "rejected": [],
+ "checks": "Worktree case (1). The branch held only idol-4's own commits, and the local claude/fuobe-parity-4 (03e49f2d) is its ancestor, so no merge was needed. origin/claude/fuobe-parity-4 is newer (a150159e) and the integrator will bring that in. Ran pnpm install --frozen-lockfile and npx next typegen. Typecheck (NODE_OPTIONS=--max-old-space-size=8192 pnpm typecheck) exited 0, and was re-run after the last edit. pnpm lint exited 0 (5 old warnings in files this package doesn't touch). eslint on the touched files is clean. Targeted Vitest: demo-ops 5/5, splat-view and model3d 55/55. One full Vitest (FUOBE_ACCOUNT_DISK_FREE_GB=1, --maxWorkers=2): 341/346 files and 5487/5497 tests passed, 4 skipped. The 6 failures are all known from main: comfy-reuse, dop-originals, preset-featured, soul-runs (2) and split-soundtrack. Browser: demo mode (FUOBE_DEMO_MODE=on pnpm dev -p 3473, Chromium/SwiftShader), node tests/e2e/splat-viewer.mjs. The first run showed that the dialog focuses the stage on open even without autoFocus. After the fix, all checks passed at 1440 and 390 px, light and dark: cards, the Library panel (ArrowRight browses), the bundle check, the GLB path and reduced motion. No console or page errors. The server was stopped with fuser -k, .next deleted, git status clean. Commit 54249e70 pushed to origin/o/idol-4. After merging origin/claude/fuobe-parity-4 into o/idol-4 (clean, no conflicts): next typegen, typecheck (8 GB heap) and lint exit 0; full Vitest 5624 passed, 7 failed, 4 skipped. All failures are known from main (comfy-reuse, dop-originals, preset-featured, soul-runs x2, split-soundtrack) plus moderation-hook, a load timeout that passes alone (9/9).",
+ "finalSummary": "idol-4 is ready for docs and merge. People can look around Gaussian splats on result cards, in the full-screen viewer and in the Library's 3D tab, with Spark 2.3.1 (MIT) loaded only by dynamic import. The fixes in this stage: the arrow keys keep browsing results in the full-screen viewer until the user engages the splat, closed viewers give their WebGL context back and a lost context shows the fallback, 'Save a still' stays hidden until the viewer is known, there is a unit test for the open-engine demo splat, and stale comments and the ARCHITECTURE.md mock sentence are corrected. Open engine (ComfyUI): Idol 3D and TripoSplat .spz results open in the viewer with the orbit video as poster and fallback; haze starts at 0.05 for Idol and Off for TripoSplat. Verified only with the demo .spz; a real run needs a GPU. Cloud: fal's TripoSplat and Idol .ply open in the same viewer, verified only with the demo .ply; a real run needs a fal key. Public sign-up: guests can look around any splat they can see but get no 'Save a still', and the server would refuse it anyway. Accounts can look around and save stills as their own uploads, but they can't start 3D models yet (403 own-gpu-tool, unchanged). No new routes, server file paths or graphs.",
+ "left": [
+ "Phone frame time on a real phone with a 262,144-Gaussian splat: there is no device here.",
+ "Real Idol 3D and TripoSplat outputs (GPU or fal key) were never opened. The orientation of ComfyUI's .spz and fal's .ply is still unverified; 'Turn it over' is there in case either shows upside down.",
+ "Exhausting WebGL contexts was not reproduced in the browser. The forceContextLoss fix and the fallback when the context is lost are checked by reading the code and a source test, not by a browser run.",
+ "Share pages still offer splats only as a download.",
+ "Docs stage: STATUS.md / DEVELOPMENT.md should mention scripts/gen-demo-splat.mjs and the splat viewer, and ARCHITECTURE.md's Image to 3D UI section should mention SplatViewer (see the implementer's docsNotes)."
+ ]
+ }
+}
\ No newline at end of file