Skip to content

refactor(workspace): hand the snapshot's index to the command - #100

Merged
PiquelChips merged 1 commit into
feat/retentionfrom
feat/workspaces-index
Nov 23, 2026
Merged

PiquelChips merged 1 commit into
feat/retentionfrom
feat/workspaces-index

Conversation

@PiquelChips

Copy link
Copy Markdown
Member

Every command that reads the working copy opened the record index again after its snapshot, and saving a revision opened it once more, through the annotations, to check whether the change diverged.

The snapshot now reads the index once and hands it to the command in WorkingCopy. Saving adds the records it just wrote with Index::add, so the index knows the new revision as one read afterwards would, without reading it again. Divergence is checked against that index, and the annotations are only opened when the change did diverge.

This is groundwork for workspaces: later in the stack, the snapshot also uses this index to tell whether the working copy's change moved on without it.

Note

Written by Claude Opus 5.5 in Claude Code (via T3 Code)

@coderabbitai

coderabbitai Bot commented Nov 22, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 59 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 3aa87b73-b987-4609-9eed-d869f622a320
Commits

Reviewing files that changed from the base of the PR and between 4592382 and 56ee96c.

Files selected for processing: 4

  • apps/origin-src/src/index.rs
  • apps/origin-src/src/workspace/annotate.rs
  • apps/origin-src/src/workspace/land.rs
  • apps/origin-src/src/workspace/mod.rs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@PiquelChips
PiquelChips added this pull request to stack #165 November 22, 2026 14:59
@PiquelChips
PiquelChips force-pushed the feat/workspaces-index branch 3 times, most recently from c1c3e53 to 6076ac7 Compare November 23, 2026 12:30
@PiquelChips
PiquelChips force-pushed the feat/workspaces-index branch from 6076ac7 to 98c29a9 Compare November 23, 2026 12:58
Every command that reads the working copy opened the record index again
after its snapshot, and saving a revision opened it once more, through
the annotations, to check whether the change diverged.

The snapshot now reads the index once and hands it to the command, in
`WorkingCopy`. Saving adds the records it wrote with `Index::add`, so the
index knows the new revision as one read afterwards would, without
reading it again. Divergence is checked against that index, and the
annotations are only opened when the change did diverge.
@PiquelChips
PiquelChips force-pushed the feat/workspaces-index branch from 98c29a9 to 56ee96c Compare November 23, 2026 18:03
@PiquelChips
PiquelChips merged commit 10d5bcb into main Nov 23, 2026
6 checks passed
@PiquelChips
PiquelChips deleted the feat/workspaces-index branch November 23, 2026 21:38
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