Skip to content

feat(viewer): an image in a table cell is a small thumbnail that zooms - #271

Merged
vite-hub[bot] merged 6 commits into
mainfrom
t3/table-image-thumbnails
Nov 24, 2026
Merged

vite-hub[bot] merged 6 commits into
mainfrom
t3/table-image-thumbnails

Conversation

@onmax

@onmax onmax commented Nov 24, 2026 •

Copy link
Copy Markdown
Member

An image in a Markdown table cell now renders as a small thumbnail that opens enlarged on click, Enter, or Space, so a doc can be one reference table with a screenshot per row.

| Term | Where |
| --- | --- |
| Forecast | ![Forecast page](https://example.com/forecast.png){width=1280 height=800 link="https://example.com/forecast"} |

The thumbnail fits a box 4rem high and 8rem wide. width and height keep the row's height before the image loads; without them the image shows whole in a 3:2 box. link adds a link to the source page in the zoomed view's header.

Changes

  • Pins the comark packages to the pkg.pr.new build of onmax/comark-ui#482 at d99e4d12, where the feature lives.
  • public/document-zoom.js leaves images that comark-zoom marks ([data-zoom]) to comark-zoom, so a thumbnail doesn't open two lightboxes.
  • Bumps the Markdown cache key to drop.32, so stored renders pick up the thumbnails.
  • The portrait-image browser test now expects the table image as a 96×64 thumbnail and checks that it opens comark-zoom's dialog with its link, not medium-zoom.

Before merging

Checked

test/viewer/portrait-image-browser.test.mjs and test/skills/markdown.test.mjs pass locally (20 tests, Chromium). The full check and suite were left to CI.

Evidence from comark-ui: https://drop.vitehub.dev/d/j8cw1k74my61/table-thumbnails-evidence

🤖 Generated with Claude Code

Pins comark-ui to onmax/comark-ui#482 (536e302f). comark-zoom draws and zooms the thumbnails, so Drop's own lightbox leaves them alone.
@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 24, 2026 •

Copy link
Copy Markdown
Contributor
Session Status Started Duration
Pending Completed Not started —
View session Starting Not started —
View session Cancelled 2026-11-24T14:43:37.334Z 22s
View session Cancelled 2026-11-24T14:43:12.613Z 7s

Latest result

Pull request merged.

Final answers

Session

Pull request merged.

Session

Merged 8b2873c directly: required checks passed and review threads were resolved.

Session

GitHub is still calculating mergeability for this PR head.

Session

GitHub is still calculating mergeability for this PR head.

Session

Pull request evidence changed.

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

Important

Two review regressions need fixing before merge: some existing table comments lose their pins after rerendering, and new Marker comments made in a thumbnail’s zoom dialog point at a copy that disappears on close.

Approach: Keeping thumbnail sizing and zoom in Comark avoids a second lightbox implementation, but Drop needs to preserve comment anchors across the renderer upgrade.

Reviewed changes across the Markdown renderer, direct document page, and sandboxed viewer:

  • Comark upgrade: The app and ViteHub Content use the same build for table thumbnails, responsive layout, and the zoom dialog’s source-page link.
  • Zoom and cache: Direct pages leave marked thumbnails to Comark, and the cache bump applies the new rendering to published documents.
  • Browser checks: The updated portrait test separates thumbnail zoom from prose image zoom. All 36 focused tests passed; additional Chromium checks reproduced both anchor regressions.

Pullfrog  | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using gpt-6.2-sol(high) | 𝕏

Comment thread server/utils/markdown-cache.ts Resolved
Comment thread pnpm-workspace.yaml Resolved

@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 P0 or P1 findings. The two existing P1 threads remain open, so I’m not approving this revision.

Reviewed changes since the previous review:

  • Updated the Comark pin to d99e4d1, which restores the keyboard focus ring on thumbnails without dimensions and preserves their 3:2 ratio when the width limit shrinks.

All 29 focused Markdown and Chromium tests passed. A separate Chromium check confirmed that Tab shows the focus ring, Enter opens the thumbnail, and a 2rem cap preserves the 3:2 ratio.

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

Keeps this PR's version over base changes:
- app/components/viewer/ViewerVariants.vue: Remove only the three newly merged script comment lines that fail required Doctor rule TS0017; the merged keyboard behavior is unchanged.

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

Important

The new resolver can put an existing comment on the wrong table, and a Marker stroke at the edge of a zoomed thumbnail can leave Done stuck. The zoom-reopen behavior required by the open Marker thread also still fails.

Reviewed changes in a925398 since the previous review:

  • Added legacy table lookup for image and area pins and for focusing a comment.
  • Saved Marker strokes against the source element while keeping their coordinates relative to the zoomed copy.
  • Added Chromium coverage for legacy pins and for drawing, closing, and reopening a thumbnail. The focused run passed 22 of 23 tests; the new test failed at the reopen assertion because the renderer checks the hidden original’s visibility before looking up the visible copy.

Pullfrog  | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using gpt-6.2-sol(high) | 𝕏

Comment thread shared/plan-runtime.ts Resolved
Comment thread shared/plan-runtime.ts Resolved

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

Important

The new mark-retry message fails typecheck and is dropped before it reaches the handler that re-enables Marker Done.

Reviewed changes in 759dbc0 since the previous Pullfrog review:

  • Tightened legacy table anchoring to require a unique label match and give new bare-table anchors a distinct selector.
  • Restored zoomed pins by checking the visible copy rather than the hidden source; verified a saved center stroke after closing, reopening, and reloading.
  • Added midpoint hit testing and a retry message for Marker saves that cannot map a zoomed target back to its source.
  • Kept glossary columns readable with a screen-only minimum width when the comment rail is open. All seven wide-table tests passed.

pnpm typecheck reproduced CI’s TS2367. The focused zoom, portrait, and Markdown run passed 22 of 23 tests; the top-edge stroke still times out, so the existing edge-stroke thread remains open.

Pullfrog  | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using gpt-6.2-sol(high) | 𝕏

Comment thread app/composables/useViewerAnnotations.ts Resolved

@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, and no P0 or P1 findings remain.

Reviewed changes in 8b2873c since the previous Pullfrog review:

  • Fixed edge-stroke hit testing by recognizing the enlarged thumbnail when it is itself the zoom content. The Chromium regression test now saves a stroke two pixels inside the top edge and finds its pin after the zoom closes and reopens.
  • Routed mark-retry to the annotation handler so a failed save re-enables Done without leaving Marker mode or resetting the stroke count.

pnpm typecheck and all 55 focused tests passed, including the Chromium and Firefox zoom tests.

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

@vite-hub
vite-hub Bot merged commit 663424b into main Nov 24, 2026
6 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