atiaomar1978-hub commented on PR #25408:
URL: https://github.com/apache/camel/pull/25408#issuecomment-5224312766
## Bugbot review
Reviewed `feature/CAMEL-24372-tui-yaml-editor` vs `main`.
### Scope
YAML/plain-text edit mode enhancements for `SourceViewer` in
`camel-jbang-plugin-tui`: undo/redo, block ops, word navigation, smart Home,
find-in-edit.
### Verified (looks good)
- **`YamlBlockEditor`**: sibling block detection for `- ` list items;
duplicate/delete/move/comment logic is coherent; non-YAML files fall back to
single-line blocks.
- **`SourceEditHistory`**: seed + beforeChange + undo/redo stack; depth
capped at 100.
- **`SourceEditorNavigation`**: word boundaries treat `_`, `-`, `.` as word
chars; `:` splits component names (`timer:tick`).
- **Tests**: Good unit coverage (`YamlBlockEditorTest`,
`SourceEditHistoryTest`, `SourceEditorNavigationTest`) plus integration tests
in `SourceViewerEditorOpsTest`.
### Issues found & fixed in branch
| Severity | Issue | Status |
|----------|-------|--------|
| **Blocker** | Alt+↑/↓, Ctrl+←/→, Ctrl+Backspace/Delete used
`isUp()`/`isLeft()`/`isDelete*()` with modifiers — tamboui only matches
unmodified keys on those helpers | **Fixed** — uses `isKey(KeyCode.*) &&
hasAlt/hasCtrl` |
| **Major** | Find-in-edit did not jump to nearest match on confirm |
**Fixed** — `jumpToNearestMatch(editState.cursorRow())` |
| **Major** | Find prev used `isChar('n') && hasShift()` instead of
`isChar('N')` | **Fixed** — aligned with view mode |
| **Major** | Esc in edit mode did not clear active find term | **Fixed** —
`search.handleEscape()` before discard |
| **Major** | Paste while find input open went into edit buffer | **Fixed**
— routes to `search.handlePaste` |
| **Major** | `moveBlockUp` cursor landed on wrong line after swap |
**Fixed** — cursor at `previous.startRow()` |
### Remaining suggestions (non-blocking)
1. **Find typing conflict**: Plain `n` navigates find when a term is active
(same as view mode) — may surprise users typing in buffer.
2. **Find highlighting**: `renderEditMode` does not apply
`SearchHighlighter.applyHighlights` in the TextArea widget (footer status only).
3. **Undo granularity**: Per-keystroke snapshots; 100-depth limit may be
shallow for large paste ops.
4. **Blank lines in blocks**: `findBlockEnd` extends through blank lines
between siblings — may pull extra lines on duplicate/delete.
**Bugbot verdict:** No blockers remaining. Approve with minor follow-ups.
_AI-generated Bugbot review on behalf of atiaomar1978-hub._
--
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]