Skip to content

fix: add missing .borders(Borders.ALL) to restore TUI pane borders#24280

Draft
gnodet wants to merge 3 commits into
mainfrom
fix-tui-missing-pane-borders
Draft

fix: add missing .borders(Borders.ALL) to restore TUI pane borders#24280
gnodet wants to merge 3 commits into
mainfrom
fix-tui-missing-pane-borders

Conversation

@gnodet

@gnodet gnodet commented Jun 28, 2026

Copy link
Copy Markdown
Contributor

Summary

Claude Code on behalf of forgebot

Fixes missing pane borders in the TUI dashboard. TamboUI's Block widget requires both .borderType() and .borders(Borders.ALL) to render border characters. All 131 Block.builder() calls across the TUI module were missing .borders(Borders.ALL), causing no rounded border box-drawing characters (╭╮╰╯│─) to render around any pane.

Before (no borders):

 Routes sort:name
   ROUTE   FROM      STATUS   AGE   TOTAL  FAIL
   route1  timer://  Started  10s       0     0

 Processors [route1]
   TYPE    PROCESSOR   TOTAL  FAIL
   log     log1           50     0

After (borders restored):

╭ Routes sort:name ────────────────────────────────────╮
│  ROUTE   FROM      STATUS   AGE   TOTAL  FAIL       │
│  route1  timer://  Started  10s       0     0        │
╰──────────────────────────────────────────────────────╯
╭ Processors [route1] ────────────────────────────────╮
│  TYPE    PROCESSOR   TOTAL  FAIL                     │
│  log     log1           50     0                     │
╰──────────────────────────────────────────────────────╯

Changes

  • 36 source files: Added .borders(Borders.ALL) after every .borderType(BorderType.ROUNDED) call and added import dev.tamboui.widgets.block.Borders
  • 1 new test file (BorderRenderTest.java): 17 rendering tests that render tabs into a virtual terminal buffer via Frame.forTesting(Buffer) and verify border characters appear at the correct positions

Test Coverage (BorderRenderTest — 17 tests)

  • HealthTab: top/bottom corners, vertical/horizontal borders, complete box formation, left/right border alignment
  • RoutesTab: full border box, dual pane borders (routes + processors), separate borders for each pane, non-overlapping borders
  • ErrorsTab: border box with data, border box in empty state
  • No-selection: border in unselected state
  • ShellPanel: border rendering when panel is open
  • Border type validation: BorderType.ROUNDED characters match expected Unicode codepoints
  • Corner alignment: / on same row, / on same row

Test plan

  • All 248 tests pass locally (231 existing + 17 new border tests)
  • Rendering tests validate actual border characters (╭╮╰╯│─) in the virtual terminal buffer
  • Code formatted with mvn formatter:format impsort:sort
  • CI build passes

🤖 Generated with Claude Code

gnodet and others added 3 commits June 28, 2026 06:37
Add 8 new test files with 161 test methods covering the TUI module's
core utilities and parsers: ShellPanel (convertRow, encodeKeyEvent,
convertAttrToStyle), FuzzyFilter, StatusParser, TuiHelper, LoadAvg,
MonitorContext, SearchHighlighter, and CamelMonitor parseKey.

Widen three methods in ShellPanel from private to package-private
(convertRow, encodeKeyEvent, convertAttrToStyle) to enable direct
unit testing.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add 4 new test files with 59 test methods that render tab widgets
into a virtual terminal buffer using TamboUI's Frame.forTesting(Buffer)
and inspect the rendered cell content, styles, and colors.

- HealthTabRenderTest (13 tests): health check table rendering, UP/DOWN
  status colors, filter toggle, header columns, footer hints
- RoutesTabRenderTest (17 tests): route table rendering, Started/Stopped
  colors, failed count highlighting, top mode toggle, processors section
- ErrorsTabRenderTest (15 tests): error table rendering, handled/unhandled
  colors, exchange ID display, exception name shortening, filter toggle
- MonitorContextRenderTest (14 tests): renderNoSelection prompt, hint
  system, rightCell/centerCell alignment, sort label/style indicators

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
TamboUI's Block widget requires both .borderType() and .borders(Borders.ALL)
to render border characters. All 131 Block.builder() calls in the TUI module
were missing .borders(Borders.ALL), causing no rounded border box-drawing
characters (╭╮╰╯│─) to render around any pane.

The fix adds .borders(Borders.ALL) to every Block.builder().borderType()
call across 36 source files, and includes 17 new rendering tests
(BorderRenderTest) that validate border characters appear correctly
in the virtual terminal buffer.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@gnodet gnodet requested review from davsclaus June 28, 2026 07:50
@github-actions

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 added the dsl label Jun 28, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🧪 CI tested the following changed modules:

  • dsl/camel-jbang/camel-jbang-plugin-tui
All tested modules (2 modules)
  • Camel :: JBang :: Plugin :: TUI
  • Camel :: Launcher :: Container

⚙️ View full build and test results

@davsclaus davsclaus left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Clean mechanical fix — all 130 .borderType(BorderType.ROUNDED) call sites now consistently include .borders(Borders.ALL), and the 17 new BorderRenderTest tests verify border characters render correctly in the virtual terminal buffer.

Note: this PR stacks on #24279 (first 2 commits are shared). Merging #24279 first will reduce this PR's diff to just the borders fix.

CI is green, no issues found.

This review was generated by an AI agent and may contain inaccuracies. Please verify all suggestions before applying.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants