Skip to content

feat(plugin): desktop attachments band and staged pane - #1062

Merged
Zach Dunn (zachdunn) merged 4 commits into
mainfrom
feat/plugin-desktop-attachments
Oct 3, 2026
Merged

Zach Dunn (zachdunn) merged 4 commits into
mainfrom
feat/plugin-desktop-attachments

Conversation

@zachdunn

Copy link
Copy Markdown
Member

What changed

Ports the desktop design prototyped for the staged media mod into plugins/claude/uploads. The gh pr create handler (head lookup, auto-attach and binding handling, uploads attach --promote, toasts, model context, the attached record, the autoPromote option) keeps its behavior; only the wording changed.

All surfaces: the count noun is "attachments", the branch name is gone from the band, and the normal linked case has no suffix.

Terminal (and other non-desktop surfaces): same band as before (Image mark, expandable rows) with the new copy. The other binding line is drawn in the warn color.

Desktop:

  • Band: Svg mark, bold "uploads", headline, then up to 4 thumbnails (25px tall, a before/after pair is one tile, non-images are a file card), "+N", a plain dim View button, and a dismiss Button (role="dismiss", "Hide"). Hide lasts until the staged set changes.
  • Pane uploads-staged ("Staged attachments"), opened by View or the new /uploads-staged command. The grid has the headline, repo · branch, Copy markdown, and, when the branch has an open PR, a primary Copy PR feed link (runs uploads feed create --repo R --pr N, copies the first stdout line, toasts, shows the link). Tiles show Before/After chips, a caption with the middle-ellipsized name and relative staged time, and a footnote.
  • Detail view in the same pane: "← All attachments", Copy markdown, Remove (uploads delete <key> per file, refresh, back to the grid), large images with role labels and an "Open on uploads.sh" link. A file that can't be previewed shows a file card, " can't be previewed here." and the link.
  • Thumbnails are JPEG data URIs fetched with curl | base64 from the storage.uploads.sh image transform (Svg can't load remote URLs), cached in state; failures are cached as "" and draw as a file card. On non-desktop surfaces the pane has no images.

Copy

Case Band / pane headline
binding self or unknown N attachments waiting for a PR
binding none N attachments waiting for a PR · link the repo to auto-attach
binding other (warn color) N attachments won't attach: repo linked to another workspace
after a CLI promote N attachments added to PR #12
after the GitHub App promoted N attachments sent to PR #12 via the uploads-sh bot

Toasts and model context use the same noun ("added 2 attachments to PR #12", and so on).

Tried and dropped

  • Thumbnail hover overlays and a ⤢ icon: broke the tile layout.
  • isInteractive on Svg: also broke layout.
  • A second preview pane: the detail view lives in the same pane instead.

Other notes

  • FileRef gains key, src and stagedAt; Staged.rows is no longer cut to 8 (the terminal band still lists at most 8). New state under the uploads plugin key (thumbs, large, preview, openPr, feedUrl, dismissed) is declared in types/index.d.ts. Older persisted state without the new fields is guarded the same way rows was.
  • Version: per docs/releasing.md the plugin version is owned by changeset version, so this adds an @uploads/plugin minor changeset instead of hand-editing plugin.json and marketplace.json. The version PR will take 0.3.0 to 0.4.0.
  • README: lists /uploads-staged, and the data and network section covers the new commands the pane runs (uploads delete, uploads feed create, gh pr view, curl).
  • Per the releasing doc, the directory may hold this version for review because the mod runs hooks/register.tsx.

Tests

  • claude plugin test plugins/claude/uploads: 36 pass, 0 fail (headline per binding on terminal and desktop, dismiss and re-show on a set change, View opens the pane, grid vs detail, remove, feed link, desktop vs terminal, file-card fallback).
  • claude plugin validate --strict plugins/claude/uploads: passes.
  • tsc against the engine typings (strict, same compiler options as the dev-mod scaffold): clean.
  • pnpm plugin-version:check and oxfmt --check: clean.

@changeset-bot

changeset-bot Bot commented Oct 3, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: c91a638

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@uploads/plugin Minor

Not sure what this means? Click here to learn what changesets are.

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

@coderabbitai

coderabbitai Bot commented Oct 3, 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: Advanced
  • Run ID: 07089a7b-0605-4ca1-81d3-bd463056a561

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
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

@uploads-sh

uploads-sh Bot commented Oct 3, 2026

Copy link
Copy Markdown

desktop-band-and-pane.webp

desktop-pane-detail.webp

Maintained by uploads.sh · add media: uploads put <file> --pr 1062 · docs

@zachdunn
Zach Dunn (zachdunn) merged commit 69a235b into main Oct 3, 2026
3 checks passed
@zachdunn
Zach Dunn (zachdunn) deleted the feat/plugin-desktop-attachments branch October 3, 2026 23: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