refactor: separate source and runtime layout - #2
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR refactors the project into a clearer “source vs runtime” layout: TypeScript lives under src/, SCSS under styles/, and runtime/config/data paths are separated via XDG directories (with a dedicated dev instance).
Changes:
- Introduces configurable XDG-based paths + instance naming (
rystal-shellvsrystal-shell-dev) and updates runtime asset/theme loading accordingly. - Adds new widgets/pages (bar modules, date-weather popup, notification popups, wallpaper selector, control-center pages) and supporting stores/utilities.
- Adds build/dev/deploy scripts to bundle and deploy an atomic user runtime under
XDG_DATA_HOME, plus isolated.dev/workflows.
Reviewed changes
Copilot reviewed 19 out of 99 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| styles/style.scss | New SCSS entrypoint composing modular SCSS partials. |
| styles/scss/_wallpaper_selector.scss | Styles for the wallpaper selector UI. |
| styles/scss/_variables.scss | Switches theme forwarding to theme.scss via Sass load paths. |
| styles/scss/_sound.scss | Sound page styling for control center. |
| styles/scss/_notifications.scss | Notification popup/card styling. |
| styles/scss/_date_weather.scss | Styles for the date-weather popup layout and widgets. |
| styles/scss/_bar.scss | Styles for the vertical bar, tray popovers, and modules. |
| styles/scss/_applauncher.scss | Styles for the app launcher UI. |
| styles/default/theme.scss | Bundled default theme tokens for runtime. |
| src/widget/wallpaper-selector/widget/WallpaperCard.ts | Wallpaper card widget/controller with thumbnail fallback logic. |
| src/widget/wallpaper-selector/index.tsx | Animated wallpaper selector panel window + key navigation. |
| src/widget/notification-popups/index.tsx | Focused-monitor notification popups with reveal/dismiss animations. |
| src/widget/date-weather/widget/WorldClockCard.tsx | World clock widget driven by config timezones. |
| src/widget/date-weather/widget/WeatherCard.tsx | Weather widget rendering current + short forecast. |
| src/widget/date-weather/widget/ProfileCard.tsx | Profile widget (avatar/handle/os/uptime) from config and system store. |
| src/widget/date-weather/widget/NotificationList.tsx | Notification list UI with DND and “clear all”. |
| src/widget/date-weather/widget/ClockCard.tsx | Clock widget using the time store. |
| src/widget/date-weather/index.tsx | Date/weather popup window with lazy-loaded content & animation. |
| src/widget/control-center/widget/VolumeSlider.tsx | Volume slider with sound feedback and endpoint mute. |
| src/widget/control-center/widget/UpdatesCard.tsx | System updates card wired to updates polling store. |
| src/widget/control-center/widget/SystemMetrics.tsx | CPU/RAM/GPU metric widgets using circular progress. |
| src/widget/control-center/widget/Sound/index.tsx | Re-export entrypoint for sound page module. |
| src/widget/control-center/widget/Sound/DeviceSelector.tsx | Output/input device selector popover for PipeWire endpoints. |
| src/widget/control-center/widget/ScreenCapture.tsx | Screenshot + recording controls UI. |
| src/widget/control-center/widget/QuickToggles.tsx | Wi-Fi/Bluetooth/Power profile/Caffeine toggles UI. |
| src/widget/control-center/widget/MediaCard/index.tsx | Media card selecting an active MPRIS player. |
| src/widget/control-center/widget/MediaCard/CavaWidget.tsx | Cava visualizer drawing area with shared default instance. |
| src/widget/control-center/widget/Connectivity/WifiPasswordDialog.tsx | Password prompt modal for Wi-Fi connections. |
| src/widget/control-center/widget/Connectivity/Shared.tsx | Shared connectivity UI helpers (headers, errors, overlays, menus). |
| src/widget/control-center/widget/Connectivity/index.tsx | Connectivity module exports. |
| src/widget/control-center/widget/BrightnessSlider.tsx | Brightness slider UI wired to brightness store. |
| src/widget/common/NotificationCard.tsx | Notification rendering with icon/image handling and cleanup. |
| src/widget/common/lucide.tsx | Lucide icon helper for GTK icon theme usage. |
| src/widget/common/CircularProgress.tsx | Animated circular progress widget for metrics. |
| src/widget/common/AnimatedList.tsx | Generic animated list for reveal/remove transitions. |
| src/widget/bar/widget/Workspaces.tsx | Workspace dots + active indicator (Hyprland). |
| src/widget/bar/widget/Weather.tsx | Weather module button for the bar. |
| src/widget/bar/widget/Volume.tsx | Volume module button with scroll volume adjust. |
| src/widget/bar/widget/Updates.tsx | Updates module with conditional visibility. |
| src/widget/bar/widget/Tray.tsx | Tray menu + expander popover behavior. |
| src/widget/bar/widget/SysMetrics.tsx | Compact metric module for the bar. |
| src/widget/bar/widget/ScrollerIndicator.tsx | “scrolloverview” indicator driven by Hyprland state. |
| src/widget/bar/widget/RecordIndicator.tsx | Recording indicator module with stop action. |
| src/widget/bar/widget/Clock.tsx | Rotated clock/date display for the bar. |
| src/widget/bar/PanelBackground.tsx | Bar background drawing + theme color parsing from theme.scss. |
| src/widget/bar/index.tsx | Bar window composition and input region configuration. |
| src/widget/bar/BarReserve.tsx | Exclusive reserve window to reserve space for the bar. |
| src/widget/app-launcher/widget/SearchInput.tsx | Search entry with keyboard navigation & open-query behavior. |
| src/widget/app-launcher/widget/SearchGoogleBtn.tsx | “Search/Open URL” pseudo-result row. |
| src/widget/app-launcher/widget/AppList.tsx | App list rendering, selection tracking, and scroll-to-selection. |
| src/widget/app-launcher/widget/AppItem.ts | App list item creation + launch/history integration. |
| src/widget/app-launcher/index.tsx | App launcher window with background and results panel. |
| src/stores/windowManager.ts | Window toggling/orchestration across monitors and panels. |
| src/stores/wifiPasswordDialog.ts | Store for managing Wi-Fi password request state. |
| src/stores/wifi.ts | Wi-Fi profile selection, duplicate cleanup, and connect logic. |
| src/stores/weather.ts | Weather polling/store using wttr.in with retry scheduling. |
| src/stores/update.ts | Updates polling store and update manager launcher. |
| src/stores/time.ts | Time store updating per minute and exporting formatted fields. |
| src/stores/system.ts | CPU/RAM/GPU polling + uptime/os-info helpers. |
| src/stores/recording.ts | Recording orchestration with wf-recorder and notifications. |
| src/stores/powerProfile.ts | Power profile toggling via AstalPowerProfiles. |
| src/stores/notification.ts | Persistent notification store with max-count enforcement. |
| src/stores/network.ts | nmcli/rfkill toggles for Wi-Fi/Bluetooth. |
| src/stores/mprisThumbnail.ts | YouTube thumbnail caching/downloading for media cards. |
| src/stores/launcherImage.ts | Launcher background loading with configured/default fallback paths. |
| src/stores/caffeine.ts | Caffeine (idle inhibit) store with daemon + runtime flag file. |
| src/stores/brightness.ts | Brightness backend detection + async apply + presets/dim logic. |
| src/stores/audio.ts | Volume sound effect + endpoint default control. |
| src/stores/application.ts | App history persistence/migration + app search + web query. |
| src/lib/paths.ts | Centralized XDG/config/data/instance path resolution. |
| src/lib/notification.ts | Notification helper using deployed asset icon path. |
| src/lib/motion.ts | Central motion timing constants. |
| src/lib/image.ts | Local-file image decode + optional texture cache. |
| src/lib/css.ts | Sass compilation + live reload using XDG/runtime dirs and fallbacks. |
| src/lib/config.ts | Loads config JSON from configurable config dir. |
| src/ipc.ts | Request handler commands for CSS reload, toggles, power/record/brightness. |
| src/env.d.ts | TS ambient module declarations (scss/css/blp/inline). |
| src/app.ts | App entry wiring instanceName, CSS init, icon search paths, widgets. |
| scripts/dev.sh | Starts isolated dev instance with .dev/ dirs and env vars. |
| scripts/deploy-user.sh | Atomic deploy of built artifacts/assets/styles to XDG data dir. |
| scripts/build.sh | Bundles app + compiles default CSS into dist/. |
| README.md | Documentation updated for build/deploy/start and dev workflow. |
| package.json | New scripts (check, build, dev, deploy:user) and types output dir. |
| launch.sh | Removed legacy in-repo launcher workflow. |
| knip.json | Updates entrypoint path to src/app.ts. |
| eslint.config.mjs | Formatting + ignore updates (.generated/, etc.). |
| debug/run-memory-scenarios.sh | Uses configurable AGS instance and dev script start/stop. |
| config/config.json.template | New template config under config/. |
| .gitignore | Ignores .generated/, .dev/, dist/, and removes old theme ignore. |
| .envrc | Adds direnv defaults for isolated dev instance directories. |
Suppressed comments (1)
src/widget/bar/PanelBackground.tsx:42
- This helper is still named
readMatugenColors, but it now reads either${rystalShellConfigDir}/theme.scssor the bundled default theme. Renaming it (and the related constants) would reduce confusion for future maintenance/debugging.
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
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.
Summary
src/and SCSS understyles/rystal-shellandrystal-shell-devAGS instancesValidation
pnpm lintpnpm knippnpm buildrystal-shellinstanceKnown limitation
pnpm tscstill reports only the two documented upstream AGS/Gnim type errors.