Skip to content

fix(annotator): isolate active threads per pane in side-by-side preview - #790

Merged
zhirongwang merged 1 commit into
masterfrom
fix/isolate-active-threads-per-pane
Sep 21, 2026
Merged

zhirongwang merged 1 commit into
masterfrom
fix/isolate-active-threads-per-pane

Conversation

@zhirongwang

@zhirongwang zhirongwang commented Sep 18, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • In side-by-side compare, both annotator instances share one event manager, so activating a thread in one pane broadcast the id to both. The pane that did not own the annotation stored the foreign id, rendered an empty "Add a comment" composer, and echoing a deselect back to the host cancelled the real selection.
  • BaseAnnotator now ignores activation ids that are not in its store (once annotations are loaded) and closes its own thread with a local clear that does not notify the host.
  • PopupV2 renders nothing when the active annotation has no messages, instead of a bare composer.

Deep links still work: activation that arrives before annotations load is stored as before. Single-annotator behavior is unchanged.

Test plan

  • Open a PDF in side-by-side compare with annotations on both versions
  • Click a thread in the left pane: only that pane opens a thread; the right pane does not show a second empty composer
  • Click a thread in the right pane: same, no leftover composer on the left
  • Click away to close a thread: host still deselects as before
  • Deep-link / reload with an annotation id in the URL: the thread still opens after annotations load
  • Single-pane preview: opening, closing, and creating threads behaves as before

@zhirongwang
zhirongwang requested a review from a team as a code owner September 18, 2026 22:51
@zhirongwang zhirongwang self-assigned this Sep 18, 2026
A shared EventManager broadcasts ACTIVE_SET to every annotator. Ignore
ids this pane does not own and clear the local thread without notifying
the host. Do not render an empty composer for a thread this pane does
not own.
@zhirongwang
zhirongwang force-pushed the fix/isolate-active-threads-per-pane branch from a3afcf4 to 13779ee Compare September 18, 2026 23:05
@zhirongwang zhirongwang changed the title Isolate active annotation threads per pane in side-by-side preview fix(annotator): isolate active threads per pane in side-by-side preview Sep 18, 2026

@JChan106 JChan106 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.

lgtm

@zhirongwang
zhirongwang merged commit 7b19da2 into master Sep 21, 2026
7 checks passed
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