-
Notifications
You must be signed in to change notification settings - Fork 52
feat: add visual indication for tracked change, comments and nested comments #1770
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
feat: add visual indication for tracked change, comments and nested comments #1770
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: dde7bcc58d
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: acd496d171
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
acd496d to
835f839
Compare
… precedence Add regression tests for getActiveCommentId behavior: - Returns innermost comment when cursor is in nested range - Returns outer comment when cursor is outside inner range - Comments take precedence over tracked changes at same position - TC ID returned when only TC exists at cursor position - Three levels of nested comments handled correctly - Returns null when cursor is outside all comments - Adjacent non-overlapping comments identified correctly
Add regression tests for trackedChangeParentId vs parentCommentId: - Comment on TC text gets trackedChangeParentId but no parentCommentId - Threaded comment in TC has both trackedChangeParentId (for bubble) and parentCommentId (for threading) - Parent spanning outside TC has no trackedChangeParentId
…hanges Refactor getActiveCommentId to: - Build a map of all comment ranges in the document - Find which comments contain the cursor position - Return the innermost comment (smallest range) when nested - Check for comments first, fall back to TC only if no comment found
Add trackedChangeParentId field to track TC association separately from comment threading. This allows: - Comments on TC text to appear as separate bubbles (not nested under TC) - Reply threading to work correctly via parentCommentId - Proper visibility toggling based on TC vs comment association - Correct export with proper range positions Files updated: - documentCommentsImporter: add trackedChangeParentId field - comment-import-helpers: check trackedChangeParentId for TC detection - comments-helpers: use trackedChangeParentId for export positioning - use-comment: pass trackedChangeParentId through - comments-store: use trackedChangeParentId for visibility check
Previously, comments on TC text were skipped for background highlighting because they had trackedChange=true. Now all comments get proper background-color highlight regardless of TC association. Update test to verify comments on TC text receive highlighting.
Synthetic comments created for tracked changes (with trackedChange=true) should not be exported to comments.xml as they are UI-only representations.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ef5991d04c
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
Tracked change, comments and nested comments visual indication
Prev:

Now:
