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
JavaScript ai-agentsdashboarddeveloper-toolsdigital-twinquantified-selfsecond-brainself-hostedtailscale
fix: count mood-board cells without a menu export
Adam Eivyc134d1a1d71f
diff --git a/client/src/components/media/MediaCard.jsx b/client/src/components/media/MediaCard.jsxindex d5a166f7cc..d870f1a88e 100644--- a/client/src/components/media/MediaCard.jsx+++ b/client/src/components/media/MediaCard.jsx@@ -2,7 +2,7 @@ import { memo, useState } from 'react';import { Trash2, Download, Film, Image as ImageIcon, Sparkles, Eye, EyeOff, Maximize2, Wand2, Star, MessageSquare, Pencil, Box, Timer } from 'lucide-react';import MediaImage from '../MediaImage';import AddToCollectionMenu from './AddToCollectionMenu';-import PinToMoodBoardMenu, { canPinToMoodBoard } from './PinToMoodBoardMenu';+import PinToMoodBoardMenu from './PinToMoodBoardMenu';import InlineConfirmRow from '../ui/InlineConfirmRow';import { loraDisplayName } from './normalize';import { formatDurationMs } from '../../utils/formatters';@@ -21,6 +21,15 @@ const TONE = {danger: 'bg-port-error/20 hover:bg-port-error/40 text-port-error',};+// Mirrors PinToMoodBoardMenu's render gate (valid image/video key, or an+// http(s)/app-path thumbnail). Kept here so a test mock of that menu does+// not have to re-export the predicate. A hidden trigger must not reserve a+// file-row cell.+function moodBoardTriggerVisible(item) {+ if (/^(image|video):[^:]+$/.test(item?.key || '')) return true;+ return typeof item?.previewUrl === 'string' && /^(https?:\/\/|\/(?!\/))/.test(item.previewUrl);+}+// Five file actions fit one row once the card interior is ~176px (the five-up// recent-renders column). Narrower — two-up on a phone — keeps three columns// so a cell stays near 40px instead of shrinking to ~20px. A hard 44px@@ -127,7 +136,7 @@ function MediaCard({},].filter(Boolean);const fileActionCount = (showCollectionMenu ? 1 : 0)- + (showMoodBoardMenu && canPinToMoodBoard(item) ? 1 : 0)+ + (showMoodBoardMenu && moodBoardTriggerVisible(item) ? 1 : 0)+ 1+ (onToggleHidden ? 1 : 0)+ (onDelete ? 1 : 0);diff --git a/client/src/components/media/PinToMoodBoardMenu.jsx b/client/src/components/media/PinToMoodBoardMenu.jsxindex 4221ea0852..6f4f047ea6 100644--- a/client/src/components/media/PinToMoodBoardMenu.jsx+++ b/client/src/components/media/PinToMoodBoardMenu.jsx@@ -42,13 +42,6 @@ const SIZES = {// rejects anything else, so we must not send a non-media key as `mediaKey`.const isValidMediaKey = (key) => /^(image|video):[^:]+$/.test(key || '');-// Same gate the trigger uses before it renders. MediaCard counts cells from-// this so a hidden trigger doesn't leave an empty file-row column.-export function canPinToMoodBoard(item) {- if (isValidMediaKey(item?.key)) return true;- return typeof item?.previewUrl === 'string' && /^(https?:\/\/|\/(?!\/))/.test(item.previewUrl);-}-// Row search for the board list. The shell's default (#3312) is the media-// COLLECTION view, whose bucket ordering sinks auto-generated empties — that// classification reads collection provenance a board record simply doesn't