4 Commits

Author SHA1 Message Date
roboomp 4bcb9b5fe9 style: bun run fix 2026-06-24 13:44:47 +00:00
roboomp de87923add fix(tui): theme-aware welcome tip line for light-theme legibility
The welcome 'Tip:' line hardcoded #b48cff (label) and #9ccfff (body)
with an additional \x1b[2m dim on the body, ignoring the active theme.
On any light theme this dropped the body to ~1.5:1 contrast on a white
background (WCAG AA needs >=4.5:1), making the line effectively
invisible. Switching between light variants did not help because the
colors were not theme-derived.

renderWelcomeTip in packages/coding-agent/src/modes/components/welcome.ts
now paints the label through theme.fg('customMessageLabel', ...) and the
body through theme.fg('muted', ...), drops the manual dim, and wraps the
whole line with theme.italic(...). Both tokens are tuned per theme, so
the line stays vivid on dark backgrounds and readable on light ones
(e.g. light theme's customMessageLabel #7e57c2 = 5.21:1 on white).

A regression test pins the contract: dark/light themes must produce
different bytes for the same tip, and no manual \x1b[2m may remain.

Fixes #3337
2026-06-24 13:44:21 +00:00
can1357 a98230addc chore: update changelog & tests 2026-06-19 16:06:18 +02:00
can1357 a48e16037b refactor(welcome): extracted tip rendering with word-wrap support
- Extracted `renderWelcomeTip` as a standalone exported function.
- Replaced truncation with `wrapTextWithAnsi` so long tips wrap under the label.
- Added test asserting multi-line output stays within box width without ellipsis.
2026-05-30 17:01:40 +02:00