Skip to content

[NA] [FE] fix: bypass manifest fetch in dev mode for hot reload#6110

Merged
awkoy merged 2 commits intomainfrom
fix/assistant-sidebar-dev-hot-reload
Apr 7, 2026
Merged

[NA] [FE] fix: bypass manifest fetch in dev mode for hot reload#6110
awkoy merged 2 commits intomainfrom
fix/assistant-sidebar-dev-hot-reload

Conversation

@awkoy
Copy link
Copy Markdown
Contributor

@awkoy awkoy commented Apr 7, 2026

Details

In dev mode, skip the manifest fetch entirely and return a static DEV_META with hashless asset paths (/assistant/assistant.js, /assistant/assistant.css). This disables the react-query manifest fetch when IS_DEV is true and removes the dev-mode special case for shellUrl inside the query transform.

Unblocks Vite hot reload for the Ollie assistant sidebar during local development.

Change checklist

  • Bypass manifest fetch in dev mode
  • Use static asset paths without content hashes
  • Clean up shellUrl dev-mode branching in prod path

Issues

NA

Testing

  • Run Opik frontend in dev mode with Ollie assistant — sidebar loads without manifest fetch
  • Change Ollie FE code — hot reload picks up the change without full page refresh
  • Run in prod/staging mode — manifest fetch still works as before

Documentation

No documentation changes needed.

In dev mode, skip the manifest fetch entirely and use static asset
paths without content hashes, so Vite hot reload works correctly
for the assistant sidebar.
@awkoy awkoy requested a review from a team as a code owner April 7, 2026 16:16
@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.

@awkoy awkoy changed the title [FE] fix: bypass manifest fetch in dev mode for hot reload [NA] [FE] fix: bypass manifest fetch in dev mode for hot reload Apr 7, 2026
Comment on lines 284 to 288
enabled: !IS_DEV && !!manifestUrl,
staleTime: Infinity,
retry: 1,
});

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

useQuery is gated by enabled: !IS_DEV && !!manifestUrl so in dev with VITE_ASSISTANT_SIDEBAR_BASE_URL unset the backend-resolved manifestUrl isn't fetched and DEV_META isn't returned — should we fetch the manifest in dev when manifestUrl exists or always return the dev fallback?

Finding type: Logical Bugs | Severity: 🟠 Medium


Want Baz to fix this for you? Activate Fixer

Other fix methods

Fix in Cursor

Prompt for AI Agents:

Before applying, verify this suggestion against the current code. In
apps/opik-frontend/src/plugins/comet/AssistantSidebar.tsx around lines 284 to 288, the
useQuery is currently gated by enabled: !IS_DEV && !!manifestUrl which prevents fetching
the manifest in dev and causes meta to remain null. Change the enabled flag to enabled:
!!manifestUrl (i.e. allow the query to run whenever a manifestUrl exists, including in
dev) and keep the existing early-return of DEV_META when IS_DEV && DEV_BASE_URL. Ensure
manifestUrl is still checked before calling fetch (manifestUrl!) so no runtime null
dereference occurs.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Commit 84bbdaa addressed this comment by changing the hook to only disable the manifest fetch when running in dev with DEV_BASE_URL and adding an explicit DEV_META early return, while keeping the query enabled whenever a manifestUrl exists so dev runs still fetch the backend manifest.

@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.

Only skip the manifest query when both IS_DEV and DEV_BASE_URL are
true. Without DEV_BASE_URL the backend-resolved manifest should
still be fetched so the sidebar loads normally in dev.
@awkoy awkoy merged commit df8373c into main Apr 7, 2026
10 checks passed
@awkoy awkoy deleted the fix/assistant-sidebar-dev-hot-reload branch April 7, 2026 16:49
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