Skip to content

fix(annotate): fit a standalone screenshot's offset notes like a compare's, so they don't widen the page - #491

Merged
vite-hub[bot] merged 2 commits into
mainfrom
fix/annotate-standalone-note-room
Nov 25, 2026
Merged

vite-hub[bot] merged 2 commits into
mainfrom
fix/annotate-standalone-note-room

Conversation

@onmax

@onmax onmax commented Nov 25, 2026

Copy link
Copy Markdown
Owner

A side=top or side=bottom note whose to point lies to one side reads toward the screenshot's edge (ca-callout-east / ca-callout-west). #488 limits its width to --ca-room, the room before that edge, but only under [data-ca-fit-notes], which only ::compare writes. A standalone ::screenshot never gets the limit, so its note can run up to 14rem past the image. On a 900px page, a note at at=92 to="12,18" made the page 997px wide.

The limit is scoped on purpose: in #488's review, a clamped note in a narrow room wrapped tall enough to leave its gutter, so a compare starts its notes stacked and the runtime puts them back beside their points once they fit. This change gives a standalone screenshot with offset notes the same data-ca-fit-notes, so it gets both the limit and the fit check. A screenshot with no offset notes is unchanged.

Checks:

  • Unit test: a screenshot with offset notes writes data-ca-fit-notes; one whose notes sit over their points doesn't.
  • Browser tests at 900px, one note at at=60 and one at at=92: the short note stays beside its point, the long one stacks under the image, and in both the page has no sideways scroll. The at=92 test fails without the change.
  • The compare-note and narrow-screen browser tests still pass.

Found while updating Drop to 0.14.3, which drops the patch that clamped every offset note.

🤖 Generated with Claude Code

@chatgpt-codex-connector

Copy link
Copy Markdown
Codex Review Summary: ❌ Failed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ❌ Failed 2026-11-25T18:32:21.331576Z
We couldn’t complete this review. Comment @codex review to try again.
5d319e9 PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@vite-hub

vite-hub Bot commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor
Session Status Started Duration
Pending Completed Not started —
View session Completed 2026-11-25T18:42:38.643Z 10m 22s

Latest result

Pull request merged.

Final answers

Session

Pull request merged.

Session

Pushed b1d7256 to keep standalone screenshot notes from widening the page while restoring their original placement in zoom. Focused unit tests and lint passed. The broader annotate suite passed 79 of 80 tests; only CLI stdout capture failed, while the CLI worked directly. Local Playwright could not start its server, so browser verification is pending in CI.

Session

Pushed b1d7256 to keep standalone screenshot notes from widening the page while restoring their original placement in zoom. Focused unit tests and lint passed. The broader annotate suite passed 79 of 80 tests; only CLI stdout capture failed, while the CLI worked directly. Local Playwright could not start its server, so browser verification is pending in CI.

Session

Pushed b1d7256 to keep standalone screenshot notes from widening the page while restoring their original placement in zoom. Focused unit tests and lint passed. The broader annotate suite passed 79 of 80 tests; only CLI stdout capture failed, while the CLI worked directly. Local Playwright could not start its server, so browser verification is pending in CI.

Session

Pushed b1d7256 to keep standalone screenshot notes from widening the page while restoring their original placement in zoom. Focused unit tests and lint passed. The broader annotate suite passed 79 of 80 tests; only CLI stdout capture failed, while the CLI worked directly. Local Playwright could not start its server, so browser verification is pending in CI.

Session

Pushed b1d7256 to keep standalone screenshot notes from widening the page while restoring their original placement in zoom. Focused unit tests and lint passed. The broader annotate suite passed 79 of 80 tests; only CLI stdout capture failed, while the CLI worked directly. Local Playwright could not start its server, so browser verification is pending in CI.

Session

Pushed b1d7256 to keep standalone screenshot notes from widening the page while restoring their original placement in zoom. Focused unit tests and lint passed. The broader annotate suite passed 79 of 80 tests; only CLI stdout capture failed, while the CLI worked directly. Local Playwright could not start its server, so browser verification is pending in CI.

View session

Pushed b1d7256 to keep standalone screenshot notes from widening the page while restoring their original placement in zoom. Focused unit tests and lint passed. The broader annotate suite passed 79 of 80 tests; only CLI stdout capture failed, while the CLI worked directly. Local Playwright could not start its server, so browser verification is pending in CI.

Session

Waiting for review checks before the next pass.

@pkg-pr-new

pkg-pr-new Bot commented Nov 25, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

comark-annotate

pnpm add https://pkg.pr.new/comark-annotate@491

comark-badge

pnpm add https://pkg.pr.new/comark-badge@491

comark-bundle

pnpm add https://pkg.pr.new/comark-bundle@491

comark-cards

pnpm add https://pkg.pr.new/comark-cards@491

comark-carousel

pnpm add https://pkg.pr.new/comark-carousel@491

comark-cast

pnpm add https://pkg.pr.new/comark-cast@491

comark-charts

pnpm add https://pkg.pr.new/comark-charts@491

comark-chat

pnpm add https://pkg.pr.new/comark-chat@491

comark-chips

pnpm add https://pkg.pr.new/comark-chips@491

comark-cjk

pnpm add https://pkg.pr.new/comark-cjk@491

comark-code

pnpm add https://pkg.pr.new/comark-code@491

comark-code-notes

pnpm add https://pkg.pr.new/comark-code-notes@491

comark-colors

pnpm add https://pkg.pr.new/comark-colors@491

comark-comments

pnpm add https://pkg.pr.new/comark-comments@491

comark-critic

pnpm add https://pkg.pr.new/comark-critic@491

comark-deflist

pnpm add https://pkg.pr.new/comark-deflist@491

comark-details

pnpm add https://pkg.pr.new/comark-details@491

comark-diagrams

pnpm add https://pkg.pr.new/comark-diagrams@491

comark-diff

pnpm add https://pkg.pr.new/comark-diff@491

comark-embed

pnpm add https://pkg.pr.new/comark-embed@491

comark-fields

pnpm add https://pkg.pr.new/comark-fields@491

comark-figure

pnpm add https://pkg.pr.new/comark-figure@491

comark-file-tree

pnpm add https://pkg.pr.new/comark-file-tree@491

comark-footnotes

pnpm add https://pkg.pr.new/comark-footnotes@491

comark-git-graph

pnpm add https://pkg.pr.new/comark-git-graph@491

comark-github

pnpm add https://pkg.pr.new/comark-github@491

comark-icon

pnpm add https://pkg.pr.new/comark-icon@491

comark-include

pnpm add https://pkg.pr.new/comark-include@491

comark-keys

pnpm add https://pkg.pr.new/comark-keys@491

comark-links

pnpm add https://pkg.pr.new/comark-links@491

comark-linter

pnpm add https://pkg.pr.new/comark-linter@491

comark-magic-move

pnpm add https://pkg.pr.new/comark-magic-move@491

comark-mark

pnpm add https://pkg.pr.new/comark-mark@491

markdown-it-to-comark

pnpm add https://pkg.pr.new/markdown-it-to-comark@491

marked-to-comark

pnpm add https://pkg.pr.new/marked-to-comark@491

comark-mathml

pnpm add https://pkg.pr.new/comark-mathml@491

comark-media

pnpm add https://pkg.pr.new/comark-media@491

comark-metrics

pnpm add https://pkg.pr.new/comark-metrics@491

migrate-to-comark

pnpm add https://pkg.pr.new/migrate-to-comark@491

comark-motion

pnpm add https://pkg.pr.new/comark-motion@491

comark-outline

pnpm add https://pkg.pr.new/comark-outline@491

comark-properties

pnpm add https://pkg.pr.new/comark-properties@491

comark-qr

pnpm add https://pkg.pr.new/comark-qr@491

comark-quiz

pnpm add https://pkg.pr.new/comark-quiz@491

comark-reading-time

pnpm add https://pkg.pr.new/comark-reading-time@491

remark-to-comark

pnpm add https://pkg.pr.new/remark-to-comark@491

comark-sources

pnpm add https://pkg.pr.new/comark-sources@491

comark-steps

pnpm add https://pkg.pr.new/comark-steps@491

comark-table

pnpm add https://pkg.pr.new/comark-table@491

comark-tabs

pnpm add https://pkg.pr.new/comark-tabs@491

comark-tests

pnpm add https://pkg.pr.new/comark-tests@491

comark-time

pnpm add https://pkg.pr.new/comark-time@491

comark-ui

pnpm add https://pkg.pr.new/comark-ui@491

comark-xref

pnpm add https://pkg.pr.new/comark-xref@491

comark-zoom

pnpm add https://pkg.pr.new/comark-zoom@491

commit: b1d7256

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

✅ No new issues found.

Approach: Reusing the existing comparison fit check keeps standalone notes inside the screenshot without introducing a second layout mechanism.

Reviewed changes

  • Standalone rendering: Screenshots with offset top or bottom notes opt into the existing width limit and stacking fallback; centered notes and table thumbnails are unchanged.
  • Regression coverage: At 900 px, the short note stays in its gutter and the long note stacks without widening the page. All 80 annotate unit tests and 32 Chromium tests passed.

No P0 or P1 findings.

Pullfrog  | View workflow run | Using gpt-6.2-sol(high) | 𝕏

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

✅ No new issues found.

Reviewed changes since 5d319e9:

  • Excluded zoom copies from page note fitting. The page still clamps or stacks offset notes, while zoom can measure and center them in their original positions.
  • Updated the zoom regression test. It verifies that a note stacked on the page returns to its offset position in zoom and is centered together with the screenshot.

No P0 or P1 findings. All 80 annotate unit tests and 65 Chromium tests passed on the serial run. The unchanged carousel layout-shift test failed once in parallel and passed five isolated reruns.

Pullfrog  | View workflow run | Using gpt-6.2-sol(high) | 𝕏

@vite-hub
vite-hub Bot merged commit 9fb5acd into main Nov 25, 2026
7 checks passed
@vite-hub
vite-hub Bot deleted the fix/annotate-standalone-note-room branch November 25, 2026 19:02
onmax added a commit to vite-hub/drop that referenced this pull request Nov 25, 2026
…, and a failed Send that stays failed

- RENDERER_SCRIPTS includes comark-annotate's scripts, so /f/<key>.md lets
  its fit runtime put compare arrows back. comark-annotate is now a direct
  dependency for that import.
- A [email protected] patch gives a standalone screenshot with offset
  notes the same fit check as a compare (onmax/comark-ui#491), so a note
  can no longer widen the page.
- The ported comments patch keeps a failed Send failed, with its count
  updated, when a status refresh finds comments still waiting, as main's
  patch did. The handoff test expects that again.
onmax added a commit to vite-hub/drop that referenced this pull request Nov 25, 2026
… it retires (#297)

* chore(deps): bump dependencies with no migration

Nuxt to the 5x nightly 5.0.0-2611241632-f471666, Vue 3.5.46, vue-router 5.5.1, Nuxt UI 4.13.1,
Tiptap 3.35.0 (y-tiptap 3.3.1), vite-plus 1.8.0 (core 8.3.8001), wrangler 4.168.0, evlog 2.37.1,
AWS SDK 3.1177.0, comark 0.9.2, shiki 4.6.0, and the remaining patch and minor releases.

Drops the vue, devalue@5, nitro and Tiptap menu overrides and the vite peerDependencyRules: the
new versions resolve to one copy each without them. minimumReleaseAgeExclude loses entries for
versions no longer in the lockfile and gains the ones pnpm refused as too new.

Fallout: oxfmt 0.79 reformats inline template text, oxlint 1.94 flags boolean literal compares
and a setter that returns, and vue-tsc 3.3.14 mangles a `//` inside a static template prop,
so SiteModal keeps the URL pattern in script.

* chore(deps): bump ViteHub, Better Auth, drizzle and the majors; drop four patches

ViteHub previews move from c3cfab6 to main 78114ab (every URL checked, @vite-hub/decisions no longer
exists there and nothing depends on it, so its override goes). Better Auth, its OAuth provider and
Stripe plugin go to 1.7.28, which ships the refresh-grant session fix our patch carried. drizzle-orm and
drizzle-kit 1.0.0-rc.6, stripe 23.2.0, @vueuse 15.1.0, entities 9, fractional-indexing 4,
es-module-lexer 3.0.5.

Deletes the @vite-hub/content, @vite-hub/ui, @vite-hub/comments and @better-auth/oauth-provider
patches. comark pins stay on d99e4d1: it is PR #482's head, squash-merged into main, and main commits
publish no pkg.pr.new previews.

useNow takes a scheduler instead of interval in VueUse 15. The code-along test loads
es-module-lexer/minimal/js, the v2 API the page gets from the CDN.

Typecheck is red: app/composables/useDropComments.ts uses the old CommentGetInput ({ id } | { n }),
which ViteHub now types as { threadId } | { scope, n }. That goes to the next round.

* chore(deps): carry vite-hub/vitehub#5475 and #5477 as a patch on the 78114ab preview

* feat(db): add ViteHub's live send key and webhook owner indexes

The 78114ab preview reads a unique live key on comment sends, an owner
column on webhook deliveries, and two list indexes. The migration only adds
a nullable column and indexes, so the running Worker keeps working.

* refactor(comments): move Send and handoffs onto ViteHub's comments API

The inbox prompt moves from a patch into the send.prompt hook. Handoffs list
and read through comments.listSends and comments.readSend, reopening relies
on ViteHub's own restore, and disconnecting uses removeMemberEndpoints.
Tests follow ViteHub's pill: Allow answers changed and keeps the code, and a
failure lives in the pill until the next status.

* test(mcp): follow Better Auth 1.7.28, which resolves a refresh token's session on each use

1.7.28 keeps the session id on the rotated refresh token row and drops it from the tokens once the session ends (better-auth #12723, #12812), so the row assertions from Drop's old patch no longer hold. The token and /mcp assertions are unchanged. Also formats pnpm-workspace.yaml.

* fix(db): map integer sql selections now that drizzle rc.6 reads bigints

drizzle 1.0.0-rc.6 turns on setReadBigInts for node:sqlite select builders, so sql fields came back as bigint. .mapWith(Number|Boolean) restores the types the callers compare against.

* test: follow ViteHub's collapsed image stack in the pin composer

ViteHub's image stack keeps its cards inert until hovered and fans them out above the box, so the test hovers the stack before Remove and gives the fan room above the box.

* chore(code-along): load es-module-lexer 3 from its minimal asm build

es-module-lexer 3 ships dist/lexer.minimal.asm.js in place of lexer.asm.js.

* chore(deps): record main's comark-annotate patch in the lockfile

* refactor(auth): keep the proxy token header beside forwardAuth

ViteHub's doctor (VHUB0037) flags a proxy identity header named outside the module that calls forwardAuth(). The header name now lives in proxy-auth.ts, and the sign-in middleware imports it from there.

* refactor(self-host): let ViteHub migrate and back up the database on start

ViteHub's doctor (VHUB0037) asks apps to use migrateOnStart instead of their own start-up migrator. Docker on SQLite now backs up through migrateOnStart: { backup: true } (three copies beside the file, as before), and Docker on D1 migrates through migrateOnStart, so Drop's VACUUM INTO backup and its D1 script go. The Workers Builds opt-in runs wrangler d1 migrations apply on the built config. The migration tests run ViteHub's D1 migrator, and D1 images now refuse migrations that lose data, like every other path.

* chore(deps): move ViteHub to the 0a275d36 main preview

0a275d36 is ViteHub main after v0.5.1, with vite-hub/vitehub#5476 (a refused MCP token carries a stable reason) and #5479 (the request log names an OAuth error). Comments, UI and database didn't change since 78114ab, so the patch for #5475 and #5477 applies as it was; pnpm patch-commit found nothing to rewrite.

* test(comments): Send's stub allows only the confirmed selection, as ViteHub's server does

ViteHub's Send now gives startPairing a count and a selection, refreshes
nothing while pairing, and answers Allow with changed when the waiting
threads differ from the confirmed ones. The stub follows: it names each
batch, pushes counts when a comment arrives, and the delivery UI test
reads ViteHub's numberless title for a waiting thread.

* chore(deps): move @types/node to 26

* fix(db): 0021 keeps one live send per key before it builds the live key index

* chore(deps): move ViteHub to the 9b36ebb5 main preview and drop its two patches

* perf(db): 0021 ranks live sends once instead of scanning the table per row

Before the live key index exists, the correlated lookup scanned vitehub_comment_sends once per live row, about 38 s at 30,000 sends, past D1's 30 s query limit. ROW_NUMBER over each key keeps the same winner (furthest state, then earliest) in 32 ms at that size.

* feat: Drop logs ViteHub's own reasons for a refused proxy identity and a refused MCP token

* Preserve proxy refusal details across shared sign-ins

* fix: errors the page catches go through ViteHub's browser-errors route again

* chore(deps): move ViteHub to the 44d67900 main preview, with vite-hub/vitehub#5487 and #5490

* test(deploy): migrateOnStart applies every Drop migration to an empty D1 database

* test(mcp): Send status says whether the last send went to an inbox or a webhook

* test(mcp): an agent reads its handoff while the webhook delivery waits for its receiver

* fix(console): console.authorize decides only Console calls, as vite-hub/vitehub#5419 has it

ViteHub no longer calls console.authorize with via "page": the pill's Console
link and page tools read the person from the Console-signed site cookie, which the
Console issues only after site.access, a signed via "console" call that Drop
already limits to DROP_ADMINS. The page branch and its test go.

* test(comments): a ViteHub Console Site access cookie signs nobody in to Drop's comments or Send

vite-hub/vitehub#5419 makes Comments read the person from the site cookie, but only
without identify. Drop's identify keeps Drop accounts the only commenters.

* docs(self-host): pass /_vitehub/site through, and say the site cookie signs nobody in to Drop

* test(content-origin): find the page tools installer in @vite-hub/comments, where vite-hub/vitehub#5419 moved it

* docs(self-host): the site cookie changes nothing in Drop, so guests still comment where the share allows it

* Preserve distinct handled browser error retries

* chore(deps): comark-ui 0.14.3 from npm, without the annotate patch

The comark packages leave the d99e4d1 preview for the 0.14.3 release. It
ships onmax/comark-ui#488, so the comark-annotate patch goes, and every
comark package resolves to one 0.14.3 copy without the comark-zoom override.

* fix: annotate's runtime under the Markdown CSP, standalone note width, and a failed Send that stays failed

- RENDERER_SCRIPTS includes comark-annotate's scripts, so /f/<key>.md lets
  its fit runtime put compare arrows back. comark-annotate is now a direct
  dependency for that import.
- A [email protected] patch gives a standalone screenshot with offset
  notes the same fit check as a compare (onmax/comark-ui#491), so a note
  can no longer widen the page.
- The ported comments patch keeps a failed Send failed, with its count
  updated, when a status refresh finds comments still waiting, as main's
  patch did. The handoff test expects that again.

* fix(comments): a refresh keeps a failed pairing or Allow until Send retries it

Names vite-hub/vitehub#5526 and Baroshem/nuxt-security#769 beside the patches they wait on.

* fix(comments): a kept Send failure shows the waiting count as it changes

* fix(comments): a recount keeps a Retry in flight, and a failed pairing clears once no comment waits

A count-only refresh of a kept failure updated state through set(), which advanced the step and discarded an explicit Allow recovery already running. It now updates the count in place. A kept pairing or Allow failure also clears once a refresh finds no waiting comments, so Retry never starts a pairing for nothing (vite-hub/vitehub#5526).

* fix(comments): an older status refresh never overwrites a newer waiting count

Routine refreshes are numbered, and a response older than the last one applied is dropped, so a slow recount can't roll a kept failure's count back. An explicit Send recovery still applies (vite-hub/vitehub#5526).

---------

Co-authored-by: vite-hub[bot] <320448255+vite-hub[bot]@users.noreply.github.com>
@github-actions github-actions Bot mentioned this pull request Nov 27, 2026
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