[NA] [FE] fix: assistant sidebar dev mode uses unhashed URLs#5920
Open
[NA] [FE] fix: assistant sidebar dev mode uses unhashed URLs#5920
Conversation
…le source of truth Dev mode detection is now based on VITE_ASSISTANT_SIDEBAR_BASE_URL instead of import.meta.env.DEV. When set, the manifest fetch is skipped entirely and raw file paths are used through the Vite proxy.
Contributor
📋 PR Linter Failed❌ Missing Section. The description is missing the ❌ Missing Section. The description is missing the ❌ Missing Section. The description is missing the ❌ Missing Section. The description is missing the ❌ Missing Section. The description is missing the |
Comment on lines
+184
to
+188
| if (IS_ASSISTANT_DEV) { | ||
| return { | ||
| scriptUrl: "/assistant/assistant.js", | ||
| cssUrl: "/assistant/assistant.css", | ||
| shellUrl: "/assistant/shell", |
Contributor
There was a problem hiding this comment.
/assistant is hardcoded in multiple asset URLs, should we extract const ASSISTANT_STATIC_PREFIX = "/assistant" and reuse it when building those URLs?
Finding type: Extract naming constants | Severity: 🟢 Low
Want Baz to fix this for you? Activate Fixer
Other fix methods
Prompt for AI Agents:
Before applying, verify this suggestion against the current code. In
apps/opik-frontend/src/plugins/comet/AssistantSidebar.tsx around lines 184 to 188
(inside the useAssistantMeta function) and the earlier manifest return (around lines
172-175), the string "/assistant" is hardcoded for scriptUrl, cssUrl, and shellUrl.
Extract a descriptive module-level constant (for example: const ASSISTANT_STATIC_PREFIX
= "/assistant") at the top of the file and replace all hardcoded occurrences in this
file (the dev return object and the manifest-based shellUrl template) to build URLs via
`${ASSISTANT_STATIC_PREFIX}/...` or `${ASSISTANT_STATIC_PREFIX}/${manifest.shell}`.
Ensure you update both the dev branch and the manifest response to use the constant so
the prefix is consistent everywhere.
aadereiko
approved these changes
Mar 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Details
Fix assistant sidebar dev mode: the manifest fetch returned hashed filenames (
assistant.{hash}.js) that don't exist on the ollie-console dev server (which serves unhashedassistant.js). Also consolidate fragmented dev mode detection into a single source of truth.constants/assistant.tswithIS_ASSISTANT_DEVbased onVITE_ASSISTANT_SIDEBAR_BASE_URLbeing set, replacing separateimport.meta.env.DEVchecks/assistant/assistant.js) through the Vite proxyuseAssistantBackend.tsto use the shared constantChange checklist
Issues
N/A
AI-WATERMARK
AI-WATERMARK: yes
Testing
npm run lintinapps/opik-frontend— passesmanifest.jsonrequest in dev modeDocumentation
N/A
🤖 Generated with Claude Code