Skip to content

feat(renderutil): color move_update tokens as underlined updates - #244

Merged
HarshK97 merged 1 commit into
mainfrom
feat/move-update
Oct 10, 2026
Merged

HarshK97 merged 1 commit into
mainfrom
feat/move-update

Conversation

@HarshK97

Copy link
Copy Markdown
Owner

Problem

  1. When a token gets edited inside a moved block, it was taking the move slot's color (teal or mauve) with an underline. In terminal side-by-side view, the token just blended right into the surrounding move block, so you'd easily miss the actual edit unless you stared right at it.
  2. We had two action kinds (ActionMoveUpdate and ActionMoveUpdate1) purely to track the two move slot colors. Now that all inner edits use update amber anyway, keeping two kinds made appendTransition treat them as different styles, spitting out unnecessary ANSI resets between adjacent spans.

What Changed

  • Render ActionMoveUpdate in bold underlined amber (Bold + Underline + UpdateFg). Edits inside moves now pop out as actual updates while the underline shows they moved.
  • Dropped ActionMoveUpdate1 from internal/color/color.go and simplified MoveActionKindForSlot so all updates return ActionMoveUpdate.
  • Switched TestSlicer_MoveUpdate_Styling to a table-driven test covering both move slots and dropped the redundant inline comments.

Tokens modified inside moved blocks previously rendered in their slot
move color (teal or mauve). They now render in bold underlined amber so
edits stand out immediately while keeping their moved context visible.

Since both move slots share the same style now, ActionMoveUpdate1 is no
longer needed and has been removed.

- renderutil: render ActionMoveUpdate using Bold+Underline+UpdateFg
- color: drop ActionMoveUpdate1 and map all slot updates to ActionMoveUpdate
- tests: add table-driven coverage for move_update rendering across slots
@HarshK97
HarshK97 merged commit a8256ff into main Oct 10, 2026
17 checks passed
@HarshK97
HarshK97 deleted the feat/move-update branch October 10, 2026 06:32
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.

1 participant