Repository navigation
feat: tern version segment on the version row (v0.8.0) - #11
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
The version row closes with a third segment when omp runs under the Tern terminal:
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).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.VersionStamp.ternoptional (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 --noEmitclean; 62/62 tests (gate matrix incl. tmux/ghostty/"Tern"/two-component; cache miss-caching; fresh-module value path).· tern 0.7.2under Tern env; negative — row unchanged underTERM_PROGRAM=tmux.