Skip to content

(fix) restore live annotation toggles - #4

Merged
Ammaar-Alam merged 4 commits into
mainfrom
fix/0.2.1-annotation-toggle-restore
Jul 27, 2026
Merged

(fix) restore live annotation toggles#4
Ammaar-Alam merged 4 commits into
mainfrom
fix/0.2.1-annotation-toggle-restore

Conversation

@Ammaar-Alam

@Ammaar-Alam Ammaar-Alam commented Jul 27, 2026

Copy link
Copy Markdown
Owner

What changed

  • keeps each question's prior-annotation baseline open while AAMC hydrates
    saved highlights and cross-outs after Start, Resume, and question navigation
  • seals only the corresponding annotation baseline when the reader invokes
    AAMC's native highlight or cross-out control or shortcut, leaving the other
    type open for delayed hydration
  • snapshots highlight and cross-out candidates before masking either type, so
    one mask cannot make the other baseline incomplete
  • records native reader intent against the same question identity used by the
    sealing scan, even if masking changes which question is visibly active
  • restores prior annotations live when clearing is turned Off, remasks only
    those originals when turned back On, and leaves new annotations usable

Root cause

AAMC's annotation hydration does not share MKit's session timing. Saved spans
can arrive after the rail is already visible, so sealing at Start or Resume
classified those delayed originals as new. Rail interactions could also close
the baseline before hydration completed.

The adapter now owns independent boundaries at the actual native annotation
actions. Both annotation candidate sets are captured before either reversible
mask changes the page, and the captured question identity is reused for the
reader-intent record instead of querying the changed DOM again.

Verification

  • exact authenticated DOM replay:
    • 7 delayed highlights masked
    • all 7 restored when clearing was disabled
    • all 7 remasked when clearing was re-enabled
  • pnpm check
    • 138 unit tests passed
    • 56 Chrome tests passed
    • lint, typecheck, build, and release audit passed
  • focused Clean Slate Chrome suite: 4 passed
  • pnpm package
  • unzip -t release/mkit-0.2.1.zip

PR written by Codex

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

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: a6bf9ede34

ℹ️ About Codex in GitHub

Your team has set up Codex to 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 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/core/review-controller.ts Outdated
Comment thread src/adapter/AamcFullLengthReviewAdapter.ts Outdated
@Ammaar-Alam

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

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: b1ae348a5c

ℹ️ About Codex in GitHub

Your team has set up Codex to 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 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/adapter/AamcFullLengthReviewAdapter.ts Outdated
@Ammaar-Alam

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

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: 49812d8352

ℹ️ About Codex in GitHub

Your team has set up Codex to 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 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/adapter/AamcFullLengthReviewAdapter.ts Outdated
@Ammaar-Alam

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Breezy!

Reviewed commit: cc6aa05cde

ℹ️ About Codex in GitHub

Your team has set up Codex to 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 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@Ammaar-Alam
Ammaar-Alam merged commit 163d3e9 into main Jul 27, 2026
1 check 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.

1 participant