Skip to content

(fix) preserve passage highlights across related questions - #5

Merged
Ammaar-Alam merged 2 commits into
mainfrom
agent/0.2.2-passage-highlights
Jul 30, 2026
Merged

(fix) preserve passage highlights across related questions#5
Ammaar-Alam merged 2 commits into
mainfrom
agent/0.2.2-passage-highlights

Conversation

@Ammaar-Alam

Copy link
Copy Markdown
Owner

Summary

  • Preserve highlights created during a Fresh Attempt when the next question belongs to the same passage.
  • Continue clearing saved passage highlights, question-specific highlights, and crossed-out choices at their correct boundaries.
  • Keep passage identity private and in-memory while handling question-specific wrapper IDs, delayed annotation hydration, route-first updates, and reused DOM containers.
  • Bump the extension and package version to 0.2.2.

Root cause

Clean Slate collected passage and question highlights under one baseline keyed only by question ID. When AAMC advanced to another question from the same passage, the new question baseline treated the reader's carried passage highlights as annotations from the completed attempt and removed them.

Verification

  • Manual live validation of same-passage highlight continuity
  • pnpm check — 139 unit tests and 57 Chrome tests, plus lint, typecheck, production build, and release audit
  • Authenticated-DOM replay of seven delayed saved highlights
  • pnpm package
  • pnpm audit:release
  • unzip -t release/mkit-0.2.2.zip

(PR written by Codex)

@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: 5bfc24c1b2

ℹ️ 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: 46f106e54f

ℹ️ 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 on lines +1560 to +1564
const images = [...passage.querySelectorAll("img")].map((image) => [
image.getAttribute("src"),
image.getAttribute("srcset"),
image.getAttribute("alt"),
]);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Fingerprint all non-text passage media

When two passages have identical normalized text and <img> attributes but differ through inline SVG, canvas, or object content, this identifier collides and reuses the first passage's sealed baseline. A saved highlight unique to the second passage is then treated as a fresh reader highlight and remains visible. Fresh evidence after the earlier comment is that the follow-up fingerprints only img elements, leaving other non-text media unrepresented; include stable identity for all supported passage media or use a passage-specific identifier.

Useful? React with 👍 / 👎.

@Ammaar-Alam
Ammaar-Alam marked this pull request as ready for review July 30, 2026 02:20
@Ammaar-Alam
Ammaar-Alam merged commit 2295f4b into main Jul 30, 2026
1 check passed
@Ammaar-Alam
Ammaar-Alam deleted the agent/0.2.2-passage-highlights branch July 30, 2026 02:20
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