Skip to content

Loom (Alpha) #4 of 4: composer panel — completes the alpha#295

Closed
CoreyRDean wants to merge 1 commit into
coreyrdean/loom-zonemapfrom
coreyrdean/loom-composer
Closed

Loom (Alpha) #4 of 4: composer panel — completes the alpha#295
CoreyRDean wants to merge 1 commit into
coreyrdean/loom-zonemapfrom
coreyrdean/loom-composer

Conversation

@CoreyRDean
Copy link
Copy Markdown
Collaborator

Summary

Fourth and final PR of the Loom alpha. Stacked on top of #294 (zone map), which is on #293 (atlas), which is on #292 (skeleton).

Adds the right-side property panel that the Loom design centers on. When the user picks a marker in the zone map, the composer paints the focused entity's fields off the Area type's per-entity arrays.

Read-only in the alpha — the design intent is ""let me read my world through Loom's lens""; editing comes in beta.

Layout

  • 340 px wide column pinned to the right
  • Brass left rule + brass border so the panel reads as the primary surface in this view
  • Title block: kind eyebrow (WAYPOINT / SPAWN POINT / etc.) in brass, entity display name in parchment, brass divider underneath
  • Body: label/value rows (label brass, value parchment), 24 px row height — 8-9 rows fit without scrolling, enough for every kind here
  • Footer note: ""Read-only in alpha"" so users aren't confused about why fields don't take typing

Per-kind body content

Kind Fields shown
waypoint index, position (X,Y,Z), pause ms, Next A/B + Previous waypoint refs
spawn index, resolved actor name (via ActorList lookup), waypoint ref, size, frequency, max, range, three optional script bindings
trigger index, position, size, script, method
portal index, name, target area, target portal, position, yaw, size

Composer + ZoneMap integration

Composer_Width() returns 0 when nothing is selected and COMPOSER_W otherwise. ZoneMap reads it to shrink its view area by that many pixels on the right so markers along the right edge of a zone don't get hidden behind the panel.

Composer reads ZoneMap_SelectedKind$ / ZoneMap_SelectedIndex from PR #3 directly — no new state to wire. Painted in Loom.bb's main loop immediately after ZoneMap_RenderAndUpdate so the panel layers on top.

Blast radius

  • src/Loom.bb: include + one Composer_RenderIfVisible call in the map mode
  • src/Modules/Loom/ZoneMap.bb: 3 lines — view-area shrink for composer width
  • src/Modules/Loom/Composer.bb: new file
  • All five engine targets compile clean. Loom.exe grew from 2.35 MB to 2.37 MB.

End-to-end alpha flow

Project Manager → Loom (Alpha) → project data loads → atlas of zones → pick a zone → zone map → pick a marker → composer shows its full data. Esc returns step by step. Read-only throughout.

Four-PR series wrap-up

PR Slice
#292 Skeleton + theme + Project Manager launcher
#293 Data loading + atlas boot surface
#294 Top-down zone map surface
#295 (this) Composer panel

Test plan

  • compile.bat builds clean
  • Project Manager → Loom (Alpha) → atlas → click a zone → zone map opens
  • Click a portal marker — composer appears on right, shows portal name + target area + position
  • Click a spawn marker — composer updates, shows resolved actor race+class + frequency + max
  • Click a trigger — shows script name + position + size
  • Click a waypoint — shows position + pause + linked waypoints
  • Map view shrinks horizontally when composer appears (markers near the right edge are still visible)
  • Read-only in alpha footer line is present
  • Press Esc — returns to atlas (composer closes)
  • Pick a different zone, pick markers — composer paints correctly for the new zone's data

What's NOT in (deferred to beta)

  • Editing — every field is read-only
  • Scrolling — assumed not needed for any kind in the alpha; if a project has a spawn with longer script names than fit, they'll truncate
  • Cross-reference jump — clicking the target-area field on a portal doesn't switch to that zone. The atlas is two clicks away (Esc, click); jump would be nice but isn't required for the alpha
  • 3D zone viewport — see Loom (Alpha) #3 of 4: top-down zone map surface #294 description; deferred until LoadArea's data path is decoupled from its UI substrate

🤖 Generated with Claude Code

Adds the right-side property panel that the Loom design centers on.
When the user picks a marker in the zone map, the composer paints the
focused entity's fields off the Area type's per-entity arrays. Read-
only in the alpha -- the design intent is "let me read my world
through Loom's lens"; editing comes in beta.

Layout:
  - 340 px wide column pinned to the right of the screen
  - Brass left rule + brass border so the panel reads as the primary
    surface in this view
  - Title block: kind eyebrow ("WAYPOINT" / "SPAWN POINT" / etc.) in
    brass, entity display name in parchment, brass divider underneath
  - Body: label/value rows (label brass, value parchment), 24 px row
    height -- 8-9 rows fit without scrolling, which is enough for
    every kind here
  - Footer note: "Read-only in alpha" so users aren't confused about
    why fields don't take typing

Per-kind body content:
  waypoint -- index, position (X,Y,Z), pause ms, Next A/B + Previous
              waypoint refs
  spawn    -- index, resolved actor name (via ActorList lookup),
              waypoint ref, size, frequency, max, range, three
              optional script bindings
  trigger  -- index, position, size, script, method
  portal   -- index, name, target area, target portal, position, yaw,
              size

Composer_Width() returns 0 when nothing is selected and COMPOSER_W
otherwise; ZoneMap reads it to shrink its view area by that many
pixels on the right so markers along the right edge of a zone don't
get hidden behind the panel.

State plumbing:
  Composer reads ZoneMap_SelectedKind$ / ZoneMap_SelectedIndex from
  PR #3 directly -- no new state to wire. Painted in Loom.bb's main
  loop immediately after ZoneMap_RenderAndUpdate so the panel layers
  on top.

All five engine targets compile clean. Loom.exe grew from 2.35 MB
(map) to 2.37 MB (map + composer).

This PR completes the four-PR Loom alpha:
  #292  skeleton + theme + Project Manager launcher
  #293  data loading + atlas boot surface
  #294  top-down zone map surface
  #295  composer panel (this)

End-to-end alpha flow: Project Manager -> Loom (Alpha) ->
project data loads -> atlas of zones -> pick a zone -> zone map ->
pick a marker -> composer shows its full data. Esc returns step by
step. Read-only throughout.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@CoreyRDean CoreyRDean requested a review from a team as a code owner May 26, 2026 21:59
Copy link
Copy Markdown

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

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: 2f54ac6a61

ℹ️ 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".

// Format a waypoint reference index for display. Some Area fields use -1
// or 0 to mean "no link", depending on the field; we render both as "(none)".
Function Composer_WaypointRef$(idx)
If idx <= 0 Then Return "(none)"
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Handle waypoint sentinel values correctly

Composer_WaypointRef$ currently treats idx <= 0 as (none), but area data uses the opposite conventions: waypoint index 0 is valid (spawns can point to waypoint 0), while unlinked waypoint references are commonly stored as 2000/2005 (see ServerCreateArea initialization in ServerAreas.bb). With the current check, the composer will hide valid links to waypoint 0 and display missing links as #2000/#2005, so the new read-only panel routinely reports incorrect data.

Useful? React with 👍 / 👎.

@CoreyRDean CoreyRDean deleted the branch coreyrdean/loom-zonemap May 27, 2026 00:02
@CoreyRDean CoreyRDean closed this May 27, 2026
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