Skip to content

feat: tern version segment on the version row (v0.8.0) - #11

Merged
rz1989s merged 3 commits into
mainfrom
feat/tern-version
Oct 11, 2026
Merged

rz1989s merged 3 commits into
mainfrom
feat/tern-version

Conversation

@rz1989s

@rz1989s rz1989s commented Oct 11, 2026

Copy link
Copy Markdown
Member

What

The 󰚦 version row closes with a third segment when omp runs under the Tern terminal:

 󰚦 omp 18.9.0 · sl 0.7.0 · tern 0.7.2
  • Source: TERM_PROGRAM=tern + TERM_PROGRAM_VERSION — set by Tern for every session it hosts; sync env read, cached process-long (version cannot change mid-process).
  • Gate: strict, case-sensitive TERM_PROGRAM === "tern" — Ghostty/tmux-hosted panes (even nested inside Tern) never borrow the segment; unknown/garbage version omits the segment per the no-placeholder-lies contract.
  • Order: omp · sl · tern; VersionStamp.tern optional (undefined ≡ null).

Review

Three-lens subagent review (correctness / test-adequacy / docs-accuracy) — one confirmed minor (null-path cache) + test gaps fixed in the hardening commit; docs drift (hero alt text) fixed.

Verification

  • tsc --noEmit clean; 62/62 tests (gate matrix incl. tmux/ghostty/"Tern"/two-component; cache miss-caching; fresh-module value path).
  • Live render, throwaway omp profile in tmux: positive · tern 0.7.2 under Tern env; negative — row unchanged under TERM_PROGRAM=tmux.
  • Width: version row 41 cells vs the ~89-col Tern fence.

Tern (stencil.so) sets TERM_PROGRAM=tern + TERM_PROGRAM_VERSION in the
sessions it hosts; when both resolve, the version row closes with
'tern <ver>' after omp/sl (strict, case-sensitive gate — other terminals
and tmux-hosted panes never borrow the segment; unknown version omits
the segment per the no-placeholder-lies contract).
…ing)

ternVersion now uses slVersion's explicit-undefined cache pattern so null
misses stay cached (??= recomputed every call in the common non-Tern case);
versionLine pins the tern-omitted optional-field two-segment row; the gate
pins the two-component version shape; ternVersion tests prove miss-caching
and the value path via a fresh module record.
@rz1989s
rz1989s merged commit 93283ec into main Oct 11, 2026
1 check passed
@rz1989s
rz1989s deleted the feat/tern-version branch October 11, 2026 14:06
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