Skip to content

Fix desktop themes app to load from zenfs instead from local file#872

Open
azayrahmad wants to merge 10 commits into
mainfrom
fix-desktop-themes-zenfs-4571368714371610913
Open

Fix desktop themes app to load from zenfs instead from local file#872
azayrahmad wants to merge 10 commits into
mainfrom
fix-desktop-themes-zenfs-4571368714371610913

Conversation

@azayrahmad

Copy link
Copy Markdown
Owner

The Desktop Themes app was updated to fully integrate with the system's ZenFS virtual file system.

Key changes:

  1. ZenFS Integration: Replaced native browser file inputs with the ShowFilePicker component, allowing users to browse and manage themes within the simulation.
  2. Default Path: Themes are now stored in C:\Program Files\Plus!\Themes, which is initialized during the system boot sequence.
  3. Theme Persistence: Implemented logic to generate and save standard Windows .theme (INI) content to ZenFS, while also updating the local registry for immediate visibility in the theme selection dropdown.
  4. Wallpaper Handling: Updated the Theme Wizard and live previews to correctly handle ZenFS paths (e.g., /C:/WINDOWS/Clouds.bmp), including conversion between Windows-style backslashes and ZenFS-style forward slashes.
  5. Refactoring: Removed unused local file handling code and replaced it with asynchronous ZenFS operations.

These changes ensure a more authentic and self-contained user experience within the virtual desktop environment.


PR created automatically by Jules for task 4571368714371610913 started by @azayrahmad

- Modified `src/system/zenfs-init.js` to create `/C:/Program Files/Plus!/Themes` directory on boot.
- Updated `public/os-gui/parse-theme.js` to handle ZenFS paths for wallpapers in theme files.
- Refactored `src/apps/desktop-themes/desktop-themes-app.js` to use `ShowFilePicker` for loading and saving themes from/to ZenFS.
- Updated Theme Wizard and previews to support ZenFS wallpaper paths.

Co-authored-by: azayrahmad <10110227+azayrahmad@users.noreply.github.com>
@google-labs-jules

Copy link
Copy Markdown
Contributor

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

….theme file association

- Updated `DesktopThemesApp` to use `ShowFilePicker` for all file operations (Open, Save, Wizard Wallpaper).
- Implemented `_onLaunch` in `DesktopThemesApp` to support opening files from the shell.
- Added `.theme` file association in `file-associations.js`.
- Configured system to ensure `/C:/Program Files/Plus!/Themes` directory exists on boot.
- Enhanced `parse-theme.js` to handle Windows-style paths for wallpapers in `.theme` files.
- Implemented standard Windows `.theme` (INI) file generation for theme saving.
- Updated preview and wizard logic to resolve ZenFS paths using `getZenFSFileUrl`.

Co-Authored-By: azayrahmad <10110227+azayrahmad@users.noreply.github.com>
@azayrahmad azayrahmad force-pushed the fix-desktop-themes-zenfs-4571368714371610913 branch from 0cb9c48 to febada9 Compare February 12, 2026 01:09
google-labs-jules Bot and others added 8 commits February 12, 2026 01:51
- Enhanced `parse-theme.js` to detect icons, cursors, sounds, and desktop configuration from .theme files.
- Disabled theme wizard in `DesktopThemesApp` in favor of direct preview loading.
- Implemented icon extraction from .ico files using `icojs`.
- Updated system managers (theme, sound, cursor) to support custom theme components provided as objects.
- Updated `DesktopThemesApp` to save full theme state (icons, cursors, sounds) into .theme files.
- Improved wallpaper mode support (tile, center, stretch) in theme loading and preview.

Co-authored-by: azayrahmad <10110227+azayrahmad@users.noreply.github.com>
- Enhanced `parse-theme.js` to detect icons, cursors, sounds, and desktop configuration from .theme files.
- Disabled theme wizard in `DesktopThemesApp` in favor of direct preview loading.
- Implemented icon extraction from .ico files using `icojs`.
- Updated system managers (theme, sound, cursor) to support custom theme components provided as objects.
- Updated `DesktopThemesApp` to save full theme state (icons, cursors, sounds) into .theme files.
- Improved wallpaper mode support (tile, center, stretch) in theme loading and preview.
- Fixed missing imports in `DesktopThemesApp`.

Co-authored-by: azayrahmad <10110227+azayrahmad@users.noreply.github.com>
- Enhanced `parse-theme.js` to detect icons, cursors, sounds, and desktop configuration from .theme files.
- Improved path resolution for `%ThemeDir%` and `%Windir%` to handle missing slashes and normalize paths.
- Disabled theme wizard in `DesktopThemesApp` in favor of direct preview loading.
- Implemented icon extraction from .ico files using `icojs`.
- Updated system managers (theme, sound, cursor) to support custom theme components provided as objects.
- Updated `DesktopThemesApp` to save full theme state (icons, cursors, sounds) into .theme files.
- Improved wallpaper mode support (tile, center, stretch) in theme loading and preview.
- Fixed missing imports in `DesktopThemesApp`.

Co-authored-by: azayrahmad <10110227+azayrahmad@users.noreply.github.com>
- Enhanced `parse-theme.js` to extract icons (CLSID), cursors, sounds (AppEvents), and desktop settings (wallpaper mode) from .theme files.
- Implemented robust path resolution for `%ThemeDir%` and `%Windir%` variables.
- Updated `DesktopThemesApp` to skip the theme wizard and directly load/preview themes from files.
- Added icon extraction from .ico files using `icojs` for theme previews.
- Updated system managers (Sound, Cursor, Icon) to support custom theme objects.
- Fixed several bugs including missing imports and incorrect icon key mappings in previews.
- Expanded theme export logic to include all custom components in generated .theme files.

Co-authored-by: azayrahmad <10110227+azayrahmad@users.noreply.github.com>
- Enhanced .theme parsing to support icons, cursors, sounds, and desktop settings.
- Bypassed theme wizard for direct file loads.
- Added 'className' support to $Window component.
- Updated desktop-themes.css to use class-based selectors to support dynamic window IDs.
- Fixed several bugs in theme component handling and path resolution.

Co-authored-by: azayrahmad <10110227+azayrahmad@users.noreply.github.com>
…g-5225790257574087455

Improve Desktop Themes loading and parsing
- Implement ZenFS path resolution in `theme-manager.js` to convert virtual filesystem paths into Blob URLs for icons, cursors, and sounds.
- Add persistence for custom themes by saving the active configuration to `/C:/WINDOWS/CurrentTheme.json` and reloading it on boot.
- Implement Blob URL cleanup via `revokeBlobUrls` to prevent memory leaks during theme changes.
- Add fallback logic to `cursor-manager.js` for failed cursor fetches.
- Fix themed icon rendering in `file-icon-renderer.js` by ensuring icon scheme values are normalized to objects with 16/32px keys, even when provided as a single string (Blob URL).
- Hook `loadCustomTheme` into `os-init.js` boot sequence.

fix: resolve ZenFS paths and persist custom desktop themes

- Implement ZenFS path resolution in `theme-manager.js` to convert virtual filesystem paths for icons, cursors, and sounds into Blob URLs.
- Add persistence for custom themes by saving the active configuration to `/C:/WINDOWS/CurrentTheme.json` and reloading it on boot.
- Implement Blob URL cleanup via `revokeBlobUrls` to prevent memory leaks during theme changes.
- Add fallback logic to `cursor-manager.js` for failed cursor fetches.
- Hook `loadCustomTheme` into `os-init.js` boot sequence.

Co-Authored-By: azayrahmad <10110227+azayrahmad@users.noreply.github.com>
…-18270793682198012526

Fix Desktop Themes Path Resolution and Persistence
@azayrahmad azayrahmad force-pushed the fix-desktop-themes-zenfs-4571368714371610913 branch from 861b0fe to 11a11e9 Compare February 18, 2026 08:14
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