Skip to content

feat(diff): add follow-latest selection chip#1578

Open
justsomelegs wants to merge 4 commits intopingdotgg:mainfrom
justsomelegs:legs/lastest-turn
Open

feat(diff): add follow-latest selection chip#1578
justsomelegs wants to merge 4 commits intopingdotgg:mainfrom
justsomelegs:legs/lastest-turn

Conversation

@justsomelegs
Copy link
Copy Markdown

@justsomelegs justsomelegs commented Mar 30, 2026

What Changed

This PR adds a Latest selection to the diff panel that follows the current head checkpoint as new checkpoints arrive.

Changes in this PR:

  • add explicit diff route state for Latest selection
  • add a Latest chip to the diff panel that stays on the newest checkpoint
  • keep individual Turn N chips as pinned checkpoint selections
  • group Latest with the current head turn chip in the UI
  • preserve the timestamp on the grouped turn chip
  • add route parsing coverage
  • add browser coverage for selecting Latest and for following newly-arrived checkpoints

Why

The diff panel already lets you inspect specific checkpoint diffs by turn, but it did not have a way to stay on the newest checkpoint as the thread continued to update.

This adds a dedicated Latest mode with clear semantics:

  • Latest = follow the newest checkpoint
  • Turn N = pin a specific checkpoint diff

That makes it easier to monitor the current head diff without losing the ability to inspect a fixed turn.

UI Changes

This adds a grouped Latest and current-head turn control to the diff panel.

The grouped turn chip still shows the timestamp so it stays consistent with the rest of the turn strip.

image image

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • I included before/after screenshots for any UI changes
  • I included a video for animation/interaction changes

Note

Add follow-latest selection chip to the diff panel

  • Adds a diffSelection=latest URL parameter and a 'Latest' chip in DiffPanel.tsx that keeps the diff view tracking the most recent turn as new checkpoints arrive.
  • When follow-latest mode is active, diffTurnId and diffFilePath are ignored and the newest turn is always used; selecting a specific turn or 'All turns' exits this mode.
  • Extends diffRouteSearch.ts to parse and strip diffSelection, accepting only 'latest' as a valid value.
  • Adds browser tests covering chip selection behavior and URL state updates when new checkpoints are appended in follow-latest mode.

Macroscope summarized bf71000.

@github-actions github-actions bot added size:L 100-499 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list. labels Mar 30, 2026
@justsomelegs justsomelegs changed the title Add latest shortcut to diff panel feat(diff): add follow-latest selection chip Mar 30, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 30, 2026

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: d0f7547b-bfde-46d0-a476-4bb16b419d18

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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

Labels

size:L 100-499 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant