tui: extract pub ColorMode/TokenStyles/tokens_for for testable colour tokens #80

Merged
sirius merged 3 commits from wt/t_49b7c2b1 into main 2026-09-15 21:51:16 +00:00

2026-09-15

Merge branch 'main' into wt/t_49b7c2b1
Some checks failed
ci / sdk (pull_request) Successful in 1m8s
android-ci / android (pull_request) Has been cancelled
ci / test (pull_request) Successful in 4m3s
2026-09-15 21:50:53 +00:00
agent
tui: fix clippy unnecessary_unwrap in NO_COLOR cleanup
All checks were successful
ci / test (pull_request) Successful in 3m58s
ci / sdk (pull_request) Successful in 56s
android-ci / android (pull_request) Successful in 8m16s
The alert_line_prefixes_when_no_color test stashed the prior NO_COLOR
value and restored it with is_none() + unwrap() — a clippy lint failure
under -D warnings. Replace with a match that takes ownership.

No behavior change; the restored env var is identical.

Co-authored-by: openhands <[email protected]>
2026-09-15 17:34:59 -04:00
agent
tui: extract pub ColorMode/TokenStyles/tokens_for for testable colour tokens
Some checks failed
ci / test (pull_request) Failing after 4m22s
ci / sdk (pull_request) Successful in 1m16s
android-ci / android (pull_request) Successful in 8m16s
Make ColorMode a pub enum with pub color_mode() fn, add TokenStyles
struct and tokens_for(mode) as the single source of truth for the
style_* helpers. Tests assert RGB/None/Ansi16 fg/bg/modifier resolution
without depending on process environment.
2026-09-15 17:29:26 -04:00