Skip to content

feat(web): galleries grid view with cover thumbnails - #719

Merged
Zach Dunn (zachdunn) merged 2 commits into
mainfrom
claude/galleries-view-ui-refinements-e815db
Aug 20, 2026
Merged

feat(web): galleries grid view with cover thumbnails#719
Zach Dunn (zachdunn) merged 2 commits into
mainfrom
claude/galleries-view-ui-refinements-e815db

Conversation

@zachdunn

Copy link
Copy Markdown
Member

What

Refines the workspace Galleries tab so a gallery's contents are scannable at a glance instead of a text-only table.

  • Grid view (default) + cover thumbnails, with a Grid/List toggle that persists via ?view= and localStorage (workspace-galleries-view.ts, sibling of the files tab's workspace-files-view.ts). The old table is still available in List view, unchanged.
  • Covers reuse the existing media-load.ts (bindMediaFallbacks) wiring — a cover whose bytes 404 degrades to a glyph tile, including the already-failed/cached case a plain error listener misses. Empty galleries and non-image covers show the same glyph.
  • API: the enriched galleries list (GET /v1/workspaces/:ws/galleries) gains an additive previewUrl per gallery — the cover resolved from cover_item_id, else the first item, built purely from the object key (no extra R2 reads), still images only. Two batch helpers (firstItemKeyForGalleries, itemKeysByIds) avoid an N+1. The cheaper bearer gallerySummary projection is untouched, and GalleryListSummaryDto stays a strict additive superset.
  • Byline trimmed: Ordered sets of media behind one public link, linkable to a pull request or issue.Ordered sets of media behind one public link.
  • "Working with galleries" CLI help moved out of the inline details block into a new /docs/galleries page, linked from the rail tip; wired into the docs nav, sitemap, llms.txt/llms-full.txt, docs hub, and prev/next nav.
  • Quick Actions hidden on this tab (showQuickActions={false}), matching the screenshots tab.

Why

The text table made it hard to tell galleries apart. A cover thumbnail per gallery is the fastest way to answer "what's in this one," which is what the grid gives.

Notes on scope / altitude

  • previewUrl deliberately skips video-poster resolution on the list path (glyph tile for video covers) to keep it head-free; adding posters later is strictly additive (nullable field, client already degrades).
  • workspace-galleries-view.ts is kept as a sibling of workspace-files-view.ts rather than folding both into a shared factory — flagged in review as a possible future refactor, deferred to avoid churning the shipped files tab + its tests.
  • No changeset: this touches only @uploads/api and @uploads/web, both on the changesets ignore list.

Testing

  • API: routes-workspace-galleries — added previewUrl cases (cover resolution, empty → null, non-image/video cover skipped).
  • Web: workspace-ui grid/toggle/cover-fallback render tests; new workspace-galleries-view resolver suite.
  • Verified end-to-end on the local signed-in stack: grid default, cover thumbnails, Grid/List toggle writing ?view=, list view intact, the media-load glyph fallback flipping data-failed + revealing the glyph on a failed cover, the tip's /docs/galleries link, and Quick Actions removed.
  • oxfmt, oxlint, astro check, changeset:lint all clean.

Refine the workspace galleries tab so gallery contents are scannable at a
glance instead of a text-only table.

- Grid view (default) with a per-gallery cover thumbnail, plus a Grid/List
  toggle that persists via ?view= and localStorage (workspace-galleries-view).
  Covers reuse media-load's bindMediaFallbacks, so a 404'd cover degrades to a
  glyph tile (handles the already-failed/cached case a plain error listener
  misses); empty and non-image-cover galleries show the same glyph.
- API: the enriched galleries list (/v1/workspaces/:ws/galleries) gains an
  additive previewUrl per gallery — the cover resolved from cover_item_id, else
  the first item, built purely from the object key (no extra R2 reads), still
  images only. Two batch helpers (firstItemKeyForGalleries, itemKeysByIds)
  avoid an N+1. The cheaper bearer projection is untouched.
- Trim the byline to "Ordered sets of media behind one public link."
- Move the "Working with galleries" CLI help into a new /docs/galleries page,
  linked from the rail tip; drop the inline details block.
- Hide the rail's quick-actions on this tab.
@changeset-bot

changeset-bot Bot commented Aug 20, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 2858c5d

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@coderabbitai

coderabbitai Bot commented Aug 20, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are limited based on label configuration.

🏷️ Required labels (at least one) (2)
  • coderabbit:review
  • review
🚫 Excluded labels (none allowed) (1)
  • wip

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 66d8a784-7594-4d0a-97a0-c32da0be482a

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Aug 20, 2026

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
uploads-api 2858c5d Commit Preview URL

Branch Preview URL
Aug 20 2026, 07:19 PM

The /me/workspaces/:name/galleries exact-shape assertion in me.test.ts
predates the additive previewUrl field; expect it (null for the no-item
gallery).
@zachdunn
Zach Dunn (zachdunn) merged commit db7620e into main Aug 20, 2026
4 checks passed
@zachdunn
Zach Dunn (zachdunn) deleted the claude/galleries-view-ui-refinements-e815db branch August 20, 2026 19:33
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