Skip to content

feat: replace JLine with TamboUI for dependency search TUI - #2465

Merged
maxandersen merged 4 commits into
jbangdev:mainfrom
maxandersen:aesh-tamboui
Jun 19, 2026
Merged

feat: replace JLine with TamboUI for dependency search TUI#2465
maxandersen merged 4 commits into
jbangdev:mainfrom
maxandersen:aesh-tamboui

Conversation

@maxandersen

@maxandersen maxandersen commented May 16, 2026

Copy link
Copy Markdown
Collaborator

Summary

Replace JLine with TamboUI 0.4.0 for the jbang deps search interactive TUI.

Changes

Dependencies

  • Remove jline-console-ui, jline-terminal-jni
  • Add tamboui-toolkit:0.4.0, tamboui-aesh-backend:0.4.0
  • Net jar size delta: ~+100KB (TamboUI includes unused widgets that offset the JLine removal)

TUI rewrite (ArtifactSearchWidget)

  • Layout: dock() with search input (top), scrollable results list (center), inline status bar (bottom)
  • Compact UI: removed the 5-line Details panel — //DEPS g:a:v preview shown inline at the right edge of the status bar. ~6 more rows for results.
  • Async Central search: runs on scheduler thread via runner.schedule(), results marshalled back with runOnRenderThread(), generation counter discards stale results
  • Match highlighting: all result rows show matched characters (green+bold) via SearchFuzzedResult.highlightTarget()
  • Version picker: side pane appears on Enter, Esc goes back
  • Deduplication: results grouped by groupId:artifactId, showing best-scored version
  • Offline support: respects existing --offline / -o flag via Util.isOffline()

Search intent classifier (SearchIntentClassifier)

Two intent types: CLASS (prefers Central) and KEYWORD (local-first).

Input Type Central Query
jackson databind KEYWORD jackson databind
ObjectMapper CLASS c:ObjectMapper
com.fasterxml.jackson.databind.ObjectMapper CLASS fc:com.fasterxml...
c:StatelessSession CLASS c:StatelessSession
import com.fasterxml...ObjectMapper; CLASS fc:com.fasterxml...
error: package org.jsoup does not exist CLASS org.jsoup
com.fasterxml:jackson-databind:2.20.0 KEYWORD pass-through
  • c:/fc: prefixes stripped from localQuery so fuzzy matching works against GAV strings
  • Auto-triggers Central search (400ms debounce) for CLASS intents

Key bindings

  • Tab/F5: search Central (semantic searchCentral action via event.matches())
  • Enter: select artifact → pick version → done
  • Esc: clear search (or quit if empty)
  • Ctrl+C: quit

Removed

  • ComboBox.java (JLine widget)
  • All JLine imports and dependencies

@coderabbitai

coderabbitai Bot commented May 16, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are limited based on label configuration.

🏷️ Required labels (at least one) (1)
  • ai-review

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: bdacd4f9-eb32-4519-8c56-a16d8eb96c93

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@quintesse

Copy link
Copy Markdown
Contributor

Why is this PR so big and has many changes that seem to have nothing to do with a change to Tamboui?

@maxandersen

Copy link
Copy Markdown
Collaborator Author

@quintesse its dependent on #2453 so it has all those changes too. so looks much bigger than it is.

More correct is just looking at e233cbd (this PR)

For now still just a draft - wanting to see if full build had any challenges.

- Replace JLine (jline-console-ui, jline-terminal-jni) with TamboUI
  (tamboui-toolkit, tamboui-aesh-backend) 0.4.0-SNAPSHOT
- Rewrite ArtifactSearchWidget using TamboUI toolkit DSL
  - dock() layout: search input (top), results (center), details+help (bottom)
  - Async Central search via runner.schedule() + runOnRenderThread()
  - Match highlighting on all result rows using SearchFuzzedResult
  - Version picker as side pane (Enter on artifact)
  - Deduplicate results by groupId:artifactId
- Add SearchIntentClassifier: detects GAV, class name, FQCN, Java import,
  compiler error, keyword — routes to appropriate Central query (c:/fc:/etc)
  - Auto-triggers Central search with 400ms debounce for class/import intents
- Support --offline flag (reuses existing BaseCommand.offline via Util)
- Remove JLine dependencies and ComboBox.java
- Custom key bindings: unbind Tab/focusNext so Tab triggers Central search,
  unbind q/Q from quit to allow typing in search
- Net jar size delta: +33KB
@maxandersen

Copy link
Copy Markdown
Collaborator Author

waiting on tamboui/tamboui#382 or similar to be merged as otherwise keybindings aren't consistent.

- Remove redundant Details panel (was 5 lines repeating the highlighted
  list row). That space now goes to more visible results.
- Merge //DEPS preview into the status bar as inline right-aligned text.
- Tighter key labels in help bar.
- Remove duplicate intent labels from search and results panel titles.
- Use semantic bindings: bind Tab and F5 to a 'searchCentral' action
  and match via event.matches() instead of raw KeyCode checks.
- Depends on tamboui/tamboui#383 for Builder.bindings() propagation fix.
- Update tambouiVersion from 0.4.0-SNAPSHOT to 0.4.0
- Remove mavenLocal() from repositories (no longer needed)
- tamboui#383 (bindings propagation fix) is included in 0.4.0
@maxandersen
maxandersen merged commit 0ee8701 into jbangdev:main Jun 19, 2026
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants