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: show a single create action in the empty Orchestration Profiles view (#11146)

[._.]/ Adam Eivy34c3b9a653aa
diff --git a/client/src/components/settings/OrchestrationTab.jsx b/client/src/components/settings/OrchestrationTab.jsx
index 7bb9c38a10..ee9abc34ca 100644
--- a/client/src/components/settings/OrchestrationTab.jsx
+++ b/client/src/components/settings/OrchestrationTab.jsx
@@ -192,7 +192,7 @@ export default function OrchestrationTab() {
for the Architect, Implementer, and Reviewer. Machine-local and opt-in per task.
</p>
</div>
- {!editingProfile && (
+ {!editingProfile && profilesLoaded && profiles.length > 0 && (
<button
onClick={handleStartCreate}
className="inline-flex items-center gap-2 px-4 py-2 bg-port-accent hover:bg-port-accent/80 text-white rounded-lg text-sm font-medium transition-colors self-start sm:self-auto"
@@ -368,7 +368,7 @@ export default function OrchestrationTab() {
{loading && !profilesLoaded ? (
<div className="p-8 text-center text-gray-400">Loading orchestration profiles…</div>
- ) : !profilesLoaded || (profileError && profiles.length === 0) ? null : profiles.length === 0 ? (
+ ) : !profilesLoaded || (profileError && profiles.length === 0) || (editingProfile && profiles.length === 0) ? null : profiles.length === 0 ? (
<div className="bg-port-card border border-port-border rounded-xl p-8 text-center space-y-3">
<p className="text-gray-400">No orchestration profiles configured.</p>
<button
diff --git a/client/src/components/settings/OrchestrationTab.test.jsx b/client/src/components/settings/OrchestrationTab.test.jsx
index 83f8a774a6..3fc97c309f 100644
--- a/client/src/components/settings/OrchestrationTab.test.jsx
+++ b/client/src/components/settings/OrchestrationTab.test.jsx
@@ -80,6 +80,18 @@ describe('OrchestrationTab', () => {
expect(screen.queryByText('Orchestration profiles are unavailable.')).toBeNull();
});
+ it('offers a single create action for an empty inventory and none while the form is open', async () => {
+ api.getOrchestrationProfiles.mockResolvedValue([]);
+ render(<OrchestrationTab />);
+ expect(await screen.findByText('Create your first profile')).toBeTruthy();
+ expect(screen.queryByText('New Profile')).toBeNull();
+
+ fireEvent.click(screen.getByText('Create your first profile'));
+ expect(await screen.findByText('Create Orchestration Profile')).toBeTruthy();
+ expect(screen.queryByText('Create your first profile')).toBeNull();
+ expect(screen.queryByText('New Profile')).toBeNull();
+ });
+
it('recovers profiles on retry while provider metadata fails independently', async () => {
api.getOrchestrationProfiles.mockRejectedValueOnce(new Error('Unavailable')).mockResolvedValueOnce(mockProfiles);
api.getProviders.mockRejectedValue(new Error('Unavailable'));