Repository navigation
feat(plugin): desktop attachments band and staged pane - #1062
Conversation
🦋 Changeset detectedLatest commit: c91a638 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
|
Important Review skippedAuto reviews are limited based on label configuration. 🏷️ Required labels (at least one) (2)
🚫 Excluded labels (none allowed) (1)
Please check the settings in the CodeRabbit UI or the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
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. Comment |
|
Maintained by uploads.sh · add media: |


What changed
Ports the desktop design prototyped for the staged media mod into
plugins/claude/uploads. Thegh pr createhandler (head lookup, auto-attach and binding handling,uploads attach --promote, toasts, model context, theattachedrecord, theautoPromoteoption) 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
otherbinding line is drawn in the warn color.Desktop:
role="dismiss", "Hide"). Hide lasts until the staged set changes.uploads-staged("Staged attachments"), opened by View or the new/uploads-stagedcommand. The grid has the headline,repo · branch, Copy markdown, and, when the branch has an open PR, a primary Copy PR feed link (runsuploads 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.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.curl | base64from 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
selforunknownnoneother(warn color)Toasts and model context use the same noun ("added 2 attachments to PR #12", and so on).
Tried and dropped
isInteractiveon Svg: also broke layout.Other notes
FileRefgainskey,srcandstagedAt;Staged.rowsis no longer cut to 8 (the terminal band still lists at most 8). New state under theuploadsplugin key (thumbs,large,preview,openPr,feedUrl,dismissed) is declared intypes/index.d.ts. Older persisted state without the new fields is guarded the same wayrowswas.docs/releasing.mdthe plugin version is owned bychangeset version, so this adds an@uploads/pluginminor changeset instead of hand-editingplugin.jsonandmarketplace.json. The version PR will take 0.3.0 to 0.4.0./uploads-staged, and the data and network section covers the new commands the pane runs (uploads delete,uploads feed create,gh pr view,curl).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.tscagainst the engine typings (strict, same compiler options as the dev-mod scaffold): clean.pnpm plugin-version:checkandoxfmt --check: clean.