Loom (Alpha) pivot: entity browser + thread chips#296
Conversation
Replaces the zone-only browse model from #293-#295. The previous alpha shipped a view of one corner of zone metadata (waypoints / spawns / triggers / portals) and skipped everything that actually makes a project interesting -- the actors, items, spells, factions. This pivot surfaces all of it through the design's actual centerpiece: "every reference is a clickable thread." What the alpha now does: Browser: everything-grid with a category tab bar at the top. Categories: Actors / Items / Spells / Zones / Factions / Animation Sets. Each card paints kind-specific summary content: actor : Race [Class] + faction name + XP multiplier item : name + type label + value spell : name + recharge + script binding (if any) zone : name + portal/spawn/trigger counts faction : name + computed member count animset : name + clip count + computed "used by" count Composer: right-side property panel that paints whatever's focused. Per-kind detail pages with the entity's full read-only field set. Each composer page also includes a "Threads" section with chips for every reference the entity makes: actor -> faction, M anim set, F anim set zone -> per-portal chips to the target zone (when the target resolves; broken portals render in danger red) faction -> chip per member actor (computed: every actor whose DefaultFaction matches this index) animset -> chip per actor using this anim set (computed: M or F binding) item -> no entity-to-entity references in rcce2's data model; composer shows the script binding as text spell -> same; script + restriction strings Thread chips (Threads.bb): clickable rounded rects with kind icon + target name + arrow. Click pushes current focus onto a back stack and refocuses on the target. Broken references render with a red border and danger-colored "(broken kind #N)" text. Back stack: Esc walks back through the navigation chain. Hero flow: Goblin Shaman -> [Faction: Forest Tribe] -> Forest Tribe -> [Member: Goblin Scout] -> Goblin Scout -> Esc -> Forest Tribe -> Esc -> Goblin Shaman -> Esc -> closes composer back to browser Footer hint shows "Esc walks back -- N in trail" when the stack is non-empty; switches to "Esc returns to browser" when empty. Architecture: src/Loom.bb Data loading (unchanged from #293). Main loop has a single Browser_RenderAndUpdate + Composer_RenderAndUpdate per frame. Esc consumes one of: pop back stack | close composer | exit Loom. src/Modules/Loom/Threads.bb Focus state (Loom_FocusKind$ / Loom_FocusID), back stack (Loom_BackStack BBList of LoomFocusEntry), name resolution per kind, and Threads_RenderChip primitive that all surfaces use. src/Modules/Loom/Browser.bb Category tab bar with brass underline for the active tab, paginated card grid that auto-fits the window width, per-kind card body renderers. src/Modules/Loom/Composer.bb Per-kind detail page renderers, row+chip layout helpers, boolean / enum / float formatters, zone-name -> Handle resolver for portal threads. Read-only throughout. Editing is a beta concern -- it needs save / dirty tracking that's its own design surface. All five engine targets compile clean. Loom.exe grew from ~2.0 MB (skeleton) to ~2.4 MB (with data layer + browser + composer + threads). About 1,200 lines of Loom-specific code total. Supersedes the closed #293 (atlas), #294 (zone map), and #295 (zone composer). Branches off develop on top of the merged #292 (skeleton + PM launcher). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: aba0d594f8
ℹ️ 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".
| Function Browser_RenderAndUpdate(sw, sh, project$) | ||
| Local mx = MouseX() | ||
| Local my = MouseY() | ||
| Local clicked = MouseHit(1) |
There was a problem hiding this comment.
Preserve click events for composer chip navigation
Browser_RenderAndUpdate reads MouseHit(1) before Composer_RenderAndUpdate runs in the same frame, and MouseHit is edge-triggered since the last call. That means the browser consumes the click and the composer receives 0, so thread chips cannot be followed reliably (and often never fire at all), which breaks the core Loom navigation flow. Sample the mouse click once per frame (e.g., in Loom.bb) and pass it into both render/update functions.
Useful? React with 👍 / 👎.
Summary
Replaces the zone-only browse model from the closed #293-#295 with the Loom design's actual centerpiece: an everything-browser and thread chips that jump between related entities.
The previous alpha shipped a view of one corner of zone metadata (waypoints / spawns / triggers / portals) and skipped everything that actually makes a project interesting — the actors, items, spells, factions. This pivot surfaces all of it.
Stacks on top of merged #292 (skeleton + Project Manager launcher).
What it does now
Browser — everything-grid with a category tab bar:
Each card paints kind-specific summary content. Hover lifts the border to arcane blue. Click focuses the entity.
Composer — right-side property panel for the focused entity, with per-kind layouts:
DefaultFactionmatches)Thread chips — clickable rounded rects with kind icon + target name + arrow. Click pushes current focus onto a back stack and refocuses on the target. Broken references render in danger red.
Back stack — Esc walks back through the navigation chain. Hero flow:
Footer hint shows ""Esc walks back · N in trail"" when the stack is non-empty.
Architecture
src/Loom.bbBrowser_RenderAndUpdate+Composer_RenderAndUpdateper frame. Esc consumes one of: pop back stack | close composer | exit Loom.src/Modules/Loom/Threads.bbBBListofLoomFocusEntry) + per-kind name resolution +Threads_RenderChipprimitive.src/Modules/Loom/Browser.bbsrc/Modules/Loom/Composer.bbRead-only in alpha
Every field is read-only. Editing is a beta concern — it needs save / dirty tracking that's its own design surface. The alpha's job is ""I can finally see my whole world through Loom's lens, and follow the threads between things.""
Blast radius
Browser.bb,Composer.bb,Threads.bbLoom.bb(was splash skeleton, now data-load + browse loop)Why no 3D zone viewport
ClientAreas.bb'sLoadAreais entangled with GUE-specific UI globals (GY_Cam,GY_*,ResolutionType,RandomImages,GetMusicName$,GetTexture, the Gooey lib). Pulling all of that in would lock Loom to GUE's UI substrate, which is exactly what Loom is supposed to decouple. A literal 3D viewport can land as a beta refactor onceLoadArea's data path is decoupled from its UI path.Test plan
compile.batbuilds cleanLoom (Alpha)Items/Spells/Zones/Factions/Animation Sets— grid repopulatesFactionchip — composer switches to that faction, shows rosterWhat's NOT in (beta concerns)
🤖 Generated with Claude Code