Repository navigation
fix(mecatui): render sharp splash in direct Ghostty 1.4+ - #2596
Conversation
Reuse source-resolution Kitty graphics for direct Ghostty sessions with a strict SemVer >= 1.4.0, preserving capability detection and multiplexer fallbacks. Cover version selection and the exported PNG transmit path. Co-authored-by: Mecatl <[email protected]>
Implementation plan archive
This archives the approved plan and its verification intentions, not a claim that every planned check has completed. Actual gate results and the outstanding live Ghostty visual check are recorded in the PR description. No plan content was redacted. Direct Ghostty 1.4+ sharp splashSlug: 2586-ghostty-sharp-splash Goal and scopeAddress #2586: let direct Ghostty 1.4+ use the existing source-resolution mascot path instead of the cell-footprint downscale. Expected code scope: Keep capability detection, overrides, native Kitty behavior, placement, chunking, image lifetime, half-block fallback, and UI callers unchanged. No terminal probe, tmux passthrough work, Mosh policy change, or general terminal support expansion. The operator approved this narrow scope and authorized implementation and PR creation; tmux passthrough and runtime probing remain explicitly excluded. Current behavior and minimum approach
Extend the existing pure resolution selector after its existing native Kitty checks. The additional Ghostty path is true only if:
Use the already-pinned Update the selector/transmit comments to describe the expanded resolution policy accurately. Renaming the private selector is optional, not a reason to expand the diff. No image resampling optimization or encoder refactor is necessary. Observable acceptance and tasks1. Resolution decision and regressionsExtend the existing map-backed truth table in Cover exact threshold, later minor/major versions (including 1.10.0 to catch lexical comparisons), older versions, absent/empty/malformed/incomplete versions, prereleases and metadata, wrong/missing/capitalized terminal identity, and TMUX present with nonempty or empty values. Preserve existing Kitty window-ID/TERM behavior, including conflicting Ghostty variables and tmux. Keep capability detection tests intact; add direct Ghostty 1.4 and tmux cases if needed to explicitly prove version selection does not enable graphics where capability detection rejects it. Explicit force may enable graphics under tmux but must not enable the new full-resolution Ghostty branch. Completion: map-backed focused tests pass without ambient terminal state; no detector behavior changes. 2. Prove the production entry point selects the correct PNGAdd a small nonparallel, environment-controlled test of exported
Reuse existing native-alpha, payload-bound, placement, and PNG helpers/tests rather than duplicating a protocol test suite. Keep their downscaled assertions scoped to the compatibility path. Completion: a wiring regression that hardcodes the exported entry point back to downscaled output fails the new positive test; a regression always selecting full resolution fails negative cases. 3. Integration and visual verificationRun the focused welcome package tests, then the direct UI boundary: For the integrated change set run Manually run the built mecatui in a real direct Ghostty 1.4+ session and confirm the splash is sharp, correctly sized, transparent, and remains correctly placed across a size-tier change. Check tmux retains its existing default fallback. Environment spoofing alone cannot establish visual correctness; if no actual terminal is available, record this check as outstanding rather than claiming completion. No user-docs update is expected: this restores rendering quality without a new setting or workflow. No tracked Markdown, generated references, architecture, or domain model changes are expected. If Markdown changes become necessary, run Compatibility and deliveryAPI compatibility: local terminal presentation only; no server, engine, wire messages, feature negotiation, Go exported signatures, or persisted formats change. No wire major/feature identifier changes or upgrades are required. Existing Kitty behavior is preserved; only the explicit new Ghostty route changes source image resolution. Run implementation panel-review against the branch's recorded start commit (capture it when implementation begins, do not use a moving base). Review subsequent fixes incrementally against the last reviewed candidate. Do not rebase without a separate request. Planning creates no branch, implementation, commit, or PR. If an implementation PR is later requested, preserve a publication-safe full copy of the latest plan in one identifiable PR conversation comment, verify readback, and record its URL only in ignored metadata. Humans merge. Risks and open decisions
|
Summary
Fixes #2586.
TERM_PROGRAM=ghostty, strict SemVerTERM_PROGRAM_VERSION >= 1.4.0, and absentTMUX.No terminal probing, tmux passthrough work, or Mosh policy changes. The SemVer parser was already pinned; only its indirect/direct classification changes.
Verification
go test ./cmd/mecatui/ui/welcome ./cmd/mecatui/uitask testtask linttask test:racetask buildgo run ./cmd/mecademo— tool call, permission ask/approval, and final result verifiedAPI compatibility
Local terminal presentation only. No server/engine/wire contracts, exported signatures, feature identifiers, or stored formats change; no major bump or upgrade action is required. Native Kitty and capability/fallback behavior remain unchanged.
The full approved implementation plan is archived in a PR conversation comment; it describes intended checks separately from the actual results above. Its complete content and SHA-256 were verified after publication.