gitstack

grindlemire/go-tui code browser

51.5 KB markdown 533 lines 2026-06-13 ยท a09a484 raw

Changelog

0.17.0 (2026-06-13)

Features

  • identity-based mount keys with React-like key attribute (bb82b57)
  • tuigen: key on a container element keys descendant component mounts (#94) (488fbfe)

Bug Fixes

  • lsp: wait for gopls to exit before canceling its command context (464d8b3)
  • textarea: guard moveEnd at phantom row and overlay cursor on hard-newline boundary (ddf4f55)
  • textarea: keep cursor visible at display-full wrap boundaries (c2da185)
  • textarea: keep the cursor visible at display-full wrap boundaries (3a2c768)
  • textarea: wrap wide characters at display-width boundaries (61fb8c8)
  • textarea: wrap wide characters at the display-width boundary (c385312)
  • tuigen: avoid receiver shadowing in generated UpdateProps (6912b40)
  • tuigen: avoid receiver shadowing in generated UpdateProps (57378db)
  • tuigen: handle let bindings with call or expression RHS and keep component expression comments (f0bb13a)
  • tuigen: parenthesize nested loop mount key expressions so multipliers compound (53765bb)
  • tuigen: prevent loop mount keys from colliding with other mount call sites (d823710)
  • tuigen: prevent loop mount keys from colliding with standalone component keys (cda2c0a)

0.16.0 (2026-06-07)

Features

  • add WithBorderTitle option for rendering titles in box borders (da4c10b)
  • add WithBorderTitle option, drawBoxTitle helpers, GSX integration, tests (31ba6dc)

Bug Fixes

  • buffer: keep wide-char continuation cells out of Diff tail erase (7b77401)
  • buffer: keep wide-char continuation cells out of Diff tail erase (e5360fb), closes #79

0.15.1 (2026-06-05)

Bug Fixes

  • preserve EraseToEOL in inline renderer coordinate translation (5b79a4f)
  • preserve EraseToEOL in inline renderer coordinate translation (49e2fd0)

0.15.0 (2026-06-03)

Features

  • add alternate-scroll mode so the wheel scrolls without mouse capture (dda7860)
  • add Buffer.SetRuneLink to attach hyperlink targets (d7c415e)
  • add Hyperlinks capability, default on except TERM=dumb (b5633e1)
  • add Link field to Cell and include it in Equal/Diff (61003b5)
  • add Markdown component with block tree rendering (97dd1a4)
  • add markdown rendering support (rich text, OSC 8 links, parser, component, gsx) (f3cc139)
  • add MarkdownTheme and DefaultMarkdownTheme (1e46923)
  • add OSC 8 hyperlink escape sequences to escBuilder (0409c6f)
  • add pluggable CodeHighlighter with built-in palette (e1d7080)
  • add PostRenderHook and allow invisible virtual cursor (ac3e9f4)
  • add PostRenderHook and allow invisible virtual cursor (bdd0068)
  • add TextSpan rich-text type with accessors, clearing, and style helpers (161339b)
  • add wrapSpans for style-preserving word wrapping (dd29b78)
  • add zero-dependency markdown parser (internal/markdown) (b7b549f)
  • emit OSC 8 hyperlinks for linked cells in Flush (143c3b8)
  • emit OSC 8 hyperlinks in bufferRowToANSI (b7ef736)
  • extract getCoreType helper and refactor type checking functions (daa2699)
  • generalize regex patterns and fix whitespace in analyzer (7aae716)
  • highlight: add Bash lexer (de4382a)
  • highlight: add Go lexer (a906f6e)
  • highlight: add JS/TS lexer (5a92b50)
  • highlight: add JSON lexer with key/value distinction (5086351)
  • highlight: add tokenizer core with language dispatch and fallback (cfe2bc8)
  • markdown: highlight fenced code blocks via the theme highlighter (d173a0c)
  • markdown: render tables as a full grid (0ad97c8)
  • markdown: restyle headings/blockquotes, outline tables (44e9b60)
  • markdown: rule between every table row, blank line after headings (de8c1f0)
  • markdown: scrollable code blocks, heading spacing, h1/h2 italics (d50dfbb)
  • markdown: wire built-in highlighter into the default theme (c052b58)
  • measure rich text in IntrinsicSize and HeightForWidth (63ba8eb)
  • register <markdown> tag in analyzer and LSP schema (ba5d647)
  • render code fences, lists, blockquotes, tables; fix row layout (b58341c)
  • render rich text in the clipped/scroll render pass (c665816)
  • render rich text in the normal pass; fix wrapSpans word boundaries (2331b45)
  • thread TextSpan.Link through wrapping and rich-text rendering (d551098)
  • trim trailing whitespace so copied selections stay clean (d89ae47)
  • tuigen: generate tui.NewMarkdown for the <markdown> tag (651d8e0)

Bug Fixes

  • apply WithWrap(false) unconditionally (be350ba)
  • apply WithWrap(false) unconditionally, fix textarea.go cleanup (646a21f)
  • apply WithWrap(false) unconditionally, table-driven map format (2de5709)
  • drawSpanLines clips an over-wide line instead of dropping the rest (caeefee)
  • end a paragraph when a table starts on the next line (d1d652d)
  • gate OSC 8 hyperlinks off for dumb terminals and report them in String() (781e1cc)
  • highlight: do not color func receiver or anonymous func params as types (dbdeb45)
  • lineWithCursor checks hideVirtualCursor instead of magic cursorRune value (8801ced)
  • markdown: keep unmatched emphasis delimiters literal (248109d)
  • markdown: scroll extent, continuous links; responsive example (e182aeb)
  • markdown: stop a closing double-marker from italicizing a stray single marker (09272c0)
  • preserve consecutive spaces in textarea rendering (2ebaab6)
  • preserve consecutive spaces in wrapParagraph (80a9faf)
  • restore deleted tests, scope WithWrap to hideVirtualCursor, table-driven format (a910d60)
  • scope WithWrap to hideVirtualCursor, fix test guard (e1b8e38)
  • treat CR/VT/FF as word separators in wrapSpans (b229624)
  • update stale comments from cursorRune check to hideVirtualCursor (15ccbe2)
  • wrap blockquote and list content instead of clipping (fd9854c)

Performance Improvements

  • highlight: avoid per-identifier rune slice allocation (88ff313)

0.14.0 (2026-05-21)

Features

  • examples: add 23-event-dump diagnostic for verifying input handling (c9ecaf5)

Bug Fixes

  • refine example text (3826b5a)
  • test: append .exe to integration test binary path on Windows (0af9408)
  • windows: apply code review feedback on reader (2529945)
  • windows: decode console input records directly for keys, mouse, and resize (389d343)
  • windows: rewrite console reader for keys, mouse, and resize (da4f753)

0.13.1 (2026-04-24)

Bug Fixes

  • tuigen: access .Root when method templ root is a function-component call (976d3c1)
  • tuigen: access .Root when method templ root is a function-component call (7a61cda)
  • tuigen: only unwrap .Root for function-templ root calls (cb713b0)

0.13.0 (2026-04-18)

Features

  • add hideScrollbar option for scrollable containers (15a2ce7)

Bug Fixes

  • update image URLs in example docs (7dc88fd)

0.12.0 (2026-04-18)

Features

  • emit bindAppFields helper for method components (dcf2824)

Bug Fixes

  • drain mount cache and unbind outgoing root on root reset (a3665a9)
  • silent event delivery loss after root reset (378e107)
  • track outgoing root in a dedicated field for unbind (e28242b)
  • tuigen: decouple UnbindApp suppression from BindApp detection (4bdb40d)

0.11.0 (2026-04-03)

Features

  • add WithModalKeyMap and tie key blocking to trapFocus (#48) (2dcff81)

0.10.3 (2026-04-03)

Bug Fixes

  • modal catch-all key binding blocking input when trapFocus is false (30df011)
  • modal: gate catch-all key binding and focus save/restore on trapFocus (7dca970)

0.10.2 (2026-04-02)

Bug Fixes

  • layout: respect explicit WithHeight/WithWidth in IntrinsicSize and HeightForWidth (7f5f6d6)
  • layout: restrict IntrinsicSize and HeightForWidth overrides to fixed dimensions only (9327491)
  • remove ability to accidentally generate incorrect Watcher signature (d34e5b0)
  • silent interface failures and layout dimension bugs (8de39e7)
  • tuigen: adjust source map entries after splicing view reset lines (c3f2de7)
  • tuigen: collect all for-loop iteration component views for watcher/bind aggregation (9309940)
  • tuigen: collect all for-loop iteration component views for watcher/bind aggregation (2525476)
  • tuigen: document intentionally ignored inForLoop parameter (89d7f92)
  • tuigen: hoist block-scoped component vars to function scope (0949b63)
  • tuigen: hoist conditional and loop-scoped component vars to function scope (234748b), closes #42
  • tuigen: reset views slice in reactive closures to prevent unbounded growth (89749ce)
  • tuigen: skip hoisting for method templs with conditional component calls (b305684)

0.10.1 (2026-03-28)

Bug Fixes

  • formatter: run gofmt on Go code blocks in .gsx files (80dcff3)
  • kitty keyboard negotiation and gofmt for .gsx Go code (08a633f)
  • negotiate Kitty keyboard after entering alt screen (7746d43)

0.10.0 (2026-03-26)

Features

  • add KeyCtrlA-Z helpers, fix Ctrl+H parsing, add topic-based debug logging (b6eea3d)

Bug Fixes

  • address review feedback on debug logging (110ebed)
  • gate debug.Log on allTopics so DEBUG=keys doesn't enable untopiced logs (6ecdfe6)
  • report initLocked errors to stderr instead of silently dropping logs (e3f5383)

0.9.0 (2026-03-22)

Features

  • reject @if/@for/@else/@let with diagnostic errors, remove TokenAtLet and parseLet (0dae91b)
  • remove @-prefixed control flow from tree-sitter grammar (6bd0d78)
  • remove legacy @-prefixed control flow syntax (cd711cb)

Bug Fixes

  • panic on unreachable LetBinding variant, suppress duplicate error for @let (4dc7ad3)

0.8.0 (2026-03-18)

Features

  • add Events, DispatchEvents, Step methods for manual event loops (419fcd6)
  • add Open lifecycle method, make Close idempotent (1d2362a)
  • add UpdateEvent type for queued closures (3a85fce)
  • manual event loop API (Open/Events/Dispatch/Render/Close) (973bf89)
  • split event channels with input priority fan-in (60730a0)

Bug Fixes

  • address code review findings (142f8bb)
  • auto-scroll message feed to bottom (7495525)
  • eliminate TOCTOU race in Run/Open and normalize struct alignment (940ddd9)
  • stop background goroutines on NewApp error path (10d630d)
  • use proper sticky-scroll pattern for message feed (bf79eb7)

0.7.0 (2026-03-15)

Features

  • add ApplyDim and FillBlank methods to Buffer (04ad1ef)
  • add auto focus highlighting, Tab cycling, key suppression, and bottom-sheet modal example (30fa430)
  • add Modal component with Render, KeyListener, and MouseListener (6f414da)
  • add modal support (87d3d78)
  • add modal support to code generator (56a62fb)
  • add modal to analyzer known tags and attributes (c4b27eb)
  • add overlay flag to Element for modal support (14976ed)
  • add overlay registration system to App (5519970)
  • add overlay render pass and focus scoping for modal support (1fc431e)
  • add reset confirmation modal to color mixer example (aff5dc4)
  • lsp: add modal element definition to schema (4c626e4)

Bug Fixes

  • add Enter key handler to select focused modal button in color mixer (e0de594)
  • address review feedback for modal PR (10addd5)
  • ensure modal content children have opaque background by default (680c6af)
  • guard modals in inline mode, fix mouse coords, and resolve dispatch validation (e898946)
  • repair RenderFull overlay handling and modal inline mode key blocking (5917456)
  • resolve render consistency, focus lifecycle, and test robustness (e300abf)
  • suspend: prevent Kitty keyboard response from leaking as typed input after Ctrl+Z resume (2016f29)

0.6.1 (2026-03-15)

Bug Fixes

  • lsp: highlight Go keywords in expression attribute values (b147ae7)

0.6.0 (2026-03-15)

Features

  • add KeyMatcher interface with On/OnStop/OnFocused constructors (99c8002)
  • add Kitty keyboard negotiation to Terminal interface (044e266)
  • add Kitty keyboard protocol escape sequences (56e6938)
  • add Kitty keyboard protocol for Ctrl+H/I/M disambiguation (591fbde)
  • add KittyKeyboard capability and WithLegacyKeyboard option (19cb4fc)
  • implement Kitty keyboard protocol negotiation in ANSITerminal (cac462e)
  • include kitty-keyboard in capabilities string (4a55000)
  • parse Kitty keyboard protocol CSI u sequences (4f48121)
  • wire Kitty keyboard negotiation into app lifecycle (5d7aaaa)

Bug Fixes

  • add trailing newline to reader_types.go and document Rune(0) behavior (fb52f4e)
  • address code review findings for Kitty keyboard and terminal flush (cdddab8)
  • address code review findings for Kitty keyboard implementation (1f9def9)
  • handle Kitty keyboard on suspend/resume and clean up minor issues (6f54fa4)
  • make KeyCtrlH/I/M aliases for KeyBackspace/Tab/Enter (4decb9a)
  • remove flag-2+ dead code from kittySpecialKeys and harden Kitty negotiation (1dd9c19)
  • struct alignment via gofmt, smarter response terminator detection (40551c0)

0.5.0 (2026-03-14)

Features

  • drop @ prefix from control flow keywords (470db04)
  • extend LetBinding AST for component call and expression RHS (888a780)
  • formatter emits bare if/for/else and := instead of @-prefixed syntax (8aefebe)
  • generator handles component call and expression RHS in LetBinding (9d68ba0)
  • lexer and parser accept bare if/for/else, remove TokenAtIf/TokenAtFor/TokenAtElse (8560391)
  • LSP uses bare keyword syntax in completions, hover, and semantic tokens (5cfc3de)
  • parse bare if/for/else and := / var bindings with element/component RHS (55a8047)
  • support multi-line component call arguments (761cd7f)
  • TextMate grammar highlights bare if/for/else and := bindings (27d98e7)
  • tree-sitter grammar supports bare if/for/else and := bindings (80764b3)

Bug Fixes

  • analyzer handles component call and expression RHS in LetBinding (3d86741)
  • lsp: drop @ prefix from offset calculations in LSP providers (feecc14)
  • lsp: prevent findElseKeyword false-positive on else inside strings (394494e)
  • parseGoStatement stops at closing brace at depth 0 (e83980f)
  • parser: prevent speculative parsing from leaking errors and comments (62caa56)
  • parser: use rune-aware iteration for UTF-8 correctness (f542956)
  • replace HTML-style comments with Go-style comments in docs code blocks (1c287fe)

0.4.0 (2026-03-13)

Features

  • examples: add directory tree data model and flatten logic (02912e2)
  • examples: add directory tree example (186b2d0)
  • examples: add directory tree example skeleton (639da53)
  • examples: add directory tree keyboard navigation (1bdae4e)
  • examples: add directory tree render and complete example (480566e)
  • examples: add scrolling, overflow clipping, and ancestor path highlighting (ee46208)
  • examples: replace hardcoded tree with random generator (b5aaa4b)
  • examples: show selected node path at top of directory tree (4d7f0ee)

Bug Fixes

  • docs: move Google Fonts from CSS @import to HTML link tag (e0ee0d0)
  • docs: move playwright to devDependencies and fix tview widget count (269e858)
  • docs: remove unused useRef import (7847f15)
  • examples: remove overflow-hidden that bypassed scrollable rendering (39ea661)
  • examples: use state-driven scrollOffset for directory tree scrolling (a272a91)
  • lsp: use character offsets for semantic tokens (b7bcf07)
  • lsp: use character offsets instead of byte offsets for semantic tokens (1791cf6)

0.3.1 (2026-03-09)

Bug Fixes

  • move SIGWINCH handling from reader to App and default to blocking input (3b2879a)

0.3.0 (2026-03-09)

Features

  • add autoFocus attribute and make focusColor optional for Input and TextArea (184af94)
  • add borderGradient, focusGradient, and backspace scroll fix for Input and TextArea (d1437fd)
  • add FocusRequired flag to KeyPattern and focus-gated binding helpers (5d97ee1)
  • add IsFocused query method to focusManager (681ffb3)
  • add reactive value binding and focusColor for Input and TextArea (35d1679)
  • implement focus-gated dispatch in dispatch table (0ea047a)
  • separate tabStop from focusable to fix Tab navigation (4d6189d)
  • wire Input component into focus system with focus-gated key bindings (d2689fa)
  • wire TextArea component into focus system with focus-gated key bindings (af57b8f)

Bug Fixes

  • add Tab/Shift+Tab focus navigation to elements example (7f77e38)
  • exclude focus-gated entries from dispatch table conflict validation (1545aa6)
  • make ContainsPoint account for scroll offset in scrollable containers (23be70e)

0.2.0 (2026-03-07)

Features

  • add default Ctrl+Z suspend fallback in key dispatch (8f61d4e)
  • add FlexWrap and AlignContent types with public API and Tailwind classes (28eb41f)
  • add no-op suspend stubs for Windows (0484abf)
  • add OnChange watcher for reactive state effects (623b93f)
  • add OnKeyMod helper, fix flex-wrap align-content, update docs (dbcce85)
  • add onSuspend/onResume fields to App struct (f8be019)
  • add WithOnSuspend and WithOnResume app options (610b3ad)
  • implement suspend/resume terminal state management (699e343)
  • layout: implement flex-wrap line breaking, per-line layout, and auto cross-axis sizing (6932cd5)
  • register SIGTSTP signal handler in app event loop (8e7163e)

Bug Fixes

  • bake inline widget to scrollback before suspend (f076cb3)
  • clear widget area on inline suspend instead of baking duplicate (a1ee2c2)
  • handle inline mode suspend/resume without corrupting scrollback (03c1aae)
  • prevent stack overflow from circular state dependencies (f1c9ba5)
  • re-register SIGTSTP signal handler after resume (554fded)
  • replace sleep-based test sync with done channel, document FlexGrow heuristic (dcc95f0)
  • resolve three suspend/resume issues (7e5b061)

0.1.2 (2026-03-04)

Bug Fixes

  • use runtime/debug to report version from go install (bd586f8)

0.1.1 (2026-03-04)

Bug Fixes

  • update README badges, examples, and VS Code extension docs (8c9fdf4)

0.1.0 (2026-03-03)

Features

  • add 1-character minimum spacing between table columns (0036fc0)
  • add ANSI-aware byte scanner for styled streaming (37c51d3)
  • add App.StreamAbove() with PrintAbove coordination (09f6eac)
  • add bufferRowToANSI for rendering buffer rows to ANSI strings (a2c1db9)
  • add ClickBinding type for ref-based mouse handling (a18bf5b)
  • add Element.Component() public getter (2c489a5)
  • add ElementTag field for table layout dispatch (51daa21)
  • add generic NewChannelWatcher helper (52f3f86)
  • add HandleClicks helper for automatic ref hit testing (ba91e9d)
  • add HeightForWidth to Layoutable for text wrap height calculation (5edcd48)
  • add inlineStreamWriter and nopStreamWriter types (e180a59)
  • add MountPersistent to prevent component sweep when hidden (0b8ce63)
  • add nowrap and wrap tailwind classes (43e4b5a)
  • add partial line tracking and appendBytes to inlineSession (cb55fd3)
  • add Print, Sprint, and Fprint for single-frame rendering (c7b4660)
  • add Print, Sprint, and Fprint for single-frame rendering (6c580b5)
  • add PrintAboveElement and QueuePrintAboveElement for inline mode (60e23c5)
  • add renderElementToBuffer for standalone element rendering (2899fc6)
  • add single-frame print example (examples/19-print) (8dd1aef)
  • add StreamWriter.WriteElement for mid-stream element insertion (fc7e4ae)
  • add tree walk to collect watchers from WatcherProvider components (2abe659)
  • add WatcherProvider interface for component-level watchers (4ceac54)
  • add WithWrap option for text wrapping (default enabled) (8efdf97)
  • add word-wrap text function with mid-word fallback (2632126)
  • add Wrap() public getter to Element (448c1cd)
  • ai-chat: add ChatApp root component with streaming (ff392d4)
  • ai-chat: add fake provider for demo/testing (06c006c)
  • ai-chat: add Header component (038fad6)
  • ai-chat: add HelpOverlay component (8168250)
  • ai-chat: add Message component with copy/retry actions (4e95b3f)
  • ai-chat: add MessageList component with vim navigation (e7e7950)
  • ai-chat: add provider abstraction for OpenAI/Anthropic/Ollama (2e0cac0)
  • ai-chat: add Settings screen components (d27cf59)
  • ai-chat: add settings screen entry point (3e86430)
  • ai-chat: add state types and AppState (e87e9d3)
  • ai-chat: migrate textarea to GSX element with persistent mount (f83b016)
  • ai-chat: wire settings screen to main app (66fe6ad)
  • ai-chat: wire up ChatApp with provider detection (d587eb5)
  • analyzer: accept textarea as valid element tag (0fdb81a)
  • auto-scroll wrapped text with hidden scrollbar on overflow (b3fa83c)
  • compute table intrinsic size from column widths and row heights (b5b9634)
  • element: add integration tests and update dashboard example (326e7f9)
  • element: add onUpdate hook for pre-render callbacks (551fbd2)
  • element: implement Phase 1 - Layout interface and Element core (a3211f4)
  • examples: scaffold ai-chat example (c8912ef)
  • generate WithTag for table elements in codegen (a854717)
  • generator: emit app.Mount + NewTextArea for textarea elements (31c29d7)
  • generator: emit MountPersistent for component elements (2635176)
  • implement table layout algorithm with auto column sizing (5d1d76a)
  • integrate WatcherProvider watchers into app lifecycle (cbc588f)
  • register tr, td, th elements in schema and analyzer (20a41d9)
  • render th elements with bold text by default (c7a0849)
  • render wrapped text across multiple lines with per-line alignment (12df559)
  • restore EventInspector with event tracking in interactive example (ffc4774)
  • schema: add textarea element definition to LSP schema (d141b42)
  • tailwind: add validation, similarity matching, and class registry (Phase 2) (935db99)
  • tailwind: expand class mappings with percentages, individual sides, and flex utilities (Phase 1) (abe07ef)
  • tailwind: integrate class validation into analyzer and LSP diagnostics (Phase 3) (3e1ac96)
  • tuigen: add named element refs syntax (#Name) - Phase 1 (91af36a)
  • tuigen: add named element refs syntax (#Name) - Phase 1 (6e7e33a)
  • tuigen: add named element refs syntax (#Name) - Phase 1 (0e47fa4)
  • tuigen: add state detection to analyzer - Phase 3 (17fb834)
  • tui: implement App.Run(), SetRoot(), and element handlers - Phases 2 & 3 (ba97b9a)
  • tui: implement Batch() for coalescing state updates - Phase 2 (cee1b25)
  • tui: implement dirty tracking and watcher types - Phase 1 (162a1c0)
  • tui: implement State[T] reactive type with bindings - Phase 1 (99665a1)
  • two-pass layout for text wrapping height calculation (afb032f)

Bug Fixes

  • add explicit row height override for table tr elements (0f50303)
  • ai-chat: fix help text, temperature labels, and copy handler (3f10c71)
  • ai-chat: remove broken go:generate directive (7fa71b2)
  • ai-chat: use explicit style attrs for dynamic styling (52ce3e3)
  • align panel heights in interactive example (1953b39)
  • flaky tests, nil-ref panic, and fill test coverage gaps (9c3491c)
  • guard against nil ref in HandleClicks (2380913)
  • move textElementWithOptions/skipTextChildren to generator_element.go per spec (4f35a8f)
  • prevent header from shrinking with flexShrink={0} (ab13198)
  • recursive HeightForWidth for containers to propagate wrapped text height (28c3486)
  • replace time.Sleep with channel draining in watcher tests (994d0cb)
  • restore previous currentApp in Run() for nested apps (bf07b93)
  • settings screen as embedded component instead of separate app (123cf98)
  • use flexGrow for proper vertical distribution in interactive example (cc10eb1)