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: standardize app build loading state

[._.]/ Adam Eivye9a9810960f9
diff --git a/client/src/components/apps/AppDetailView.jsx b/client/src/components/apps/AppDetailView.jsx
index c38b60e6a8..25509cd440 100644
--- a/client/src/components/apps/AppDetailView.jsx
+++ b/client/src/components/apps/AppDetailView.jsx
@@ -416,11 +416,12 @@ export default function AppDetailView() {
<button
onClick={handleBuild}
disabled={buildLoading}
+ aria-busy={buildLoading}
className="px-2 py-1 bg-port-warning/20 text-port-warning enabled:hover:bg-port-warning/30 transition-colors rounded-lg border border-port-border flex items-center gap-1 disabled:opacity-50 disabled:cursor-not-allowed"
- aria-label={`Build production UI: ${app.buildCommand}`}
+ aria-label={`${buildLoading ? 'Building' : 'Build'} production UI: ${app.buildCommand}`}
>
<Hammer size={14} className={buildLoading ? 'animate-bounce' : ''} />
- <span className="text-xs">{buildLoading ? 'Building...' : 'Build'}</span>
+ <span className="text-xs">{buildLoading ? 'Building…' : 'Build'}</span>
</button>
)}
{app.hasDeployScript && (
diff --git a/client/src/pages/Apps.jsx b/client/src/pages/Apps.jsx
index 78af388265..6b6583a502 100644
--- a/client/src/pages/Apps.jsx
+++ b/client/src/pages/Apps.jsx
@@ -698,11 +698,12 @@ export default function Apps() {
<button
onClick={() => handleBuild(app)}
disabled={building[app.id]}
+ aria-busy={building[app.id]}
className="px-3 py-1.5 min-h-[40px] sm:min-h-0 bg-port-warning/20 text-port-warning enabled:hover:bg-port-warning/30 transition-colors rounded-lg text-xs flex items-center gap-1 disabled:opacity-50 disabled:cursor-not-allowed"
- aria-label={`Build production UI: ${app.buildCommand}`}
+ aria-label={`${building[app.id] ? 'Building' : 'Build'} production UI: ${app.buildCommand}`}
>
<Hammer size={14} aria-hidden="true" className={building[app.id] ? 'animate-bounce' : ''} />
- {building[app.id] ? 'Building...' : 'Build'}
+ {building[app.id] ? 'Building…' : 'Build'}
</button>
)}
{/* PM2-specific actions */}
diff --git a/client/src/pages/Apps.test.jsx b/client/src/pages/Apps.test.jsx
index 02fb3bbef4..a364936e87 100644
--- a/client/src/pages/Apps.test.jsx
+++ b/client/src/pages/Apps.test.jsx
@@ -166,6 +166,25 @@ describe('Apps row action hierarchy', () => {
expect(screen.queryByRole('button', { name: /More actions/ })).toBeNull();
});
+
+ it('labels the build action as in progress while the build is running', async () => {
+ let resolveBuild;
+ api.getApps.mockResolvedValue([{ ...APPS[0], buildCommand: 'npm run build' }]);
+ api.buildApp.mockImplementation(() => new Promise(resolve => { resolveBuild = resolve; }));
+ const user = userEvent.setup();
+ render(<MemoryRouter><Apps /></MemoryRouter>);
+
+ await user.click(await screen.findByRole('button', { name: 'Expand Example App details' }));
+ await user.click(await screen.findByRole('button', { name: 'Build production UI: npm run build' }));
+
+ const buildingButton = screen.getByRole('button', { name: 'Building production UI: npm run build' });
+ expect(buildingButton).toBeDisabled();
+ expect(buildingButton).toHaveAttribute('aria-busy', 'true');
+ expect(screen.getByText('Building…')).toBeTruthy();
+
+ await act(async () => { resolveBuild({ success: true }); });
+ await waitFor(() => expect(screen.getByRole('button', { name: 'Build production UI: npm run build' })).toBeEnabled());
+ });
});
describe('Apps archived filter', () => {