Skip to content

chore: use non-blinking software block cursor in TUI#24449

Merged
davsclaus merged 1 commit into
apache:mainfrom
gnodet:tui-software-block-cursor
Jul 8, 2026
Merged

chore: use non-blinking software block cursor in TUI#24449
davsclaus merged 1 commit into
apache:mainfrom
gnodet:tui-software-block-cursor

Conversation

@gnodet

@gnodet gnodet commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Replace the hardware terminal cursor in ShellPanel with a software-rendered reversed-video cursor that does not blink. The hardware cursor's blink timer resets on every TamboUI frame redraw, causing it to appear half-shown on each keypress.
  • Replace the blinking half-block () cursor in CaptionOverlay with a non-blinking full-block () character.
  • The software cursor renders the character at the cursor position with reversed style, matching the approach already used by AiPanel and similar to how Claude Code renders its cursor.

Changes

  • ShellPanel: Add convertRow(buffer, offset, width, cursorCol) overload that emits the cursor column as a single reversed-video span. Pass cursor coordinates from renderLiveView instead of using frame.setCursorPosition(). Remove lastCursorX/lastCursorY tracking fields.
  • CaptionOverlay: Replace /space blink toggle with static .
  • ShellPanelTest: Add 6 tests for cursor rendering (middle, start, end, null codepoint, no cursor, bold run split).

Test plan

  • All 525 TUI module tests pass
  • New cursor rendering tests cover edge cases (cursor at start/middle/end, null cell, bold text, no-cursor sentinel)
  • Manual: open camel monitor TUI, open shell panel (F6), verify cursor is a solid non-blinking reversed block
  • Manual: verify cursor moves correctly with arrow keys, Home/End
  • Manual: test CaptionOverlay inline input shows non-blinking block cursor

Claude Code on behalf of Guillaume Nodet

Replace the hardware terminal cursor in ShellPanel with a software-rendered
reversed-video cursor that does not blink. The hardware cursor's blink timer
resets on every TamboUI frame redraw, causing it to appear half-shown on each
keypress. The software cursor renders the character at the cursor position with
reversed style, matching the approach already used by AiPanel.

Also replace the blinking half-block (▌) cursor in CaptionOverlay with a
non-blinking full-block (█) character.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@gnodet gnodet requested review from davsclaus July 6, 2026 08:27
@github-actions github-actions Bot added the dsl label Jul 6, 2026
@github-actions

github-actions Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

🌟 Thank you for your contribution to the Apache Camel project! 🌟
🤖 CI automation will test this PR automatically.

🐫 Apache Camel Committers, please review the following items:

  • First-time contributors require MANUAL approval for the GitHub Actions to run
  • You can use the command /component-test (camel-)component-name1 (camel-)component-name2.. to request a test from the test bot although they are normally detected and executed by CI.
  • You can label PRs using skip-tests and test-dependents to fine-tune the checks executed by this PR.
  • Build and test logs are available in the summary page. Only Apache Camel committers have access to the summary.

⚠️ Be careful when sharing logs. Review their contents before sharing them publicly.

@github-actions

github-actions Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

🧪 CI tested the following changed modules:

  • dsl/camel-jbang/camel-jbang-plugin-tui

🔬 Scalpel shadow comparison — Scalpel: 2 tested, 1 compile-only — current: 2 all tested

Maveniverse Scalpel detected 3 affected modules (current approach: 2).

⚠️ Modules only in Scalpel (1)
  • camel-launcher

Skip-tests mode would test 2 modules (1 direct + 1 downstream), skip tests for 1 (generated code, meta-modules)

Modules Scalpel would test (2)
  • camel-jbang-plugin-tui
  • camel-launcher-container
Modules with tests skipped (1)
  • camel-launcher

ℹ️ Shadow mode — Scalpel observes but does not affect test execution. Learn more

All tested modules (3 modules)
  • Camel :: JBang :: Plugin :: TUI
  • Camel :: Launcher
  • Camel :: Launcher :: Container

⚙️ View full build and test results

@davsclaus

Copy link
Copy Markdown
Contributor

LGTM

@davsclaus davsclaus marked this pull request as ready for review July 8, 2026 05:10
@davsclaus davsclaus added this to the 4.22.0 milestone Jul 8, 2026
@davsclaus davsclaus added the enhancement New feature or request label Jul 8, 2026
@davsclaus davsclaus merged commit 55aafdf into apache:main Jul 8, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dsl enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants