davsclaus opened a new pull request, #27197:
URL: https://github.com/apache/camel/pull/27197
_Claude Code on behalf of davsclaus_
Four source editor bugs found while recording the screenshots for #27196.
Stacked on #27187, because fix 4 extends its `QuickFixes`.
1. **Ctrl+G (Go to Node) listed only YAML routes.** In a Java file it showed
the nodes of the project's YAML route, not the Java route in the file. A new
`ModelRouteNodeScanner` reads Java and XML files into the Camel model with
`RouteModel` (as the route checks do; Java without compiling). It gives the
same entries as the YAML scanner. `when` and `otherwise` are nodes of their
own, as in the diagram.
2. **The viewer kept showing the old content after an AI write.** When an AI
edit was applied (camel_write_file / camel_edit_file), the file changed on disk
but the viewer showed the old text until the file was opened again. `McpFacade`
now tells the bridge which file it wrote, and the Source tab reloads it on the
UI thread at the same line. It does so only when the viewer shows that file and
it is not being edited, so an edit in progress is never replaced.
3. **The edit title disappeared when the file had errors.** A TamboUI
`Block` has a single top title, so adding `errors: N` replaced `Edit [file *]`
and the YAML path. The count now goes on the same title line.
4. **No quick fix for `Unknown function: bdy (did you mean ${body}?)`.** The
Simple error names the right function, so this is now a quick fix (`${bdy} →
${body}`). The case-sensitive and the parentheses hints work the same way. A
hint without a suggestion gives no fix.
Tested live in the TUI on a project with a Java and a YAML route:
- Ctrl+G lists the Java route, and choosing `throwException` jumps to its
line.
- An approved AI edit shows in the viewer at once.
- The title reads `Edit [OrderRoute.java *] errors: 1`.
- Shift+F9 fixes `${bdy}`.
New tests:
- `ModelRouteNodeScannerTest` (Java, XML, not a route);
- `SourceViewerReloadTest` (reloads, leaves an edit alone, ignores another
file);
- 2 cases in `QuickFixesTest`.
camel-jbang-core (185 related tests) and camel-jbang-plugin-tui (1464) pass.
F1 help and the doc page list the new quick fix.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
--
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]