Conversation
…ure detail page
Features created from project chat have no brainstorming phase, so inbox
navigation was building invalid /brainstorming/... URLs causing "phase not found"
errors. Now detects phase-less features and routes to /features/{slug} instead.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…highlights Expand onboarding from 14 to 18 steps by inserting 4 new feature-exploration steps (6-9) between the old steps 5 and 6. Each step now uses a multi-stage tooltip-guided flow instead of direct navigation: - Steps 6-8: Highlight system/user features and missing specs with OK-button tooltips - Step 9: Highlight feature #10 row → navigate to detail → highlight Create Implementation button - Step 10: Highlight feature #11 row → navigate → auto-prefill chatbox + highlight send button - Steps 11/13: Wait for decision summarizer before showing Create Implementation button - Step 12: Highlight feature #12 row → navigate → scroll to MCQ questions - Step 14: 3-stage Settings → MCP tab → API Key button tour - Step 15: Modal with coding agent instructions and copyable prompt - Step 16: 2-stage Grounding nav → main branch tab (completes on click) - Step 17: Prefill + OK-button tooltip on send button - Step 18: Modal with dismiss-to-highlight Create Implementation flow Also: fix @mfbt AI → @MFBTAI branding, add data-onboarding attributes to FeatureRow/ModuleCard/GroundingBranchTabs, global click-to-dismiss tooltips, auto-scroll checklist to next step, scroll-into-view before tooltip positioning. Backend: renumber step references (6→10, 7→11, etc.) across all services, workers, MCP metadata, and tests. Update VALID_STEPS to 1-18. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
| Filename | Overview |
|---|---|
| backend/workers/handlers/generation.py | Adds spec-generation onboarding hook, but uses old feature-key-agnostic step logic that duplicates and conflicts with the corrected hook in feature_content_version_service.py — can mark wrong steps when user generates specs out of order. |
| backend/app/services/feature_content_version_service.py | Adds corrected feature-key-aware onboarding hook for steps 9/11/13 — correct logic, but fires redundantly after the conflicting generation.py hook. |
| frontend/components/sidebar/OnboardingChecklistPanel.tsx | 1936-line panel with multi-stage tooltip logic for all 18 steps; inner polling-loop timeouts not cleaned up on unmount in several effects. |
| backend/app/services/onboarding_service.py | New service; idempotent step completion, flag_modified for JSON mutation, dismiss one-way transition — all correct. |
| frontend/lib/contexts/OnboardingContext.tsx | New context; session-dedup via firedStepsRef, WebSocket subscriptions for step completion and project-list changes, localStorage state — well-structured. |
| backend/workers/core/worker.py | Adds semaphore-based concurrency (WORKER_CONCURRENCY env var, default 5), getmany batch size, and done_callback for semaphore release — correct implementation. |
| backend/app/routers/auth.py | Adds /me/onboarding and /me/onboarding/steps endpoints; previously-flagged is_onboarded guard is now correctly applied. |
| backend/tests/test_onboarding.py | 14 tests covering service unit tests and API endpoint tests — idempotency, invalid steps, unauthenticated access all covered. |
Prompt To Fix All With AI
This is a comment left during a code review.
Path: backend/workers/handlers/generation.py
Line: 1573-1601
Comment:
**Duplicate onboarding hook uses stale feature-key-agnostic logic**
This block fires at the *start* of `feature_content_generate_handler` — before the spec is written — and uses the old "next-incomplete" assignment (`step = 9 if 9 not in _completed else (11 if … else 13)`) that ignores which feature triggered the generation.
`FeatureContentVersionService.create_or_update` already has a corrected hook (added in this same PR) that maps feature-key suffixes (`-010→9`, `-011→11`, `-012→13`) and fires *after* the spec is saved. Both hooks fire for every spec-generation event, but in this order:
1. **This hook (wrong logic)** — commits first, marks step 9 for *any* feature whose spec is generated when step 9 is not yet done.
2. **Service hook (correct logic)** — re-queries the user, sees step 9 already committed, then correctly maps the feature key and marks the right step.
If a user navigates directly to feature-012 and generates its spec before feature-010, both step 9 (incorrectly) **and** step 13 (correctly) are marked complete. The user's onboarding progress is permanently corrupted — step 9 shows as done without the user ever generating a spec for feature-010.
Since `feature_content_version_service.py` now handles this correctly with feature-key awareness, this entire block in `generation.py` should be removed.
How can I resolve this? If you propose a fix, please make it concise.
---
This is a comment left during a code review.
Path: frontend/components/sidebar/OnboardingChecklistPanel.tsx
Line: 2853-2918
Comment:
**Inner polling timeouts not cancelled on unmount**
The `pollForApiKey` loop chains up to 30 × 500 ms `setTimeout` calls. The effect's cleanup only cancels the outer `timer` (`return () => clearTimeout(timer)`), so if the component unmounts after `timer` has already fired, the inner polling chain keeps running for up to 15 seconds.
The same pattern exists in `tryHighlightBranch` (step 16), `tryFindMcq` (step 12), `tryHighlightSend` (step 10), and `tryHighlight` (step 1). Consider tracking a `cancelled` ref inside each effect and checking it at the top of each recursive call, then setting it in the cleanup function so all pending iterations stop immediately on unmount.
How can I resolve this? If you propose a fix, please make it concise.Reviews (3): Last reviewed commit: "style: apply ruff format to alembic migr..." | Re-trigger Greptile
Enable each Kafka worker pod to process multiple messages concurrently using asyncio tasks and a semaphore-based backpressure pattern. Controlled by WORKER_CONCURRENCY env var (default 5), reducing required pod count ~5× for the same throughput. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Standardize logging pattern in feature_service.py except block - Use FeatureProvenance.USER instead of timestamp comparison for step 18 - Remove spurious pathname dependency from OnboardingContext useEffect - Downgrade debug trace from warning to debug level in implementation_service - Fix stale step numbers in comments (6→10, 8→12, 11/14→15/18) - Validate is_onboarded field in dismiss onboarding endpoint - Validate feature_key suffix for spec step attribution (9/11/13) - Fix import sorting in alembic migration (ruff I001) - Run prettier on 10 frontend files Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Summary
New Steps (6-9)
Multi-Stage Improvements to Existing Steps
Test plan
uv run pytest tests/test_onboarding.py -v— 14/14)npx tsc --noEmit)npx eslint --fixexits 0)🤖 Generated with Claude Code