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

fix(media): render collection covers through MediaImage so a missing asset degrades gracefully

[._.]/ Adam Eivy3c121255b1ce
diff --git a/.changelog/NEXT.md b/.changelog/NEXT.md
index 6edcf71e24..1e239a2718 100644
--- a/.changelog/NEXT.md
+++ b/.changelog/NEXT.md
@@ -1,5 +1,14 @@
# Unreleased Changes
+## Creative Director
+
+- **A project whose stored record lost its id no longer shows up as an unusable card.** Each project is one database row: the id is a column, and the whole record is duplicated into a JSON blob beside it. Reads handed back the blob untouched, so a row whose blob was written without an id — the column still had one — reached the page as a project with no identity. Its card opened `/creative-director/undefined/overview`, and Start, Pause and Delete all acted on `undefined`. Reads now fill the id in from the column, which is the value every lookup already matches on, and the record repairs itself on its next save.
+
+## Media Gen
+
+- **The favourite star on an image or video card is now reachable by keyboard.** The star sat inside the card's own click-to-preview button. A button nested in another button is invalid HTML with no defined behaviour, and here it left the star unreachable by keyboard and out of the tab order. The star and the badges are now siblings of the preview target rather than children of it, so the star is focusable and clicking it still favourites without also opening the preview. Three more controls with the same defect were fixed alongside it: the Plan/Execute/Verify button on a GSD phase row, the Dashboard link on a Chief-of-Staff GSD project card, and the tag filters on a SongBook entry — each was mouse-only, and each needed a click-suppressing workaround that is no longer necessary.
+- **A collection whose cover image is missing now shows the syncing placeholder instead of a broken image.** Collection covers were plain `<img>` tags, so a cover pointing at a pruned video thumbnail — or at a federated collection whose files haven't been pulled yet — left the browser's broken-image icon on the card. Covers now use the same component as the rest of the media UI: they fall back to a "Syncing" tile and swap in the real image the moment the file arrives from a peer.
+
## Image Gen
- **Agy and Grok can no longer hand back a picture they drew themselves.** When Antigravity's `generate_image` backend hit its quota (HTTP 429 "you have exhausted your capacity on this model"), agy did not fail the render — it took the instruction "save a PNG at this path" literally and wrote a script that drew a stand-in with a plotting library instead. The result was a real PNG, so it passed the signature check and landed in the gallery looking like a generated image: flat vector shapes, placeholder circles, overlapping labels, and the prompt's own pixel dimensions captioned into the artwork. Both cloud CLIs are now told that only the image tool may produce the image and that reporting a failure is the correct outcome when it can't; a scratch-directory check discards any render whose agent left a drawing script behind. The agy prompt also stopped naming exact pixel dimensions — `generate_image` only exposes an aspect ratio, so that was an instruction it could never satisfy, which is precisely what made reaching for code look reasonable.
@@ -29,6 +38,7 @@
## POST
+- **The session launcher can show which AI provider a run will use again.** The launcher read the provider list as if the server returned a bare array, but it returns an object wrapping one. The mismatch threw on every mount, was swallowed into a console warning, and left the list permanently empty — so the Wit &amp; Memory panel never showed the provider a drill was about to use unless one had been pinned explicitly.
- **[issue-3253] Powers practice now teaches a fast mental path before raising the difficulty.** New sessions begin with recall-friendly powers of two, unlock named techniques through speed-and-accuracy mastery, never generate a pair without a documented method, and show the worked steps after a miss and in session review. Manual base and exponent controls remain available when Progressive is switched off.
- **[issue-3254] Memory drills can now join Full and Quick POST sessions.** Memory remains off in Session Composition by default, but users with an enabled memorized item can opt in to interleave recall work with their daily session; empty or fully-disabled item pools are explained and never produce a broken mid-session drill.
- **[issue-3252] A new Practice Plan page decides what you're actually studying.** POST had grown to roughly thirty drill types across six subjects plus three standalone study surfaces, with no single place to say which of them you want. Practice Plan (`/post/plan`, also reachable from ⌘K and by voice) lists every topic with a switch, expandable to its individual drills, and shows a live "your daily POST will include…" summary that updates as you flip switches — so you can see what tomorrow's session becomes before you run it. Drill Config still owns how hard each drill is; Practice Plan owns what's in the rotation.
diff --git a/client/src/pages/MediaCollections.jsx b/client/src/pages/MediaCollections.jsx
index 3badd46dba..88c0476f03 100644
--- a/client/src/pages/MediaCollections.jsx
+++ b/client/src/pages/MediaCollections.jsx
@@ -7,6 +7,7 @@ import {
listVideoHistory, listImageGallery,
} from '../services/api';
import { buildUnsortedCollection } from '../lib/unsorted';
+import MediaImage from '../components/MediaImage';
import SyncBadge from '../components/sync/SyncBadge';
import { useSyncIntegrity, syncBadgeStatus } from '../hooks/useSyncIntegrity';
@@ -158,7 +159,10 @@ export default function MediaCollections() {
className="block aspect-square bg-port-bg relative"
>
{c.cover ? (
- <img src={c.cover} alt={c.name} className="w-full h-full object-cover" loading="lazy" />
+ // A cover can point at a pruned video thumbnail or an unpulled
+ // peer asset; MediaImage degrades to the syncing tile instead
+ // of the browser's broken-image icon.
+ <MediaImage src={c.cover} alt={c.name} className="w-full h-full object-cover" loading="lazy" />
) : (
<div className="w-full h-full flex items-center justify-center text-gray-600">
{c.synthetic ? <Inbox className="w-12 h-12" /> : <FolderOpen className="w-12 h-12" />}