Skip to content

Commit 6f5ec6a

Browse files
Aurelioloclaude
andcommitted
fix: address 16 review findings from 7 pre-PR agents
Pre-reviewed by 7 agents, 16 findings addressed: - Fix stale docstring on complete_setup (contradicted relaxed agent req) - Add status_code=HTTP_200_OK to personality endpoint for consistency - Auto-advance WizardModeStep after selection (was stuck with no nav) - Catch unhandled promise rejection in ProviderProbeResults.handleAdd - Remove non-functional Test Connection button (provider doesn't exist yet) - Display personalityPresetsError in AgentsStep - Remove incorrect template.tags.length as agent count in TemplateCard - Update user_guide.md for new wizard flow (mode gate, step order, no costs) - Delete orphaned cost-estimator.ts and its test files - Log actual error in createProviderFromPreset discovery catch - Log failed probes in reprobePresets (was silently dropping) - Add retry button for providersError in ProvidersStep - Add comment to CompleteStep bare catch explaining error flow - Guard setStep against steps not in current stepOrder - Mark PersonalityPresetInfo fields as readonly - Extract duplicate preset validation (kept as-is, minor maintenance risk) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 15ff079 commit 6f5ec6a

14 files changed

Lines changed: 51 additions & 539 deletions

File tree

docs/user_guide.md

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -66,17 +66,22 @@ Configuration is in `docker/.env` (copy from `docker/.env.example`):
6666

6767
### First-Run Setup
6868

69-
After the containers are running, open the web dashboard at [http://localhost:3000](http://localhost:3000). On a fresh install, the **setup wizard** will appear automatically and guide you through:
69+
After the containers are running, open the web dashboard at [http://localhost:3000](http://localhost:3000). On a fresh install, the **setup wizard** will appear automatically. You first choose a setup mode:
70+
71+
- **Guided Setup** (recommended) -- walks through every configuration step.
72+
- **Quick Setup** -- sets a company name, adds a provider, and completes. Everything else can be configured later in Settings.
73+
74+
**Guided Setup steps:**
7075

7176
1. **Account** (conditional) -- create the first admin user. This step only appears when no admin account exists yet.
72-
2. **Template** -- choose a company template. Templates are grouped by category (Startup, Development, Enterprise, etc.) with side-by-side comparison and cost estimates.
77+
2. **Template** -- choose a company template. Templates are displayed in a flat grid with category tags and side-by-side comparison.
7378
3. **Company** -- name your synthetic organization, set a description, choose a display currency, and select a model tier profile (Economy, Balanced, or Premium).
74-
4. **Agents** -- customize agent names, roles, and model assignments. Agents are pre-populated from the selected template with models matched to configured providers.
75-
5. **Providers** -- configure LLM providers. Local providers (e.g. Ollama) are auto-detected; cloud providers can be added manually. Model discovery verifies each connection.
79+
4. **Providers** -- configure LLM providers. Local providers (e.g. Ollama) are auto-detected with a re-scan button; cloud providers can be added manually. Model discovery runs automatically after adding a provider.
80+
5. **Agents** -- customize agent names, personality presets, and model assignments. Agents are pre-populated from the selected template with models matched to configured providers.
7681
6. **Theme** -- set UI preferences including color palette, typography, layout density, animation level, and sidebar position.
7782
7. **Complete** -- review a summary of your configuration and launch the organization.
7883

79-
All substantive steps must be completed -- the backend validates that a company, at least one agent, and at least one provider exist before allowing setup to finish. Steps are completed sequentially -- a later step only appears done if all prior steps are also complete. Completed steps show a summary and can be revisited via the step indicator. After completing the wizard, the dashboard appears and the setup wizard is not shown again.
84+
The backend validates that a company and at least one provider exist before allowing setup to finish. Agents are optional (Quick Setup skips agent configuration). Steps are completed sequentially -- a later step only appears done if all prior steps are also complete. Completed steps show a summary and can be revisited via the step indicator. After completing the wizard, the dashboard appears and the setup wizard is not shown again.
8085

8186
To start fresh, use `synthorg wipe` (offers an interactive backup, wipes all data, and optionally restarts with a clean slate to re-open the setup wizard) or delete the `api.setup_complete` setting via the settings API.
8287

src/synthorg/api/controllers/setup.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -597,6 +597,7 @@ async def randomize_agent_name(
597597

598598
@put(
599599
"/agents/{agent_index:int}/personality",
600+
status_code=HTTP_200_OK,
600601
guards=[require_ceo],
601602
)
602603
async def update_agent_personality(
@@ -805,8 +806,9 @@ async def complete_setup(
805806
) -> ApiResponse[SetupCompleteResponse]:
806807
"""Mark first-run setup as complete.
807808
808-
Validates that a company, at least one agent, and at least one
809-
provider are configured before allowing completion.
809+
Validates that a company and at least one provider are configured
810+
before allowing completion. Agent configuration is optional
811+
(Quick Setup mode) -- a warning is logged when no agents exist.
810812
811813
Args:
812814
state: Application state.
@@ -816,7 +818,7 @@ async def complete_setup(
816818
817819
Raises:
818820
ConflictError: If setup has already been completed.
819-
ApiValidationError: If company, agents, or providers are missing.
821+
ApiValidationError: If company or providers are missing.
820822
"""
821823
app_state: AppState = state.app_state
822824
settings_svc = app_state.settings_service

web/src/__tests__/utils/cost-estimator.property.test.ts

Lines changed: 0 additions & 133 deletions
This file was deleted.

web/src/__tests__/utils/cost-estimator.test.ts

Lines changed: 0 additions & 194 deletions
This file was deleted.

web/src/api/types.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1280,8 +1280,8 @@ export interface UpdateAgentPersonalityRequest {
12801280
}
12811281

12821282
export interface PersonalityPresetInfo {
1283-
name: string
1284-
description: string
1283+
readonly name: string
1284+
readonly description: string
12851285
}
12861286

12871287
export interface PersonalityPresetsListResponse {

0 commit comments

Comments
 (0)