Skip to content

Comments

fix: workflow visualizer styles#4301

Open
jog1t wants to merge 1 commit into02-24-fix_disable_selection_on_dragfrom
02-24-fix_workflow_visualizer_styles
Open

fix: workflow visualizer styles#4301
jog1t wants to merge 1 commit into02-24-fix_disable_selection_on_dragfrom
02-24-fix_workflow_visualizer_styles

Conversation

@jog1t
Copy link
Contributor

@jog1t jog1t commented Feb 24, 2026

Description

This change consolidates CSS styling by moving Shiki syntax highlighting variables, scrollbar styles, and spacing definitions from the inspector app to the main theme file. The inspector now imports from the centralized theme location, and new dark theme overrides have been added for xyflow components (Controls, MiniMap, and edges) along with Ladle story container styling.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes.

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

Copy link
Contributor Author

jog1t commented Feb 24, 2026

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more


How to use the Graphite Merge Queue

Add the label merge-queue to this PR to add it to the merge queue.

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@jog1t jog1t marked this pull request as ready for review February 24, 2026 19:52
@claude
Copy link

claude bot commented Feb 24, 2026

PR Review: fix: workflow visualizer styles

Overview

This PR consolidates CSS by moving Shiki, scrollbar, and spacing styles from the inspector into the main app's CSS, redirects the inspector's import to frontend/src/index.css, and adds xyflow/Ladle dark theme overrides to frontend/src/components/theme.css.


Issues

1. Duplicate xyflow styles (significant)

The xyflow overrides added to frontend/src/components/theme.css already exist verbatim in two other places:

  • frontend/src/index.css (lines 67–97) — already applied to the main app
  • .ladle/ladle.css (lines 41–79) — already applied to Ladle stories

Since .ladle/ladle.css imports ../src/components/theme.css, Ladle stories will now have these styles defined twice. If the intent is to centralize the xyflow overrides into theme.css, the duplicate block in .ladle/ladle.css should be removed in this PR. Otherwise, this is an incomplete consolidation.

2. Inspector now imports a file with @tailwind directives (moderate)

frontend/apps/inspector/src/index.css changes to:

@import "../../../src/index.css";

@tailwind base;
@tailwind components;
@tailwind utilities;

frontend/src/index.css itself also contains @tailwind base/components/utilities. This means the inspector will process Tailwind directives from both the imported file and its own declarations. Depending on how the Vite/PostCSS pipeline resolves this, it could result in doubled Tailwind output. It would be cleaner to have the inspector import only frontend/packages/components/public/theme.css for CSS variables and include the Shiki/scrollbar styles directly (or extract them to a shared partial), rather than pulling in the full app-level index.css.

3. Hardcoded border-radius (minor)

.react-flow__controls {
    border-radius: 6px;  /* Should use var(--radius) or calc(var(--radius) - Npx) */
}
.react-flow__minimap {
    border-radius: 6px;
}

The rest of the theme uses var(--radius) for consistency. Hardcoding 6px will be out of sync if the radius variable is changed.

4. !important on minimap background (minor)

.react-flow__minimap {
    background: hsl(var(--card)) !important;
}

!important here signals a specificity conflict with xyflow's inline or default styles. This is worth documenting with a comment explaining why it's needed (e.g., xyflow sets this via inline style), so it doesn't get silently removed later.

5. PR category (minor)

The checklist marks this as a Bug fix, but the changes are a style consolidation/refactor. This is low priority but worth noting for changelog accuracy.


What works well

  • Moving the inspector's import to frontend/src/index.css is a clean way to share Shiki highlighting, scrollbar, and spacing definitions without duplicating them.
  • Centralizing xyflow overrides and Ladle story styles into theme.css (where Ladle already imports from) is the right architectural direction.
  • Adding a newline at the end of theme.css fixes the pre-existing missing-newline issue.

Summary

The main thing to address before merging is the duplicate xyflow block still present in .ladle/ladle.css. The @tailwind double-inclusion and border-radius hardcoding are worth fixing but lower priority.

@jog1t jog1t force-pushed the 02-24-fix_workflow_visualizer_styles branch from 61f1c35 to 2e00b4d Compare February 24, 2026 20:17
@jog1t jog1t mentioned this pull request Feb 24, 2026
11 tasks
@pkg-pr-new
Copy link

pkg-pr-new bot commented Feb 24, 2026

More templates

@rivetkit/cloudflare-workers

pnpm add https://pkg.pr.new/rivet-dev/rivet/@rivetkit/cloudflare-workers@4301

@rivetkit/framework-base

pnpm add https://pkg.pr.new/rivet-dev/rivet/@rivetkit/framework-base@4301

@rivetkit/next-js

pnpm add https://pkg.pr.new/rivet-dev/rivet/@rivetkit/next-js@4301

@rivetkit/react

pnpm add https://pkg.pr.new/rivet-dev/rivet/@rivetkit/react@4301

rivetkit

pnpm add https://pkg.pr.new/rivet-dev/rivet/rivetkit@4301

@rivetkit/sql-loader

pnpm add https://pkg.pr.new/rivet-dev/rivet/@rivetkit/sql-loader@4301

@rivetkit/sqlite-vfs

pnpm add https://pkg.pr.new/rivet-dev/rivet/@rivetkit/sqlite-vfs@4301

@rivetkit/traces

pnpm add https://pkg.pr.new/rivet-dev/rivet/@rivetkit/traces@4301

@rivetkit/workflow-engine

pnpm add https://pkg.pr.new/rivet-dev/rivet/@rivetkit/workflow-engine@4301

@rivetkit/virtual-websocket

pnpm add https://pkg.pr.new/rivet-dev/rivet/@rivetkit/virtual-websocket@4301

@rivetkit/engine-runner

pnpm add https://pkg.pr.new/rivet-dev/rivet/@rivetkit/engine-runner@4301

@rivetkit/engine-runner-protocol

pnpm add https://pkg.pr.new/rivet-dev/rivet/@rivetkit/engine-runner-protocol@4301

commit: 2e00b4d

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant