CtrlK
BlogDocsLog inGet started
Tessl Logo

jbaruch/tamboui

Teaches coding agents how to build TUIs with TamboUI correctly: API-level selection, render-thread discipline, display-width safety, CSS-aware element authoring, and JFR conventions.

76

Quality

95%

Does it follow best practices?

Run evals on this skill

Adds up to 20 points to the overall score

View guide

SecuritybySnyk

Passed

No findings from the security scan

Overview
Quality
Evals
Security
Files

enable-mouse-capture-when-scrollable.mdrules/

alwaysApply:
Yes

Enable Mouse Capture When Using Scrollable Widgets

TuiConfig.mouseCapture defaults to false, which means mouse-wheel and click events never reach the runner — and therefore never reach ListElement.handleMouseEvent, RichTextAreaElement.handleMouseEvent, or any other element that already has correct mouse handling. Why: without explicit opt-in, "scroll doesn't work" looks like a TamboUI bug when it is actually a missing one-line config override.

When You Must Override configure()

  • Any ToolkitApp that uses a scrollable widget (list, table, tree, richTextArea, scrollable paragraph) must override configure() and enable mouse capture
  • This applies even when keyboard scrolling already works — wheel scroll is the user expectation for log/chat panes, and silent failure here is a livestream-support issue

The Required Snippet

override fun configure(): TuiConfig =
    TuiConfig.builder().mouseCapture(true).build()

(Java equivalent: return TuiConfig.builder().mouseCapture(true).build();)

What You Get For Free

  • ListElement, RichTextAreaElement, and other built-ins already route SCROLL_UP / SCROLL_DOWN to their internal scroll state — you do not need to wire mouse handlers manually
  • Click-to-focus on focusable elements also depends on mouse capture being on — without it, only Tab cycling reaches non-default-focused panes

When You Can Leave It Off

  • Single-pane, single-screen apps with no scroll, no list, no multi-pane focus (e.g., a static status display) — mouse capture is purely overhead there
  • The default is false deliberately so dashboards that only print text do not eat the terminal's native text selection

rules

char-width-for-display.md

css-element-style-resolution.md

enable-mouse-capture-when-scrollable.md

exception-hierarchy.md

focusable-needs-id.md

java-8-source-compat.md

jfr-event-conventions.md

persistent-stateful-elements.md

pick-the-api-level.md

pick-the-text-element.md

projector-safe-colors.md

render-thread-discipline.md

resource-lifecycle.md

text-input-submit-pattern.md

CHANGELOG.md

README.md

tile.json