Skip to content

fix(ui): unify modal titlebar styles and improve dark mode adaptation - #36

Merged
linletian merged 1 commit into
developfrom
fix/fix-ui
May 24, 2026
Merged

fix(ui): unify modal titlebar styles and improve dark mode adaptation#36
linletian merged 1 commit into
developfrom
fix/fix-ui

Conversation

@linletian

Copy link
Copy Markdown
Owner

Summary

This PR improves UI dark/light mode adaptation and unifies modal dialog styling across the entire application.

Dark/Light Mode Fixes

Issue Fix
All 5 modal dialogs had no explicit background, causing unreadable content in dark mode Added background: var(--main-bg) and color: var(--text-primary) to generic dialog rule
#status-bar used hardcoded rgba(0,0,0,0.5) and #ccc Replaced with --status-bar-bg / --status-bar-text variables with dark mode overrides
.wt-action-btn:hover used hardcoded rgba(0,0,0,0.1) (invisible in dark mode) Changed to var(--hover-bg)
.wt-item.active box-shadow used rgba(0,0,0,0.05) (negligible in dark mode) Changed to var(--shadow) with dark mode override
button.primary border used rgba(27,31,35,0.15) Changed to var(--button-border)
#connection-overlay inline styles with hardcoded colors Extracted to CSS class with --overlay-bg / --overlay-text variables
.conn-sub used --text-secondary on dark overlay (low contrast) Changed to --overlay-text
JS hardcoded error color #cb2431 in Import Worktree modal Changed to var(--danger-text)

UI Design Improvements

Change Description
Unified modal titlebar Added .modal-titlebar / .modal-close-btn / .modal-title pattern to all 5 modals
Removed parallel implementation #modal-monitor previously used .monitor-titlebar/.monitor-close-btn/.monitor-title — now unified
.tab:hover / .tab.active indentation fix These were incorrectly nested inside .tab.drag-over rule, now properly independent

Scrollbar Fixes

  • Added overflow-y: hidden to #tabs-container to eliminate unwanted vertical scrollbar
  • Added ::-webkit-scrollbar with 2px thin horizontal scrollbar styling

New CSS Variables

Added in :root with dark mode overrides:

  • --shadow, --dialog-shadow, --status-bar-bg, --status-bar-text, --overlay-bg, --overlay-text

Files Changed

  • internal/ui/static/index.html (1 file, +272/-156 lines)

Testing

  • All 5 modal dialogs verified visually in both light and dark mode
  • Tabs horizontal scrollbar verified on Chrome and Safari
  • Vertical scrollbar no longer appears after sliding horizontally

- Add CSS variables for dialog-shadow, status-bar colors, overlay colors
- Add dark mode overrides for all newly added variables
- Fix generic dialog: add background, color, overflow-y, remove hardcoded padding
- Add unified .modal-titlebar / .modal-close-btn / .modal-title pattern
- Apply unified pattern to all 5 modals (Create Worktree, LLM Settings,
  Import Worktree, Start Instance, Resource Monitor)
- Remove parallel .monitor-titlebar/.monitor-close-btn/.monitor-title
- Convert #connection-overlay inline styles to CSS class with variables
- Fix JS hardcoded error color in Import Worktree modal
- Fix .wt-item.active box-shadow to use CSS variable
- Fix .wt-action-btn:hover to use var(--hover-bg)
- Fix #status-bar hardcoded colors
- Fix button.primary hardcoded border
- Fix .tab .tab:hover .tab.active CSS nesting indentation
- Add 2px thin horizontal scrollbar for #tabs-container
- Add overflow-y: hidden to prevent vertical scrollbar flash
- Fix .tab-rename-input undefined --bg-primary variable
@linletian linletian self-assigned this May 24, 2026
@linletian
linletian merged commit 5ae525a into develop May 24, 2026
2 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.

1 participant