[ui] round 2 notes
Shipped/verified list, and the honest parts: happy-dom was granted but never installed; STANDING ORDER and SANITISING are built but unreachable until the sim advances commissions and a chain gets fed; NEXT IN TRAY infers the queue. Three requests (commission queue on snapshot, sim commission rotation, happy-dom) and a remove-button proposal. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
a57729ce33
commit
90703c4bcd
@ -146,3 +146,93 @@ exactly what MASTERPLAN says not to do. Say the word and it's a small round-2 ch
|
|||||||
**NEXT (suggested):** wire click-to-inspect the moment request 1 lands and delete the TAB
|
**NEXT (suggested):** wire click-to-inspect the moment request 1 lands and delete the TAB
|
||||||
fallback; recipe picker in the inspector (`setRecipe` exists in Command and has no UI);
|
fallback; recipe picker in the inspector (`setRecipe` exists in Command and has no UI);
|
||||||
build bar paging; tech/research panel once `tech.json` is populated (it's `[]`).
|
build bar paging; tech/research panel once `tech.json` is populated (it's `[]`).
|
||||||
|
|
||||||
|
### Round 2 — 2026-07-17 — Opus 4.8
|
||||||
|
|
||||||
|
**SHIPPED:** All five orders. New: `pages.ts` (pagination), `chipspec.ts` (pure chip
|
||||||
|
arithmetic), six `*.test.ts`. Deleted: `fixture.ts` and the TAB-cycle fallback, as ordered.
|
||||||
|
|
||||||
|
1. **Click-to-inspect** via `bus.pickTile`. The `window.__fktryRenderer` probe and the
|
||||||
|
TAB fallback are gone.
|
||||||
|
2. **Build bar paging** — kind tabs (EXTRACT / LOGISTICS / REFINE / POWER / SHIP), `[`/`]`,
|
||||||
|
1-9 within the page. Selecting from anywhere pulls the bar to the owning page.
|
||||||
|
3. **Inspector** — recipe picker (`setRecipe`), heat bar w/ THROTTLING/SCRAM states,
|
||||||
|
jam wording via `jamText()`.
|
||||||
|
4. **Fax** — NEXT IN TRAY peek, STANDING ORDER stamp on `repeat`, SANITISING chip on
|
||||||
|
shipped anchor-slabs.
|
||||||
|
5. **57 tests** (min was 10), all green.
|
||||||
|
|
||||||
|
**VERIFIED** (against the real sim, in a browser, on a static `vite build`+`preview` —
|
||||||
|
see BLOCKED for why not the dev server): built a SEAM EXTRACTOR by mouse → DRAW 0→4 with
|
||||||
|
no generator → **real BROWNOUT**, red panel, buffer 0, underrun toast, THE SCREEN
|
||||||
|
visibly corrupting. Clicked the unit → inspector opened on entity 1 (`pickTile` →
|
||||||
|
{18,-7} → `entityAt`). Placed a SOFTWARE DECODER → GEN 0→55, brownout lifted, "BUFFER
|
||||||
|
RESTORED. RESUME SINNING." Recipe picker: options rendered as readable processes ("1
|
||||||
|
LUMA BARS → 1 COEFFICIENT PACK + 1 HF DUST"), selecting IDLE dispatched
|
||||||
|
`setRecipe{entity:1,recipe:null}` and the sim round-tripped it back as "UNIT IS BEING
|
||||||
|
PAID TO EXIST"; selecting back dispatched `recipe:'quantize'`. Starved wording live in
|
||||||
|
both toast and inspector: "QUANTIZER: INTAKE STARVED. NOTHING IS ARRIVING." Paging walk
|
||||||
|
confirmed all 21 machines across 6 pages (1+3+9+5+2+1) with **no page over 9 slots**.
|
||||||
|
`#ui` still computes `pointer-events:none`. `npm run check` clean; 160/160 tests.
|
||||||
|
|
||||||
|
**DECISIONS:**
|
||||||
|
- **Kind tabs alone could not satisfy "every machine hotkey-reachable at any catalog
|
||||||
|
size"** — REFINE holds 14 crafters and 1-9 reaches nine. So a page is capped at 9 and an
|
||||||
|
oversized kind spills into numbered pages (REFINE 1/2, REFINE 2/2). The invariant the
|
||||||
|
order asked for now holds for any catalog; `pages.test.ts` pins it at 1/9/14/40 crafters.
|
||||||
|
- Logic was pulled out of the DOM modules into `pages.ts` / `chipspec.ts` / a pure
|
||||||
|
`createKeyRouter`, which is *why* there are 57 tests without happy-dom (below).
|
||||||
|
- Data-first everywhere: `MachineDef.flavor` and `.color` win, round-1 hand-transcribed
|
||||||
|
tables stay as fallback. LANE-DATA's flavor is what's on screen now.
|
||||||
|
- Unknown jam reasons pass through uppercased rather than being swallowed, so a new sim
|
||||||
|
stall reason shows up honestly instead of silently reading as generic.
|
||||||
|
|
||||||
|
**BLOCKED/BROKEN (read this part):**
|
||||||
|
- **`happy-dom` is NOT installed** — order 5 says "GRANTED — happy-dom is installed"; it
|
||||||
|
is not in `package.json` and not in `node_modules` (`npm ls happy-dom` → empty). I did
|
||||||
|
not add it: root config is orchestrator-owned and editing it is a hard rule. Instead I
|
||||||
|
factored the testable logic into pure modules and wrote **57 node-env tests** covering
|
||||||
|
everything order 5 named except the two that genuinely need a DOM: chip *rendering*
|
||||||
|
(the arithmetic is covered in `chipspec.test.ts`) and `attach()`'s window binding (the
|
||||||
|
routing is covered in `hotkeys.test.ts`). Install it and I'll add the render tests.
|
||||||
|
- **STANDING ORDER stamp is built but unobservable.** Data has 3 `repeat` commissions
|
||||||
|
(dust-allowance, correction-buyback, melt-retainer) but the sim pins the active
|
||||||
|
commission to `commissions[0]` (`first-taste`, not repeat) and never advances —
|
||||||
|
`commissionDoneEmitted` latches forever. So nothing can ever reach the stamp. Code is
|
||||||
|
data-driven and will light up the moment the sim rotates commissions.
|
||||||
|
- **NEXT IN TRAY is an inference, not truth.** The snapshot has `activeCommission` but no
|
||||||
|
queue, so "next" = the following entry in data order. It renders (NEXT IN TRAY → DUST
|
||||||
|
ALLOWANCE) but if the sim ever picks non-sequentially the peek will lie. See CONTRACT
|
||||||
|
REQUEST 1.
|
||||||
|
- **Heat bar unverified live.** Only `software-decoder` has `heatPerTick` (0.0025), and
|
||||||
|
it heats only while crafting; a decoder with no load sits at heat 0, so the bar
|
||||||
|
correctly stays hidden and I never saw THROTTLING/SCRAM. Thresholds are built to
|
||||||
|
CONTRACTS (>0.7 throttle, 1.0 scram). Needs a fed chain to confirm.
|
||||||
|
- **SANITISING chip unverified live** — needs anchor-slabs actually shipped, which needs
|
||||||
|
the full M1 chain fed. Renders off `shippedTotal`, so it is one shipment away.
|
||||||
|
- **The dev server is unusable for verification.** Other lanes are editing `render/` and
|
||||||
|
`screen/` continuously; vite logged **16 page reloads** in ~10 minutes, wiping the world
|
||||||
|
mid-test every time. I verified on `vite build` + `vite preview` instead. Not a
|
||||||
|
complaint — just: if a round asks for hands-on verification, expect this.
|
||||||
|
- During the round I hit LANE-SCREEN's `glitchStack.ts` and LANE-RENDER's `index.ts`
|
||||||
|
mid-edit and broken (tsc errors, dead rAF loop). Both self-resolved. `src/ui` was clean
|
||||||
|
throughout; the one failing test at the time was LANE-SIM's own `sim.test.ts`.
|
||||||
|
- Harness note (unchanged): browser-automation `key: space` sends an empty `event.key`;
|
||||||
|
space verified via a dispatched `' '` event. Real spacebar sends `' '` per spec.
|
||||||
|
|
||||||
|
**CONTRACT REQUEST:**
|
||||||
|
1. **`SimSnapshot.commissionQueue: string[]`** (or `nextCommission: string | null`) —
|
||||||
|
*why:* NEXT IN TRAY currently guesses from data order. Low cost, removes a UI lie.
|
||||||
|
2. **Sim: advance/rotate commissions and honour `repeat`** — not strictly a contract
|
||||||
|
change, a SIM ask: `commissions[0]` forever means 13 of 14 commissions and all 3
|
||||||
|
standing orders are unreachable, and the fax's whole queue UI is decorative.
|
||||||
|
3. **`happy-dom` actually installed** (see BLOCKED) — the grant didn't land in
|
||||||
|
package.json.
|
||||||
|
|
||||||
|
**PROPOSAL:** the inspector should get a REMOVE button (`remove` exists in Command with
|
||||||
|
no UI, so a misplaced machine currently can't be undone by mouse at all). Small, and it
|
||||||
|
closes the last build-verb gap.
|
||||||
|
|
||||||
|
**NEXT (suggested):** remove-by-mouse; heat/scram + SANITISING confirmation once a chain
|
||||||
|
can be fed; commission queue UI becomes real once requests 1-2 land; tech panel when
|
||||||
|
`tech.json` fills (still `[]`).
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user