Commit Graph

10 Commits

Author SHA1 Message Date
dailz
c6e83cb8c2 feat(tui): add AppMode, level_cache and config integration
Add AppMode enum (Normal/Settings), level_cache field populated in recompute_wrap_cache via detect_level(), color_config loaded from TOML in main.rs. Refactor handle_key for mode dispatch with S key to enter settings.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-12 10:52:03 +08:00
dailz
ef4c2e7383 feat(tui): add color mapping module
Add color.rs with parse_color (string to ratatui::Color), level_fg (LogLevel to color via ColorConfig), and AVAILABLE_COLORS constant for the settings panel.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-12 10:51:26 +08:00
dailz
1c9367f1f9 feat(tui): update status bar with Tab format hint
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-11 11:38:42 +08:00
dailz
280c3f5014 feat(tui): add Tab key to toggle JSON pretty-print
Press Tab to switch JSON log lines between raw single-line and indented
multi-line format (2-space indent, like jq output). Only JSON Object lines
are affected; plain text lines stay unchanged.

- Add json_format bool field to App, toggled by Tab
- Add format_json_line() standalone function with serde_json::to_string_pretty
- Integrate into recompute_wrap_cache with \n-split sub-line wrapping
- Center viewport on cursor after cache rebuild to prevent jump on toggle
- Add 12 unit tests covering format, toggle, and edge cases

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-11 11:38:30 +08:00
dailz
8a664c02c8 fix(tui): use char-level wrapping instead of word-level for log lines 2026-04-11 09:02:01 +08:00
dailz
3c042e20a1 fix(tui): show [0/0] instead of [1/0] for empty files 2026-04-11 08:52:22 +08:00
dailz
6820246997 feat(tui): rewrite UI with line numbers, soft wrap, and scrolling 2026-04-10 23:38:06 +08:00
dailz
555ffc0836 feat(tui): expand App state with file loading and scroll 2026-04-10 23:28:23 +08:00
dailz
73322138c1 feat(tui): ratatui skeleton with layout
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-10 21:20:14 +08:00
dailz
0ee82cbccd feat(init): scaffold cargo workspace and CI
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-10 21:17:22 +08:00