Repository navigation
Environment themes for a desktop paired to its own background service, and published themes from every connected environment #19856
Replies: 1 comment
|
This limitation is still present with T3 Code v0.1.2 (desktop AppImage and background-service CLI), on Omarchy/Hyprland Linux. My desktop has Local environment disabled and is paired with the persistent background server on the same machine. Omarchy publishes its generated palette to This affects Omarchy's automatic theme integration, not just one-time selection. Omarchy PRs #15907 (self-updating AppImage) and #14178 (theme setup without opening the app) are already present in the installed Omarchy revision, Source review at T3 main Proposal 1 would address this use case while preserving the background server: follow the paired environment matching the desktop's own T3 home, without giving unrelated connections control of the client theme. Manual import provides a snapshot workaround, but loses automatic updates when Omarchy changes themes. Enabling the desktop's Local environment is not a suitable workaround while the service owns the same home. Adding this as current-version evidence for the existing proposal, rather than opening a duplicate of #19842. No patched client build or visual UI automation was used to validate a fix. |
Uh oh!
There was an error while loading. Please reload this page.
Follow-up to #19842, which asked for this as an Ideas discussion that explains how conflicts between environments are resolved.
Problem
Since #16102, one server owns a T3 home. A desktop that runs on the same machine as
t3 servicehas to turn Local environment off and pair with the service through Add environment. The background-service docs lead users to this setup, so that closing the window doesn't stop threads.That desktop then has no primary environment, so it never sees that home's environment themes.
t3 theme seton the service changes nothing, and the published themes aren't listed in Settings → Appearance. The workaround in #19842, keeping Local environment on, is no longer possible because the service owns the lock. Today the only way is to import the JSON by hand on every client, and then the theme no longer follows server updates.Seen on
0.0.46-nightly.20261015.3145, desktop and service on the same machine.Cause (by design)
apps/web/src/state/primaryEnvironment.ts#L5-L12: the primary environment is the catalog entry whose target isPrimaryConnectionTarget. A paired environment is aBearerConnectionTarget(packages/client-runtime/src/connection/model.ts#L9-L54).apps/web/src/hooks/useEnvironmentTheme.ts#L107-L108andapps/web/src/state/server.ts#L125-L128: published themes come only from the primary server's config.apps/web/src/hooks/useDefaultTheme.ts#L73-L84: default-theme adoption keys onprimaryEnvironmentIdAtomand returns early when it isnull.Two separate questions
"Which themes can I pick?" and "whose
t3 theme setswitches me?" are separate questions. Only the second can conflict.Proposal 1: treat a same-home paired environment as the theme source
When the desktop has no primary environment, use a paired environment whose
environmentIdmatches the desktop's own T3 home (userdata/environment-id) as the source for environment themes and default adoption.useDefaultThemeAdoption. Every other "primary" behaviour stays as it is. A broader version would make that connection fully primary, but that is a larger decision.t3code:default-theme-applied:v2:<environmentId>and the environment ID doesn't change, so a client that switches from Local environment to the paired service doesn't apply the samet3 theme settwice.desktop-settings.json. It would pass the home's environment ID to the renderer, next to the existing desktop bootstrap data.Proposal 2: published themes from every connected environment, defaults from one
Extend Settings → Appearance to list the published themes of every connected environment:
<environmentId>:<themeId>), so two machines can each publish anightfallwithout colliding.t3 theme set. At3 theme seton any other environment only publishes. Most-recent-wins across machines is not used, because their clocks can differ and the result would surprise people.That is the conflict rule: one environment sets the default, and every environment can publish themes a client can pick.
A later option, not part of this ask: a Follow defaults from setting per client, for clients that have neither a primary nor a same-home environment.
Use case
A seated Linux desktop paired with its own
t3 service, asbackground-service.mddescribes, with a theme published once on the service (t3 theme set nightfall). Today each client has to import that file by hand, and it stops following updates. With Proposal 1 the desktop behaves as it did with Local environment on. With Proposal 2, other machines can also pick the theme from the environment that publishes it.Proposal 1 is a small change. If maintainers approve the direction, I can send a PR for it.
All reactions