Skip to content

Add the History panel - #4894

Open
TrueDoctor wants to merge 1 commit into
graph-storage-23-live-clifrom
graph-storage-24-history-panel
Open

TrueDoctor wants to merge 1 commit into
graph-storage-23-live-clifrom
graph-storage-24-history-panel

Conversation

@TrueDoctor

Copy link
Copy Markdown
Member

No description provided.

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 issue found across 25 files

Confidence score: 3/5

  • In document/format/src/persist.rs, head movement can change registry fields that Touched does not track, leaving the History panel’s storage cursor inconsistent. Mark this change as requiring a full rebuild.
Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="document/format/src/persist.rs">

<violation number="1" location="document/format/src/persist.rs:461">
P2: This records only the touched entities, but head movement can change registry fields that `Touched` does not track. Mark the change as requiring a full rebuild, otherwise the History panel can move the storage cursor while the editor still displays the old state.</violation>
</file>

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

pub fn move_head(&mut self, rev: Rev) -> Result<(), Error> {
if self.retires_locally() {
let (moved, touched) = self.session.move_head_to(rev)?;
self.remote_changes.touched.extend(touched);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: This records only the touched entities, but head movement can change registry fields that Touched does not track. Mark the change as requiring a full rebuild, otherwise the History panel can move the storage cursor while the editor still displays the old state.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At document/format/src/persist.rs, line 461:

<comment>This records only the touched entities, but head movement can change registry fields that `Touched` does not track. Mark the change as requiring a full rebuild, otherwise the History panel can move the storage cursor while the editor still displays the old state.</comment>

<file context>
@@ -452,6 +452,24 @@ impl<L: Layout> Gdd<L> {
+	pub fn move_head(&mut self, rev: Rev) -> Result<(), Error> {
+		if self.retires_locally() {
+			let (moved, touched) = self.session.move_head_to(rev)?;
+			self.remote_changes.touched.extend(touched);
+			self.persist_registry_snapshot()?;
+			self.persist_session_state()?;
</file context>
Suggested change
self.remote_changes.touched.extend(touched);
self.remote_changes.touched.extend(touched);
self.remote_changes.rebuilt = true;

Comment thread frontend/src/stores/history.ts Resolved

This branch was successfully deployed

1 active (outdated) deployment
graphite-dev (Preview) — 23ec54ec Deployed Nov 1, 2026 by github-actions[bot]
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