Repository navigation
ariadne(tui): tvision backend — native desktop chrome around hosted FTXUI content - #711
Merged
Merged
Conversation
transfix
force-pushed
the
feat/ariadne-tui-followups
branch
from
October 19, 2026 05:09
622b2ff to
48a4e3a
Compare
transfix
force-pushed
the
feat/ariadne-tvision-backend
branch
from
October 19, 2026 05:09
d004cfd to
98e2372
Compare
transfix
force-pushed
the
feat/ariadne-tui-followups
branch
from
October 19, 2026 06:15
48a4e3a to
d77c663
Compare
transfix
force-pushed
the
feat/ariadne-tvision-backend
branch
from
October 19, 2026 06:15
98e2372 to
74b1bc9
Compare
transfix
force-pushed
the
feat/ariadne-tui-followups
branch
from
October 19, 2026 06:29
d77c663 to
f34f9fd
Compare
transfix
force-pushed
the
feat/ariadne-tvision-backend
branch
from
October 19, 2026 06:29
74b1bc9 to
b553c5f
Compare
…TXUI content cvc::ariadne::TvisionBackend (roadmap §16.5 row 5): Turbo Vision owns the terminal and draws movable, resizable, overlapping windows with close / zoom boxes, a pull-down menu bar and a status line. The window contents are the FTXUI backend's, through a new hosted mode in FtxuiBackend (Options::hosted): - no window frames or menu bar are drawn; each window's body is kept per walk and laid out on demand at the host's size (render_window -> TermRows of glyph + SGR colours + styles); - the menu bar becomes a model (hosted_menus) whose items the host activates (activate_menu_item); hosted menus join the walk from the second frame so a menu toggle cannot seed a window's tree.<id>.open closed before the window seeds it open; - input arrives per window in its own cells (feed_window); focus moves stay inside that window; combo lists open inside it; - the host reports window bounds (set_window_geometry, persisted to tree.<id>.geometry), closes windows (close_window) and the screen size. TvisionBackend subclasses FtxuiBackend in that mode: each sync runs a walk and reconciles tvision with it (TWindows created at the document's placement, retitled, destroyed when the document stops drawing them; the menu bar rebuilt when its model changes, never while it is executing; a background view for widgets outside windows). Content views blit the hosted cells (tvision quantizes colours; FTXUI lays out at truecolor for the run) and feed tvision's mouse (drag loop) and keys back. Ctrl-C / Ctrl-\ and OS signals follow the same on_signal routing as the FTXUI loop. Built behind CVC_ARIADNE_TVISION when tvision + ncursesw + FTXUI are found (shared builds; linked BUILD-only so no path reaches the exported targets). `ari run --backend tvision`; ari points ncurses at the prefix's bundled terminfo when TERMINFO_DIRS is unset. CI installs tvision with the other optional Ariadne deps.
transfix
force-pushed
the
feat/ariadne-tvision-backend
branch
from
October 19, 2026 16:05
b553c5f to
fa2e152
Compare
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.
The tvision terminal backend (roadmap §16.5 row 5), the native-desktop counterpart of the FTXUI backend. Stacked on #709, which is itself stacked on #708. This PR's own change is the top commit.
Design: native chrome, shared content
Turbo Vision owns the terminal and draws the chrome natively:
The window contents come from the FTXUI backend, through a new hosted mode in
FtxuiBackend(Options::hosted). So both terminal backends share one widget engine, focus model and set of commit rules, and there is no second widget implementation to keep in sync. FTXUI is only a layout engine here; it never touches the terminal.What hosted mode does:
render_window(id, w, h)returnsTermRows(glyph + SGR colour + styles).hosted_menus) whose items the host activates (activate_menu_item).tree.<id>.open(as interminal_tour.ari) would seed that key closed before the window could seed it open. That's the first-frame order ImGui/FTXUI have, since there a menu first runs when the user opens it.feed_window). Tab and arrow focus moves stay inside the window, and a combo's list opens inside it.set_window_geometry, persisted totree.<id>.geometry) and the screen size, and asks for closes (close_window).TvisionBackendsubclassesFtxuiBackendin that mode. Each sync runs one walk and reconciles tvision with it:TWindows are created at the document's placement, retitled, and destroyed when the document stops drawing them. Destruction always waits until the event that caused it has finished.Content views blit the hosted cells. FTXUI lays out at truecolor for the run and tvision quantizes to the terminal. tvision's mouse drag loop and key events are fed back to the backend. Windows get
ofFirstClick, so the click that raises a window also reaches the widget under it. Ctrl-C / Ctrl-\ and OS signals follow the sameon_signal:routing as the FTXUI loop.Build and packaging
CVC_ARIADNE_TVISION(default ON) is the feature flag the roadmap keeps for tvision's Borland-derived licensing. The backend builds when tvision + ncursesw + FTXUI are found, in shared builds only.tvisionalongside the other optional Ariadne deps, so the real path is compiled there.ari run --backend tvisionruns it. WhenTERMINFO_DIRSis unset,aripoints ncurses at the prefix's bundledshare/terminfo.Verification
ariadne_ftxui_test40/40, including:TvisionBackendsanity test.ctest -R Ariadne376/376; full build green.--backend tvision):tree.<id>.open);Known limits
snapshotandcheckalways lay out with FTXUI, since tvision needs a terminal.