-
[NA] [FE] Send project onboarding stats to assistant bridge (#6067)
发布于
2026-04-07 14:04:27 +00:00 - feat(frontend): send project onboarding stats to assistant sidebar bridge
Add useProjectOnboardingStats hook that fetches lightweight counts
(traces, experiments, optimizations, blueprint versions) and passes
them through BridgeContext so the Ollie assistant can provide
context-aware onboarding guidance.Companion to ollie-assist contextual-nudges PR.
Co-Authored-By: Claude Opus 4.6 (1M context) noreply@anthropic.com
- fix(frontend): address review findings in onboarding stats hook
- Return undefined instead of zeroed stats when no projectId
- Reuse ProjectStats from assistant-sidebar types (remove duplicate)
- Use processFilters(generateProjectFilters()) for proper project filtering
- Remove unnecessary useMemo wrapper
Co-Authored-By: Claude Opus 4.6 (1M context) noreply@anthropic.com
- Extract useOnboardingCountQuery helper to deduplicate count queries
Addresses Baz review comment about three duplicate useQuery calls
sharing the same wiring pattern.Co-Authored-By: Claude Opus 4.6 (1M context) noreply@anthropic.com
- fix(frontend): fix query cache collision and reduce staleTime for onboarding stats
Include endpoint in useOnboardingCountQuery queryKey to prevent cache
collisions across projects, and reduce staleTime from 30s to 1s so
the assistant sees freshly logged traces promptly.Co-Authored-By: Claude Opus 4.6 (1M context) noreply@anthropic.com
Co-authored-by: Claude Opus 4.6 (1M context) noreply@anthropic.com
下载附件