Skip to content

Add profile setup wizard to project chat#1141

Merged
simple-agent-manager[bot] merged 6 commits into
mainfrom
sam/implement-profile-setup-wizard-01ksqk
May 28, 2026
Merged

Add profile setup wizard to project chat#1141
simple-agent-manager[bot] merged 6 commits into
mainfrom
sam/implement-profile-setup-wizard-01ksqk

Conversation

@simple-agent-manager
Copy link
Copy Markdown
Contributor

Summary

  • Replaces raw project chat configuration controls with profile-first onboarding: single-agent default banner, multi-step profile wizard, and existing-profile pill selector with edit/new actions.
  • Wires wizard state through useProjectChatState, creates profiles through the existing agent profile endpoint, and auto-creates a default single-agent profile on first submit.
  • Sources VM labels/specs/pricing from ProviderCatalog helpers, hides pricing without BYOC credentials, and keeps the composer disabled only when onboarding requires it.

Validation

  • pnpm lint
  • pnpm typecheck
  • pnpm test
  • Additional validation run (if applicable)

Additional validation:

  • pnpm --filter @simple-agent-manager/web typecheck
  • pnpm --filter @simple-agent-manager/web lint (existing warnings only)
  • pnpm --filter @simple-agent-manager/web test -- tests/unit/pages/project-chat.test.tsx (25 tests passed)
  • npx playwright test tests/playwright/project-chat-composer-audit.spec.ts --project="iPhone SE (375x667)" --project="Desktop (1280x800)" (10 tests passed)
  • pnpm build

Staging Verification (REQUIRED for all code changes — merge-blocking)

All checkboxes below are mandatory for any PR that changes runtime code (.ts, .tsx, .go, etc.). Write N/A: docs-only ONLY if the PR contains zero runtime code changes. See .claude/rules/13-staging-verification.md.

  • Staging deployment greenDeploy Staging workflow triggered manually and passed for this branch
  • Live app verified via Playwright — logged into app.sammy.party (staging) using test credentials and actively tested the application
  • Existing workflows confirmed working — staging deploy smoke tests passed after deployment
  • New feature/fix verified on staging — profile selector + New wizard completed on live staging and created a profile through the API
  • Infrastructure verification completed — N/A: no infra changes
  • Mobile and desktop verification notes added for UI changes

Staging Verification Evidence

  • Staging deploy run 26588104250 passed deploy and smoke-tests jobs.
  • Live Playwright verification used token login against app.sammy.party, created a temporary GitHub-backed project, observed the existing profile selector, opened + New, completed work type, VM size, and name steps at 375x667, verified the created profile via GET /api/projects/:projectId/agent-profiles, checked no horizontal overflow, and deleted the temporary project.
  • Screenshots captured under .codex/tmp/playwright-screenshots/: staging-profile-wizard-existing-profiles-mobile.png, staging-profile-wizard-vm-mobile.png, staging-profile-wizard-final-mobile.png.

UI Compliance Checklist (Required for UI changes)

  • Mobile-first layout verified
  • Accessibility checks completed
  • Shared UI components used or exception documented
  • Playwright visual audit run locally — mock data scenarios tested at mobile (375x667) and desktop (1280x800); no horizontal overflow; screenshots in .codex/tmp/playwright-screenshots/

End-to-End Verification (Required for multi-component changes)

  • Data flow traced from user input to final outcome with code path citations (see .claude/rules/10-e2e-verification.md)
  • Capability test exercises the complete happy path across system boundaries
  • All spec/doc assumptions about existing behavior verified against code (not just "read the code")
  • If any gap exists between automated test coverage and full E2E, manual verification steps documented below

Data Flow Trace

  1. ProjectChat passes agents, profiles, provider catalogs, BYOC state, and wizard handlers into ChatInput (apps/web/src/pages/project-chat/index.tsx).
  2. ChatInput renders the default banner, no-profile gate/wizard, or profile pill bar and uses selectProviderCatalog() / lookupSizeInfo() for VM card details (apps/web/src/pages/project-chat/ChatInput.tsx).
  3. Wizard save calls createProfileFromWizard() in useProjectChatState, which validates duplicates and calls createAgentProfile() (apps/web/src/pages/project-chat/useProjectChatState.ts).
  4. The API client posts to the existing /api/projects/:projectId/agent-profiles endpoint (apps/web/src/lib/api/agents.ts).
  5. Subsequent chat submit sends agentProfileId; single-agent/no-profile submit first calls ensureDefaultProfileForSingleAgent() before submitTask() (apps/web/src/pages/project-chat/useProjectChatState.ts).

Untested Gaps

Live staging account already had profiles available, so staging verified the existing-profile + New wizard path. Single-agent default and multi-agent no-profile gate paths are covered by unit tests and local Playwright mock audit.

Post-Mortem (Required for bug fix PRs)

N/A: not a bug fix.

Specialist Review Evidence (Required for agent-authored PRs)

  • All dispatched reviewers completed and findings addressed before merge
  • If any reviewer did NOT complete: needs-human-review label added and merge deferred to human
Reviewer Status Outcome
task-completion-validator PASS Checklist and acceptance criteria mapped to implementation and tests; BYOC pricing coverage added before pass.
ui-ux-specialist PASS Mobile 375px and desktop visual audits passed; touch targets and no-overflow checks passed.
test-engineer PASS Unit coverage includes single-agent auto profile, multi-agent wizard, BYOC price visible, no-BYOC price hidden, no agents, duplicate names, existing-profile new flow.
constitution-validator PASS No hardcoded production VM prices/specs/URLs; catalog values use ProviderCatalog helpers and VM_SIZE_LABELS fallback.

Exceptions (If any)

  • Scope: None
  • Rationale: None
  • Expiration: None

Agent Preflight (Required)

  • Preflight completed before code changes

Classification

  • external-api-change
  • cross-component-change
  • business-logic-change
  • public-surface-change
  • docs-sync-change
  • security-sensitive-change
  • ui-change
  • infra-change

External References

N/A: implementation used existing in-repo APIs and prototype reference only.

Codebase Impact Analysis

Affected code paths:

  • apps/web/src/pages/project-chat/ChatInput.tsx
  • apps/web/src/pages/project-chat/useProjectChatState.ts
  • apps/web/src/pages/project-chat/index.tsx
  • apps/web/src/components/project-chat/ProjectChatComposer.tsx
  • apps/web/tests/unit/pages/project-chat.test.tsx
  • apps/web/tests/playwright/project-chat-composer-audit.spec.ts

Documentation & Specs

Task file archived at tasks/archive/2026-05-28-profile-setup-wizard.md. No product docs required for this internal UX change.

Constitution & Risk Check

Checked Principle XI: no hardcoded values. VM pricing/specs are not hardcoded in production code; provider catalog values are read through selectProviderCatalog() and lookupSizeInfo(), with generic labels from VM_SIZE_LABELS when catalog data is absent.

@sonarqubecloud
Copy link
Copy Markdown

@simple-agent-manager simple-agent-manager Bot merged commit 91c7fa1 into main May 28, 2026
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant