Skip to content

Conversation

@caio-pizzol
Copy link
Contributor

@caio-pizzol caio-pizzol commented Jan 16, 2026

Tracked change, comments and nested comments visual indication

Prev:
Captura de Tela 2026-01-17 às 09 50 18

Now:
Captura de Tela 2026-01-17 às 09 51 07

@linear
Copy link

linear bot commented Jan 16, 2026

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a 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".

@caio-pizzol caio-pizzol marked this pull request as draft January 16, 2026 22:40
@caio-pizzol caio-pizzol marked this pull request as ready for review January 16, 2026 22:52
@caio-pizzol caio-pizzol self-assigned this Jan 16, 2026
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a 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".

@caio-pizzol caio-pizzol force-pushed the caio/sd-1519-add-visual-highlight-for-comment-ranges-when-comment-is branch from acd496d to 835f839 Compare January 17, 2026 10:29
@caio-pizzol caio-pizzol marked this pull request as draft January 17, 2026 11:02
… 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.
@caio-pizzol caio-pizzol marked this pull request as ready for review January 17, 2026 12:48
@caio-pizzol caio-pizzol changed the title feat: add visual highlight for comment ranges feat: add visual indication for tracked change, comments and nested comments Jan 17, 2026
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a 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".

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.

2 participants