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
Move the mood board prompt into the tool rail as a multi-line field
Claude78ee9762c784
diff --git a/client/src/components/moodBoard/MoodBoardGeneratePanel.jsx b/client/src/components/moodBoard/MoodBoardGeneratePanel.jsxindex 06c8a5e7e8..3b535ef075 100644--- a/client/src/components/moodBoard/MoodBoardGeneratePanel.jsx+++ b/client/src/components/moodBoard/MoodBoardGeneratePanel.jsx@@ -146,7 +146,7 @@ export default function MoodBoardGeneratePanel({ board, disabled = false, embeddonChange={(width, height) => setSize({ width, height })} /></div><p className="text-xs text-gray-500">Uses the renderer’s configured image model and settings. Only backends supported by the media queue are offered. Prompt writing survives navigation; if the server restarts, saved prompts remain on the board.</p>- {disabled && <p className="text-xs text-port-warning">Save the board description before generating.</p>}+ {disabled && <p className="text-xs text-port-warning">Save the board prompt before generating.</p>}<div className="flex flex-wrap gap-2"><button type="button" onClick={() => generate()} disabled={!ready}className="min-h-[44px] px-3 py-2 rounded bg-port-accent text-white text-sm disabled:opacity-50">diff --git a/client/src/pages/MoodBoardDetail.jsx b/client/src/pages/MoodBoardDetail.jsxindex 1345687cf5..e951aac806 100644--- a/client/src/pages/MoodBoardDetail.jsx+++ b/client/src/pages/MoodBoardDetail.jsx@@ -237,7 +237,9 @@ function MoodBoardEditor({ id }) {};}, [id, mountedRef]);- const metaDirty = board && (name.trim() !== (board.name || '') || description !== (board.description || ''));+ const nameDirty = Boolean(board) && name.trim() !== (board.name || '');+ const descriptionDirty = Boolean(board) && description !== (board.description || '');+ const metaDirty = nameDirty || descriptionDirty;// The item under analysis (#4188 Phase 3), re-derived from board state so the// modal's stored-analysis view stays fresh after the persist PATCH. The@@ -845,19 +847,7 @@ function MoodBoardEditor({ id }) {{formatCount(items.length)} item{items.length === 1 ? '' : 's'} · {formatCount(analyzedCount)} analyzed</p></div>- <div className="min-w-0 flex-[2_1_20rem]">- <label htmlFor="board-description" className="sr-only">Description</label>- <textarea- id="board-description"- value={description}- maxLength={5000}- rows={1}- placeholder="Add a description…"- onChange={(e) => setDescription(e.target.value)}- className="block w-full h-[34px] focus:h-28 bg-transparent border border-transparent hover:border-port-border focus:border-port-accent focus:bg-port-bg rounded px-2 py-1.5 text-sm text-gray-300 outline-none resize-none transition-[height]"- />- </div>- {metaDirty || savingMeta ? (+ {nameDirty || (savingMeta && !descriptionDirty) ? (<buttontype="button"onClick={handleSaveMeta}@@ -1173,6 +1163,32 @@ function MoodBoardEditor({ id }) {? 'port-opaque-surface fixed inset-x-0 bottom-0 z-50 max-h-[88dvh] overflow-y-auto rounded-t-xl bg-port-card border-t border-port-border shadow-2xl p-3 pb-6 space-y-3': 'hidden'}>+ {/* The board-wide prompt is long prose, so it gets a real multi-line+ field beside the tools rather than a line in the header. */}+ <div className="bg-port-card border border-port-border rounded-md p-3 space-y-2">+ <label htmlFor="board-description" className="block text-xs text-gray-400">Board prompt</label>+ <textarea+ id="board-description"+ value={description}+ maxLength={5000}+ rows={5}+ placeholder="Describe the board’s story, mood and look…"+ onChange={(e) => setDescription(e.target.value)}+ className="block w-full bg-port-bg border border-port-border rounded px-2 py-1.5 text-sm text-white focus:border-port-accent outline-none resize-y"+ />+ {descriptionDirty || (savingMeta && !nameDirty) ? (+ <div className="flex justify-end">+ <button+ type="button"+ onClick={handleSaveMeta}+ disabled={savingMeta}+ className="min-h-[40px] flex items-center justify-center gap-1.5 px-3 py-1.5 text-sm rounded bg-port-accent text-white hover:bg-port-accent/80 disabled:opacity-50 transition-colors"+ >+ <Save className="w-4 h-4" aria-hidden="true" /> Save prompt+ </button>+ </div>+ ) : null}+ </div><div className="flex items-center gap-1"><TabPillsvariant="pills"diff --git a/client/src/pages/MoodBoardDetail.test.jsx b/client/src/pages/MoodBoardDetail.test.jsxindex d51249a6b0..5e5614de4f 100644--- a/client/src/pages/MoodBoardDetail.test.jsx+++ b/client/src/pages/MoodBoardDetail.test.jsx@@ -667,6 +667,26 @@ describe('MoodBoardDetail layout', () => {expect(screen.getByTestId('generate-more-panel')).toBeInTheDocument();});+ it('edits the board prompt as a multi-line field in the tool panel', async () => {+ mockGetMoodBoard.mockResolvedValueOnce({ id: 'a', name: 'Board A', description: 'Old prompt', items: [] });+ mockUpdateMoodBoard.mockResolvedValueOnce({ id: 'a', name: 'Board A', description: 'New prompt\nSecond line', items: [] });+ renderPage();+ await waitFor(() => expect(boardNameValue()).toBe('Board A'));++ const tools = screen.getByRole('complementary', { name: 'Board tools' });+ const field = screen.getByLabelText('Board prompt');+ expect(tools).toContainElement(field);+ expect(field.tagName).toBe('TEXTAREA');+ expect(Number(field.getAttribute('rows'))).toBeGreaterThan(1);+ expect(screen.queryByRole('button', { name: 'Save prompt' })).toBeNull();++ fireEvent.change(field, { target: { value: 'New prompt\nSecond line' } });+ expect(screen.queryByRole('button', { name: 'Save', exact: true })).toBeNull();+ fireEvent.click(screen.getByRole('button', { name: 'Save prompt' }));+ await waitFor(() => expect(mockUpdateMoodBoard).toHaveBeenCalledWith('a', { name: 'Board A', description: 'New prompt\nSecond line' }, { silent: true }));+ await waitFor(() => expect(screen.queryByRole('button', { name: 'Save prompt' })).toBeNull());+ });+it('remembers the last tool used for the next board', async () => {mockGetMoodBoard.mockResolvedValue({ id: 'a', name: 'Board A', items: [] });const { unmount } = renderPage();