xonecas.io
70160
Ce

cel-tui / files

cel-tui / TODO.md

5.3 KB
1# cel-tui — TODO
2
3There are currently no known open items. The mini-coder integration findings
4and former future enhancements were completed in the 2026-07-09 quality pass.
5Add newly reproduced issues or measured opportunities here rather than relying
6on undocumented workarounds.
7
8## Completed quality pass
9
10### Core runtime and interaction
11
12- ✅ **Runtime theme replacement and explicit full redraw** — `cel.setTheme()`
13  replaces the palette and schedules a full frame; `cel.redraw()` repairs
14  terminal resume/external corruption without private buffer access. Full
15  redraws also restore the SGR baseline and native cursor state.
16- ✅ **Stable identity for stateful nodes** — viewport-global `stateKey`
17  identities retain TextInput cursor/scroll, uncontrolled container scroll,
18  and per-layer focus through callback recreation, insertion, and reordering.
19  Duplicate keys fail deterministically, node-kind changes remount, and absence
20  for one successful frame releases keyed state. Legacy callback/path/index
21  fallbacks remain available.
22- ✅ **Layer-aware initial focus** — `autoFocus` seeds the active topmost layer
23  once per mounted identity with reason `"auto"`, does not reclaim after
24  Escape, and allows underlying focus to resume after a modal disappears.
25- ✅ **Observable and controllable TextInput cursor** — `cursor` and
26  `onCursorChange` expose controlled UTF-16 offsets, clamp backward to grapheme
27  boundaries, preserve batched editing, and honor programmatic value/cursor
28  updates together on the next render.
29- ✅ **True no-op terminal output** — identical buffers and cursor state emit
30  no bytes, while cursor-only changes still emit. `cel.setTitle()` suppresses
31  duplicate sanitized titles and resets its cache across runtime lifecycles.
32
33### Long-lived and streaming views
34
35- ✅ **Variable-height VirtualList** — the callable keyed component measures
36  visible variable-height rows, uses prefix sums/binary search and bounded
37  overscan, supports controlled or internal scrolling, sticky bottom,
38  first-visible anchor compensation, width/version invalidation, imperative
39  navigation, and eager bounded-cache release. A 5,000-row same-process
40  regression measured 134.39 ms unvirtualized versus 2.170 ms virtualized
41  (98.4% reduction, 61.9× speedup), with the returned row tree hard-bounded.
42- ✅ **SyntaxHighlight identity and cache scaling** —
43  `createSyntaxHighlight()` owns one isolated append stream and exposes
44  `.dispose()`. Direct calls use a bounded exact-render LRU with no content-
45  prefix identity guessing; custom theme/color caches are bounded. Crossing
46  the former four-entry cliff at five snippets improved from 1.7105 ms to
47  0.0082 ms per frame (99.5%).
48
49### Components
50
51- ✅ **Markdown heading inline styling** — `#`, `##`, and `###` headings retain
52  their heading style while composing bold, italic, inline-code, and link
53  spans in wrapping rows; plain headings retain the compact Text path.
54- ✅ **Native palette-slot syntax themes** — compatible TextMate registrations
55  remain supported, while native `baseStyle` / `scopeStyles` preserve
56  `color00`–`color15` references and explicit false style values. Runtime
57  palette replacement changes emitted RGB without re-highlighting.
58- ✅ **TextInput-backed Select / Combobox** — Select now uses exact TextInput
59  text and cursor behavior (case, spaces, grapheme deletion, readline editing,
60  batched input, bracketed paste), plus initial/controlled query, cursor, and
61  highlight state, updateable items, cancel handling, custom filtering/rows,
62  and the compatible callable static-list API.
63- ✅ **Spinner and managed animation** — configurable `Spinner()` instances and
64  `createTicker()` provide explicit maximum cadence, drift-safe skipped frames,
65  start/stop/reset/dispose lifecycles, stable frame width, and no permanent
66  framework FPS loop. The hello/chat examples no longer duplicate spinner
67  arrays, intervals, render calls, or cleanup.
68
69### Former future enhancements
70
71- ✅ **Cursor shape customization** — TextInput `cursorStyle` supports
72  `"block"`, `"bar"`, and `"underline"` in both the painted fallback and
73  native DECSCUSR cursor; shape-only diffs and terminal cleanup are covered.
74- ✅ **Scrollbar styling** — `scrollbarStyle` customizes single-cell thumb and
75  track characters plus normal terminal style props, with width validation.
76- ✅ **Explicit hidden overflow** — `overflow: "hidden"` is specified as the
77  default clipping mode and has a deterministic explicit-prop regression test.
78- ✅ **Advanced Kitty keyboard reporting** — the API uses Kitty's actual
79  independent progressive-enhancement flags (not fictional numbered levels)
80  for event phases, alternate/layout keys, all-key reporting, and associated
81  text. `onKeyPress(key, event)` exposes typed metadata; release events never
82  edit, activate, traverse, or blur; mixed tmux/legacy streams remain accepted.
83
84## Verification snapshot
85
86- `bun test`: 720 tests, 16,441 assertions
87- `bun run typecheck`
88- `bun run check`
89- `bun run format`
90- `bun run prepublish-check`
91- `bun run docs`: clean HTML and Markdown generation, no warnings
92- `bun run bench:regression`: all fixed-work cases complete with raw JSON
93- `examples/hello.ts`: visually smoke-tested in an 80×24 tmux pane
94
95Detailed benchmark methodology and snapshots live in `benchmarks/RESULTS.md`.