fix(llma): respect dark mode in skill version compare diff#60293
Merged
Conversation
The Compare versions view on the LLM skill detail page uses Monaco's diff editor but never passed a theme, so it stayed on the default light Monaco theme even when the rest of the app was in dark mode. Wire `isDarkModeOn` from `themeLogic` into `MonacoDiffEditor`'s `theme` prop, mirroring the pattern already used by `CodeEditor`. Generated-By: PostHog Code Task-Id: 1d754461-bdea-4cb6-a0e2-d0993fd38390
Contributor
|
Reviews (1): Last reviewed commit: "fix(llma): respect dark mode in skill ve..." | Re-trigger Greptile |
Contributor
|
Size Change: 0 B Total Size: 80.2 MB ℹ️ View Unchanged
|
lucasheriques
approved these changes
May 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.
Problem
On the LLM skill detail page (prompt management), clicking Compare versions opens a side-by-side diff between two versions. The diff is rendered with Monaco's built-in diff editor via
MonacoDiffEditor, butSkillDiffViewnever passed atheme. As a result, the editor fell back to Monaco's default light theme even when the surrounding PostHog UI was in dark mode, producing a jarring bright panel inside an otherwise dark page.Changes
SkillDiffView(products/llm_analytics/frontend/skills/LLMSkillScene.tsx), readisDarkModeOnfromthemeLogicand passtheme={isDarkModeOn ? 'vs-dark' : 'vs-light'}to<MonacoDiffEditor>.frontend/src/lib/monaco/CodeEditor.tsx, and uses thethemeprop thatMonacoDiffEditoralready accepts and forwards tomonaco.editor.setTheme(...).No new dependency, no styling overrides — just wiring the existing theme selector into the existing prop.
How did you test this code?
I'm an agent — no manual UI verification was performed. Suggested manual check for the reviewer:
vs-lightandvs-darkalongside the rest of the UI.Publish to changelog?
no
🤖 Agent context
Authored by Claude Code (Opus 4.7). The reporter pointed out that the Compare diff on the skill detail page didn't respect dark mode. Exploration confirmed that
MonacoDiffEditoralready supports athemeprop (it just callsmonaco.editor.setTheme) and thatCodeEditorwas already readingisDarkModeOnfromthemeLogicto drive the same prop — the skill diff view was the only caller missing this wiring. No alternative approaches considered: the fix is purely "use the existing prop the same way the rest of the codebase already does".