Skip to content

Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS

feat(media): organize-to-collection from inside a collection + wrap long names

Adam Eivy06caa0902379
diff --git a/.changelog/NEXT.md b/.changelog/NEXT.md
index 9856fc07d5..fe443dfbd0 100644
--- a/.changelog/NEXT.md
+++ b/.changelog/NEXT.md
@@ -22,7 +22,7 @@
## Changed
-- **Organize from the lightbox.** `MediaLightbox` footer now hosts an Add-to-collection (folder+) button alongside Download — pick a collection (or create one) without closing the larger preview. `AddToCollectionMenu` gained a `size` prop (`sm` default for the card action row, `md` for the lightbox footer) so both surfaces share one component without duplicate styling. `browser/data/` is now gitignored (CDP profile cache shouldn't be tracked).
+- **Organize from the lightbox + from inside a collection.** `MediaLightbox` footer now hosts an Add-to-collection (folder+) button alongside Download — pick a collection (or create one) without closing the larger preview. `MediaCollectionDetail` cards no longer suppress the same menu, so you can move/copy an item between collections from inside any collection view. `AddToCollectionMenu` gained a `size` prop (`sm` default for the card action row, `md` for the lightbox footer) so both surfaces share one component without duplicate styling, and long collection names in the picker now wrap instead of getting clipped with ellipsis. `browser/data/` is now gitignored (CDP profile cache shouldn't be tracked).
- **World Builder batch render reuses one collection per world.** Auto-generated collection names drop the ` — YYYY-MM-DD HH:MM` suffix: a batch render of "Echoes of the Choir" now files into `World: Echoes of the Choir` every time instead of minting a fresh date-stamped bucket. A user-supplied `collectionName` also flows through find-or-create (case-insensitive trimmed match), so repeat renders into a custom name append into the same collection. Backed by a new `findOrCreateCollectionByName()` helper in `server/services/mediaCollections.js`. One-shot migration at `data/migrations/001-merge-worldbuilder-collections.js` collapses legacy date-suffixed `World: <name> — <date>` collections into their base name (dedupes items by `kind:ref`, preserves the earliest `createdAt`, rewrites `world-builder.json` `runs[].collectionId` references). Run via `npm run migrations`; idempotent.
- **Clean → Light / Aggressive available beyond Image Gen.** The Eraser pill that strips render artifacts now appears in any image lightbox: Media History and Media Collection Detail both wire `onClean` into `MediaLightbox`. Cleaning from inside a collection automatically adds the cleaned file to that collection alongside the original, so the user can compare side-by-side before deciding which to keep. (Image Gen behaviour unchanged; Video Gen's lightbox only renders videos so it intentionally doesn't expose Clean.)
diff --git a/client/src/components/media/AddToCollectionMenu.jsx b/client/src/components/media/AddToCollectionMenu.jsx
index 9023584d20..d1a77cd96f 100644
--- a/client/src/components/media/AddToCollectionMenu.jsx
+++ b/client/src/components/media/AddToCollectionMenu.jsx
@@ -246,7 +246,7 @@ export default function AddToCollectionMenu({ item, size = 'sm' }) {
role="menuitemcheckbox"
aria-checked={inIt}
>
- <span className="truncate">{c.name}</span>
+ <span className="break-words min-w-0 flex-1">{c.name}</span>
{inIt && <Check className="w-3.5 h-3.5 text-port-success shrink-0" />}
</button>
);
diff --git a/client/src/pages/MediaCollectionDetail.jsx b/client/src/pages/MediaCollectionDetail.jsx
index 7990fa34f9..aa50eeb055 100644
--- a/client/src/pages/MediaCollectionDetail.jsx
+++ b/client/src/pages/MediaCollectionDetail.jsx
@@ -205,7 +205,6 @@ export default function MediaCollectionDetail() {
onSendToVideo={item.kind === 'image' ? handleSendToVideo : undefined}
onContinue={item.kind === 'video' ? handleContinue : undefined}
onDelete={handleRemove}
- showCollectionMenu={false}
starred={!!annotations[key]?.starred}
hasNote={!!annotations[key]?.note}
onToggleStar={toggleStar}