davsclaus opened a new pull request, #28459:
URL: https://github.com/apache/camel/pull/28459

   Three rough spots found while giving a tour of the TUI in the browser 
(`camel tui --web`).
   
   **`--web` without a terminal**
   `camel tui --web` started from a script, a CI job or a background shell 
failed with "camel tui requires an interactive terminal". Each browser session 
already runs a TUI of its own (`TuiWebServer.runSession`), so the started 
process does not need one. Without an interactive terminal it now serves 
browsers only: it prints `Camel TUI in the browser at http://127.0.0.1:8090/ 
(Ctrl+C to stop)` and runs until Ctrl+C. `--mcp` drives the screen of the 
terminal, so it is refused in this mode with a usage error. With a terminal, 
nothing changes.
   
   **`--defaults`**
   Starts the TUI as a new user sees it: the saved `camel.tui.*` settings are 
not read, and what is changed lasts for the session only, so the user's own 
settings are left alone. Useful for demos and to rule out a setting. All 
settings go through `TuiUserConfig`, which keeps them in memory instead; it 
holds for the whole JVM, so the browser sessions of `--web` follow it too. Not 
called `--reset`, which would sound like it deletes the saved settings.
   
   **Utility routes shown out of the box**
   The architecture and the topology hid the utility routes until `u`, with 
nothing on screen saying routes were left out: a new project with AI groups 
could show a single box. They are now shown out of the box; `u` hides them.
   
   **Go to node footer**
   While the go to node popup (`g`) is open, the footer listed the diagram's 
keys (`c source`, `+/- zoom`...), which do not apply as what is typed goes into 
the popup. It now shows `type filter · Enter go to · Esc back`.
   
   Other:
   - `camel tui` (`TuiCommand`) forwards `--defaults` and skips its own 
terminal check for `--web`.
   - The `--theme`/`--panel-theme` checks move from `CamelMonitor` to 
`MonitorStartup`, to keep `CamelMonitor` under its `SourceSizeTest` cap 
(lowered to 2756).
   - Docs: options table, Web Browser Access, Settings, the Utility group in 
the diagram page, the Diagram help page; generated command docs and metadata.
   
   Tested:
   - `mvn test` of the module: 2276 tests pass (new `MonitorStartupTest`, 
`--defaults` in `TuiUserConfigTest`, the popup footer in 
`DiagramTabRenderTest`, the new default in `ArchitectureViewTest`).
   - Live: `camel tui --web --defaults < /dev/null` from a background shell 
serves the browser; the TUI comes up in the default theme with the mini panels 
on (my saved theme and panels-off were not read, and `~/.camel-cli.properties` 
was unchanged afterwards); the topology shows all routes with `u utility ●`; 
the go to popup footer shows its keys; SIGINT stops the server and frees the 
port.
   
   Relates to #28458 (clickable `+/-`, `f/F`, `Space` hints), which touches 
different code.
   
   _Claude Code on behalf of davsclaus_
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   
   https://claude.ai/code/session_012nJsFsjqqFiwroeHRWaKbS


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to