feat(campaign-editor): real kit chrome, level-info panel, level-metadata scope fix #154

Merged
nelsong6 merged 2 commits from claude/naughty-bhabha-a129a5 into main 2026-06-27 02:07:57 -07:00
nelsong6 commented 2026-06-27 02:00:08 -07:00 (Migrated from github.com)

What

Brings the campaign editor (/campaigns-next) onto the real UI kit and corrects a scope leak.

  • Chrome migration — the editor's panels, buttons, rows, fields, icon-buttons, and shields now consume the baked kit 9-slice assets (/assets/ui/kit/*) via border-image, the same way Settings does, replacing the magenta placeholder set. The campaignEditorAssets var-indirection is removed.
  • Forces readout — moved from the global top bar into the level header, where it reads off the selected level's own board (allies/enemies counts).
  • Level Info view — a compact, read-only panel that toggles into the board-preview slot: board size + tile/terrain mix, unit roster by piece, zones, and a rules line (objective · difficulty).
  • Scope fix — level-metadata editing controls (name, objective, difficulty, economy, notes) are pulled out of the campaign editor. Editing a level's intrinsics belongs in the level editor; this tool keeps read-only displays + Edit Board / Test Play navigation. The setLevel* store actions are retained (still tested).

Why

The campaign editor had inherited level-editing controls from the concept art, but its job is organizing campaigns + sequencing levels and displaying level info — not editing level intrinsics. A multi-agent audit confirmed those fields are level-scoped (objective included — the CampaignLevelRef.objective override is vestigial) and that editing them belongs in /edit.

Notes / follow-ups

  • The level editor doesn't yet edit level metadata (name / difficulty / economy / notes) — that home is being built separately. Until it lands, renaming a level has no UI surface.
  • A separate data-loss bug was surfaced by the audit: the level editor's buildLevel() writes zones: [], dropping a level's zones on save. Tracked separately.
  • Tests: 138 pass; typecheck clean.

🤖 Generated with Claude Code

## What Brings the campaign editor (`/campaigns-next`) onto the real UI kit and corrects a scope leak. - **Chrome migration** — the editor's panels, buttons, rows, fields, icon-buttons, and shields now consume the baked kit 9-slice assets (`/assets/ui/kit/*`) via `border-image`, the same way Settings does, replacing the magenta placeholder set. The `campaignEditorAssets` var-indirection is removed. - **Forces readout** — moved from the global top bar into the level header, where it reads off the selected level's own board (allies/enemies counts). - **Level Info view** — a compact, read-only panel that toggles into the board-preview slot: board size + tile/terrain mix, unit roster by piece, zones, and a rules line (objective · difficulty). - **Scope fix** — level-metadata *editing* controls (name, objective, difficulty, economy, notes) are pulled out of the campaign editor. Editing a level's intrinsics belongs in the level editor; this tool keeps read-only displays + Edit Board / Test Play navigation. The `setLevel*` store actions are retained (still tested). ## Why The campaign editor had inherited level-*editing* controls from the concept art, but its job is organizing campaigns + sequencing levels and displaying level info — not editing level intrinsics. A multi-agent audit confirmed those fields are level-scoped (objective included — the `CampaignLevelRef.objective` override is vestigial) and that editing them belongs in `/edit`. ## Notes / follow-ups - The level editor doesn't yet edit level metadata (name / difficulty / economy / notes) — that home is being built separately. Until it lands, renaming a level has no UI surface. - A separate data-loss bug was surfaced by the audit: the level editor's `buildLevel()` writes `zones: []`, dropping a level's zones on save. Tracked separately. - Tests: 138 pass; typecheck clean. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Sign in to join this conversation.
No description provided.