Commit Graph

4 Commits

Author SHA1 Message Date
JiXieShi e9a58dc363 fix: insert CSI u handler into model.go + add tui tests
The previous commit defined parseCSIuBytes but failed to insert the
handler into Update(). Now properly inserted before the textinput
fallback. Add 10 test cases for parseCSIuBytes covering ctrl+alt+f/c/
m/p/h, ctrl+shift+c, alt+c, and invalid sequences.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-24 03:30:43 +08:00
JiXieShi 4112e3fb03 fix: log path format, panel hotkey passthrough, TUI hint styling
- Fix log path default: $s→%s, show available fmt fields in prompt
- Panel handlers default return false (allows Ctrl+Alt+M/F/P/H to
  switch panels without closing current one)
- TUI bottom hints: replace Faint with Bold + brighter colors
  (suggest=cyan, status=bright white, hotkeys=bright gray)

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-24 02:58:41 +08:00
JiXieShi a4996ba3e7 feat: multi-field forward form with Tab cycling
Replace single-line prompt with form-based forward input:
- Separate Type/Host/Port fields
- Tab/Shift+Tab cycles focus, Tab on Type field cycles mode values
- Address auto-split into host+port for edit
- COM port excludes port field
- Form render with focused field indicator

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-24 02:13:18 +08:00
JiXieShi d8fc9d7374 refactor: split termapp into proper internal packages
Replace monolithic internal/termapp with proper separation:
- internal/app: App struct, lifecycle, output loops
- internal/command: CommandHost interface, Dispatcher, handlers
- internal/tui: Model, hotkeys, panels, render (with panelError + border fixes)
- internal/console: RunConsole, escape parsing, entry point logic
- cmd/serialterminal: thin main() calling console.Run()

Eliminate global vars (cfg, sess, out) via dependency injection.
Break App->CommandDispatcher cycle via CommandHost interface.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-23 22:46:02 +08:00