Repository navigation
Accept tracked changes; list a whole project's tracked changes - #14
Merged
Merged
Conversation
…ckedChanges in MCP The suggestion guard refused any edit touching a pending tracked change, including the signed-in user's own, so follow-up edits inside one's own unaccepted suggestions were impossible. Now only other authors' changes are protected: the user id comes from the project page's ol-user_id and changes with that user_id pass. Verified live that a tracked insert inside one's own tracked insertion extends it and a tracked delete shrinks it. Unknown user id or authorless changes stay protected. The MCP write tools take overwriteTrackedChanges, described as only for when the user explicitly said to override a co-author's suggestion.
acceptTrackedChanges(path, ids) calls Overleaf's POST /project/:id/doc/:docId/changes/accept (verified live: text and version unchanged, ranges drop the changes, accept-changes is broadcast). Ids are checked against fresh ranges; if any is not pending, nothing is accepted. Exposed as MCP overleaf_accept_tracked_changes (destructive, only for changes the user said to accept) and CLI accept (ids, --all, --before). listTrackedChanges without a path walks every doc, and each change now carries its path.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Builds on #13. This branch contains #13's commit (af3a9df) plus one new commit (993cbf3). Please merge #13 first; after that, this PR's diff shrinks to just the new commit.
Changes
acceptTrackedChanges(path, ids)(SDK) calls Overleaf'sPOST /project/:id/doc/:docId/changes/accept {change_ids}, the same request the review panel's Accept sends. Before sending, the ids are checked against freshly read ranges; if any id is not pending in that doc, nothing is accepted. Returns the accepted changes.overleaf_accept_tracked_changes {project, path, changeIds}. It is markeddestructiveHint: true, because an accepted suggestion can no longer be rejected. Its description limits it to changes the user explicitly said to accept.accept <project> <path> <id>... | --all [--before ISO-DATE].listTrackedChanges(andoverleaf_list_tracked_changes,claudeleaf changes) now lists every doc's changes whenpathis omitted. Each change carries itspath.Verified live
On a test project: accepting returns 204. Text and version are unchanged; the ranges drop the changes; the server broadcasts
accept-changes [docId, ids]to the project. I also used it on a real project to accept 463 changes across 24 docs in one pass.Tests