Thanks to visit codestin.com
Credit goes to github.com

Skip to content

TamboUI TUI, module extraction, and shell improvements#83

Merged
jbachorik merged 25 commits intomainfrom
jb/tamboui
Feb 23, 2026
Merged

TamboUI TUI, module extraction, and shell improvements#83
jbachorik merged 25 commits intomainfrom
jb/tamboui

Conversation

@jbachorik
Copy link
Collaborator

@jbachorik jbachorik commented Feb 22, 2026

Summary

Add full-screen TamboUI-based TUI mode with tabbed interface, completion popup, history search, cell picker, event browser, and constant pool browser.

This is a working prototype. Things mostly work, but more effort is anticipated.

Screenshot 2026-02-22 at 19 56 22

Test plan

  • Full ./gradlew build passes (all 64 tasks)
  • Verify TUI mode launches correctly with --tui flag
  • Verify jfr-mcp shadow JAR does not contain TamboUI classes

🤖 Generated with Claude Code

jbachorik and others added 24 commits February 22, 2026 19:12
- View-specific search: results and detail filters are independent
- Ctrl+L in search mode applies filter to both views
- Ctrl+F / Ctrl+/ / slash all enter search mode
- Ctrl+R triggers history search from any focus
- Shift+Up/Down navigates command history from any focus
- Ctrl+Up/Down for fast page scroll in results and detail
- Alt/Opt+R reverses sort in results (was plain R)
- Enter in results switches to detail pane
- Printable chars in detail redirect to command input
- Auto-focus results after command execution
- Fix detail pane scroll using wrong height
- Fix filtered results rendering and row navigation
- Drill-down clears both filters
- Add S-Tab and S-arrow hints to all focus modes

Co-Authored-By: Claude Opus 4.6 <[email protected]>
Co-Authored-By: Claude Opus 4.6 <[email protected]>
isCpSummaryCommand() only matched bare 'cp' as parts[0], but the
actual command dispatched in TUI is 'show cp'. Accept both forms.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
- Remove separate renderCpBrowser() path; render CP types
  sidebar inside renderResults() for a single layout pipeline
- Show tab bar when any tab is pinned for immediate feedback
- Add 📌 prefix for pinned tabs, reset name to "jfr>" on unpin
- Add {/} keybinding for result tab switching

Co-Authored-By: Claude Opus 4.6 <[email protected]>
…ixes

- show events: dual-pane browser (left: event types, right: entries)
- Debounced sidebar navigation (~100ms) for smooth scrolling
- Alt+s / Opt+s session picker popup
- Status bar: replace line info with session switch hint
- Ctrl+R: skip duplicates, wrap around, show failing state

Co-Authored-By: Claude Opus 4.6 <[email protected]>
…filter

- Row position indicator in results/browser titles
- Esc clears active filter before switching focus
- Search match highlighting (yellow/black)
- Detail pane horizontal scrolling (arrow keys)
- Ctrl+E export to CSV with editable path popup
- Browser-mode filtering targets focused pane
- Live/sticky filter shown in pane titles

Co-Authored-By: Claude Opus 4.6 <[email protected]>
Separate query engine, backend SPI, plugin framework, and session
management into jfr-shell-core so that jfr-mcp and backend plugins
no longer pull in TamboUI/CLI transitive dependencies.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
@jbachorik jbachorik added the AI AI-generated code or contributions label Feb 22, 2026
@github-actions
Copy link

github-actions bot commented Feb 22, 2026

Combined JUnit Test Report

  • Total: 1194
  • Passed: 1190
  • Failures: 0
  • Errors: 0
  • Skipped: 4

HTML Test Reports

Run artifacts: https://github.com/btraceio/jafar/actions/runs/22298218616

@jbachorik jbachorik marked this pull request as ready for review February 22, 2026 19:30
@jbachorik jbachorik requested a review from Copilot February 22, 2026 19:30
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces a new full-screen TamboUI-based TUI mode for jfr-shell, while extracting the core query engine / backend SPI / plugin framework into a new jfr-shell-core module to enable reuse (e.g., by jfr-mcp) and to keep UI dependencies out of the core.

Changes:

  • Add --tui fullscreen mode (TamboUI) with new table/tree renderers and TUI-specific completion/file completion behavior.
  • Extract core functionality into jfr-shell-core and update dependent modules (jfr-shell-*, jfr-mcp, workflows) to depend on it.
  • CLI/JfrPath UX updates: introduce constants as the primary constant-pool root/command (alias cp), add events shorthand/alias behavior, and extend output format completion to include tui.

Reviewed changes

Copilot reviewed 54 out of 93 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
settings.gradle Adds :jfr-shell-core module include.
jfr-shell/src/test/java/io/jafar/shell/cli/completion/property/validators/CompletionContextValidator.java Updates completion parsing to recognize constants root.
jfr-shell/src/test/java/io/jafar/shell/cli/completion/property/validators/CandidateValidator.java Updates allowed roots/types validation for constants and cp.
jfr-shell/src/test/java/io/jafar/shell/cli/completion/property/generators/JfrPathComponentGenerators.java Updates property generators to include constants.
jfr-shell/src/test/java/io/jafar/shell/cli/completion/property/PropertyBasedCompletionTests.java Adjusts root completion expectation to constants.
jfr-shell/src/test/java/io/jafar/shell/cli/TamboUIApiTest.java Adds TamboUI smoke tests rendering to a buffer.
jfr-shell/src/test/java/io/jafar/shell/cli/ShellCompleterSelectRootsTest.java Updates select completion roots to constants/.
jfr-shell/src/test/java/io/jafar/shell/NonInteractiveModeTest.java Updates constant pool command tests to invoke constants.
jfr-shell/src/test/java/io/jafar/shell/JsonOutputFormatTest.java Updates JSON output tests to use constants.
jfr-shell/src/main/resources/tips.txt Adds TUI tips/help content.
jfr-shell/src/main/resources/examples/thread-profiling.jfrs Updates examples to use events/... shorthand (no show).
jfr-shell/src/main/resources/examples/request-tracing.md Updates examples to use events/... shorthand.
jfr-shell/src/main/resources/examples/monitor-contention.md Updates examples to use events/... shorthand.
jfr-shell/src/main/resources/examples/gc-impact.md Updates examples to use events/... shorthand.
jfr-shell/src/main/resources/examples/gc-analysis.jfrs Updates examples to use events/... shorthand.
jfr-shell/src/main/resources/examples/basic-analysis.jfrs Updates examples to use events/... shorthand.
jfr-shell/src/main/java/io/jafar/shell/cli/completion/completers/RootCompleter.java Switches suggested CP root from cp/ to constants/.
jfr-shell/src/main/java/io/jafar/shell/cli/completion/completers/OptionCompleter.java Adds constants options and tui output format completion.
jfr-shell/src/main/java/io/jafar/shell/cli/completion/completers/EventTypeCompleter.java Maps constants/cp to constant pool type completion.
jfr-shell/src/main/java/io/jafar/shell/cli/completion/completers/CommandCompleter.java Adds session, events, constants commands/aliases to completion.
jfr-shell/src/main/java/io/jafar/shell/cli/completion/CompletionContextAnalyzer.java Recognizes constants as a root and constants command in completion analyzer.
jfr-shell/src/main/java/io/jafar/shell/cli/TuiTreeRenderer.java Adds TamboUI-based tree renderer for metadata trees.
jfr-shell/src/main/java/io/jafar/shell/cli/TuiTableRenderer.java Adds TamboUI-based table renderer + structured data capture for TUI detail panes.
jfr-shell/src/main/java/io/jafar/shell/cli/TableRenderer.java Improves cell formatting for maps/arrays/collections (more compact summaries).
jfr-shell/src/main/java/io/jafar/shell/cli/ShellCompleter.java Adds alias completion routing for events/... and constants/... + TUI file completion fallback.
jfr-shell/src/main/java/io/jafar/shell/Main.java Adds --tui mode and renames cp command to constants with alias cp.
jfr-shell/src/main/java/io/jafar/shell/JLineShellBackend.java Introduces a minimal TamboUI backend backed by JLine Terminal.
jfr-shell/build.gradle Makes jfr-shell depend on jfr-shell-core, adds TamboUI deps, relocates dev.tamboui in shadowJar.
jfr-shell/README.md Updates docs/examples for events/... shorthand and constants naming.
jfr-shell-tck/build.gradle Switches TCK dependency from jfr-shell to jfr-shell-core.
jfr-shell-jdk/build.gradle Switches plugin SPI compileOnly dependency to jfr-shell-core.
jfr-shell-jafar/build.gradle Switches plugin SPI compileOnly dependency to jfr-shell-core.
jfr-shell-core/build.gradle Adds new core module build, deps, and japicmp configuration.
jfr-shell-core/src/main/java/io/jafar/shell/providers/MetadataProvider.java Adds backend-based metadata provider abstraction.
jfr-shell-core/src/main/java/io/jafar/shell/providers/ConstantPoolProvider.java Adds backend-based constant pool provider abstraction.
jfr-shell-core/src/main/java/io/jafar/shell/providers/ChunkProvider.java Adds backend-based chunk provider abstraction.
jfr-shell-core/src/main/java/io/jafar/shell/plugin/UpdateChecker.java Adds plugin update detection + update policy logic.
jfr-shell-core/src/main/java/io/jafar/shell/plugin/PluginStorageManager.java Adds on-disk plugin storage and installed/registry caching.
jfr-shell-core/src/main/java/io/jafar/shell/plugin/PluginMetadata.java Adds plugin metadata model.
jfr-shell-core/src/main/java/io/jafar/shell/plugin/PluginManager.java Adds plugin manager (install/update/classloader).
jfr-shell-core/src/main/java/io/jafar/shell/plugin/PluginInstaller.java Adds plugin install + checksum verification + rollback.
jfr-shell-core/src/main/java/io/jafar/shell/plugin/PluginInstallException.java Adds plugin install exception type.
jfr-shell-core/src/main/java/io/jafar/shell/plugin/PluginClassLoader.java Adds URLClassLoader wrapper for plugin jars.
jfr-shell-core/src/main/java/io/jafar/shell/plugin/MavenResolver.java Adds Maven Resolver wrapper for plugin artifact resolution.
jfr-shell-core/src/main/java/io/jafar/shell/jfrpath/JfrPathParser.java Treats constants (and cp) as constant-pool root.
jfr-shell-core/src/main/java/io/jafar/shell/jfrpath/JfrPathEvaluator.java Renames CP root enum usage to CONSTANTS.
jfr-shell-core/src/main/java/io/jafar/shell/jfrpath/JfrPath.java Renames root enum from CP to CONSTANTS.
jfr-shell-core/src/main/java/io/jafar/shell/backend/* Introduces backend SPI (JfrBackend), capabilities, sources, and registry.
jfr-shell-core/src/main/java/io/jafar/shell/TypeDiscovery.java Moves/introduces type discovery utilities into core.
jfr-shell-core/src/test/java/io/jafar/shell/plugin/UpdateCheckerTest.java Adds unit tests for update classification behavior.
jfr-shell-core/src/test/java/io/jafar/shell/plugin/MavenResolverTest.java Adds tests for local Maven repo resolution behavior.
jfr-shell-core/src/test/java/io/jafar/shell/jfrpath/* Adds evaluator/parser tests (time range, multi-event, projection, etc.).
jfr-shell-core/src/test/java/io/jafar/shell/backend/BackendRegistryTest.java Adds tests for backend discovery/rediscovery behavior.
jfr-mcp/src/main/java/io/jafar/mcp/JafarMcpServer.java Updates help text from cp to constants.
jfr-mcp/build.gradle Switches dependency from :jfr-shell to :jfr-shell-core.
doc/parser/MapVariables.md Updates examples to use events/... shorthand.
doc/mcp/Tutorial.md Updates docs root name from cp to constants.
doc/jbang/JFRShellUsage.md Updates docs root name from cp to constants.
doc/cli/Usage.md Updates docs for constants, events/... shorthand, and session alias.
doc/cli/Scripting.md Updates script examples to use events/... shorthand.
doc/cli/ScriptExecution.md Updates examples to use events/... shorthand.
doc/cli/JFRPath.md Updates grammar/docs from cp to constants (+ notes about aliases).
doc/cli/CommandRecording.md Updates examples to use events/... shorthand.
doc/cli/Architecture.md Updates architecture docs to reflect jfr-shell-core split and constants root.
README.md Updates examples to use events/... shorthand.
AGENTS.md Documents the jfr-shell-core vs jfr-shell split.
.github/workflows/release.yml Publishes jfr-shell-core in release workflow.
.github/workflows/pr-tests.yml Moves japicmp CI step to jfr-shell-core.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@jbachorik jbachorik merged commit 4b15c20 into main Feb 23, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AI AI-generated code or contributions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants