feat: phase 12 — InputWidget, HistoryStore, readline-like input + ses…#11
Merged
feat: phase 12 — InputWidget, HistoryStore, readline-like input + ses…#11
Conversation
…sion history Adds full readline-like command input and persistent session history to the TUI, completing the Phase 12 M4 milestone deliverables. New modules: - `logicshell-tui/src/input.rs` — InputWidget: cursor tracking, insert/delete, Home/End, Ctrl-A/E/K (kill-to-end), render_with_cursor() - `logicshell-tui/src/history.rs` — HistoryStore: VecDeque ring-buffer (1 000- entry cap), Up/Down navigation, consecutive-duplicate dedup, XDG persistence App wiring (app.rs): - Replaced `input: String` with `input_widget: InputWidget` + `history: HistoryStore` - Added key handlers: Left/Right, Home/End, Delete, Ctrl-A/E/K, Up/Down arrows - Enter pushes to history, saves to disk, resets navigation - `App::with_history()` constructor for test injection Other changes: - ui.rs: prompt uses `input_widget.render_with_cursor()`, phase banner → 12 - phase11_integration.rs: updated to use `input_widget` API - phase12_integration.rs: 53 new integration tests - examples/phase12.rs: runnable interactive demo Coverage: 94.26% (821/871 lines). 173 new tests, all CI checks pass. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…sion history
Adds full readline-like command input and persistent session history to the TUI, completing the Phase 12 M4 milestone deliverables.
New modules:
logicshell-tui/src/input.rs— InputWidget: cursor tracking, insert/delete, Home/End, Ctrl-A/E/K (kill-to-end), render_with_cursor()logicshell-tui/src/history.rs— HistoryStore: VecDeque ring-buffer (1 000- entry cap), Up/Down navigation, consecutive-duplicate dedup, XDG persistenceApp wiring (app.rs):
input: Stringwithinput_widget: InputWidget+history: HistoryStoreApp::with_history()constructor for test injectionOther changes:
input_widget.render_with_cursor(), phase banner → 12input_widgetAPICoverage: 94.26% (821/871 lines). 173 new tests, all CI checks pass.