Commit Graph

3 Commits

Author SHA1 Message Date
JiXieShi 7b6f4f03ab fix: simplify forward form to 2 fields, fix centering
- Revert fillScreen to Left/Top (normal terminal behavior)
- Simplify startForwardForm to 2 fields: Type (Tab cycle) + Address
- Remove splitAddr/netSplit helpers
- Add huh form library dependency for future use

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-24 02:23:48 +08:00
JiXieShi 939c3d5a29 fix: center main view content using terminal size
Change fillScreen from lipgloss.Left to lipgloss.Center for horizontal
positioning so content is centered based on actual terminal dimensions.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-24 02:15:02 +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