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
feat: add keyword search to Brain Links tab
Adam Eivya92c2bdcfaa8
diff --git a/.changelog/NEXT.md b/.changelog/NEXT.mdindex a728474504..0f6e6a1cbe 100644--- a/.changelog/NEXT.md+++ b/.changelog/NEXT.md@@ -8,6 +8,7 @@ TBD## Added+- **Brain → Links search**: a keyword search box on the Links tab filters the saved links list in real time across title, URL, description, and tags (case-insensitive). It composes with the existing GitHub/Other category tabs, includes a clear (×) affordance, and shows a distinct "no links match" empty state separate from the "no links saved yet" state. Filtering is client-side over the already-loaded list, so there are no extra round-trips and no server changes.- **Unified Story Builder** (`/story-builder`): a new guided page that walks a story from idea → universe aesthetic → plot arc → reader map → characters → issues → production as one linear flow. Each step is LLM-assisted with an AI-refinement affordance and ends with an explicit lock before the next unlocks; going back to revise an earlier step soft-flags the downstream locked steps as "stale" (integrity gate) so nothing silently drifts — without destroying their content. The builder is a thin conductor over the existing Universe / Series / Issue records (no data duplication); heavy per-issue production hands off to the existing Pipeline issue page. Reachable from the sidebar (Create → Story Builder), ⌘K, and voice. The intro screen supports two intake modes: **start from a seed idea**, or **import a finished work** (comic script / screenplay / novel / short story) — the importer reverse-engineers it into a universe, arc, characters, and issues, then drops you into the wizard to review and lock each stage. An **AI provider/model picker** at the top of the builder (and the import tab) drives every operation — idea expand, aesthetic, arc, reader map, character refine, and the import analysis — persisted on the session so one selection applies throughout. The **characters step generates a styled preview image per character** (world style fused with the character descriptor, via the same render path as the Universe Builder) and shows it alongside each character so you can eyeball that the world and character styles read correctly together.- **Base style image (style probe)** on a universe: generate a canonical image from the universe's embrace/avoid influences as the positive/negative prompt, with no character or subject — to preview the world's base visual emphasis. `styleNotes` is intentionally NOT mixed into the probe prompt because it never reaches the image model on any downstream prompt (canon refs, variations, sheets, comic pages) — including it would misrepresent what those renders will look like. Triggerable from both the Universe Builder (under the style/influences editor) and the Story Builder's Universe Aesthetic step; the result persists on the universe (`styleImageRefs`) so both surfaces share it. Includes a "Regenerate" affordance to re-roll the probe once an image already exists (new filenames append to `styleImageRefs[]` so prior renders survive as walk-back fallbacks).- **Reader Map** on a series arc (`series.arc.readerMap`): a distinct audience-experience roadmap — hooks, payoffs, emotional beats, and cliffhangers across the arc — built on top of the Vonnegut story shape, separate from the protagonist arc. Generated and refined via the new Story Builder reader-map step (also preserved by arc regeneration).diff --git a/client/src/components/brain/tabs/LinksTab.jsx b/client/src/components/brain/tabs/LinksTab.jsxindex 75ee81e150..cf125c59b5 100644--- a/client/src/components/brain/tabs/LinksTab.jsx+++ b/client/src/components/brain/tabs/LinksTab.jsx@@ -15,7 +15,8 @@ import {AlertCircle,FolderOpen,Tag,- ShieldCheck+ ShieldCheck,+ Search} from 'lucide-react';import BrailleSpinner from '../../BrailleSpinner';import toast from '../../ui/Toast';@@ -46,6 +47,7 @@ export default function LinksTab({ onRefresh }) {const [total, setTotal] = useState(0);const [loading, setLoading] = useState(true);const [filter, setFilter] = useState('all'); // all, github, other+ const [search, setSearch] = useState('');const [editingId, setEditingId] = useState(null);const [editForm, setEditForm] = useState({});const [confirmingDeleteId, setConfirmingDeleteId] = useState(null);@@ -74,6 +76,20 @@ export default function LinksTab({ onRefresh }) {const hasInFlightClone = links.some(l => l.cloneStatus === 'cloning' || l.cloneStatus === 'pending');useAutoRefetch(fetchLinks, 3000, { enabled: hasInFlightClone, pollOnly: true });+ // Client-side keyword search across title, url, description, and tags.+ const query = search.trim().toLowerCase();+ const visibleLinks = query+ ? links.filter(link => {+ const haystack = [+ link.title,+ link.url,+ link.description,+ ...(link.tags || [])+ ].filter(Boolean).join(' ').toLowerCase();+ return haystack.includes(query);+ })+ : links;+const handleSubmit = async (e) => {e.preventDefault();if (!inputUrl.trim() || sending) return;@@ -270,9 +286,30 @@ export default function LinksTab({ onRefresh }) {})}</div>+ {/* Search */}+ <div className="relative mb-4">+ <Search size={16} className="absolute left-3 top-1/2 -translate-y-1/2 text-gray-500 pointer-events-none" />+ <input+ type="text"+ value={search}+ onChange={(e) => setSearch(e.target.value)}+ placeholder="Search links by title, URL, description, or tag..."+ className="w-full pl-9 pr-9 py-2 bg-port-card border border-port-border rounded-lg text-white text-sm placeholder-gray-500 focus:outline-hidden focus:border-port-accent"+ />+ {search && (+ <button+ onClick={() => setSearch('')}+ className="absolute right-2 top-1/2 -translate-y-1/2 p-1 text-gray-500 hover:text-white transition-colors"+ title="Clear search"+ >+ <X size={14} />+ </button>+ )}+ </div>+{/* Links list */}<div className="space-y-3">- {links.map(link => (+ {visibleLinks.map(link => (<divkey={link.id}className="p-4 bg-port-card border border-port-border rounded-lg"@@ -523,6 +560,19 @@ export default function LinksTab({ onRefresh }) {</div>))}+ {visibleLinks.length === 0 && query && (+ <div className="text-center py-12 text-gray-500">+ <Search className="w-12 h-12 mx-auto mb-3 opacity-30" />+ <p>No links match "{search.trim()}".</p>+ <button+ onClick={() => setSearch('')}+ className="text-sm mt-1 text-port-accent hover:underline"+ >+ Clear search+ </button>+ </div>+ )}+{links.length === 0 && (<div className="text-center py-12 text-gray-500"><Link2 className="w-12 h-12 mx-auto mb-3 opacity-30" />