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

keep the in-flight guard per job, and leave edit mode reachable

Adam Eivyaee794d4afca
diff --git a/client/src/components/apps/tabs/AutomationTab.test.jsx b/client/src/components/apps/tabs/AutomationTab.test.jsx
index 76d1cca0d2..22d57a0b5c 100644
--- a/client/src/components/apps/tabs/AutomationTab.test.jsx
+++ b/client/src/components/apps/tabs/AutomationTab.test.jsx
@@ -123,8 +123,6 @@ describe('AutomationTab per-app options', () => {
// desktop screen empty. Only the cap is asserted — which breakpoints the
// card grid uses is a retune anyone should be free to make.
expect(container.querySelector('.max-w-5xl')).toBeNull();
- const grid = screen.getByText('layered-intelligence').closest('.grid');
- expect(grid.className).toMatch(/grid-cols-1/);
});
it('puts custom automations before the shared schedule cards and shows app cadence', async () => {
diff --git a/client/src/components/cos/JobCard.jsx b/client/src/components/cos/JobCard.jsx
index c285e1974e..f08e4ef7c5 100644
--- a/client/src/components/cos/JobCard.jsx
+++ b/client/src/components/cos/JobCard.jsx
@@ -751,17 +751,23 @@ export default function JobCard({
<Edit3 size={14} />
Edit
</button>
- <button
- type="button"
- onClick={() => setExpanded(!expanded)}
- aria-expanded={expanded}
- className={`ml-auto ${SECONDARY_ACTION_CLASS}`}
- title={expanded ? 'Hide details' : 'Details'}
- aria-label={expanded ? 'Hide details' : 'Details'}
- >
- {expanded ? <ChevronUp size={14} /> : <ChevronDown size={14} />}
- {expanded ? 'Hide details' : 'Details'}
- </button>
+ {/* Hidden while editing: collapsing the card would take the edit form's
+ own Cancel/Save away without leaving edit mode, stranding the card
+ with its run panel hidden and Run now dead for a reason only a hover
+ tooltip explains — which a touch user never sees. */}
+ {!editing && (
+ <button
+ type="button"
+ onClick={() => setExpanded(!expanded)}
+ aria-expanded={expanded}
+ className={`ml-auto ${SECONDARY_ACTION_CLASS}`}
+ title={expanded ? 'Hide details' : 'Details'}
+ aria-label={expanded ? 'Hide details' : 'Details'}
+ >
+ {expanded ? <ChevronUp size={14} /> : <ChevronDown size={14} />}
+ {expanded ? 'Hide details' : 'Details'}
+ </button>
+ )}
</div>
</div>
);
diff --git a/client/src/components/cos/JobCard.test.jsx b/client/src/components/cos/JobCard.test.jsx
index 359336703e..ab21da631a 100644
--- a/client/src/components/cos/JobCard.test.jsx
+++ b/client/src/components/cos/JobCard.test.jsx
@@ -124,6 +124,30 @@ describe('JobCard on-demand cadence', () => {
expect(screen.getAllByLabelText('Subject')).toHaveLength(1);
});
+ it('keeps in-progress run values across a refetch, but follows a real saved change', () => {
+ const withValues = (formValues) => (
+ <JobCard
+ job={{ ...ON_DEMAND_JOB, formFields: [{ key: 'subject', label: 'Subject', type: 'text' }], formValues }}
+ onToggle={noop}
+ onTrigger={noop}
+ onDelete={noop}
+ onUpdate={noop}
+ />
+ );
+ const { rerender } = render(withValues({ subject: 'Saved' }));
+ fireEvent.change(screen.getByLabelText('Subject'), { target: { value: 'One-off' } });
+
+ // A poll hands back an equal-but-new object every time. Keying the reset on
+ // object identity instead of the value signature would wipe what the user
+ // is still typing on each one.
+ rerender(withValues({ subject: 'Saved' }));
+ expect(screen.getByLabelText('Subject')).toHaveValue('One-off');
+
+ // A genuine change to the saved value does reset the dial onto it.
+ rerender(withValues({ subject: 'Edited elsewhere' }));
+ expect(screen.getByLabelText('Subject')).toHaveValue('Edited elsewhere');
+ });
+
it('offers the cadence and hides the time input once it is selected', () => {
renderCard({ ...ON_DEMAND_JOB, interval: 'daily', intervalMs: 86400000, scheduledTime: '09:00' });
fireEvent.click(screen.getByRole('button', { name: 'Edit' }));
diff --git a/client/src/components/cos/tabs/JobsTab.jsx b/client/src/components/cos/tabs/JobsTab.jsx
index 2200b8ba3f..d5aff81e6e 100644
--- a/client/src/components/cos/tabs/JobsTab.jsx
+++ b/client/src/components/cos/tabs/JobsTab.jsx
@@ -148,7 +148,10 @@ export default function JobsTab() {
toast.error(err.message, { id: 'job-trigger' });
return null;
});
- setTriggering(null);
+ // Only if this job is still the one held: triggering a second job while the
+ // first is in flight would otherwise have the first's completion re-enable
+ // the second's button, which is the double-click this state exists to stop.
+ setTriggering(prev => (prev === jobId ? null : prev));
if (result) {
if (result.status === 'skipped') {
const notify = result.duplicate ? toast.success : toast.error;