Skip to content

[Bug]: Imported theme sharing an id with a published theme overrides its colors, while the background comes from the published one #37965

Closed

Description

@abzy128

Before submitting

  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.

Area

apps/web

Steps to reproduce

  1. In Settings → Themes, use Add theme to import a theme JSON named "Promenade of the Condemned". Its id becomes promenade-of-the-condemned.
  2. Publish a newer version of the same theme to <themesDir>/promenade-of-the-condemned.json, with a background image at <themesDir>/promenade-of-the-condemned.webp. t3_theme_read lists it as published with hasBackground: true.
  3. Select the theme (the "halves" setting ends up as {"light":"t3-chat","dark":"promenade-of-the-condemned"}) and reload.
  4. Edit a color in the published file, for example change warningForeground from #0b1a1e to #e2c044, and reload again.

Expected behavior

Two themes can't share an id silently. Either the import gets a unique id, or one copy consistently wins: colors, CSS and background together.

Actual behavior

The two copies get mixed:

  • The background image comes from the published copy. go(themeId) fetches environment-theme-background by id.
  • The colors come from the stale imported copy. Edits to the published file have no visible effect. For example, the sidebar "Woke" label (text-warning-foreground) stays almost invisible, rendering about #18262a on #162327, even though the published file and t3_theme_read both return warningForeground: #e2c044.

Nothing in the UI shows that two themes share an id. Both cards look like the same theme, and only the imported one has edit and delete buttons.

Impact

Minor bug or occasional failure

Version or commit

v0.1.10

Environment

macOS (Apple Silicon), T3 Code (Beta) desktop 0.1.10

Workaround

Delete the imported card (the one with the trash icon), run t3 theme set promenade-of-the-condemned, and reload. All colors then come from the published file.


Created with Opus 5.5 in T3 Code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions