Repository navigation
Releases
dabt 0.0.33
- Datasets:
tui.data.*and markup<data>;<table>,<list>and<label>bind to them withfrom=. - Live charts:
<spark>,<gauge>,<chart>andtui.chartfor every renderer, fed from a dataset. - Context menus:
<contextmenu for="#id">opens on right click. - Navigation:
<nav>with<item>s, the current page highlighted. - Timer-driven draws are limited to one flush per
TUI_FRAME_BUDGET_US. - Size unit
Nc: exactly N cells. - Dev-tools tab
Console: the app log as it is written. - Guides: Data, Components and templates, Navigation; tutorial: A live dashboard.
- A/B timing and function-call cost tools:
tools/benchmarks/ab-tests.
TUI_FRAME_BUDGET_USsetting.tui.perf.reportcountersticks_dropped,paced_deferredand atick:IDspan per timer.tools/bench/live_updates.sh.tools/benchmarks/ab-tests:ab.sh(traceable A/B timing from scenario files, suites, live view and report throughtools/benchmarks/reporting),callcount.py(exact function calls by name and depth of a headless command) andcallmodel.py.- Profiler report: calls per call depth and interaction (
attr.functions[].depths_by_group). - Datasets:
tui.data.new,drop,append,set,replace,remove,clear,count,has,get,cell,rows,col,find,stat,sort,bind,unbind,flush,gen,save,load; keyed rows,--maxwindows, scopespage,session,disk. - Markup
<data>,<spark>,<gauge>,<chart>andfrom=on<table>,<list>,<label>. tui.chart KIND VARfor every renderer,--datato chart a dataset;tui.chart.spark,tui.chart.gauge.show=on a bound<table>andtui.data.bind tablepicks the columns; a<chart>may name several columns (col="cpu,mem");from=is optional on<spark>,<gauge>,<chart>.key=on a bound label or gauge: one row of a keyed dataset.width=fit,levels=,heat=andclass=options of bound widgets;-w fit/-h fitin a chart'sargs;tui.chart --class; default theme classes.gauge_ok,.gauge_warn,.gauge_crit.- Guide: Data. Tutorial: A live dashboard. Example:
examples/live-data. <contextmenu for="#id">;mouse:rightopens the menu at the pointer (tui.action.contextmenu, default bind).<nav>with<item page text icon badge collapsed_text shortcut action>; the item of the current page getsactive_class.tui.nav.sync.shortcuton<button>.<tui on_leave="fn">, called asfn NEXT_PAGE_PATH.tui.get.page_name.tui.exists ID.tui.restyle ID CLASS.dabt:paths in<theme src>,@import,<include src>,<component src>,tui.load_theme,tui.theme.set.- Size unit
Nc(exactly N cells). <tui focus_on_enter="first">.text=on<input>,<checkbox>,<select>(same aslabel=).--quietontui.job.run(same as--silent).- Dev-tools tab
Console(key5): the app log file as it is written. - Debug event
callback.call. - Validator:
foron<contextmenu>,<theme src>and its@importfiles, size tokens, bare-number sizes beside unsized or unit siblings,<nav>/<item>,<tui on_leave>. - Schema:
<nav>,<item>,for,on_leave,shortcut,textoninput/checkbox/select; typedx,y,anchor. - Default theme classes
.nav_button,.nav_active. - Guide: Components and templates, Navigation,
dabt:paths.
tools/t.shsnapshot includes_TUI_RUNNING,_TUI_BATCH_*,_TUI_PACE*,_TUI_OUT_LAST._tui_build.attrvreads the attribute table directly instead of callingtui_node.attr_get: one function call less per attribute read while a page is built.tui.chartof an empty dataset gives an empty string; the renderer no longer waits for stdin.tui.chartrefuses a size or scale flag whose value is not a number (-w fit): the renderers looped forever on one.tui.chartturns a renderer's literal\033colours into escapes.tui.outputdoes nothing when the text is unchanged.tui.set_labeldoes nothing when the label is unchanged.tui.set_labeldraws inside a callback batch instead of flushing on its own.tui.theme.setreturns 1 and keeps the current theme for a file it cannot read.tui.updatedoes nothing inside a callback when the value is unchanged.tui.updateon an input moves the cursor to the end.workspace.xml,settings.xmland the first-app example useNcsizes.- A timer that is late by whole intervals skips those ticks.
- A timer that runs longer than its interval waits as long as it ran before the next run.
- Dataset-bound widgets are drawn in the same batch as the timer callback.
- Layer tags take no row in their pane.
- Shipped themes import glyphs with
dabt:glyphs/…. - The main loop polls with
TUI_INPUT_SETTLE_TIMEOUTwhile a timer draw is waiting. - The start-up check skips a file without a
<tui>root that another page names insrc. - Theme load problems are logged once per requesting file, with the caller and a nearby or
dabt:file when one exists. - Timer-driven draws are limited to one flush per
TUI_FRAME_BUDGET_US(default 16666).
tui.job.run --silentadded to the API page.focus_on_enter="first"focuses the first widget.bad substitutionon bash < 5.2 when removing markup nodes or closing a context menu.
Full changelog: v0.0.31...v0.0.33
Checksums (sha256)
71741b5dbff39aa9b5a02c734e00ca1f80a530462780daa09a9036ce7ede27cf .dabt.metadata
b6f0953646760a72bf9804b590d2d7476fedaa5f86d32fef36fcb03afcdf8c55 CHANGELOG.md
dbed8e4a2c4457f96d273eee9767429a39dbff1c52803c81d39603154d2579d7 LICENSE
9662155c1a819d2208a6156a373b5b250334d06b09807ddd845acf3a14f72101 NEWS
7daab39b35ed0ee575e17d41c2430fc3a2478e947298b8b581b517bb2209b81b README.md
d3ccac5eb3092c590ac468b32c65ce0c673c35f2eeb622de404e3a15aaa8eb75 VERSION
8cbcaa73d90f6d16548d1c4cafdd6587fc8b4fa90e4747628756d835e9793cca bin
8115d23bc49b6b3dd13f9b6014a837d9a85ce283e668d5ed1ce41c7b60e4e040 docs
6e6a59405343e74be8d35ec02710a4554e9df4f74044eb506169f9f15e16ac9a install.sh
07f2ce8fc2fc68d2206a6353313105a343b8d89331e9147e0cd3c50fb842f035 lib
309ca840160169c44d2ae1623ac164c5af6722661f1bb668cdd9142c1f7f5e34 share
dabt 0.0.31
Why even keep rolling the boulder? The gods won't notice- even if they do what are **they gonna do?**
Version 0.0.30 gave you a profiler for pages. This release points a profiler at the renderers (table, hbar, vbar, linechart, the CSV charts and the rest of lib/terminal_renderer.sh) and then goes after what it found: 33% less time per call on average across 114 cases, 47% less in the 82 cases that got faster, and the big ones down by up to 96%. A 200-row csv_vbar went from 309 ms to 13 ms, a 200 x 8 table from 257 ms to 25 ms, and none of them start a process per row any more.
Output did not change: every case prints the same bytes as before.
- The renderers take 33% less time per call on average (x1.9 geometric mean over 114 profiler cases).
- 82 of 114 cases are at least 5% faster, by 47% on average; the rest stay within a few percent.
csv_vbar207 to 10 ms,csv_linechart165 to 8 ms andcsv_hbar154 to 12 ms per case on average.table65 to 7 ms on average; 200 rows x 8 columns 257 to 25 ms.linechart48 to 6 ms on average; 1000 points 159 to 12 ms.vbar21 to 4 ms andcolumns20 to 3 ms on average.scatter42%,histogram37%,sparkline41%,list30% andhbar24% less time on average.- No process per row or cell: a 200 row
tableor CSV chart forks 2 to 4 times, down from about 201. box,alert,quote,divider,bannerandbadgesare unchanged within a few percent: they were already fast.- The renderer profiler names every renderer correctly.
vbar,linechartand the CSV charts used to show up as "0", "10" and "12". tools/benchmarks/renderers/profile.shprofiles every renderer oflib/terminal_renderer.shon several datasets and argument sets.
tools/benchmarks/renderers/profile.sh: time per call, output size and forks for 114 renderer cases, a diff against the previous run, saved reports._tr_set_lines NAME STRING: splits awk's output into an array withoutmapfile._tr_csv_entries NAME FILE DELIM HEADER: reads thelabel:valuepairs of a CSV in one awk pass.- Release charts for this version:
tools/release_charts.pyentryv0-0-31.
table(30 or more rows),hbarandvbar(40 or more entries),linechart,sparkline(over 300 points) and the CSV readers are laid out in one awk pass when the delimiter is one character. Smaller inputs and other delimiters keep the bash path, which is faster for them.tablekeeps each row's cells in an array of its own, trims only cells with an edge blank and skips the per-cell line table for single-line rows.vbarbuilds its cell, blank and underline strings once per chart instead of once per cell.columnskeeps wrapped cells in arrays instead of$(printf ...)subshells and pads with slices of one blank run.scatterkeeps each braille cell's dot mask while plotting;histogramsplits a one-character delimiter inside awk._tr_wordwrapreturns early for one short line without escapes;_tr_resamplereads its input through a nameref;_tr_braille_initbuilds its table with twoprintfcalls.columnspads non-ASCII text by characters instead of bytes, so the columns line up.- The benchmark tools live in
tools/benchmarks/:profiler/,compare-v2/andrenderers/. - A
tui.everyjob that is due at once no longer waits out the 50 ms poll; the profiler's nav tables showshownnext todone, andnav.arrowsmeasures a page switch by Enter on a focused menu button.
- Renderers no longer leak their loop variables into the caller:
vbar,table,kv,box,list,tree,hbar,csv_linechartand_tr_wordwrapdeclare themlocal. The leak is what mislabelled the profiler's renderer groups. - A page of a shell honours
autofocus. - Alt plus a digit or punctuation key no longer waits 10 ms for a sequence terminator.
dabt update # existing install
curl -fsSL https://raw.githubusercontent.com/DinosaursAreCute/DinosAmazingBashTui/main/install.sh | bash # new installThe full list of changes is in the changelog. Compare with v0.0.30.
dabt 0.0.30
dabt --debugshows what the app is doing: a live status strip and a dev-tools dock inside the terminal.- F12 toggles the status strip, F11 the dock with its Events, Pages, Perf and Counters tabs.
- Debug mode costs a normal run nothing: hot paths pay one arithmetic test.
- The Scrolling page opens in about half the time.
- Templates with
<if>alternatives only build the branch they use. - The Scrolling page fills the terminal on first launch.
- Cold first visit of the Scrolling page at 60 rows: 2.5 s to 1.1 s.
- Expanding a template use with ten
<if>branches clones 1 branch instead of 10. - A first launch builds the Scrolling page once instead of twice.
- Redraw only what changed:
tui.update_changedskips the draw when a widget already holds the value. - Demo pages refresh on timers, not tick counters.
- The Widgets status line repaints 0 times a second while idle, down from about 3.
- The Monitor page no longer runs a callback on every main-loop iteration (about 20 a second).
- Plugins page clicks fork up to 8 times less; the Settings and Keybinds handlers fork none.
- The Monitor's interval input runs no
awk. - Searching a markdown document is up to 3x faster.
- Marking a search match in 2000 rows drops from 800 ms to 237 ms.
- Stepping through search matches skips rows without a match: 170 ms down to 47 ms for 2000 rows.
dabt --debug[=CATEGORIES]: status strip (F12) and dev-tools dock (F11).- Dev-tools dock tabs: Events, Pages, Perf, Counters; keys for scroll, pause, filter, clear and maximise.
tui.debug.bar,tui.debug.devtools,tui.debug.segment,tui.debug.segment.toggle,tui.debug.init.tui.debug.event,tui.debug.enable,tui.debug.resetandTUI_DEBUG_RING_MAX.- Theme classes
.debugbar*and.devtools*. tui.update_changed ID TEXT.- Guide: section 14, copy-paste patterns for fast callbacks.
- Unit tests for search marking: literal queries, case folding, non-overlapping matches, style sequences and matches spanning a reset.
<use>resolves a template's top-level<if>branches from its parameters before cloning.bin/DABT_demo.shwrites the Scrolling page's row-count addon before the first page load.- The Scrolling demo's generated rows cover 4 x the terminal height on every terminal, not only above 57 rows.
- Monitor refreshes through a
tui.everyjob instead of_TUI_TICK_FN. - Widgets status line uses
tui.update_changed; the progress job counts in a variable. - Plugins, Settings and Keybinds callbacks read values with
tui.capture,tui.get ID VARandtui.config.get KEY DEFAULT VAR. - Debug page refreshes its status once per tick.
_tui_md.mark_rowcopies a row in whole chunks instead of one character at a time and returns before any setup when the row has no match._tui_md.mark_rowmemoises the lowercased unstyled text of styled rows in_TUI_MD_LOW(bounded at 4096 entries)._tui_md.mark_matchesis split out of_tui_md.mark_row.
- Unreachable code in the Keybinds page refresh.
Full changelog: v0.0.29...v0.0.30
Checksums (sha256)
30f652548c603bd41e8d795661943d3539e37a3b01c8a5307dacb66557e8bef2 .dabt.metadata
44ba8cdc34b93b0155162e5454ff4c6a2cdcdd3c094d976856bc30258cf6c8cb CHANGELOG.md
dbed8e4a2c4457f96d273eee9767429a39dbff1c52803c81d39603154d2579d7 LICENSE
f70668296abed7c4b7cf047fa61a3f4439e9e71415367fd6675822b76567fc40 NEWS
673984123530ac70772db7aed967c050c2647bd3d0e41574a4675e1eb77475c9 README.md
804b565add0bd73e65c5ae169970e4bcefee729d2fff44193ddbe46d253e6cdb VERSION
8cbcaa73d90f6d16548d1c4cafdd6587fc8b4fa90e4747628756d835e9793cca bin
31da12e6c8ed4dc0ebfa6dfe1f9a892ae724c8315749726fe49b7956244aaeac docs
6e6a59405343e74be8d35ec02710a4554e9df4f74044eb506169f9f15e16ac9a install.sh
b9bcf6fd79a1a7a1eaebfd64a42106ba051b7289c1817ae5b0218f2cff4451a6 lib
934dd2d9aaa551f59f0856d8eef5dc445750567f02c428ba6ece95e9a346c04b share
dabt 0.0.29
- Pages are ready for the current terminal size when they are opened. The background pool re-fits every cached page laid out for another size, at start-up and, after
TUI_CACHE_RESIZE_DEBOUNCE_MSof stillness, after every resize (restore, lay out, snapshot: about a tenth of a rebuild), silently and at low priority.tui.cache.is_sizedtells whether a page is ready for the current size.
tui.cmd.loadkeeps the parse of a commands file (commands.xml) as a snapshot under$TUI_HOME/cache/commandsand replays it with onesourcewhile the XML is not newer: sourcingtui_cmd.shtakes about 3 ms instead of 14 ms (the 23 shipped commands cost seven regex reads each before).- A button click costs about 60 ms less. Releasing a button that changed the page repainted the released button and its pane's border once more, 20-28 ms after the new page was drawn, so the screen could also show the pane in a focus ring the page render does not draw; it now skips that when the action repainted the whole screen (
_TUI_RENDER_SEQ).tui.focuscalled by anon_visitcomposed two or three pane borders only to drop them (27 ms on Docu); it now sets the focus state and composes nothing while the page loads. A pane border's side columns are composed in one append per row instead of eight calls: a 42-row pane 7.9 ms to 1.7 ms, which every border redraw (a focus change, a press) and the page render pay. - The page cache on disk is one file per page (
<path>.page) instead of twelve, so a start reads 26 files instead of 286:tui.cache.load_dirtakes 50 ms instead of 88 ms for the demo's 26 pages. A file that was not written whole is ignored; the files of the old layout are deleted the first time they are seen, and their pages are built again once. tui.bind.defaultskeeps the parse ofkeybinds.xmlas a snapshot under$TUI_HOME/cache/keybindsand loads it with onesourcewhile the XML is not newer: sourcing the library takes about 71 ms instead of 91 ms.- A page switch paints the screen once. Draws made while
tui.gotoloads the page (tui.update,tui.focus,tui.pane_title, a list or output redraw inon_visit) return before they compose anything, because the frametui.gotorenders afterwards covers them, and output queued before that frame is no longer painted again right after it. On the demo's Docu page, 5 writes (41 KB) and a 9 KB repaint became one write (32 KB), and the goto pair lost about 45 ms of composing that was thrown away (Settings 23 ms, Markdown 11 ms, Terminal 10 ms). - Leaving a page of a shell twice in a row does the work once (
tui.gotoand the replay that follows both left the page), andtui.gotosyncs the page ids once before it leaves instead of twice. tui.page.resettable, run by every footer build, looks only at the ids that keep state (as save and restore do) instead of every widget and pane: 1.1-2.7 ms down to 0.2-0.4 ms. The footer'sCollapseandResizepredicates find a pane's parent through a remembered, re-checked lookup (_tui_resize.parent_of) instead of scanning every pane per ancestor. A footer build went from 3.0-6.5 ms to 1.8-2.3 ms.
- After clicking a button that switches the page, the screen could show the menu pane in a focus ring that a full render of the same state does not draw (42 rows differed from a redraw after a resize); the click now ends on the page render.
- The Settings page no longer fails with
cursor:: command not found. A backtick in a double-quoted description ran as a command, so every app showed an error toast and the pointer setting lost the words`cursor:`.
Full changelog: v0.0.28...v0.0.29
Checksums (sha256)
6a9abc2ab3192f411d23e595e16b8bfa0f73fe2802efb8e22af289f342123cc8 .dabt.metadata
05aab8ea59d5d1016d5f8303764b95f834c9acb26d12a1ab41fb73a43f760110 CHANGELOG.md
dbed8e4a2c4457f96d273eee9767429a39dbff1c52803c81d39603154d2579d7 LICENSE
31b0ef833b95a54ee751471e4651ebe0ac72b534f78eb62efb51fdee0a628577 NEWS
fb505c3fa3112408482c8d0d231e16845ef4590d2d93542b3f7c2a6e7326a770 README.md
8e9875f8cec66e7573b4caaa60e1a5a1ae99247156f6f1275a9d0d4df8a5bdf9 VERSION
82ad194f9ad5b4f660b37aa40e1fb811f6f005f9b7f851e67daa6212f8d4b065 bin
2e19306fb9f5c3d36a6f137c92f03d3a0726533814c50ff6a44382ba7b1d0656 docs
6e6a59405343e74be8d35ec02710a4554e9df4f74044eb506169f9f15e16ac9a install.sh
ad6e9363f6d34ff17affbb716c499d6f90b9e02d4e5ec8851833b19ff940b7ff lib
ccad059d447fc7a52c075fdbcd7e1f0581d73e7418baa7f7eed6ce3e2be834b0 share
dabt 0.0.28
- Table keys are about twice as fast: a Down keypress on a 200-row table drops from 40 ms to 20 ms. Column widths and padded row text are cached per table, and held Down no longer repaints more than the cursor and detail pane.
- Typing in a filter input paints the character first and runs
on_changeafter it, cutting a keystroke that filters a table from 42 ms to 5 ms. - A callback that updates several widgets now costs one redraw instead of one per widget.
tools/compare-v2accepts extra scenarios with--plugins DIR; the workbench scenario pauses 5 s before its idle step so background work does not count as idle.
tui.update,tui.progress.setand the list and table setters queue their redraw while a callback runs and draw each widget once, in one write, after it returns.- Key bindings, button actions,
on_changecallbacks andtui.every/tui.afterjobs run as one draw batch. - A text widget's
on_changeruns after the widget is redrawn, as a batch with the widgets it updates. - A list or table key press redraws the widget before its
on_changecallback runs. - A full
tui.renderdiscards redraws queued by a running callback, since the frame already contains them. - A table scans its rows for column widths once per data change, and caches each visible row's padded text until its rows, columns, width or alignment change.
- Table rows are split with parameter expansion instead of a here-string, so a row costs no write.
- A page switch started from a button no longer repaints the new page twice.
- A 200-line
tui.list.addon a long list no longer pays a row-diff pass on its batched redraw. - Installer no longer downloads code from main but from latest release.
Full changelog: v0.0.27...v0.0.28
Checksums (sha256)
457f83c63460412a6f3797f777a37598c25205ac18f7239284bac78548d57cd6 .dabt.metadata
5f1e1a5210b344076514433dcde6e50c36e360cdcf5142a7fa898b7feecf77ba CHANGELOG.md
dbed8e4a2c4457f96d273eee9767429a39dbff1c52803c81d39603154d2579d7 LICENSE
31b0ef833b95a54ee751471e4651ebe0ac72b534f78eb62efb51fdee0a628577 NEWS
9e01024892fc93ac4f62376040ff8c0f5c973a8d215019f924d4d91fae1f5b52 README.md
3b1cab8d0effa0037e9724c92ad49bb4ed9c9c5b5adda49951d73702fe3b0808 VERSION
82ad194f9ad5b4f660b37aa40e1fb811f6f005f9b7f851e67daa6212f8d4b065 bin
c9606e7c173cb142f1cb734262c30c57d9f260909d05731bd793b60e4c6f0267 docs
6e6a59405343e74be8d35ec02710a4554e9df4f74044eb506169f9f15e16ac9a install.sh
c451669dc3ada4fba048b22654a8d15b3198ef604094bf808ad0d2769df5a181 lib
476def91d277d26a7130e33cee852932acbb71c667b1dc998cc3f1a310449652 share
dabt 0.0.27
- Mouse pointer shapes: a
cursor:CSS property sets the pointer over a widget of the class (OSC 22);:hoverand:focusvariants; resize handles showcol-resize/row-resize/nwse-resize, collapse buttonspointer; layer headers (pointer,move,nwse-resize), dialog buttons and the command palette react, and the page under a modal or popup keeps the default pointer;tui.modal.opentakes an optional POINTERFN; buttons, checkboxes, selects, lists and tables default topointer, inputs and textareas totext. Settings > Input turns it off (pointer.shape). tui.mouse.capture ID FNroutes the held mouse button toFN drag|release ID X Yuntil release.<textarea mode="syntax">andtui.text.mode ID syntaxhighlight only the Markdown delimiters, each in the color of its element class.tools/compare-v2: pty-based, black-box benchmarking of comparable dabt and textual apps with improved accuracy and data set than the first version. .
.- Widget glyph designs:
tui.glyph.get|set|user|available,tui.variant,tui.variant.default|list, theme.type.variantrules with quoted glyph properties, andvariant=on widgets and panes. - Built-in glyph designs
thin,dots,squares,asciiandblocksinshare/defaults/glyphs/. - The demo has a Glyphs page that shows every widget design side by side.
- The demo has a Markdown page with an editor and a live preview.
- Themes can
@importother stylesheets; editing an imported file refreshes the cached theme. - The Settings page has a Glyphs category, a live Preview pane and a custom-design editor.
tui.on_change ID FN --debounceruns a list or table callback once the keys stop (at most everyTUI_CHANGE_DEBOUNCE_MAXevents).tui.modal.count_keysandtui.bind --countlet a held key reach a handler as one call withTUI_EVENT_COUNT.tui.config.stageandtui.config.flushbatch setting writes into one file save.
- A scrollbar press on the thumb no longer jumps; a press on the track centers the thumb on the pointer.
- A button runs its action on release and drops its focus and hover looks.
- A button's action runs before its un-press redraw, which is then one batched draw, so spamming a button no longer queues clicks behind repaints.
- A nav button (
page=) whose target is the page already shown does nothing instead of reloading it. - The default Markdown delimiter color is bold yellow and the default rule color is bold red.
- The demo Markdown editor uses
mode="syntax". - Held scroll and navigation keys in lists, tables, dialogs and the command palette are merged into one step with a count.
- The demo Settings page swaps its input fields for selects and adds a progress-bar design section.
- List and table redraws no longer blank their first row before drawing it.
- Widgets above or below the viewport of a scrolling pane are skipped on a full render before their placement is computed.
- A Markdown heading with no text, such as a lone
#, no longer crashes the TUI. - Emphasis, code and link spans inside a Markdown heading keep the heading colors.
- A widget redraw inside a page switch no longer ends the switch's synchronized update early, which showed the half-built page.
- Nested synchronized updates no longer emit inner markers:
_tui.writeadds none whilemode.sync_startis open. - Single widget redraws are written inside a synchronized update instead of as a bare print.
Full changelog: v0.0.26...v0.0.27
Checksums (sha256)
c2bbb9ae9a849995ad2466931e57e489cb6b4f7b5d5ad5535db3953f5fef1ae8 .dabt.metadata
d1d1680eed9e635474b3f5b11a470812558ceb38812a3f558c07bb2ab2485af3 CHANGELOG.md
dbed8e4a2c4457f96d273eee9767429a39dbff1c52803c81d39603154d2579d7 LICENSE
8ac7b87ae042f4079d86da3442ebec348135e24ca47784275b6fd92efbd903b3 NEWS
9e01024892fc93ac4f62376040ff8c0f5c973a8d215019f924d4d91fae1f5b52 README.md
e1169a569a1c3d167300ee0eb9eba17e77d460d5fcfab368546a805ebe588a3e VERSION
82ad194f9ad5b4f660b37aa40e1fb811f6f005f9b7f851e67daa6212f8d4b065 bin
c9606e7c173cb142f1cb734262c30c57d9f260909d05731bd793b60e4c6f0267 docs
5eb55f2a9ba6341d79710ea0ba0da900fcf9b9c4550558e203a9c11ba1e966d6 install.sh
5620dc96ecfaaf97d98cfa2c386d8910e8ffd3336f9548b132af57acb0ead73b lib
ba4aacac2417c38d7b8b4925dd034111e2921dbc851e7866b2b25c86248c1f5b share
dabt 0.0.26
Scrolling a pane of widgets is about twice as fast: 147 ms instead of 72 ms per wheel tick (profiler, scroll scenario, 2 rounds, 200x45; Page keys 96 ms to 41 ms, the list wheel 71 ms to 51 ms). A scroll step no longer places, draws or indexes the widgets that are outside the viewport.
- A scrolling pane's repaint skips the widgets above and below the viewport before computing their placement (the pinned widget is always drawn); the output is the same.
- The widget placement cache no longer includes the scroll offset in its key: it holds the unscrolled placement and the offset, the pin and the clip at the viewport's bottom edge are applied after the lookup (
_tui._wp_scroll), so a new offset is still a hit. - The hit index skips widgets that cannot be hit in a vertically scrolling pane: below the viewport (unless they have
hit_padorhitbox) and above it. Spatial focus moves still find them, they fall back to_tui._widget_pos. _tui_scroll.stuckwalks only the pinned widgets instead of every widget;_tui_scroll.measuredrops its per-widget locals and regex.
Full changelog: v0.0.25...v0.0.26
Checksums (sha256)
1e9e9467767efa90adb49aba03649dad6b22ab0d38be1989f75da0deb64259a4 .dabt.metadata
5131fa014d79a1dbfbe7c09e1a218c5b176914b42954c749774b1a1d0b48ce64 CHANGELOG.md
dbed8e4a2c4457f96d273eee9767429a39dbff1c52803c81d39603154d2579d7 LICENSE
8ac7b87ae042f4079d86da3442ebec348135e24ca47784275b6fd92efbd903b3 NEWS
9e01024892fc93ac4f62376040ff8c0f5c973a8d215019f924d4d91fae1f5b52 README.md
bae589714175cc8cb38d9be4b1bdfb42577401491fc8cab492805948b6523202 VERSION
82ad194f9ad5b4f660b37aa40e1fb811f6f005f9b7f851e67daa6212f8d4b065 bin
2432cfc1e838c7f1b88514957f0fdd3b0f0a68c13809030021d2a5186381bed1 docs
5eb55f2a9ba6341d79710ea0ba0da900fcf9b9c4550558e203a9c11ba1e966d6 install.sh
ae98be4bd77a78092353a78ddc288c5529a623f33aaaeec468c8aec01ff15434 lib
c994ab86c3762697b1c88650bf9b90ed2d70bb57265d1e84b3aa57c2e3fd3617 share
dabt 0.0.25
tui.log.level [NAME]reads or sets the log level (debug,info,warn,error,off) while the app runs;TUI_LOG_LEVELsets it at start.- Settings in
tui_configuration.shfor the start-up work:TUI_CACHE_LAZY(0builds every page before the first frame, as before),TUI_CACHE_LAZY_WORKERS,TUI_CACHE_LAZY_PREP,TUI_CACHE_LAZY_NICE,TUI_VALIDATE_JOBS(1validates in the calling shell) andTUI_VALIDATE_ASYNC(0validates before building). - While the background cache build runs, a toast says so; another says when the cache is ready. Plugins get the hooks
cache_buildingandcache_complete. - Profiler: every cold-start phase has a probe (shared prep, starting the background build, restoring page state, focus, the cache-build announcement, validation start and wait), stretches no probe covers are named ("unprobed after X"), a
page buildsline gives the workers, the slowest and the work in total, andcache complete(when the background build ends) is shown as information, not as part of the budget.
- The first launch (and every launch after an update or a page edit) builds only the first page behind the splash. The other pages are built by background workers (at lower priority) while the app runs, the pages the first page's buttons link to first, in the order they appear. A page opened before its worker is done is built on the spot. The cache is written once they finish; a quit before that keeps the pages already built.
- Page validation runs in parallel, one worker per core: 27 pages took 1550 ms, now 248 ms; the messages are the same and come in the same order. A launch that finds the pages unchanged still skips it.
- Validation runs in a background process while the first page is built, and is joined before the cache is written or the app starts, so an invalid page still stops the start with the same messages. Cold start 1.70 s before, 1.45 s after (3 rounds, profiler).
- Themes and shells are prepared for the first page behind the splash and for the other pages by the background pool, and each theme file is loaded once instead of once per page (a memoized load still cost about 3 ms). Cold start 1.79 s before, 1.70 s after (median of 3).
- The app log writes
infoand above by default; it used to write every debug line (about 600 per 6 page builds, 83 ms of CPU). Building 6 pages: 2224 ms atdebug, 2141 ms atinfo. SetTUI_LOG_LEVEL=debugfor the build trace. - The logger moved from
tui.shinto its own file,lib/tui_log.sh; its functions are unchanged. - The DABT/Textual comparison waits for DABT's "Page cache ready" notice at the end of the cold session, so its steps run on a complete cache.
- The debug trace in the app log by default (page-build steps, style bakes): it is only written at
TUI_LOG_LEVEL=debug.
- A headless cache build counted as a run of the app:
runsandlast_runinapp.metawere changed once for every page the splash built. They only change when the app itself starts.
Full changelog: v0.0.24...v0.0.25
Checksums (sha256)
3e575246cded7bf2cd646975080baee42f467e92bf46497b9ec2b0fb96eb7244 .dabt.metadata
86110ebf84fbe67868434e6013665ab31b262c3e95fda06a8384e4a12d5f5c1d CHANGELOG.md
dbed8e4a2c4457f96d273eee9767429a39dbff1c52803c81d39603154d2579d7 LICENSE
8ac7b87ae042f4079d86da3442ebec348135e24ca47784275b6fd92efbd903b3 NEWS
9e01024892fc93ac4f62376040ff8c0f5c973a8d215019f924d4d91fae1f5b52 README.md
eef1e4279861bdd3bd2a7649bfc03cfa14e2c18c7b2a7c12dcbca265b6da93e5 VERSION
82ad194f9ad5b4f660b37aa40e1fb811f6f005f9b7f851e67daa6212f8d4b065 bin
8d3b948d487ccb83b977471a960761d7a23b4daf8bc7e95fa367f72bda8b6e99 docs
5eb55f2a9ba6341d79710ea0ba0da900fcf9b9c4550558e203a9c11ba1e966d6 install.sh
9ea304f616afe5bbd0213083c17e536d858932dcd69665f895c7cda45dae08e6 lib
776f56946ec51c74fd10efe04ddae245734ff83f80d9725dd6ae263a579dbe90 share
dabt 0.0.24
Rowattribute for widgets is no longer required and is inferred based on its position in the markup. If row is specified it will be ensured.tui.page.refreshapplies a change next to plugin widgets (tags a plugin registered, such as a graph) pane by pane instead of rebuilding the whole page in the background.- Anything open over the page (a layer, the command palette, a dialog) now goes out in the same write as every repaint of the page under it, so background updates no longer flicker through it.
- Collapsing a pane now also hides the widgets of the panes nested in it (they used to keep drawing over the space the siblings took); expanding it again leaves a nested pane that is itself collapsed hidden.
- Errors no longer draw over the screen: while the TUI runs, stderr is captured (
tui.errors.capture) and each message is logged with its location, the key/action being handled, the page and the focus, and shown once as an error notification; repeats are counted.TUI_ERR_TRACE=1adds the call stack of the failing command to the log. The app prints one line at exit when errors were logged. - Jobs: a job started from inside another job's work (a page build runs the page's
on_visit) no longer stops the main shell's job of the same ID, and its temp files no longer reuse the numbers of the main shell's jobs. Before, a quick second page refresh could hand the main shell another process's result file and printtui_job.sh: ...N.blob: No such file or directory. - Layers:
<window>,<modal>,<dialog>,<popup>,<tooltip>,<contextmenu>and<toast>float above the page with a clamped rectangle, an anchor (screen,parent,#id), a drop shadow and a header with reset, fullscreen, minimize and close buttons. Windows drag by the header, resize by the corner, snap to screen edges and rise when clicked or focused; modal layers hold Tab and the pointer and give the focus back. Panes can float and dock back (detachable,dock_group,leave,on_detach,on_dock), andpersist="layout"keeps where windows and detached panes are. Newtui.layer.*API; the page and its layers go out in one write, so dragging does not flicker. The Layers demo page shows all of it. - Markdown panes have default keys: alt chords (
alt+j/klinks,alt+lfollow,alt+bback,alt+ssearch,alt+ooutline,alt+zfold,alt+y/ucopy) act on the keyboard pane, the pane under the pointer or the only Markdown pane;keys="reader"(tui.md.keys) adds plain pager keys (n N b / ] [ o z y Y g G, Enter follows) while the pane has the keyboard. A left click on a link follows it, andtui.md.show PANE TEXT FILElets a text-filled pane resolve relative links.f2lists the keys. The demo's Docs and Case Study pages use reader mode. - Markdown pictures in headings and table cells: a heading that is only an image (the README's
<h2><img alt=...></h2>banners) is drawn as the picture in graphics mode and as its alt text otherwise (outline and#anchorlinks keep working); table cells that hold only pictures are drawn as pictures, sized to an equal share of the table. - Markdown renderer:
lib/markdown/turns Markdown into styled, width-fitted rows without a terminal (tui.md.render,tui.md.style). Headings, lists, quotes, fenced code with bash/json highlighting, tables, links, task lists, strikethrough, autolinks, reference links and a small HTML subset;#and##can be drawn in block fonts. It runs in the Docs and Case study pages, in<textarea mode="markdown">and in the new<markdown>tag. Settings > Markdown styles every element, with a live preview and a "Theme default" profile. Pictures draw in kitty and Ghostty (local PNG, converted SVG/GIF/JPEG, remote images when fetching is on). Guide:docs/guide/markdown.md. - Markdown renderer: a pane paints its first screens at once and finishes the rest in time slices (anything that needs the whole document completes it first); whole renders are cached per width, style and focus, and inline results are reused across widths, so a resize or a revisit re-wraps instead of re-parsing. Text widgets cut and measure styled rows 2-3x faster.
- Markdown speed, part 2: stepping through links no longer re-renders (the focused link is drawn over the cached rows: 316 ms to 5 ms in the bench), a file's render is kept on disk (
$TUI_HOME/cache/markdown) and loaded in about 5 ms instead of rendering for 320 ms in a new session, the pre-pass of a first paint is ~30% shorter (tag parsing by expansions, a file-backed line split), andtools/bench/run.shhasmd_*benches with spansmd_render,md_disk_load,md_slice,md_compose. - Markdown viewport budget (100 ms, accepted < 500; docs/design/markdown-render-budget.md): a scrolled pane renders from the block it is on and joins the part above afterwards, so a resize paints the view in ~35 ms (README: 53-80 ms) at any position and keeps it on its source line instead of its row. The width-independent half of a render (prepared text, block records) is kept per text.
tools/bench/run.sh --comparefails amd_view_*bench over 500 ms. - Mouse thumb buttons (SGR buttons 8-11) are their own keys
mouse:side1..mouse:side4(withdrag:andTUI_EVENT_BUTTON=side1..); they used to be decoded as left and middle clicks. In Markdown panesmouse:side2andalt+leftgo back,mouse:side1andalt+rightgo forward (tui.md.forward, new).alt+left/rightkeep their pane behaviour everywhere else. - New
tui.async.*: background painters, functions that run in a process of their own and draw straight to the terminal (stopped bytui.reset_uiand on exit, held while a modal or a layer is open or a resize is applied). Newtui.set_canvas PANE TEXTfor ready-made, unmeasured frames. The tick oftui.runfollows the shortesttui.everyinterval below 50 ms (down to 20 ms). - New
tui.border.register NAME TL TR BL BR HZ VT [CAP_L CAP_R]: add a border style forborder="NAME", with optional glyphs either side of pane titles (btop's┐title┌). - Pages can keep their state: input values, selections, scroll offsets, collapsed panes and pane sizes survive page changes (
keep_value,keep_collapsed,keep_size,keep_state), can be stored on disk (persist="disk"), and can be reset withalt+shift+r. - Pane titles take hotkey accents: a
^marks the next character, drawn in thetitle_keytheme class (title="^menu");^^is a literal caret. A registered border style now leads its left-aligned title in with its own edge glyph. - Panes can be fused (neighbours share one border line), resized with the mouse or
alt+r, and collapsed to a title bar, a rail or nothing. The new Workspace demo page (an on-call console) shows all three and replaces the Styles page. - Profiler
--jobs Noutput: each running unit gets its own live section (header and latest steps), finished units print as one block, failures are repeated at the end;--plaingives headless output with no cursor control or colour. - Profiler sweeps and perflab:
--scenarios perflabdrives a frozen fixture app (tools/perflab/) that pushes each framework feature along its own cost axis (tui.tick.addlisteners,tui.everyjobs,keyhook handlers, table rows and columns, buttons) over a ladder of sizes, one unit per rung. New--set NAME=VALUE(ladders,scale),--trace(sweeps run latency only by default), per-unit environment, apreparehook for scenario files,--scenario floor(normal use of every feature, traced, 5 rounds and 5 traced passes;--quick1 and 1;RUNSin a scenario file,--trace-runs N), and a LIMITS report section: the largest N inside the budget, the first N over it, the first rung that failed, and the log-log slope per axis. - Profiler: a run is based on a scenario file (
--scenarios FILE|NAME, defaulttools/profiler/scenarios/demo.py). The scripted user session, groups, budgets, units, default app, terminal size and environment moved out ofdprof/scenarios.pyinto that file; the engine loads and checks it, so profiling another app means writing a file, not editing the profiler. An app script that does not source the library in the expected form is now an error instead of a silent unprobed run. The report records the file's name. Reference:tools/profiler/README.md, Scenario files. - Settings > Keybinds lists every registered binding (keybinds.xml defaults,
tui.bindcode binds, yours), one row per command with all its keys, built from the binding tables. Key decoding understands the kitty sub-parameters: a reported shifted key (CSI 55:47;4u= alt+/ on a German layout) names the character, and an event-type suffix no longer drops the modifiers; key releases are ignored. The Markdown search chord isalt+s: symbol chords need shift or AltGr on many layouts and some terminals reportalt+shift+7asalt+7. - Settings is one page with a category sidebar (collapses to a rail), a search that filters every setting while you type, a details pane, and Markdown and Plugins folded in.
- Shells:
<tui shell="_shell.xml">builds a page into the<outlet/>of a shared chrome file.tui.gotobetween pages of one shell keeps the shell's widgets, focus, values and timers and rebuilds only the page (about 20 % faster than a full goto). Newtui.shell.file; the demo menu and header now live inshare/demo/_shell.xml. - Tables:
tui.table.set --keep COLkeeps the selection and its screen position across refreshes;tui.table.alignand `tu...
dabt 0.0.23
The first DevEx updates went after milliseconds. This one closes the house-cleaning and opens the next chapter: pages are data now. Templates, loops, conditionals, components and addons are in the markup, and tui.page.refresh rebuilds only the panes that changed. Along the way the profiler learned to hold a key: Up/Down on the nav bar costs 47 ms of work per second of hold instead of 478, and paints 4.3 KB instead of 49.5.
Medians of probe-measured latency on a 150×45 terminal. A held key repeats about every 33 ms, so a repeat has to be handled well inside that; the budget for a held key is 50 ms.
Held keys, the same build without and with the focus work (deep runs 20261002-222307 and 20261002-223527):
| Per second of hold | before | after | |
|---|---|---|---|
| Up/Down on the nav bar: app work | 478 ms | 47 ms | −90% |
| Up/Down on the nav bar: bytes painted | 49.5 KB | 4.3 KB | −91% |
| Up/Down on the nav bar: lag per press | 8.5 ms | 4.5 ms | −47% |
| Tab: app work | 420 ms | 60 ms | −86% |
| Tab: bytes painted | 60.7 KB | 15.9 KB | −74% |
| Tab: lag per press | 33.2 ms | 21.2 ms | −36% |
| List, table, page keys, cursor, typing | 2.5 to 7.3 ms | 2.6 to 6.6 ms | within noise |
Arrow-key focus search on a page of widgets went from 80 to 8 ms per hold (trace attribution).
Against v0.0.22 (deep run 20261001-230749 and the newest deep run 20261002-223527). This is the part to read carefully:
| v0.0.22 | v0.0.23 | ||
|---|---|---|---|
| Page switch, first visit | 143 ms | 151 ms | +6% (budget 150) |
| Page switch, revisit | 125 ms | 141 ms | +13% (budget 100) |
| Page switch by key, all ten pages | 101 ms | 108 ms | +7% |
| Page switch between trivial pages | 87 ms | 97 ms | +13% |
| Warm start | 290 ms | 347 ms | +20% |
| Cold start | 2.83 s | 3.38 s | +20% |
| Terminal resize | 203 ms | 145 ms | −29% |
| Wheel scroll | 18 ms | 16 ms | −12% |
| Idle repaints | 2.0 /s | 2.0 /s | unchanged |
Stage 2 made page switches and start-up slower, by 6 to 20%. Addon files are now part of a page's cache signature and composition runs on every build; the floor of a refresh with nothing changed is about 27 ms (see the design page). The newest run was taken while the demo was being edited and tested on the same machine, so read the page-switch rows as an upper bound. The command palette close reads 47 ms in both runs of this build against 13 ms in v0.0.22: a clock tick inside the profiler's settle window inflates some samples, and it is not resolved. Winning the page switch back is the next venture.
- Reuse in pages.
<template>,<use>,<slot>,<fill>,<component name src>,<for each|count>,<if test>/<else>and<include src p="v"/>with{{@p}}parameters. They expand when a page loads, so the built page has only plain tags. - Addons.
<addon id target priority>files withappend,prepend,before,after,replace,remove,setandwrap, read from the app'saddonsfolder and from folders given totui.addon.dir. tui.page.refresh. Re-applies addons to the page on screen and rebuilds only the panes whose content changed. Nothing changed: 27 ms; one addon: about 45 ms. The result equals a full load (unit-tested).- Background jobs.
tui.job.run,tui.job.cancel,tui.job.running: work in a background process with a spinner after a configurable delay, a done function that draws the result in one go, andtui.page.rebuildto build a page in the background. - Focus and hit zones.
tab_order,tabbable,focusable,focus_group,focus_nav,focus_wrap,autofocus,hit_pad,hitbox, a per-row zone index, and mouse events that carry the zone. - Paint pipeline. Targeted redraws are diffed against the last flush row by row, redraws coalesce to one flush per loop pass, and the line canvas has a junction table for every border style.
- The Compose demo page. One realistic page instead of two: a project board with three tabs. Board generates task cards from one template (nested
<if>for status, owner and priority) and lets you add, complete, block, remove and reset tasks. Conditionals shows==,!=, truthy values,<else>and nesting live, next to the markup that does it. Addons applies the five example addons. Every action writes an addon file and refreshes the page; switching tabs swaps the whole view the same way. Open it withalt+-or from the command bar.
- A focus move paints what it knows is dirty.
tui.focusdraws the old and the new widget, plus the border of a pane only when the keyboard pane changes, as one raw frame. It used to redraw the pane border on every move, even inside one pane, and run every frame through a row diff (about 105 of 120 ms of a flush). The nav bar stays inside one pane, so a hold repaints two widgets. - Arrow-key search reads cached rects.
tui.action.focus_dirtook every focusable widget's position from_tui._widget_poson every press. It now reads the rects the hit index already computed, and rebuilds them only when the layout or a widget changes. - Widgets nested in a pane start on its first line (row 0). Shift+Tab with nothing focused starts at the last widget. A pane that scrolls only vertically has no bottom-row scrollbar zone, and a widget's click area is clipped to its pane.
- The page parser finds the end of a tag with one regex, and
tui.cache.deps_ofand the<include>lookup no longer fork. The node store lists each node's attribute names, so clone, remove and parameter substitution visit only the attributes they need. - The demo's header and menu are templates in
share/demo/_templates.xml; the_header.xmland_nav.xmlfragments are gone.
- Boxes that checked themselves on hover.
tui.setstores a widget's value but does not redraw it. A visit callback that used it on a visible checkbox or input showed stale state until the mouse hovered the widget: on the old Addons page the boxes of addons applied in an earlier run looked unchecked, then flipped on hover. The demo pages usetui.update(store and redraw); two regression tests. ${v//a/&...}on bash 5.2+ treats&as "the matched text": template parameters containing&and thewxattribute rebuild now quote the replacement.<if>branches sharing a widget id removed the kept branch from the id index; an addon folder that was both registered and the app's own was read twice and reported as an include cycle; the validator demandedpaneandrowon widgets nested in a pane.
- Hold a key in the profiler.
tools/profiler/profile.sh --scenario heldsends one press every 33 ms for holds of 0.1 s to 1 s on the nav bar, a list, a table, an input, Tab and PgDn. Per press it reports the queue time, the lag from the key sent to the first output the terminal receives (so widgets that draw outside the flush count too) and the render cadence. The rating uses the worst press, not the first paint. --scenario composeprofiles the refresh paths of the Compose page: open, add a task, switch tab, change a conditional, apply the five addons. In the first quick run these took 160 to 320 ms against their 100 ms budgets; that is the work for the next update.- The explorer and journey include the new deep runs, the held-key groups and the stage 2 cost.
- The Generated and Addons demo pages are one page, Compose. Anything that opened
generated.xmloraddons.xml(a command, a binding, a profiler scenario of your own) must point atcompose.xml. The example addons now targetcompose.xml. - Use
tui.update, nottui.set, to change a widget that is already on screen from a visit or action callback;tui.setalone does not redraw. - Golden frames of the demo change where a focus move used to be two flushes and is now one (
widgets.frame, 16 bytes of synchronised-output markers); re-record your own once withtools/t_golden.sh. - A
<select>,<password>,<textarea>,<list>,<table>or<progress>nested in a pane gets "missing id or pane" today: give it an explicitpane=. A fix is on the l...









