Repository navigation
Add a prototype implementation of the History panel - #4894
Conversation
There was a problem hiding this comment.
1 issue found across 25 files
Confidence score: 3/5
- In
document/format/src/persist.rs, head movement can change registry fields thatToucheddoes 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); |
There was a problem hiding this comment.
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>
| self.remote_changes.touched.extend(touched); | |
| self.remote_changes.touched.extend(touched); | |
| self.remote_changes.rebuilt = true; |
f80208a to
36d14f9
Compare
36d14f9 to
4a7121b
Compare
4a7121b to
f25fbba
Compare
f25fbba to
866e62c
Compare
866e62c to
b64bd98
Compare
b64bd98 to
23ec54e
Compare
23ec54e to
746caaa
Compare
746caaa to
366283d
Compare
366283d to
1d9938d
Compare
1d9938d to
76eef1d
Compare
065cdc1 to
0413401
Compare
9fab2d6 to
19c8374
Compare
19c8374 to
e6d26bd
Compare
e6d26bd to
c8c4be3
Compare
c8c4be3 to
45820eb
Compare
45820eb to
db74d32
Compare
There was a problem hiding this comment.
1 issue found across 25 files
Confidence score: 3/5
- In
editor/src/messages/portfolio/document/document_history.rs, clearing the legacy redo stack makes BringBack and Redo silently do nothing for an undone step after a History panel change, until the next edit. Keep the legacy redo stack available until storage redo has consumed it.
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="editor/src/messages/portfolio/document/document_history.rs">
<violation number="1" location="editor/src/messages/portfolio/document/document_history.rs:253">
P2: `clear_legacy` empties the legacy redo stack, which `redo_in_storage` requires to be non-empty. After a History panel change, BringBack and Redo of an undone step silently do nothing until the next edit. Keep the legacy stacks the storage path gates on, or gate on the storage redo stack instead.</violation>
</file>
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
| } | ||
|
|
||
| /// Forgets the legacy snapshots once the head has moved off their line. | ||
| pub fn clear_legacy(&mut self) { |
There was a problem hiding this comment.
P2: clear_legacy empties the legacy redo stack, which redo_in_storage requires to be non-empty. After a History panel change, BringBack and Redo of an undone step silently do nothing until the next edit. Keep the legacy stacks the storage path gates on, or gate on the storage redo stack instead.
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 editor/src/messages/portfolio/document/document_history.rs, line 253:
<comment>`clear_legacy` empties the legacy redo stack, which `redo_in_storage` requires to be non-empty. After a History panel change, BringBack and Redo of an undone step silently do nothing until the next edit. Keep the legacy stacks the storage path gates on, or gate on the storage redo stack instead.</comment>
<file context>
@@ -235,6 +236,26 @@ impl DocumentHistory {
+ }
+
+ /// Forgets the legacy snapshots once the head has moved off their line.
+ pub fn clear_legacy(&mut self) {
+ self.legacy_undo_stack.clear();
+ self.legacy_redo_stack.clear();
</file context>
…istory line and fold its line changes into one message
…name and tag inputs and close them when focus leaves
…'s actions while it has focus
aae83e9 to
2b93219
Compare
No description provided.