Skip to content

feat(neo): grok-exact theme + xterm.js evidence harness (neo-go-tui task 2)#119

Merged
code-yeongyu merged 1 commit into
mainfrom
neo/theme
Jul 5, 2026
Merged

feat(neo): grok-exact theme + xterm.js evidence harness (neo-go-tui task 2)#119
code-yeongyu merged 1 commit into
mainfrom
neo/theme

Conversation

@code-yeongyu

@code-yeongyu code-yeongyu commented Jul 5, 2026

Copy link
Copy Markdown
Owner

Summary

Plan task 2 of .omo/plans/neo-go-tui.md: the grok-exact theme package for the neo Go TUI, plus the xterm.js evidence-harness core that all later TUI-visual QA in the plan runs through. Additive only — nothing outside packages/neo changes.

Changes

  • internal/theme: 24-bit palette transcribed from the grok capture research (grok-night default + grok-day), lipgloss v2 styles (surfaces, text tiers, accents, borders, footer/hint, tool-row glyphs, braille spinner), loader honoring settings.json theme + ~/.senpi/agent/themes custom themes; NO_COLOR + 256-color fallbacks.
  • packages/neo/qa/xterm-render.mjs: .ans → self-contained HTML review page + per-cell grid JSON + assertion helpers, on the root-hoisted @xterm/headless (no new dep); visual-claims.json manifest + verify-manifest mode failing on missing frames/triplet legs/assertions.
  • Hidden --theme-sample flag on cmd/senpi-neo renders the QA panel.

QA / Evidence

Evidence: .omo/evidence/task-2-neo-go-tui.md (+ red/, red-posthoc/, gates/, qa/ artifact dirs) in the work worktree.

  • Golden tests assert exact truecolor SGR through the harness cell grid; hexes derived from captures, never implementation output. 22 test functions / 28 subtests, all green (-v capture archived).
  • tmux QA (verbatim plan scenario): rendered panel captured with capture-pane -e, every extracted fg/bg hex asserted ∈ grok palette via the parsed cell grid; full triplet archived. 256-color fallback frame has zero truecolor escapes, no crash.
  • Integrity round: an initial RED artifact was found unreliable (timestamp mismatch) by an adversarial audit and superseded by two labeled post-hoc proofs (implementation-aside compile RED restored byte-identical by sha256; one-hex mutation proof failing with exact cell coordinates). Re-audit verdict: real.
  • Harness self-test 6/6 (corrupted fixture fails loudly; verify-manifest negatives fail); npm run check exit 0; real ~/.senpi untouched (hash receipt).

Risks

  • Goldens could drift from grok captures if palette edits bypass the research files — mitigated by capture-derived golden constants and the visual-claims manifest gate that later waves (tasks 20/21, F3) re-run.

Secret safety

No secrets in code, fixtures, or evidence; QA sandboxed.


Summary by cubic

Implements the exact grok theme for the neo Go TUI and adds an xterm.js evidence harness for visual QA. Locks in truecolor palette accuracy (grok-night default, grok-day optional) with 256/NO_COLOR fallbacks and a reproducible sample panel.

  • New Features

    • packages/neo/internal/theme: exact 24‑bit palette, lipgloss v2 styles (surfaces, text tiers, accents, borders), braille spinner, and tool-row glyphs.
    • Theme loader honors settings.json theme and ~/.senpi/agent/themes custom themes; default is grok-night.
    • Truecolor rendering with downgrade to ANSI256/NO_COLOR via colorprofile.
    • Hidden --theme-sample flag in cmd/senpi-neo to render a deterministic QA panel.
    • packages/neo/qa/xterm-render.mjs: .ans → HTML review + per-cell grid JSON + assertion helpers; visual-claims.json with verify-manifest to fail on missing frames/triplet legs/assertions.
    • Golden tests verify exact hexes through the parsed cell grid; loader and harness self-tests included.
  • Dependencies

    • Uses root-hoisted @xterm/headless (no new npm dep in this package).
    • Uses charm.land/lipgloss/v2 and github.com/charmbracelet/colorprofile.
    • Additive change confined to packages/neo.

Written for commit 3118bca. Summary will update on new commits.

Review in cubic

internal/theme: 24-bit palette transcribed from the grok capture research
(.omo/research/neo-grok ansi-colors.md + FINDINGS.md) — grok-night default
plus grok-day, surfaces/text tiers/accents/borders, braille spinner frames,
tool-row glyphs, hint/footer styles; loader honors settings.json theme +
~/.senpi/agent/themes custom themes with grok-night default for neo;
NO_COLOR + 256-color fallbacks. Golden tests assert exact truecolor SGR
bytes through the xterm.js harness cell grid, with hexes derived from the
captures, never from implementation output.

packages/neo/qa: xterm-render.mjs evidence-harness core on the root-hoisted
@xterm/headless (.ans -> self-contained HTML review page + per-cell grid
JSON + assertion helpers), visual-claims.json manifest and a verify-manifest
mode that fails on missing frames, missing triplet legs, or assertion-less
claims. Hidden --theme-sample flag on cmd/senpi-neo renders the QA panel.

Plan: .omo/plans/neo-go-tui.md
@code-yeongyu code-yeongyu enabled auto-merge July 5, 2026 17:12
@code-yeongyu code-yeongyu merged commit 11cde65 into main Jul 5, 2026
3 checks passed
@code-yeongyu code-yeongyu deleted the neo/theme branch July 5, 2026 17:17
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