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
address review (claude): exclude untitled universes from the attach dropdown
[._.]/ Adam Eivy006296b30be6
diff --git a/client/src/pages/StartStory.jsx b/client/src/pages/StartStory.jsxindex 241c46acdd..8c2ea1642d 100644--- a/client/src/pages/StartStory.jsx+++ b/client/src/pages/StartStory.jsx@@ -44,6 +44,12 @@ export default function StartStory() {const [useExisting, setUseExisting] = useState(false);const [universeId, setUniverseId] = useState('');+ // Only named universes can be an attach target: the Importer matches universes+ // by name (not id), so forwarding an untitled one would silently start fresh;+ // and an "(untitled universe)" option is indistinguishable from any other in+ // the dropdown anyway. Name the universe first, then attach.+ const namedUniverses = universes.filter((u) => (u.name || '').trim());+useEffect(() => {let cancelled = false;// silent: the custom catch below owns the toast (CLAUDE.md). A failed load@@ -106,7 +112,7 @@ export default function StartStory() {checked={useExisting}onChange={() => setUseExisting(true)}className="accent-port-accent"- disabled={universes.length === 0}+ disabled={namedUniverses.length === 0}/>Use an existing universe</label>@@ -119,8 +125,8 @@ export default function StartStory() {className="bg-port-bg border border-port-border rounded px-3 py-1.5 text-sm text-gray-200 sm:ml-auto"><option value="">Select a universe…</option>- {universes.map((u) => (- <option key={u.id} value={u.id}>{u.name || '(untitled universe)'}</option>+ {namedUniverses.map((u) => (+ <option key={u.id} value={u.id}>{u.name}</option>))}</select>)}diff --git a/client/src/pages/StartStory.test.jsx b/client/src/pages/StartStory.test.jsxindex 932bc2e5f4..90301e5f1f 100644--- a/client/src/pages/StartStory.test.jsx+++ b/client/src/pages/StartStory.test.jsx@@ -77,6 +77,24 @@ describe('StartStory onramp', () => {expect(screen.getByText(/Pick a universe above/)).toBeTruthy();});+ it('excludes untitled universes from the attach dropdown', async () => {+ // The Importer matches universes by name, so an untitled one can't be an+ // attach target — it must not appear as a selectable option.+ listUniverses.mockResolvedValueOnce([+ { id: 'u1', name: 'Alpha' },+ { id: 'u2', name: '' },+ { id: 'u3', name: ' ' },+ ]);+ render(<StartStory />);+ await screen.findByText('From an idea');+ fireEvent.click(screen.getByLabelText('Use an existing universe'));+ const select = await screen.findByLabelText('Existing universe');+ // Only the placeholder + the one named universe.+ const options = select.querySelectorAll('option');+ expect(options.length).toBe(2);+ expect(options[1].value).toBe('u1');+ });+it('surfaces a toast when the universe list fails to load', async () => {listUniverses.mockRejectedValueOnce(new Error('boom'));render(<StartStory />);