Skip to content

fix: resolve theme style inconsistency between CLI dashboard and docu…#12

Merged
endalk200 merged 3 commits intomainfrom
fix-style-mismatch
Jan 13, 2026
Merged

fix: resolve theme style inconsistency between CLI dashboard and docu…#12
endalk200 merged 3 commits intomainfrom
fix-style-mismatch

Conversation

@endalk200
Copy link
Owner

@endalk200 endalk200 commented Jan 12, 2026

Greptile Overview

Greptile Summary

This PR resolves theme style inconsistencies between the CLI dashboard and documentation site by adopting the "Lyra" design system. Key changes include:

Theme Changes:

  • Replaced oklch-based color palette with Lyra theme (cyan/teal primary colors #00d4ff, accent green #00ff88)
  • Set default theme to "dark" instead of "system" to match documentation site
  • Maintained full light/dark mode support through CSS custom properties

Build Process Improvements:

  • Moved copy-dashboard.mjs to run immediately after tsup in build:cli script
  • Changed copy-dashboard script to exit gracefully (exit 0) when dashboard build not found, preventing build failures during CLI-only builds
  • Replaced createRequire with readFileSync + fileURLToPath for reading package.json in ESM context (more explicit, works reliably with both CJS and ESM outputs)

The changes ensure consistent branding across the CLI dashboard and documentation while maintaining the existing build workflow.

Confidence Score: 5/5

  • Safe to merge - changes are well-structured theme updates and build improvements with proper runtime validation
  • All changes are intentional and correct. Theme changes are cosmetic CSS updates that don't affect functionality. Build script reorganization maintains the same execution order with improved flexibility (allowing CLI builds without dashboard). The copy-dashboard graceful exit is appropriate since runtime validation in dashboard-server.ts will catch missing assets. The package.json reading change from createRequire to readFileSync is more explicit and works correctly in ESM context.
  • No files require special attention

Important Files Changed

File Analysis

Filename Score Overview
apps/dashboard/src/App.tsx 5/5 Changed default theme from "system" to "dark" to align with documentation site
apps/dashboard/src/index.css 5/5 Replaced oklch-based color palette with Lyra documentation theme palette using CSS custom properties
apps/webhook-cli/CHANGELOG.md 5/5 Added changelog entries for versions 3.4.3 and 3.4.4
apps/webhook-cli/package.json 5/5 Bumped version to 3.4.4 and moved copy-dashboard script to run after tsup build
apps/webhook-cli/scripts/copy-dashboard.mjs 5/5 Changed script to exit successfully (0) instead of failing (1) when dashboard dist not found
apps/webhook-cli/src/core/dashboard-server.ts 5/5 Improved comment formatting for __dirname resolution logic
apps/webhook-cli/src/index.ts 5/5 Replaced createRequire with readFileSync and fileURLToPath for reading package.json in ESM

Sequence Diagram

sequenceDiagram
    participant User
    participant BuildScript as build script
    participant Dashboard as @better-webhook/dashboard
    participant Tsup as tsup (CLI build)
    participant CopyScript as copy-dashboard.mjs
    participant DistFolder as dist/

    User->>BuildScript: pnpm run build
    BuildScript->>Dashboard: pnpm --filter @better-webhook/dashboard build
    Dashboard->>Dashboard: Build React dashboard
    Dashboard-->>DistFolder: apps/dashboard/dist/*
    
    BuildScript->>BuildScript: pnpm run build:cli
    BuildScript->>Tsup: tsup --format cjs,esm --dts
    Tsup->>Tsup: Compile TypeScript sources
    Note over Tsup: clean: false preserves existing dist
    Tsup-->>DistFolder: dist/index.js, dist/index.cjs, dist/*.d.ts
    
    BuildScript->>CopyScript: node ./scripts/copy-dashboard.mjs
    CopyScript->>CopyScript: Check if apps/dashboard/dist exists
    
    alt Dashboard built
        CopyScript->>DistFolder: Copy apps/dashboard/dist → dist/dashboard
        CopyScript-->>BuildScript: Exit 0 (success)
    else Dashboard not built
        CopyScript->>CopyScript: console.warn (skip copy)
        CopyScript-->>BuildScript: Exit 0 (graceful)
    end
    
    BuildScript-->>User: Build complete
    
    Note over User,DistFolder: Runtime: CLI serves dashboard from dist/dashboard
    User->>User: better-webhook dashboard
    User->>DistFolder: Load dist/index.js
    DistFolder->>DistFolder: Serve static files from dist/dashboard
    DistFolder-->>User: Dashboard UI with Lyra theme
Loading

@endalk200 endalk200 requested a review from Copilot January 12, 2026 13:25
@endalk200 endalk200 self-assigned this Jan 12, 2026
@vercel
Copy link

vercel bot commented Jan 12, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
better-webhook-docs Ready Ready Preview, Comment Jan 13, 2026 10:04am

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR resolves a theme style inconsistency between the CLI dashboard and the documentation site by unifying them under the "Lyra" design system.

Changes:

  • Updated CSS variables to use a new Lyra color palette that matches the documentation site theme
  • Changed the default theme from "system" to "dark" in the dashboard
  • Modified the build process to ensure dashboard assets are copied during CLI builds

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
apps/webhook-cli/package.json Bumped version to 3.4.3 and updated build:cli script to copy dashboard assets
apps/webhook-cli/CHANGELOG.md Added changelog entry for version 3.4.3 documenting the theme alignment fix
apps/dashboard/src/index.css Replaced oklch color scheme with Lyra palette-based CSS variables for both light and dark modes
apps/dashboard/src/App.tsx Changed default theme from "system" to "dark"

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.

@endalk200
Copy link
Owner Author

@greptile-apps review

Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

2 files reviewed, 2 comments

Edit Code Review Agent Settings | Greptile

@endalk200
Copy link
Owner Author

@greptile-apps review

@endalk200 endalk200 merged commit f7ca499 into main Jan 13, 2026
7 checks passed
@endalk200 endalk200 deleted the fix-style-mismatch branch February 22, 2026 12:56
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.

2 participants