davsclaus opened a new pull request, #27398: URL: https://github.com/apache/camel/pull/27398
https://issues.apache.org/jira/browse/CAMEL-25358 — follow-up to #27386 (merged). Replaces #27387, which closed when its stacked base branch was deleted on merge. ## Why Looking at the log and seeing an ERROR is the most natural moment to ask for help. #27386 brought *Shift+F8* (fix with AI) to failing lines in the Source editor and to the Errors tab; this does the same for the Log tab. ## What - **Shift+F8 in the Log tab** asks about the ERROR on the screen, including one whose stack trace is on the screen but whose first line is not. - **Failed exchange:** Camel's ERROR has a Message History whose last row is the step that failed (`orders.camel.yaml:34 billing/throwException2`), so the AI is asked to fix that line of the route, with the same question as #27386. - **`log` EIP with `loggingLevel: ERROR`:** in dev mode the logger is named after the source location, so it maps to that line too. - **Any other ERROR:** the AI is asked to explain it (ERROR line, exception, up to three `Caused by:`) and fix it when the cause is in the project (`AiFixPrompt.ofLogError`, `AskAi.explainLogError`). - **Several different ERRORs on the screen:** a pick list comes up, newest first. The same error repeated (ids and numbers masked) is listed once with its count. With none on screen, a hint says to scroll to one, or use F8. - **Fix: follow mode with word wrap.** The view took the last N entries by count, so wrapped lines (the Message History table) pushed the newest entries below the screen and the log looked frozen. It now shows the entries that fit when wrapped, newest last, and *Shift+F8* sees exactly the entries on the screen. - **Docs:** the observe page and the F1 help of the Log and Errors tabs, with a screenshot.  - **Footer:** the Log tab puts the *Shift+F8* hint with the F-keys too (hidden while a pick list is open). On the long Log footer, F2/F10 make room for it (see the footer change in #27386). ## Tests - New `LogErrorsTest` (6 tests), built from the log lines Camel writes for a failed exchange: source line and exception, the same error counted once with different ones newest first, a stack trace belonging to the ERROR above the screen, a log EIP error mapped through its logger, no ERROR on screen, and the question. - `LogTabRenderTest`: wrapped-row counting, the newest line visible when following with word wrap (fails without the fix), and the pick list rendering. - Whole `camel-jbang-plugin-tui` module: 1741 tests pass. - Checked in the running TUI against an app with a `throwException` route, a `direct:` endpoint no route consumes, and a `log` at ERROR level; the screenshot is from that run. _Claude Code on behalf of davsclaus_ 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01DDRLJAyf8cDXSg8iX785My -- 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]
