Skip to content

style: enhance layout and responsiveness of dashboard components#1428

Merged
zerob13 merged 1 commit intodevfrom
style-dashboard
Apr 3, 2026
Merged

style: enhance layout and responsiveness of dashboard components#1428
zerob13 merged 1 commit intodevfrom
style-dashboard

Conversation

@zhangmo8
Copy link
Copy Markdown
Collaborator

@zhangmo8 zhangmo8 commented Apr 3, 2026

Summary by CodeRabbit

  • UI/UX Improvements
    • Enhanced dashboard responsive layout for improved display across different screen sizes
    • Refined calendar heatmap design and token usage list presentation
    • Optimized spotlight overlay functionality

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 3, 2026

📝 Walkthrough

Walkthrough

This pull request refactors dashboard UI components with responsive layout improvements, transitioning from flex-based to CSS Grid-based layouts for the calendar heatmap, and replaces framework components with native HTML elements in the spotlight overlay component.

Changes

Cohort / File(s) Summary
Dashboard Layout Refactoring
src/renderer/settings/components/DashboardSettings.vue
Restructured responsive layout with flex-col-to-row transitions, reworked calendar heatmap using CSS Grid instead of flex, updated responsive breakpoints (md → lg for some elements), modified grid classes for token usage list and breakdown cards, added calendarGridStyle computed property for dynamic grid columns, and adjusted multiple spacing/sizing classes throughout.
Spotlight Component Simplification
src/renderer/src/components/spotlight/SpotlightOverlay.vue
Replaced <Input> and <Button> framework components with native <input> and <button> HTML elements while preserving all bindings, event handlers, and conditional styling.
Test Suite Updates
test/renderer/components/DashboardSettings.test.ts
Added assertions for new data-testid selectors (dashboard-header, calendar-heatmap, calendar-weeks, token-usage-list), verified responsive flex classes, updated grid template expectations, and confirmed new CSS grid implementation details.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~28 minutes

Suggested reviewers

  • zerob13

Poem

🐰 The dashboard hops with grid so fine,
CSS columns now align,
Native buttons, inputs clean,
Responsive magic in between,
Tests confirm each flex and frame! ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title accurately describes the main changes: layout and responsiveness enhancements to dashboard components through CSS/styling updates across multiple files.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch style-dashboard

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@src/renderer/settings/components/DashboardSettings.vue`:
- Line 298: Replace the invalid Tailwind class "wrap-break-word" in the
DashboardSettings.vue component with a valid utility (likely "break-words");
update each occurrence on the CardTitle elements (and any other components using
wrap-break-word at the noted locations) to use "break-words" (or
"break-all"/"break-normal" if different wrapping behavior is desired) so the
class names are valid Tailwind utilities.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: c363200a-a09a-44c2-b8dd-0bff6cc33b3c

📥 Commits

Reviewing files that changed from the base of the PR and between 3f6eb5e and 26b8cb7.

📒 Files selected for processing (3)
  • src/renderer/settings/components/DashboardSettings.vue
  • src/renderer/src/components/spotlight/SpotlightOverlay.vue
  • test/renderer/components/DashboardSettings.test.ts

>
<CardHeader class="space-y-1 pb-1">
<CardTitle class="break-words whitespace-normal text-base leading-tight">
<CardTitle class="wrap-break-word whitespace-normal text-base leading-tight">
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.

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Search for wrap-break-word definition in Tailwind config or CSS files
echo "=== Checking Tailwind config for custom utility ==="
fd -e js -e ts -e cjs -e mjs 'tailwind' --exec grep -l 'wrap-break-word' {} \; 2>/dev/null || echo "Not found in tailwind config"

echo ""
echo "=== Checking CSS files for wrap-break-word definition ==="
rg -n 'wrap-break-word' --type css --type vue 2>/dev/null || rg -n 'wrap-break-word' -g '*.css' -g '*.vue' 2>/dev/null || echo "Searching all files..."
rg -n '\.wrap-break-word' 

echo ""
echo "=== Checking if it's a UnoCSS or other utility ==="
fd -e js -e ts -e json 'uno' --exec grep -l 'wrap-break-word' {} \; 2>/dev/null || echo "Not found in uno config"

Repository: ThinkInAIXYZ/deepchat

Length of output: 704


🏁 Script executed:

#!/bin/bash

echo "=== Checking all configuration files for wrap-break-word ==="
# Look for all tailwind config files
find . -name '*tailwind*' -o -name 'tailwind.config.*' 2>/dev/null | head -20

echo ""
echo "=== Viewing Tailwind configuration file ==="
# Find and display tailwind config
fd 'tailwind.config' --type f -x cat {} 2>/dev/null | head -100

echo ""
echo "=== Searching entire codebase for wrap-break-word definition ==="
rg -n 'wrap-break-word' -B 2 -A 2

echo ""
echo "=== Checking global CSS/style files ==="
fd -e css -e scss -e postcss | head -20

Repository: ThinkInAIXYZ/deepchat

Length of output: 2158


🏁 Script executed:

#!/bin/bash

echo "=== Searching for tailwind config file in src and root ==="
find . -maxdepth 3 -name 'tailwind.config.*' -o -name 'tailwind.config*' 2>/dev/null

echo ""
echo "=== Checking main.css for wrap-break-word ==="
if [ -f "src/renderer/src/assets/main.css" ]; then
  grep -n 'wrap-break-word' src/renderer/src/assets/main.css || echo "Not found in main.css"
fi

echo ""
echo "=== Checking style.css for wrap-break-word ==="
if [ -f "src/renderer/src/assets/style.css" ]; then
  grep -n 'wrap-break-word' src/renderer/src/assets/style.css || echo "Not found in style.css"
fi

echo ""
echo "=== Listing root directory files ==="
ls -la | grep -E '\.(js|ts|json|config)$'

echo ""
echo "=== Checking for .cjs or config files in root ==="
find . -maxdepth 1 -type f \( -name '*.config.*' -o -name '*config*' \) 2>/dev/null | head -20

Repository: ThinkInAIXYZ/deepchat

Length of output: 1571


🏁 Script executed:

#!/bin/bash

echo "=== Checking components.json (shadcn/ui config) ==="
cat components.json

echo ""
echo "=== Checking electron.vite.config.ts for Tailwind config ==="
cat electron.vite.config.ts | head -100

echo ""
echo "=== Searching for Tailwind configuration in package.json ==="
cat package.json | grep -A 10 -i tailwind | head -30

echo ""
echo "=== Checking for postcss.config ==="
find . -maxdepth 2 -name 'postcss.config.*' 2>/dev/null | xargs cat 2>/dev/null

echo ""
echo "=== Searching for 'break-words' in codebase (standard Tailwind) ==="
rg 'break-words|break-all|break-keep|break-normal' --type vue | head -10

echo ""
echo "=== Checking UnoCSS or other utility framework configs ==="
rg 'uno\.config\|unocss\|@unocss' -g '*.ts' -g '*.js' -g '*.json'

Repository: ThinkInAIXYZ/deepchat

Length of output: 4500


🏁 Script executed:

#!/bin/bash

echo "=== Looking for tailwind.config file in src/renderer ==="
find src/renderer -name 'tailwind.config.*' 2>/dev/null

echo ""
echo "=== Checking style.css file contents (start) ==="
head -50 src/renderer/src/assets/style.css

echo ""
echo "=== Checking for `@layer` in style.css ==="
grep -n '@layer\|@apply' src/renderer/src/assets/style.css | head -20

echo ""
echo "=== Checking if wrap-break-word is in the built CSS (minified) ==="
grep -c 'wrap-break-word' resources/cdn/tailwind.min.css || echo "Not found in minified CSS"

echo ""
echo "=== Search for custom utility definitions in components ==="
rg '@apply' -g '*.vue' -A 2 | head -30

echo ""
echo "=== Checking Tailwind v4 documentation context - verify standard utilities ==="
echo "Standard Tailwind break utilities: break-words, break-all, break-keep, break-normal"
echo "Checking if wrap-break-word appears anywhere else..."
rg 'wrap.break' 2>/dev/null || echo "No similar patterns found"

Repository: ThinkInAIXYZ/deepchat

Length of output: 50379


🏁 Script executed:

#!/bin/bash

echo "=== Checking entire style.css file for wrap-break-word definition ==="
cat src/renderer/src/assets/style.css | grep -i 'wrap.*break'

echo ""
echo "=== Checking if wrap-break-word is defined in any `@layer` ==="
rg -A 5 'wrap-break-word' src/renderer/src/assets/

echo ""
echo "=== Summary: Check standard Tailwind utilities in usage ==="
echo "Files using 'break-words' (standard):"
rg -l 'break-words' --type vue | wc -l
echo ""
echo "Files using 'break-all' (standard):"
rg -l 'break-all' --type vue | wc -l
echo ""
echo "Files using 'wrap-break-word' (questionable):"
rg -l 'wrap-break-word' --type vue | wc -l

Repository: ThinkInAIXYZ/deepchat

Length of output: 486


🏁 Script executed:

#!/bin/bash

echo "=== Checking for wrap-break-word across all files (grep) ==="
grep -r 'wrap-break-word' src/renderer/src/assets/ 2>/dev/null || echo "Not found in assets"

echo ""
echo "=== Checking how many Vue files use standard break utilities ==="
grep -r 'break-words\|break-all\|break-keep\|break-normal' src/renderer/ 2>/dev/null | wc -l

echo ""
echo "=== Sample of standard break utilities used in Vue components ==="
grep -r 'break-words\|break-all' src/renderer/ 2>/dev/null | head -5

echo ""
echo "=== Confirm wrap-break-word usage in DashboardSettings ==="
grep -n 'wrap-break-word' src/renderer/settings/components/DashboardSettings.vue

echo ""
echo "=== Check if this could be a typo (similar patterns) ==="
grep -r 'word-break' src/renderer/ 2>/dev/null || echo "No CSS word-break property found"

Repository: ThinkInAIXYZ/deepchat

Length of output: 1548


Replace wrap-break-word with a valid Tailwind utility class.

The class wrap-break-word does not exist in Tailwind CSS or your project configuration. Use standard Tailwind utilities instead: break-words, break-all, break-keep, or break-normal. For text wrapping behavior in these components, break-words is likely the intended utility.

Also applies to: lines 303, 305, 310, 317, 324

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/renderer/settings/components/DashboardSettings.vue` at line 298, Replace
the invalid Tailwind class "wrap-break-word" in the DashboardSettings.vue
component with a valid utility (likely "break-words"); update each occurrence on
the CardTitle elements (and any other components using wrap-break-word at the
noted locations) to use "break-words" (or "break-all"/"break-normal" if
different wrapping behavior is desired) so the class names are valid Tailwind
utilities.

@zerob13 zerob13 merged commit 6c59418 into dev Apr 3, 2026
3 checks passed
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