Skip to content

NAS-0000: Add sync theme with OS appearance to GUI settings - #13402

Closed
randallle wants to merge 196 commits into
truenas:masterfrom
randallle:scratch/randallle/NAS-0000-sync-theme-with-os
Closed

NAS-0000: Add sync theme with OS appearance to GUI settings #13402
randallle wants to merge 196 commits into
truenas:masterfrom
randallle:scratch/randallle/NAS-0000-sync-theme-with-os

Conversation

@randallle

Copy link
Copy Markdown
Contributor

Overview

Adds a "Sync Theme With OS" option to GUI Settings that automatically switches the UI theme based on the operating system's light/dark appearance preference. Users can configure which theme to use for each mode.

Changes

  • Added syncThemeWithOS, lightTheme, and darkTheme fields to preferences interface, defaults, actions, and reducer
  • Added "Sync Theme With OS" checkbox to GUI form with conditionally rendered Light Theme and Dark Theme dropdowns
  • Updated ThemeService to read syncThemeWithOS from preferences state and apply the correct theme based on OS appearance via matchMedia
  • Added matchMedia change listener in ThemeService for live theme switching when OS appearance changes
  • Fixed stale previewTheme state after form save that required a page refresh for OS sync to work
  • Updated GUI card to display active theme from ThemeService instead of raw userTheme preference

Testing

  • Updated existing tests for ThemeService, GuiFormComponent, and GuiCardComponent to pass with new changes
  • Not covered: live matchMedia change event in ThemeService (requires simulating OS appearance changes), the hasSaved guard preventing stale preview dispatches (requires precise async timing), and full end-to-end sync flow (save with sync enabled, then verify OS theme change applies correct theme)

Downstream

Affects Reasoning
Documentation New GUI Settings option "Sync Theme With OS" with Light/Dark Theme dropdowns
Testing Additional test coverage for matchMedia listener and end-to-end sync flow would be valuable

Screenshots

Before

Screen.Recording.2026-03-29.at.9.25.30.PM.mov

After

Screen.Recording.2026-03-29.at.9.21.51.PM.mov

AquariusStar and others added 30 commits August 3, 2025 06:05
Added translation lines.
Fix translation.
…figuration (by william-gr) (truenas#12380)

* NAS-137014: Add web_port field to VM Display device configuration

- Add web_port input to Display device form with validation
- Show web_port field only when Web Interface checkbox is enabled
- Update Port field tooltip to clarify SPICE server usage
- Update tests to include web_port field in Display device tests

(cherry picked from commit b2d8fef)

* Address review

(cherry picked from commit c5f33e2)

---------

Co-authored-by: William Grzybowski <william@grzy.org>
…urce Field of Container Form (by AlexKarpov98) (truenas#12384)

* NAS-136903: Validation Inconsistency in Storage Disk Source Field of Container Form

(cherry picked from commit eb1acba)

* NAS-136903: PR update

(cherry picked from commit 6373e87)

---------

Co-authored-by: Alex Karpov <karpov4you@gmail.com>
…ly (by AlexKarpov98) (truenas#12392)

* NAS-136973: Virtual Machines page doesnt refresh properly

(cherry picked from commit 3f0dc38)

* NAS-136973: Update

(cherry picked from commit d993b7a)

* NAS-136973: Update

(cherry picked from commit 37c03b4)

* NAS-136973: PR Update

(cherry picked from commit 3467da7)

* NAS-136973: PR update

(cherry picked from commit d561aa7)

---------

Co-authored-by: Alex Karpov <karpov4you@gmail.com>
…ds, gray out button. (by AlexKarpov98) (truenas#12399)

* NAS-136799: To block feedback/bugs on experimental builds, gray out button.

(cherry picked from commit de8ce69)

* NAS-136799: NAS-136779: PR update

(cherry picked from commit 0867ddf)

---------

Co-authored-by: Alex Karpov <karpov4you@gmail.com>
…of user/pass fields in WebUI login (by AlexKarpov98) (truenas#12404)

* NAS-136335: Password managers intermittent recognition of user/pass fields in WebUI login

(cherry picked from commit 1155986)

* NAS-136335: PR update

(cherry picked from commit 9dc66e4)

* NAS-136335: PR update

(cherry picked from commit d267605)

---------

Co-authored-by: Alex Karpov <karpov4you@gmail.com>
… not work after an instance reboot (by AlexKarpov98) (truenas#12405)

* NAS-135923: Instance shell: the "Reconnect" button does not work after an instance reboot

(cherry picked from commit 839d0a3)

* NAS-135923: Instance shell: the "Reconnect" button does not work after an instance reboot

(cherry picked from commit 29cbd01)

* NAS-135923: PR update

(cherry picked from commit a053c1e)

* NAS-135923: PR update

(cherry picked from commit 7781aa1)

* NAS-135923: PR update

---------

Co-authored-by: Alex Karpov <karpov4you@gmail.com>
(cherry picked from commit 169022b)

Co-authored-by: William Grzybowski <william@grzy.org>
(cherry picked from commit b8b37f6)

Co-authored-by: William Grzybowski <william@grzy.org>
…pendencies (by william-gr) (truenas#12413)

* Clean up build scripts and remove unused dependencies

- Remove unused @inquirer/prompts dependency
- Consolidate build:prod script by removing redundant setup_prod.js
- Move environment.ts creation logic into setup-production-env.js
- Remove build:prod:aot script (merged into build:prod)
- Update Dockerfile and debian/rules to use simplified build:prod
- Fix JIRA URL in package.json (jira.ixsystems.com → ixsystems.atlassian.net)

(cherry picked from commit 3e6f4ab)

* Fix

(cherry picked from commit 8014ee2)

* Fix workflow

(cherry picked from commit 9127742)

---------

Co-authored-by: William Grzybowski <william@grzy.org>
…exKarpov98) (truenas#12416)

* NAS-137096: Time sort for frequency is incorrect

(cherry picked from commit 626ad6c)

* NAS-137096: PR update

(cherry picked from commit cb7cf5d)

---------

Co-authored-by: Alex Karpov <karpov4you@gmail.com>
…rvin) (truenas#12433)

* NAS-137185: add UI support for VNC to VM feature

(cherry picked from commit 0cfbcea)

* NAS-137185: remove SPICE from VM wizard, keep only VNC display option

- Remove SPICE display controls and logic from os-step component
- Make VNC the default and only display option in VM wizard
- Update form labels to be more generic since VNC is the only option
- Remove SPICE display device creation from wizard workflow
- Update help text to reflect VNC-only functionality
- Fix all related unit tests to match VNC-only configuration

(cherry picked from commit 9d233ee)

---------

Co-authored-by: Aaron Ervin <aaron.ervin@truenas.com>
(cherry picked from commit 9802286)

Co-authored-by: Alex Karpov <karpov4you@gmail.com>
… and inaccessible on Users (WIP) screen for Restricted admins (truenas#12436)

(cherry picked from commit 7282593)

Co-authored-by: Alex Karpov <karpov4you@gmail.com>
…2435)

(cherry picked from commit 199d573)

Co-authored-by: Alex Karpov <karpov4you@gmail.com>
…s when Importing CSR (by AlexKarpov98) (truenas#12445)

* NAS-137150: Private Key and Passphrase Validation Errors when Importing CSR

(cherry picked from commit 502751c)

* NAS-137150: Private Key and Passphrase Validation Errors when Importing CSR

(cherry picked from commit 9548967)

* NAS-137150: PR update

(cherry picked from commit e875683)

---------

Co-authored-by: Alex Karpov <karpov4you@gmail.com>
…dvanced (truenas#12447)

(cherry picked from commit 44fd3e3)

Co-authored-by: Aaron Ervin <aaron.ervin@truenas.com>
…/dedup VDEVs with no redundancy (truenas#12446)

(cherry picked from commit 4d212bd)

Co-authored-by: Aaron Ervin <aaron.ervin@truenas.com>
…iam-gr) (truenas#12451)

* NAS-137253: Properly check for RDMA capability

(cherry picked from commit fa1f8c9)

* NAS-137253: address review

(cherry picked from commit 5e02ad6)

---------

Co-authored-by: William Grzybowski <william@grzy.org>
(cherry picked from commit 9d727c6)

Co-authored-by: Alex Karpov <karpov4you@gmail.com>
(cherry picked from commit 2d034fb)

Co-authored-by: William Grzybowski <william@grzy.org>
…y gmbok9) (truenas#12460)

* NAS-137243: some improvements for editable component

(cherry picked from commit 11239a8)

* NAS-137243: resolved claude review

(cherry picked from commit e6c3359)

* NAS-137243: removed editable service

(cherry picked from commit 7761984)

* NAS-137243: resolved claude PR review

(cherry picked from commit 56c8700)

* NAS-137243: fixed unit tests

(cherry picked from commit 8adde61)

* NAS-137243: Fix pills styling

(cherry picked from commit 7572628)

* NAS-137243: fixed unit test

(cherry picked from commit 712a6ff)

* NAS-137243: fixed lint issue

(cherry picked from commit 17b69ae)

---------

Co-authored-by: Gerald Miral <gm.boknat@gmail.com>
Co-authored-by: Alex Karpov <karpov4you@gmail.com>
…william-gr) (truenas#12465)

* Fix WebSocket connection state sync issue by updating isConnectionLive$ on open

(cherry picked from commit 303edc2)

* Fixed WebSocket reconnection issue causing signin page to stay in loading state

(cherry picked from commit 84f4c29)

---------

Co-authored-by: William Grzybowski <william@grzy.org>
…ssword Prompt (truenas#12466)

(cherry picked from commit ff4fcb0)

Co-authored-by: Alex Karpov <karpov4you@gmail.com>
bugclerk and others added 20 commits January 8, 2026 10:32
…tory services group names into audit watch list and ignore list forms if caching is disabled (by AlexKarpov98) (truenas#13009)

* NAS-138855: UI doesnt properly allow users to input directory services group names

(cherry picked from commit c8881ed)

* NAS-138855: UI doesnt properly allow users to input directory services

(cherry picked from commit cccc9ae)

* NAS-138855: PR Update

(cherry picked from commit 0d8502e)

* NAS-138855: Fix async validator debounce timing and improve consistency

- Move debounceTime before API calls using switchMap to prevent race conditions
- Move validator attachment to ngAfterViewInit for consistency with existing pattern
- Prevents unnecessary API calls on every keystroke

(cherry picked from commit 3a55c77)

* NAS-138855: PR update

* NAS-138855: PR update

* NAS-138855: PR update

* NAS-138855: PR update

* NAS-138855: PR update

* NAS-138855: PR update

* NAS-138855: PR Update

---------

Co-authored-by: Alex Karpov <karpov4you@gmail.com>
…ms and list (by mattwyatt-ix) (truenas#13067)

* Empty commit to create PR on github.

You should reset it

* NAS-138979: feat: backport immediate updates for disk forms and list

---------

Co-authored-by: matt wyatt <matt.wyatt@truenas.com>
truenas#13098)

(cherry picked from commit bebe763)

Co-authored-by: Alex Karpov <karpov4you@gmail.com>
…as#13071)

* NAS-134875: Improve App Update UX

(cherry picked from commit ee2f62a)

* NAS-134875: Improve App Update UX

(cherry picked from commit 6f5359c)

* NAS-134875: PR update

* NAS-134875: PR Update

---------

Co-authored-by: Alex Karpov <karpov4you@gmail.com>
…truenas#13120)

- Add dynamic validators based on selected IDMAP backend instead of
requiring all fields regardless of backend type
- Remove incorrect [required] attribute from checkbox fields
- Add tests for dynamic validation behavior
…/groups (by AlexKarpov98) (truenas#13168)

* Empty commit to create PR on github.

You should reset it

* NAS-139459: PR update

---------

Co-authored-by: Alex Karpov <karpov4you@gmail.com>
…om Fangtooth (25.04.2.6) to Goldeye (25.10.2) when audit log is enabled (truenas#13174)

(cherry picked from commit 5fa84bb)

Co-authored-by: Alex Karpov <karpov4you@gmail.com>
…ete still shows error for prev value (by AlexKarpov98) (truenas#13208)

* NAS-139658: Clearing invalid value on user/group autocomplete still shows error for prev value

(cherry picked from commit d5dc3b3)

* NAS-139658: PR update

---------

Co-authored-by: Alex Karpov <karpov4you@gmail.com>
…anges and updates (by william-gr) (truenas#13219)

* NAS-137480: Suppress reboot info dialog during security updates

(cherry picked from commit 44a4c6b)

* NAS-137480: Use finalize() to guarantee unsuppress cleanup

(cherry picked from commit 5f9a04f)

* NAS-137480: Move finalize before errorHandler to run on dialog close

(cherry picked from commit b88b638)

---------

Co-authored-by: William Grzybowski <william@grzy.org>
… security settings save (by william-gr) (truenas#13220)

* NAS-139503: Add refreshRebootInfo action and refresh after security settings save

(cherry picked from commit b140fb0)

* NAS-139503: Refactor reboot info effects to reduce duplication and add HA test

(cherry picked from commit 568f1af)

---------

Co-authored-by: William Grzybowski <william@grzy.org>
…ruenas#13227)

(cherry picked from commit de67455)

Co-authored-by: William Grzybowski <william@grzy.org>

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Claude Code Review

This pull request is from a fork — automated review is disabled. A repository maintainer can comment @claude review to run a one-time review.

@AlexKarpov98

Copy link
Copy Markdown
Contributor

@claude review

@AlexKarpov98 AlexKarpov98 left a comment

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.

Hello, @randallle thanks for your PR.
Could you make sure this PR is created into the MASTER branch?

@randallle
randallle changed the base branch from release/25.10.2.1 to master March 30, 2026 18:03
@randallle
randallle requested a review from a team as a code owner March 30, 2026 18:03
@randallle
randallle requested review from AlexKarpov98 and removed request for a team March 30, 2026 18:03

@AlexKarpov98 AlexKarpov98 left a comment

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.

I'd suggest creating a new PR. This one has a lot of issues and 842 file changes. TY.

@randallle

Copy link
Copy Markdown
Contributor Author

I'd suggest creating a new PR. This one has a lot of issues and 842 file changes. TY.

Yeah I was gonna try rebasing, but I will close and create a new PR.

@randallle randallle closed this Mar 30, 2026
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.

9 participants