Repository navigation
fix(annotate): a note beside its point wraps before the screenshot's edge - #488
Conversation
…edge, so a compare no longer scrolls sideways
Codex Review Summary: ❌ FailedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
comark-annotate
comark-badge
comark-bundle
comark-cards
comark-carousel
comark-cast
comark-charts
comark-chat
comark-chips
comark-cjk
comark-code
comark-code-notes
comark-colors
comark-comments
comark-critic
comark-deflist
comark-details
comark-diagrams
comark-diff
comark-embed
comark-fields
comark-figure
comark-file-tree
comark-footnotes
comark-git-graph
comark-github
comark-icon
comark-include
comark-keys
comark-links
comark-linter
comark-magic-move
comark-mark
markdown-it-to-comark
marked-to-comark
comark-mathml
comark-media
comark-metrics
migrate-to-comark
comark-motion
comark-outline
comark-properties
comark-qr
comark-quiz
comark-reading-time
remark-to-comark
comark-sources
comark-steps
comark-table
comark-tabs
comark-tests
comark-time
comark-ui
comark-xref
comark-zoom
commit: |
There was a problem hiding this comment.
Important
Fix the top-note clipping regression before merging. The new width cap can eliminate horizontal scrolling while hiding most of the note above the carousel.
Approach: Capping an offset note by the available width fixes the reported overflow, but the layout also needs to account for how tall the wrapped note becomes.
Reviewed changes
- Placement: The HTML renderer now computes the room from the note’s anchor to the stage edge in its reading direction, including any side gutter.
- Layout: East- and west-facing notes apply that width cap; the container queries still remove it in the stacked layout.
- Verification: All 79 focused tests passed. Chromium confirmed the horizontal fix at
at=70and reproduced the clipping regression atat=90.
gpt-6.2-sol(high) | 𝕏
Latest result Pull request merged. Final answersSession Pull request merged. Session Pushed 23affb7 and resolved the P1 scroll-jump finding. Fit measurement now preserves the comparison’s height while testing the absolute layout. The scroll simulation, 74 focused tests, and lint passed. Playwright could not start locally, and two CLI tests returned empty output. Hosted CI will verify the new browser regression and CLI tests. Session Pushed 23affb7 and resolved the P1 scroll-jump finding. Fit measurement now preserves the comparison’s height while testing the absolute layout. The scroll simulation, 74 focused tests, and lint passed. Playwright could not start locally, and two CLI tests returned empty output. Hosted CI will verify the new browser regression and CLI tests. Session Pushed 23affb7 and resolved the P1 scroll-jump finding. Fit measurement now preserves the comparison’s height while testing the absolute layout. The scroll simulation, 74 focused tests, and lint passed. Playwright could not start locally, and two CLI tests returned empty output. Hosted CI will verify the new browser regression and CLI tests. Session Pushed 23affb7 and resolved the P1 scroll-jump finding. Fit measurement now preserves the comparison’s height while testing the absolute layout. The scroll simulation, 74 focused tests, and lint passed. Playwright could not start locally, and two CLI tests returned empty output. Hosted CI will verify the new browser regression and CLI tests. Session Pushed 23affb7 and resolved the P1 scroll-jump finding. Fit measurement now preserves the comparison’s height while testing the absolute layout. The scroll simulation, 74 focused tests, and lint passed. Playwright could not start locally, and two CLI tests returned empty output. Hosted CI will verify the new browser regression and CLI tests. Session Pushed 23affb7 and resolved the P1 scroll-jump finding. Fit measurement now preserves the comparison’s height while testing the absolute layout. The scroll simulation, 74 focused tests, and lint passed. Playwright could not start locally, and two CLI tests returned empty output. Hosted CI will verify the new browser regression and CLI tests. |
There was a problem hiding this comment.
Important
The original clipping cases now stack correctly, but a note can still clip if its size changes while the comparison width stays fixed. All three new Chromium tests also fail as written.
Approach: Measuring the callouts and stacking both sides is the right fallback, but the fit decision needs to stay current when note geometry changes.
Reviewed changes since 64ae0b4:
- Scoped the width cap to column comparisons with offset notes and reused the lettered layout when a callout does not fit.
- Added browser measurement on initial layout, comparison width changes, and font loads.
- Added east and west regression cases. Separate Chromium measurements confirmed both edge cases now stay readable, aligned, and free of horizontal overflow. The annotate unit suite passed (91 passed, 1 skipped); the Chromium suite had 25 passes and 3 failures, all in the new tests.
gpt-6.2-sol(high) | 𝕏
There was a problem hiding this comment.
Important
A refit can move the reader up the page even when the comparison stays stacked.
Reviewed changes since 1150e8a:
- Expanded refit triggers. Observed stage and callout dimensions independently of comparison width, and batched geometry, content, and font updates into one frame.
- Corrected the browser fixtures. Measured the rendered text wrapper and added a grow-and-shrink regression at a fixed comparison width. All 29 annotate Chromium tests and all four comparison-note Firefox tests passed. The annotate unit suite had 91 passes and one skip.
gpt-6.2-sol(high) | 𝕏
There was a problem hiding this comment.
ℹ️ The scroll-jump fix works. No P0 or P1 findings remain; one host styling edge case is noted inline.
Reviewed changes since 4ca4cc1:
- Preserved the comparison height while measuring stacked notes. Verified that both a whitespace-only edit and a fixed-width font-size change leave the reader’s scroll position unchanged.
- Added a scroll regression. All 30 annotate tests passed in Chromium, all five comparison-note tests passed in Firefox, and 114 unit and script checks passed with one skipped. WebKit could not launch because system libraries were missing.
gpt-6.2-sol(high) | 𝕏
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.
… 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>

A `side=top` or `side=bottom` note whose `to` point lies to one side reads away from it (`ca-callout-east` / `ca-callout-west`). It started at `at` and could run up to 14rem with no limit at the screenshot's edge. With `at=70` on a 467px screenshot, the note ended about 70px past the right edge.
On its own the note just hangs into the margin. Inside `::compare` the carousel track is `overflow-x: auto`, so the overflow turns into a sideways scroll that clips the Before column on the left.
Each east or west note now gets `--ca-room`: the distance from where it starts to the edge it reads toward, gutters included. The note's max width is `min(14rem, var(--ca-room))`, so it wraps inside the screenshot. The stacked layout on narrow screens still sets `max-width: none`, since its rule comes later.
Checked on a live Drop compare with two such notes: the track's scrollWidth went from 1033 and 1057 to 971, equal to its clientWidth, and every note ends at its screenshot's edge.
🤖 Generated with Claude Code