Skip to content

[NA] [FE] Send project onboarding stats to assistant bridge#6067

Merged
Lothiraldan merged 4 commits intomainfrom
boris/contextual-nudges-bridge
Apr 7, 2026
Merged

[NA] [FE] Send project onboarding stats to assistant bridge#6067
Lothiraldan merged 4 commits intomainfrom
boris/contextual-nudges-bridge

Conversation

@Lothiraldan
Copy link
Copy Markdown
Contributor

@Lothiraldan Lothiraldan commented Apr 2, 2026

Details

Adds a useProjectOnboardingStats hook that fetches lightweight counts (size=1, staleTime=30s)
for traces, experiments, optimizations, and blueprint versions. Extends BridgeContext with a
projectStats field and passes it to the assistant sidebar so it can deliver contextual nudges
based on where the user is in their onboarding journey.

Change checklist

  • User facing
  • Documentation update

Issues

  • N/A — companion PR for ollie-assist contextual nudges feature

AI-WATERMARK

AI-WATERMARK: yes

  • If yes:
    • Tools: Claude Code
    • Model(s): Claude Opus 4.6
    • Scope: Full implementation
    • Human verification: Code reviewed and tested locally

Testing

  • npm run lint — passes
  • npm run typecheck — passes
  • Verified stats appear in bridge context when viewing a project page
  • Verified no extra API calls when not on a project page (queries disabled when projectId is null)

Documentation

No documentation changes needed — internal hook consumed by assistant sidebar.

…idge

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>
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 2, 2026

📋 PR Linter Failed

Invalid Title Format. Your PR title must include a ticket/issue number and may optionally include component tags ([FE], [BE], etc.).

  • Internal contributors: Open a JIRA ticket and link to it: [OPIK-xxxx] or [CUST-xxxx] or [DND-xxxx] or [DEV-xxxx] [COMPONENT] Your change
  • External contributors: Open a Github Issue and link to it via its number: [issue-xxxx] [COMPONENT] Your change
  • No ticket: Use [NA] [COMPONENT] Your change (Issues section not required)

Example: [issue-3108] [BE] [FE] Fix authentication bug or [OPIK-1234] Fix bug or [NA] Update README


Missing Section. The description is missing the ## Details section.


Missing Section. The description is missing the ## Change checklist section.


Missing Section. The description is missing the ## Issues section.


Missing Section. The description is missing the ## Testing section.


Missing Section. The description is missing the ## Documentation section.

Comment thread apps/opik-frontend/src/plugins/comet/AssistantSidebar.tsx
Comment thread apps/opik-frontend/src/hooks/useProjectOnboardingStats.ts Outdated
Comment thread apps/opik-frontend/src/hooks/useProjectOnboardingStats.ts
Comment thread apps/opik-frontend/src/hooks/useProjectOnboardingStats.ts Outdated
- 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>
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 7, 2026

📋 PR Linter Failed

Invalid Title Format. Your PR title must include a ticket/issue number and may optionally include component tags ([FE], [BE], etc.).

  • Internal contributors: Open a JIRA ticket and link to it: [OPIK-xxxx] or [CUST-xxxx] or [DND-xxxx] or [DEV-xxxx] [COMPONENT] Your change
  • External contributors: Open a Github Issue and link to it via its number: [issue-xxxx] [COMPONENT] Your change
  • No ticket: Use [NA] [COMPONENT] Your change (Issues section not required)

Example: [issue-3108] [BE] [FE] Fix authentication bug or [OPIK-1234] Fix bug or [NA] Update README


Missing Section. The description is missing the ## Details section.


Missing Section. The description is missing the ## Change checklist section.


Missing Section. The description is missing the ## Issues section.


Missing Section. The description is missing the ## Testing section.


Missing Section. The description is missing the ## Documentation section.

Comment thread apps/opik-frontend/src/hooks/useProjectOnboardingStats.ts Outdated
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>
@Lothiraldan Lothiraldan changed the title feat(frontend): send project onboarding stats to assistant bridge [NA] [FE] Send project onboarding stats to assistant bridge Apr 7, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 7, 2026

📋 PR Linter Failed

Invalid Title Format. Your PR title must include a ticket/issue number and may optionally include component tags ([FE], [BE], etc.).

  • Internal contributors: Open a JIRA ticket and link to it: [OPIK-xxxx] or [CUST-xxxx] or [DND-xxxx] or [DEV-xxxx] [COMPONENT] Your change
  • External contributors: Open a Github Issue and link to it via its number: [issue-xxxx] [COMPONENT] Your change
  • No ticket: Use [NA] [COMPONENT] Your change (Issues section not required)

Example: [issue-3108] [BE] [FE] Fix authentication bug or [OPIK-1234] Fix bug or [NA] Update README


Missing Section. The description is missing the ## Details section.


Missing Section. The description is missing the ## Change checklist section.


Missing Section. The description is missing the ## Issues section.


Missing Section. The description is missing the ## Testing section.


Missing Section. The description is missing the ## Documentation section.

@Lothiraldan Lothiraldan marked this pull request as ready for review April 7, 2026 12:18
@Lothiraldan Lothiraldan requested a review from a team as a code owner April 7, 2026 12:18
Comment thread apps/opik-frontend/src/hooks/useProjectOnboardingStats.ts
…oarding 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>
@Lothiraldan Lothiraldan merged commit 04749c2 into main Apr 7, 2026
10 checks passed
@Lothiraldan Lothiraldan deleted the boris/contextual-nudges-bridge branch April 7, 2026 14:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants