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
Keep the vision describe + build-details panels open until each is applied
[._.]/ Adam Eivybfcccc508aa3
diff --git a/client/src/components/universe/VisionDescribeModal.jsx b/client/src/components/universe/VisionDescribeModal.jsxindex fc2792d8cd..ddbc41fe0d 100644--- a/client/src/components/universe/VisionDescribeModal.jsx+++ b/client/src/components/universe/VisionDescribeModal.jsx@@ -135,12 +135,7 @@ export default function VisionDescribeModal({context: context.trim() || undefined,...imagePayload(),}, { silent: true });- if (res?.description) {- setResult(res.description);- // Drop any prior structured proposal so the two result panels don't- // linger side-by-side after switching flows.- setProposed(null);- }+ if (res?.description) setResult(res.description);return res;}, { errorMessage: 'Failed to describe image(s)' });@@ -150,8 +145,8 @@ export default function VisionDescribeModal({context: context.trim() || undefined,...imagePayload(),}, { silent: true });- // Drop any prior prose result so the two panels don't linger side-by-side.- setResult('');+ // Keep any prose description that's already shown — both the description and+ // the structured proposals stay open so the user can apply each in turn.if (res?.locked) {toast.error(`${entryName || 'This character'} is locked — unlock it to fill from an image`);return res;@@ -168,10 +163,16 @@ export default function VisionDescribeModal({return res;}, { errorMessage: 'Failed to build details from image(s)' });+ // Whether the structured-attributes panel still has unsaved proposals.+ const hasPendingAttributes = !!proposed && proposed.updatedFields.length > 0;+const applyDescription = () => {onApply(result.trim());toast.success(`Applied description to ${entryName || `this ${noun}`}`);- onClose();+ // Clear just the description (it's saved); keep the modal open if the+ // structured proposals are still unsaved so the user can apply those too.+ setResult('');+ if (!hasPendingAttributes) onClose();};const toggleField = (f) => {@@ -198,7 +199,12 @@ export default function VisionDescribeModal({}onApplyFields(patch);toast.success(`Applied ${Object.keys(patch).length} detail${Object.keys(patch).length > 1 ? 's' : ''} to ${entryName || `this ${noun}`}`);- onClose();+ // Clear just the proposals (they're saved); keep the modal open if a prose+ // description is still unsaved so the user can apply that too.+ setProposed(null);+ setSelectedFields(new Set());+ setFieldEdits({});+ if (!result.trim()) onClose();};// A vision model must be explicitly selected — otherwise the request sendsdiff --git a/client/src/components/universe/VisionDescribeModal.test.jsx b/client/src/components/universe/VisionDescribeModal.test.jsxindex d80bae897e..a6ed8f7de0 100644--- a/client/src/components/universe/VisionDescribeModal.test.jsx+++ b/client/src/components/universe/VisionDescribeModal.test.jsx@@ -78,4 +78,41 @@ describe('VisionDescribeModal', () => {// Edited value wins; unchecked field is dropped.expect(onApplyFields).toHaveBeenCalledWith({ pronouns: 'she/they' });});++ it('keeps the description and attribute panels both open, closing only after the last is applied', async () => {+ const onApply = vi.fn();+ const onApplyFields = vi.fn();+ const onClose = vi.fn();+ apiMocks.describeEntityFromImages.mockResolvedValue({ description: 'a weathered barbarian', llm: {} });+ apiMocks.expandEntityFromImages.mockResolvedValue({+ fields: { pronouns: 'she/her' }, updatedFields: ['pronouns'], llm: {},+ });+ render(+ <VisionDescribeModal {...baseProps} kind="character"+ onApply={onApply} onApplyFields={onApplyFields} onClose={onClose} />,+ );+ fireEvent.change(document.querySelector('input[type="file"]'), {+ target: { files: [new File(['x'], 'up.png', { type: 'image/png' })] },+ });+ // Describe → prose panel appears.+ const describeBtn = screen.getByRole('button', { name: /Describe from image/i });+ await waitFor(() => expect(describeBtn).not.toBeDisabled());+ fireEvent.click(describeBtn);+ await screen.findByRole('textbox', { name: /Generated description/i });++ // Build → structured panel appears WITHOUT clearing the description.+ fireEvent.click(screen.getByRole('button', { name: /Build character details/i }));+ await screen.findByRole('textbox', { name: 'Pronouns' });+ expect(screen.getByRole('textbox', { name: /Generated description/i })).toBeInTheDocument();++ // Apply the attributes → modal stays open (description still unsaved).+ fireEvent.click(screen.getByRole('button', { name: /Apply 1 detail/i }));+ expect(onApplyFields).toHaveBeenCalled();+ expect(onClose).not.toHaveBeenCalled();++ // Apply the description → now the modal closes.+ fireEvent.click(screen.getByRole('button', { name: /Apply description/i }));+ expect(onApply).toHaveBeenCalledWith('a weathered barbarian');+ expect(onClose).toHaveBeenCalled();+ });});