Skip to content

fix(ui): honor custom comment colors#558

Draft
arbiter-hd wants to merge 1 commit into
modem-dev:mainfrom
arbiter-hd:agent/fix-custom-comment-color
Draft

fix(ui): honor custom comment colors#558
arbiter-hd wants to merge 1 commit into
modem-dev:mainfrom
arbiter-hd:agent/fix-custom-comment-color

Conversation

@arbiter-hd

Copy link
Copy Markdown

Summary

  • Honor [custom_theme.syntax].comment for Pierre-highlighted diffs.
  • Cover TypeScript comments in both dark and light custom themes.
  • Add a patch Changeset for hunkdiff.

Root cause

Pierre emits TypeScript comments as #737373, but Hunk's reserved token-color map did not associate that color with the comment syntax role. The raw Pierre color therefore bypassed the configured custom comment color.

The renderer currently remaps by raw color, so other Pierre scopes that share #737373 will also inherit syntax.comment.

Fixes #557.

Validation

  • bun test src/ui/diff/pierre.test.ts (16 passed)
  • bun run typecheck
  • bun run lint
  • bun run format:check
  • bun run test:theme-contrast
  • bun run test:integration (55 passed)
  • bun run test:tty-smoke
  • Real PTY smoke from source with an actual TypeScript comment diff
  • bun run changeset:status -- --since=upstream/main

Full bun test: 1206 passed, 22 skipped, and one unrelated AppHost.watch.test.tsx failure that reproduces unchanged on upstream/main at 2458366.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Custom syntax.comment override is ignored in TypeScript diffs

2 participants