2.2 KiB
termlib upstream alignment
Haven builds against a fork of connectbot/termlib wired in as a git
submodule at /termlib. The fork exists because termlib didn't always
expose the seams Haven needs (per-keyboard-mode input types, live IME
composition flow, scroll drift fixes, …). The long-term policy is to
shrink the fork to a handful of patches by upstreaming everything that
could possibly benefit other termlib hosts, and keeping Haven's
opinionated UX in the :core:terminal-haven module that wraps termlib
from outside.
Where things live
termlib/— fork trackingupstream/main, with the active branchfeature/154-cf-access-diagnosticscarrying Haven-only patches (upstream is pulled in by merge — seetermlib/REBASE.md).termlib/REBASE.md— rebase checklist (inside the submodule so it travels with the fork).core/terminal-haven/— Haven-owned wrapper around termlib's public API.HavenTerminal()delegates toTerminal();HavenKeyboardModemaps Haven's Secure/Standard/Raw onto termlib'sallowStandardKeyboardrawKeyboardModeflags.
Upstream PR pipeline
Open PRs against connectbot/termlib in this order when a Haven patch
turns out to be more broadly useful:
- Universal bug fixes — scroll drift, Copy/Paste viewport clamp, tmux scrollback corruption, Enter/IME double-fire fixes. File individually with reproducers and tests. Low risk.
- Small API additions —
onPasteShortcuthook,getSnapshotLineTexts()accessor,onTerminalDoubleTapcallback,enableAltScreenparam. Small surface, frame as "host-useful extension points". - Design-discussion items —
composingText: StateFlow<String>(for compose-mode hosts), makingImeInputViewopen+ factory seam (lets hosts add Raw / voice toggles without forking). Open an issue first. - Large refactors — gesture callback architecture, URL wrap-boundary detector re-introduction (upstream reverted #155). Last.
As each PR lands upstream the corresponding patch gets dropped from
termlib/feature/154-cf-access-diagnostics on the next monthly upstream merge.
If a PR is rejected
Retain the fork patch. Document the rejection inline below so the reasoning survives turnover.
Rejection log
(Empty so far.)