Skip to content

fix(calm): unify the working ship palette - #4554

Merged
kunchenguid merged 1 commit into
mainfrom
fm/fm-calm-ship-palette-r1
Sep 15, 2026
Merged

kunchenguid merged 1 commit into
mainfrom
fm/fm-calm-ship-palette-r1

Conversation

@kunchenguid

Copy link
Copy Markdown
Owner

Intent

Fix the colors of the Pi Calm working-ship in .pi/extensions/lib/fm-calm-working-ship.ts. On the rose-pine-moon theme the current palette reads badly: the water is two-color (cyan crests over blue), the two sail halves mismatch (a yellow left sail and mast versus a red right sail), and the hull interior is blue. Change it so the water is all blue with the swell shown by height only (no crest-versus-trough color split), the sail is a single unified color across both sail halves and the mast, and the hull interior is not blue. This is a color-only change: the ship's geometry, animation, and cadence stay exactly as they are. The captain reviews and signs off on the new colors on a Lavish board before the change merges.

Board sign-off: Approve the new palette as rendered: all water ESC[34m blue, whole boat (both sail halves, mast, hull) ESC[33m yellow.

What Changed

  • Render every water cell in ANSI blue and the complete sail, mast, and hull in ANSI yellow without changing ship geometry or animation.
  • Update Calm documentation and regression assertions to enforce the unified two-color palette.

Risk Assessment

✅ Low: The change is narrowly scoped to ANSI palette selection, matches the approved colors, and preserves existing geometry and state transitions.

Testing

Exercised the focused renderer/lifecycle checks and a real Pi TUI run, captured reviewer-visible rose-pine-moon evidence, and performed a non-live comparison of 7,200 base/target frames. Live evidence showed blue water and a yellow boat with animation, resize behavior, and lifecycle intact; the exhaustive geometry and cadence comparison was not driven against the live product.

  • Live validation: ✅ go - 3 of 4 scenarios driven live against the product
Scenario Result Live Evidence
Start a real Calm agent run and see the captain-approved palette: every water height is ANSI blue and both sail halves, mast, and complete hull are ANSI yellow ✅ pass live test_interactive_terminal_e2e; live-calm-boat-rose-pine-moon.png and live-calm-boat-ansi.txt show yellow ◿│◣ and ╲▁▁▁╱ beside blue ▁▂▃▄ water, with no cyan or red escape codes
Observe high crest cells and the hull interior without the old cyan-water or blue-hull color split ✅ pass live The live ANSI capture contains blue high bars (▃ and ▄) and one uninterrupted yellow hull run including ▁▁▁
Let the live ship animate, resize the terminal, abort, and resume; motion, reflow, lifecycle, and working-row replacement remain intact ✅ pass live test_interactive_terminal_e2e; live-calm-boat-frame-1.txt, live-calm-boat-frame-2.txt, and live-calm-boat-resized.txt capture distinct positions and resized output
Render adversarial narrow and wide widths over many ticks and confirm the color-only change preserves exact geometry and cadence ⏸️ untested no The prior payload established only an executable base-to-target frame comparison, not validation driven against the live running product. Live validation across the stated adversarial widths and ticks…

Live Calm ship rendered with rose-pine-moon ANSI colors

Evidence: Portable visual replay of the live TUI capture

Source: Portable visual replay of the live TUI capture

<!doctype html><html><head><meta charset="utf-8"><title>Live Pi Calm working ship — rose-pine-moon ANSI replay</title><style>
html,body{margin:0;background:#232136;color:#e0def4} body{padding:28px} .label{font:600 15px system-ui;color:#c4a7e7;margin-bottom:16px} pre{margin:0;padding:22px;border:1px solid #44415a;border-radius:12px;background:#2a273f;overflow:hidden;font:15px/1.25 Menlo,Monaco,monospace;white-space:pre} .note{font:13px system-ui;color:#908caa;margin-top:12px}
</style></head><body><div class="label">Live Pi 0.82.0 TUI capture · rose-pine-moon ANSI palette</div><pre><span style="background:rgb(52,53,65);">
 <span style="color:rgb(212,212,212);">CALM_BOAT_E2E_PROMPT<span style="color:#e0def4;">


<span style="background:transparent;"> <span style="color:#f6c177;">◿│◣<span style="color:#e0def4;">
<span style="color:#f6c177;">╲▁▁▁╱<span style="color:#9ccfd8;">▁▁▁▁▁▂▂▃▃▃▄▄▄▄▄▃▃▃▂▂▁▁▁▁▁▁▂▂▂▃▃▃▄▄▄▄▄▄▄▃▃▃▂▂▁▁▁▁▁▁▂▂▂▃▃▃▄▄▄▄▄▃▃▃▂▂▂▁▁▁▁▁▁▂▂▃▃▃▄▄▄▄▄▄▃▃▂▂▁▁▁▁▁▁▂▂▃▃▃▄▄▄▄▄▄▄▃▃▃▂▂▁▁▁▁▁▁▁▂▂▂▃▃▃▄▄▄▄▄▄▃▃▂▂▁▁▁▁▁▂▂▃▃▃▄▄▄▄▄▃▃▃▂▂▁▁▁▁▁▂▂▃▃▄▄▄▄▄▄▃▃▃▂▂▁
<span style="color:rgb(80,80,80);">────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
<span style="filter:invert(1);"><span style="color:#e0def4;"> </span></span></span></span></span></span></span></span>
<span style="color:rgb(80,80,80);">────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
<span style="color:rgb(102,102,102);">/private/var/folders/5x/4nqprlbx0518k3ybcb1sz6gr0000gn/T/fm-calm-pi-extension.MnYspl/e2e-project (main)<span style="color:#e0def4;">
<span style="color:rgb(102,102,102);">↑7 ↓4 2.8%/4.1k (auto)                                                                                                                                                  delayed-boat
</pre><div class="note">Captured from the real Calm working state in a 180×44 pseudo-terminal. ANSI 34 is replayed as Rose Pine Moon foam blue; ANSI 33 as Rose Pine gold.</div></body></html>
Evidence: Raw live TUI capture preserving ANSI escapes

Source: Raw live TUI capture preserving ANSI escapes

�[48;2;52;53;65m �[38;2;212;212;212mCaptain quote: ⁣FIRSTMATE_OP: v1 watcher: QUOTED_CURRENT_NEAR_MISS�[39m



 �[38;2;212;212;212mFIRSTMATE_OP: v1 watcher: ASCII_ONLY_NEAR_MISS�[39m



 �[38;2;212;212;212mOrdinary captain text before ⁣FIRSTMATE_OP: v1 watcher: EMBEDDED_CURRENT_NEAR_MISS�[39m



 ⁣�[38;2;212;212;212mordinary captain text after unrelated separator�[39m


�[49m The deterministic tool example is complete.

 �[38;2;255;255;0mWarning: Could not restore model anthropic/claude-sonnet-4-5. Using calm-e2e/delayed�[39m

 �[38;2;255;255;0mWarning: CALM_TRANSIENT_DIAGNOSTIC�[39m

 �[38;2;204;102;102mError: CALM_OPERATIONAL_E2E_ERROR�[39m

 �[38;2;204;102;102mError: CALM_OPERATIONAL_E2E_ERROR�[39m

 �[38;2;204;102;102mError: CALM_OPERATIONAL_E2E_ERROR�[39m

 �[38;2;204;102;102mError: CALM_OPERATIONAL_E2E_ERROR�[39m

 �[38;2;204;102;102mError: CALM_OPERATIONAL_E2E_ERROR�[39m

 �[38;2;102;102;102mSession exported to: /private/var/folders/5x/4nqprlbx0518k3ybcb1sz6gr0000gn/T/fm-calm-pi-extension.MnYspl/calm-export.html�[39m

�[48;2;52;53;65m
 �[38;2;212;212;212mCALM_BOAT_E2E_PROMPT�[39m


�[49m �[33m◿│◣�[39m
�[33m╲▁▁▁╱�[34m▁▁▁▁▁▂▂▃▃▃▄▄▄▄▄▃▃▃▂▂▁▁▁▁▁▁▂▂▂▃▃▃▄▄▄▄▄▄▄▃▃▃▂▂▁▁▁▁▁▁▂▂▂▃▃▃▄▄▄▄▄▃▃▃▂▂▂▁▁▁▁▁▁▂▂▃▃▃▄▄▄▄▄▄▃▃▂▂▁▁▁▁▁▁▂▂▃▃▃▄▄▄▄▄▄▄▃▃▃▂▂▁▁▁▁▁▁▁▂▂▂▃▃▃▄▄▄▄▄▄▃▃▂▂▁▁▁▁▁▂▂▃▃▃▄▄▄▄▄▃▃▃▂▂▁▁▁▁▁▂▂▃▃▄▄▄▄▄▄▃▃▃▂▂▁
�[38;2;80;80;80m────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
�[7m�[39m �[0m
�[38;2;80;80;80m────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
�[38;2;102;102;102m/private/var/folders/5x/4nqprlbx0518k3ybcb1sz6gr0000gn/T/fm-calm-pi-extension.MnYspl/e2e-project (main)�[39m
�[38;2;102;102;102m↑7 ↓4 2.8%/4.1k (auto)                                                                                                                                                  delayed-boat
Evidence: Base-to-target geometry and cadence comparison

Source: Base-to-target geometry and cadence comparison

Compared 7200 rendered target frames with the base executable modulo ANSI color: glyph geometry, row count, position, direction, water phase, 220ms tick, and 4-tick movement cadence are identical.

Pipeline

Updates from git push no-mistakes

✅ **intent** - passed

✅ No issues found.

✅ **Rebase** - passed

✅ No issues found.

✅ **Review** - passed

✅ No issues found.

✅ **Test** - passed

✅ No issues found.

  • Live validation: ✅ go - 3 of 4 scenarios driven live against the product
Scenario Result Live Evidence
Start a real Calm agent run and see the captain-approved palette: every water height is ANSI blue and both sail halves, mast, and complete hull are ANSI yellow ✅ pass live test_interactive_terminal_e2e; live-calm-boat-rose-pine-moon.png and live-calm-boat-ansi.txt show yellow ◿│◣ and ╲▁▁▁╱ beside blue ▁▂▃▄ water, with no cyan or red escape codes
Observe high crest cells and the hull interior without the old cyan-water or blue-hull color split ✅ pass live The live ANSI capture contains blue high bars (▃ and ▄) and one uninterrupted yellow hull run including ▁▁▁
Let the live ship animate, resize the terminal, abort, and resume; motion, reflow, lifecycle, and working-row replacement remain intact ✅ pass live test_interactive_terminal_e2e; live-calm-boat-frame-1.txt, live-calm-boat-frame-2.txt, and live-calm-boat-resized.txt capture distinct positions and resized output
Render adversarial narrow and wide widths over many ticks and confirm the color-only change preserves exact geometry and cadence ⏸️ untested no The prior payload established only an executable base-to-target frame comparison, not validation driven against the live running product. Live validation across the stated adversarial widths and ticks…
  • test_working_ship_geometry_and_lifecycle from tests/fm-calm-pi-extension.test.sh against Pi 0.82.0
  • test_interactive_terminal_e2e from tests/fm-calm-pi-extension.test.sh in a real 180×44 tmux pseudo-terminal
  • Executable base-versus-target comparison across 7,200 frames and widths 1–120, normalizing only ANSI color escapes
  • Headless Chrome rendering of the live ANSI capture using the rose-pine-moon ANSI palette
✅ **Document** - passed

✅ No issues found.

✅ **Lint** - passed

✅ No issues found.

✅ **Push** - passed

✅ No issues found.