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: keep catalog ingest action visible on phones (#10696)

Adam Eivy4af2bae94451
diff --git a/client/src/pages/CatalogIngest.jsx b/client/src/pages/CatalogIngest.jsx
index 5a05c5b191..e76a9a2ebe 100644
--- a/client/src/pages/CatalogIngest.jsx
+++ b/client/src/pages/CatalogIngest.jsx
@@ -771,10 +771,17 @@ export default function CatalogIngest() {
className="w-full px-3 py-2 bg-port-bg border border-port-border rounded text-white text-sm focus:outline-none focus:border-port-accent" />
</div>
<div>
- <label htmlFor="ingest-text" className="block text-sm font-medium mb-1 text-white">{babble ? 'Babble freely — no need to organize or judge yet' : 'Raw text'}</label>
- <textarea id="ingest-text" maxLength={babble ? 30000 : undefined} rows={12} value={rawText} onChange={(e) => setRawText(e.target.value)}
+ <div className="flex flex-wrap items-center justify-between gap-2 mb-2">
+ <label htmlFor="ingest-text" className="block text-sm font-medium text-white">{babble ? 'Babble freely — no need to organize or judge yet' : 'Raw text'}</label>
+ <button type="submit" disabled={submitting || !rawText.trim() || (babble && (picker.loading || !picker.selectedProviderId || !picker.selectedModel))}
+ className="inline-flex items-center gap-2 px-4 py-2 rounded-lg bg-port-accent hover:bg-port-accent/90 disabled:opacity-50 disabled:cursor-not-allowed text-white text-sm font-medium">
+ {submitting ? <Loader2 className="w-4 h-4 animate-spin" /> : <Sparkles className="w-4 h-4" />}
+ {submitting ? 'Working…' : babble ? 'Prune into suggestions' : 'Ingest'}
+ </button>
+ </div>
+ <textarea id="ingest-text" maxLength={babble ? 30000 : undefined} rows={6} value={rawText} onChange={(e) => setRawText(e.target.value)}
placeholder="Paste prose, scene notes, character sketches — anything you want catalogued."
- className="w-full px-3 py-2 bg-port-bg border border-port-border rounded text-white text-sm font-mono focus:outline-none focus:border-port-accent" />
+ className="w-full min-h-36 max-h-[55vh] sm:max-h-[70vh] resize-y overflow-y-auto px-3 py-2 bg-port-bg border border-port-border rounded text-white text-sm font-mono focus:outline-none focus:border-port-accent" />
<p className="text-xs text-gray-500 mt-1">{formatCount(rawText.length)}{babble ? ' / 30,000 chars' : ' chars'}</p>
</div>
{babble && <>
@@ -785,13 +792,6 @@ export default function CatalogIngest() {
onModelChange={(model) => { picker.setSelectedModel(model); setEffort(''); }}
effort={effort} onEffortChange={setEffort} loading={picker.loading} />
</>}
- <div className="flex items-center justify-end">
- <button type="submit" disabled={submitting || !rawText.trim() || (babble && (picker.loading || !picker.selectedProviderId || !picker.selectedModel))}
- className="inline-flex items-center gap-2 px-4 py-2 rounded-lg bg-port-accent hover:bg-port-accent/90 disabled:opacity-50 disabled:cursor-not-allowed text-white text-sm font-medium">
- {submitting ? <Loader2 className="w-4 h-4 animate-spin" /> : <Sparkles className="w-4 h-4" />}
- {submitting ? 'Working…' : babble ? 'Prune into suggestions' : 'Ingest'}
- </button>
- </div>
</form>
)}
</>
diff --git a/client/src/pages/CatalogIngest.test.jsx b/client/src/pages/CatalogIngest.test.jsx
index e9567e5442..94047537c7 100644
--- a/client/src/pages/CatalogIngest.test.jsx
+++ b/client/src/pages/CatalogIngest.test.jsx
@@ -1,5 +1,5 @@
import { it, expect, vi } from 'vitest';
-import { render, screen, fireEvent, waitFor } from '@testing-library/react';
+import { render, screen, fireEvent, waitFor, act } from '@testing-library/react';
import { MemoryRouter } from 'react-router';
import CatalogIngest from './CatalogIngest';
import { createCatalogScrap, extractFromCatalogScrap, pruneCatalogScrap, commitCatalogScrapDraft, ingestCatalogBrain } from '../services/apiCatalog';
@@ -61,6 +61,19 @@ it('carries the Brain-selected provider and model into a creative inbox handoff'
));
});
+it('keeps the paste action beside a compact, scrollable raw-text editor', async () => {
+ render(<MemoryRouter initialEntries={['/catalog/ingest']}><CatalogIngest /></MemoryRouter>);
+ await act(async () => {});
+
+ const textarea = screen.getByLabelText(/Raw text/);
+ const submit = screen.getByRole('button', { name: 'Ingest' });
+ expect(textarea).toHaveAttribute('rows', '6');
+ expect(textarea.className).toContain('overflow-y-auto');
+ expect(submit.closest('div').parentElement).toContainElement(submit);
+ expect(screen.getAllByRole('button', { name: 'Ingest' })).toHaveLength(1);
+ expect(submit).toBeDisabled();
+});
+
// Regression (#7615): the brain-bridge handoff runs from the mount effect, so
// reading the universe list out of component STATE there captures the
// pre-load empty array and the capture-source Reality default never resolves —