davsclaus opened a new pull request, #26612:
URL: https://github.com/apache/camel/pull/26612

   Follow-up to #26482, which bumped TamboUI to 0.5.0. This removes the local 
workarounds that release makes redundant and fixes the one place where the 
`--web` frontend still disagreed with TamboUI on character widths.
   
   JIRA: https://issues.apache.org/jira/browse/CAMEL-24759
   
   ## Workarounds dropped (commit 1)
   
   - **Recording wrapper** — `TuiBackendHelper.applyRecording` wrapped the 
explicit JLine backend in `RecordingBackend` itself, because `TuiRunner` only 
did that for backends it created. Since tamboui/tamboui#418 `TuiRunner.create` 
wraps explicit backends too (idempotently), so the helper and its 
`dev.tamboui.internal.record` imports are gone. `TuiBackendHelperRecordingTest` 
now goes through `createTuiRunner` and asserts on `runner.backend()`, so it 
still catches `--record` silently doing nothing.
   - **Throughput chart y-axis** — the chart divided the `rate * 100` history 
by `THROUGHPUT_SCALE` before rendering so the integer axis would not show `700` 
for 7 msg/s, which also flattened every sub-1 msg/s rate to an empty bar. It 
now keeps the scaled data and uses `DualSparkline.yAxisFormatter` 
(tamboui/tamboui#396) with the same `formatThroughput` the title uses. The 
payload-size chart gets a 4-character byte formatter (`1.5K`, `12K`, `1.2M`) 
instead of the default `999+` cap.
   
   ## Web terminal VS16 widths (commit 2)
   
   TamboUI 0.5.0 measures a text-default glyph + VS16 as 2 columns 
(tamboui/tamboui#388), but the xterm.js Unicode 11 addon vendored for `--web` 
treats U+FE0F as zero-width, so `⌨️`/`⏺️`/`🗑️` took one column in the browser 
and misaligned everything after them. The addon is swapped for 
`@xterm/addon-unicode-graphemes` 0.4.0 (the stable release paired with xterm.js 
5.5), which promotes base + VS16 to a 2-column cell.
   
   A script driving both width tables over every string in `TuiIcons` confirms 
all 95 agree between xterm.js-graphemes and `CharWidth.of`; the Unicode 11 
addon disagreed on every VS16 sequence. That makes the CAMEL-23818 icon swap 
reversible: keystrokes get `⌨️` back (no longer sharing `🔤` with Rename), tape 
recording gets `⏺️`/`⏹️`, delete gets `🗑️`. The "no VS16" test rule is replaced 
by one requiring those icons to carry VS16 and measure two columns.
   
   Verified live in Chrome against `camel tui --web`: the Screen submenu aligns 
and moving the selection over the VS16 rows leaves no stray characters (the 
original CAMEL-23818 symptom).
   
   Note: xterm.js still labels the graphemes addon "experimental"; it has been 
the recommended path for VS16/grapheme handling since 5.4 and the width check 
covers everything the TUI renders.
   
   ## Testing
   
   `camel-jbang-plugin-tui`: 1380 tests, 0 failures. New `FlowHelperTest`; 
`TuiIconsTest`/`TabRegistryTest` updated.
   
   ---
   _Claude Code on behalf of davsclaus_
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to