Skip to content

feat(theme): make Cinema Dark the only theme, customized by the admin - #1534

Merged
Quick104 merged 3 commits into
mainfrom
t3code/restrict-theme-customization-to-admin
Sep 27, 2026
Merged

Quick104 merged 3 commits into
mainfrom
t3code/restrict-theme-customization-to-admin

Conversation

@Quick104

@Quick104 Quick104 commented Sep 27, 2026 •

Copy link
Copy Markdown
Contributor

Problem

Related issue: N/A
Validation tasks: changes #1227 C1, #1228 C1, #1181 C1

Every profile could pick one of five base themes, override individual colours and fonts, add its own CSS, and install community themes. Each of those choices changes how the rest of the UI looks, so a profile could easily end up with a combination nobody designed or tested. This change makes Cinema Dark the only theme. Customizing it is now an admin-only, server-wide decision on /admin/settings/appearance.

Approach

Profiles. The theme swatches in the profile menu, /settings/appearance, and /settings/theme-editor are gone. Date and time format moved to /settings/accessibility, and the two old URLs redirect there. Text size, text weight, and high contrast stay per profile.

Admin. The admin keeps the accent colour, token overrides, and custom CSS, all layered on Cinema Dark for everyone. The Default theme picker, the light-theme logo slots, and the community theme list URL are removed. A new "Reset to Cinema Dark" action clears the accent, token overrides, and CSS. Like "Restore defaults" for badges, it is staged and only applies when the admin saves.

Stored data. The migration 20260926233851_retire_profile_themes deletes every stored ui.theme, ui.custom_theme_vars, and ui.custom_css value at all scopes. SQLite user-store schema v29 does the same. The branding.default_theme and light-logo server settings are kept, because the frozen /api/v1 branding response still reports them. The three profile keys stay in the settings manifest, marked deprecated (revision 12), so a write from a stale cached web bundle is accepted instead of failing. Nothing reads them.

API. /api/v2 is not locked yet, so it drops the theme catalog operations, default_theme and the light-logo URLs from branding, and the wordmark_light/mark_light asset kinds. Each removal is approved in breaking-approvals.json. The frozen /api/v1 routes are unchanged: the catalog and light-logo uploads still work, and /theme/branding still reports any stored default_theme and light-logo URLs. The v1 catalog removal is recorded in docs/architecture/v1-scope.md and migration.json.

Plugins. The plugin proxy used to send each profile's ui.theme in X-Silo-Theme, falling back to the legacy account-level row. It now always sends midnight-cinema, so plugins never receive a theme that the migration has deleted or that the host no longer shows.

silo-apple and silo-android don't read any of the removed fields, keys, or routes. Their generated settings constants for the three deprecated keys still resolve. jellycompat has no theme surface.

Validation

  • Full pre-PR gate from CONTRIBUTING.md (Go build/vet/gofmt/lint-changed/test-go; web lint, format, build, budget, full vitest suite; generated-contract, fixture, route, migration-ledger, and local-path checks): pass, except TestAdminResourceCapabilitiesAndScope in internal/apiv2, which fails the same way on an unmodified main. The launch bundle shrank by about 3 KB, and perf-budget.json records that.
  • Migration: a Postgres test covers the deletion, the no-op Down, and a re-run. A SQLite v29 test covers the same deletion. The full migration chain was applied to a scratch database with seeded rows, and only the targeted rows were removed; server_settings is left untouched.
  • In the running web app against a dev server: the profile menu has no theme control, both old settings URLs land on Accessibility with the date and time controls, and the admin page no longer shows the removed fields. "Reset to Cinema Dark" is disabled at stock, enables after an accent is picked, resets the staged values on confirm, and writes nothing until Save. The backend part of this change has not been deployed to a shared server yet.

Risks

  • The migration deletes data and can't be undone. Profiles lose their chosen theme and any custom colours or CSS. An admin default theme and light-theme logos are kept but no longer affect the web client.
  • Admin custom CSS written against the other four themes ([data-theme="cinema-light"] and so on) stops matching. CSS targeting Cinema Dark or :root keeps working.
  • The /api/v2 removals break any third-party client that used the theme catalog or light-logo kinds. The API is still pre-lock, and no first-party client uses them.

Checklist

  • I read and can explain the complete diff.
  • This pull request addresses one concern.

AI Disclosure

  • Harness: Claude Code, running in T3 Code

  • Tool(s): Claude Code, including Claude Code subagents

  • Model(s): claude-opus-5-5[1m] (web changes); claude-opus-5-5 subagents (server, contract, and migration changes; review)

  • Involvement: Fully AI-generated, not yet human verified. A maintainer set the scope and approved the plan.

  • Adversarial review: A separate Claude Code review agent (claude-opus-5-5) read the full diff and searched the Go and web trees, and the silo-apple, silo-android and silo-plugin-sdk checkouts, for remaining uses of the removed keys, storage keys, branding fields, modules and routes. It also checked first paint, /api/v1 behavior, migration safety (table and key names, encrypted rows, SQLite v29 idempotency, backfill ordering), and the admin reset/discard logic. It found no blocking or major defects. Three findings were fixed:

    • The admin "show all device overrides" view still offered the retired Theme setting. It now excludes it.
    • Two stale comments pointed at removed code.
    • The /api/v1 branding change was undocumented: the migration also empties the light-logo URLs until a new upload. The handler comment, docs/settings-api.md, and the v1-scope record now say so.

    One was left as is: docs/settings-api.md and the v2 settings fixtures still use ui.theme as the example key, which is still served.

🤖 Generated with Claude Code

Note

Make Cinema Dark the only theme, customized by the admin

Removes all user-selectable themes, the community theme catalog, and the v2 theme catalog/download API endpoints. Cinema Dark is now the fixed base theme; admins customize it with accent color, token overrides, and up to 64 KB of custom CSS, and can reset it via a new confirmation-controlled "Reset to Cinema Dark" action in AppearanceSettings.tsx.

  • Deletes user theme selection, preview, and per-user custom CSS injection from the web client (useTheme.tsx, CustomThemeProvider.tsx); only text scale, text weight, and high contrast remain as user appearance preferences, now surfaced on the Accessibility page with new date/time format settings.
  • Removes the v2 theme catalog, catalog capabilities, catalog refresh, and theme download paths from the OpenAPI contract, with approvals recorded in breaking-approvals.json and migration records moved to the v1 removals table.
  • Drops light-theme branding assets (wordmark_light, mark_light) from v2 while frozen v1 routes keep serving them.
  • Adds a Goose migration and SQLite schema v29 migration that permanently delete ui.theme, ui.custom_theme_vars, and ui.custom_css rows; rollback does not restore them.
  • Behavioral Change: settingskeys.Revision and the settings manifest bump to 12; ui.theme is now a retired device-setting key; Appearance and Theme Editor settings routes redirect to Accessibility; Sonner notifications always use the dark theme.

Macroscope summarized 03d9d10.

@coderabbitai

coderabbitai Bot commented Sep 27, 2026 •

Copy link
Copy Markdown
Contributor

Important

Review skipped

Too many files!

This PR contains 110 files, which is 10 over the limit of 100.

To get a review, reduce the PR to 100 files or fewer by splitting it into smaller PRs or changing its base branch.

Upgrade to a paid plan to raise the limit.

This review couldn't start because sufficient usage credits or metered capacity aren't available. Add credits or update usage-based reviews in the billing tab, then retry.

Check out review usage here.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: fbee5422-b583-4f29-8ce3-d0d175ada91c

📥 Commits

Reviewing files that changed from the base of the PR and between 47cc1d8 and 03d9d10.

⛔ Files ignored due to path filters (1)
  • web/public/silo-wordmark-sidebar-light.png is excluded by !**/*.png
📒 Files selected for processing (110)
  • cmd/silo/main.go
  • contracts/api/v2/breaking-approvals.json
  • contracts/api/v2/fixtures/admin_network_access_status_not_found.json
  • contracts/api/v2/fixtures/admin_network_access_unknown_host.json
  • contracts/api/v2/fixtures/admin_subtitle_metadata_precondition_required.json
  • contracts/api/v2/fixtures/ebook_annotation_delete_missing_guard.json
  • contracts/api/v2/fixtures/ebook_annotation_patch_missing_guard.json
  • contracts/api/v2/fixtures/ebook_config_missing_guard.json
  • contracts/api/v2/fixtures/ebook_progress_missing_event_time.json
  • contracts/api/v2/fixtures/get_system_info_ok.json
  • contracts/api/v2/fixtures/index.json
  • contracts/api/v2/fixtures/list_series_seasons_invalid_artwork.json
  • contracts/api/v2/fixtures/login_provider_null.json
  • contracts/api/v2/fixtures/playback_installation_changed.json
  • contracts/api/v2/fixtures/playback_invalid_protocol.json
  • contracts/api/v2/fixtures/playback_progress_conflict.json
  • contracts/api/v2/fixtures/start_device_login_temporary_null.json
  • contracts/api/v2/fixtures/theme_catalog_document.json
  • contracts/api/v2/fixtures/theme_catalog_refreshed.json
  • contracts/api/v2/fixtures/theme_download_document.json
  • contracts/api/v2/fixtures/theme_songs_playback_not_acceptable.json
  • contracts/api/v2/fixtures/theme_songs_playback_unauthorized.json
  • contracts/api/v2/migration.json
  • contracts/api/v2/openapi.json
  • contracts/settings/v1/conformance.json
  • contracts/settings/v1/manifest.json
  • docs/admin-api.md
  • docs/architecture/v1-scope.md
  • docs/settings-api.md
  • internal/api/handlers/branding.go
  • internal/api/handlers/theme_service.go
  • internal/api/router.go
  • internal/api/testdata/media_routes.txt
  • internal/apiv2/admin_branding_assets.go
  • internal/apiv2/branding.go
  • internal/apiv2/document.go
  • internal/apiv2/document_test.go
  • internal/apiv2/fixtures_test.go
  • internal/apiv2/router.go
  • internal/apiv2/theme_catalog.go
  • internal/apiv2/theme_catalog_fixtures_test.go
  • internal/apiv2/theme_catalog_test.go
  • internal/branding/branding.go
  • internal/branding/render.go
  • internal/branding/render_test.go
  • internal/plugins/http_proxy.go
  • internal/plugins/user_theme_lookup.go
  • internal/server/branding_frontend_test.go
  • internal/settingskeys/keys.go
  • internal/userdb/migrate.go
  • internal/userdb/migrate_v29_test.go
  • migrations/retire_profile_themes_test.go
  • migrations/sql/20260926233851_retire_profile_themes.sql
  • web/perf-budget.json
  • web/src/App.tsx
  • web/src/api/v2/operations.ts
  • web/src/api/v2/schema.ts
  • web/src/app.css
  • web/src/components/AppSidebar.test.tsx
  • web/src/components/AppSidebar.tsx
  • web/src/components/SiloBrand.test.tsx
  • web/src/components/SiloBrand.tsx
  • web/src/components/admin/BrandingAssetField.test.tsx
  • web/src/components/admin/BrandingAssetField.tsx
  • web/src/components/admin/brandingAssetSpecs.ts
  • web/src/components/theme/CatalogBrowser.tsx
  • web/src/components/theme/CatalogBrowser.v2.test.tsx
  • web/src/components/theme/ImportExportBar.tsx
  • web/src/components/theme/RawCssEditor.tsx
  • web/src/components/theme/ThemePreviewCard.tsx
  • web/src/components/theme/TokenEditor.tsx
  • web/src/components/ui/sonner.tsx
  • web/src/contexts/BrandingProvider.tsx
  • web/src/contexts/CustomThemeProvider.tsx
  • web/src/highContrastContrast.test.ts
  • web/src/highContrastCss.test.ts
  • web/src/hooks/appearanceCacheOwnership.test.tsx
  • web/src/hooks/queries/admin/branding.ts
  • web/src/hooks/queries/branding.v2.test.tsx
  • web/src/hooks/queries/keys.ts
  • web/src/hooks/queries/theme.ts
  • web/src/hooks/queries/themeCatalog.v2.test.tsx
  • web/src/hooks/themePreferences.ts
  • web/src/hooks/useCustomTheme.ts
  • web/src/hooks/useTheme.previewIntent.test.tsx
  • web/src/hooks/useTheme.test.ts
  • web/src/hooks/useTheme.tsx
  • web/src/lib/adminSettingsSearch.ts
  • web/src/lib/design-system.ts
  • web/src/lib/deviceSettingGroups.ts
  • web/src/lib/documentTitle.ts
  • web/src/lib/settingsConformance.json
  • web/src/lib/settingsContract.ts
  • web/src/lib/settingsDisplay.test.ts
  • web/src/lib/settingsDisplay.ts
  • web/src/lib/themeExport.ts
  • web/src/lib/themeTokens.ts
  • web/src/lib/themes.ts
  • web/src/pages/SettingsLayout.test.tsx
  • web/src/pages/SettingsLayout.tsx
  • web/src/pages/admin-settings/AppearanceSettings.test.tsx
  • web/src/pages/admin-settings/AppearanceSettings.tsx
  • web/src/pages/settings/AccessibilitySettings.tsx
  • web/src/pages/settings/AppearanceSettings.tsx
  • web/src/pages/settings/ThemeEditorSettings.tsx
  • web/src/test/signedInBoot.test.tsx
  • web/src/themeBoot.js
  • web/src/themeBoot.test.tsx
  • web/src/utils/storage.test.ts
  • web/src/utils/storage.ts

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 34072dcc3d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread docs/settings-api.md
Comment on lines +484 to +488
Manifest revision 12 deprecates `ui.theme`, `ui.custom_theme_vars` and
`ui.custom_css`. They were web-only, and the web client no longer reads or writes
them. Migration `20260926233851_retire_profile_themes` (SQLite user store schema
v29) deleted every stored value at every scope. The definitions stay published, so
a write from a stale cached web bundle still succeeds, but nothing reads the value.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Replace ui.theme in the active settings examples

This section says that ui.theme is retired and no client reads it, but the same document's primary query and response examples at lines 117–145 still instruct API consumers to request it and show cinema-light as an effective value. After this migration deletes those values and the product supports only Cinema Dark, those examples describe behavior the client no longer implements; use a nondeprecated setting throughout the examples instead.

AGENTS.md reference: AGENTS.md:L109-L116

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Partly addressed in 70f5dee. These examples quote the committed v2 fixtures (list_effective_settings_ok.json, resolve_effective_settings_ok.json and others), which are generated from internal/apiv2/fixtures_test.go using ui.theme. Changing the doc alone would leave it disagreeing with the fixtures it cites. Changing the fixtures would spread into about 20 Go and web tests for request/response mechanics that work the same for every key. The section now opens with a note that the examples use the deprecated ui.theme key, links to "Retired theme settings", and says the mechanics are identical for any key. Moving the fixtures to a non-deprecated key can be a separate change.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 27, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-27T03:26:15.663808Z 03d9d10 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@macroscopeapp

macroscopeapp Bot commented Sep 27, 2026

Copy link
Copy Markdown

The Validation tasks: line omits three affected cases: #1180 C1 loses persisted theme preferences in the migration; #1221 C1 no longer offers the retired ui.theme override; and #1229 C1's Web branding/logo presentation now uses only Cinema Dark and has no light-logo variants. The related task cases are all Not run, so there are no recorded validations to invalidate or unblock.

Suggested replacement:
Validation tasks: changes #1227 C1, #1228 C1, #1229 C1, #1180 C1, #1181 C1, #1221 C1

Automated check: Macroscope check run agent (gpt-6-luna). No validation was performed.

Posted via Macroscope — v1 validation impact

Quick104 and others added 3 commits September 26, 2026 23:15
Profiles can no longer pick a theme, override tokens, add CSS, or install
community themes. Cinema Dark is the only base theme; the admin customizes
it server-wide with the accent, token overrides, and custom CSS, and can
reset it to stock. Date and time format moves to Accessibility.

Stored ui.theme, ui.custom_theme_vars, ui.custom_css values and the
retired branding.default_theme and light-logo references are deleted
(Postgres migration and SQLite user store v29). The three profile keys
stay in the manifest as deprecated. /api/v2 drops the theme catalog,
default_theme, and light-logo kinds; /api/v1 routes are unchanged.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
The migration no longer deletes branding.default_theme or the light-logo
references, and GET /api/v1/theme/branding reports them again, so the
frozen v1 response is unchanged on upgraded servers. The web client and
/api/v2 still ignore them. The settings API doc notes that its examples
use the deprecated ui.theme key.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@Quick104
Quick104 force-pushed the t3code/restrict-theme-customization-to-admin branch from 70f5dee to 03d9d10 Compare September 27, 2026 03:22
@Quick104
Quick104 merged commit 39a5547 into main Sep 27, 2026
10 checks passed
@Quick104
Quick104 deleted the t3code/restrict-theme-customization-to-admin branch September 27, 2026 03:24
Quick104 added a commit that referenced this pull request Sep 27, 2026
Approvals live only on the pull request that needs them. #1534 merged
with its eight, so the contract gate now reports them as stale on every
pull request against main.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Quick104 added a commit that referenced this pull request Sep 27, 2026
* feat(watchsync): sync dropped shows with Trakt and Simkl

Dismissing an episode or series from Home now drops the whole show for
the profile: it leaves Next Up and Continue Watching until the profile
watches it again or undoes the dismissal. Drops sync both ways with
Trakt and Simkl through a new per-connection setting, so shows dropped
on the provider no longer come back through history import.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>

* fix(watchsync): fill Watch Tonight past dropped series

Watch Tonight filtered dropped series out of one page of in-progress
entries, so dropped entries could crowd out eligible ones. Read further
pages, up to five, until the Continue Watching half is full.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>

* fix(watchsync): keep v1 dismissals per card and merge drops by time

Only v2 Home dismissals drop a show; the frozen v1 route keeps its
per-card dismissals. A catalog merge keeps the later of two drops,
deleting a profile removes its drops on either user store, and Watch
Tonight skips entries repeated across pages.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>

* chore(apiv2): remove the breaking-change approvals #1534 merged with

Approvals live only on the pull request that needs them. #1534 merged
with its eight, so the contract gate now reports them as stale on every
pull request against main.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>

* fix(watchsync): keep a provider re-drop made after a local watch

When watching in Silo ended an agreed drop and the user dropped the
show again on the provider afterwards, the sync sent an undrop and
overwrote that later drop. Import it instead when the provider drop is
newer than the watch. Also qualify the v2 descriptions: only connections
with dropped-show sync on send drops, and only the profile-wide Next Up
hides dropped shows.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>

* fix(watchsync): send a re-drop made after watching ended the drop

When watching ended an agreed drop and the profile dismissed the show
again, the agreement still read as dropped, so the re-drop was never
sent and a later read of the undropped show deleted it. A local drop
newer than the agreement now counts as a local change.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>

* fix(watchsync): check library access before dropping a series

A v2 dismissal drops the series and sends it to the profile's watch
providers, so a profile must be able to see the series first. An
inaccessible series answers 404 and nothing is written or sent.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>

* fix(watchsync): agree on a restored drop at its imported time

After importing a provider re-drop, the agreement check still compared
the old local drop time, so the agreement kept its old timestamp and
the next read treated the imported drop as a local change. Agree on
the drop as imported. The sync setting description now names series
dismissals too.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>

---------

Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
blurbery added a commit to blurbery/silo-server that referenced this pull request Oct 1, 2026
- Restore upstream's Silo-Server#1534 breaking-change approvals for the theme catalog
  and light branding slot removals. Upstream cleared them once its own main
  absorbed the change, but the fork's gate still compares against the
  pre-removal fork main. The fingerprints are unchanged.
- Restore upstream's admin collections test, which still carried the
  removed poster-only editor helpers.
- Fix changed-line lint on inherited upstream code: reuse the collection
  artwork constants, name repeated codec and hash strings, and log the
  artwork reconcile warnings with their context.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
blurbery added a commit to blurbery/silo-server that referenced this pull request Oct 4, 2026
- Replace the fork's consumed Silo-Server#1534 breaking-change approvals with upstream's
  own records for the changes this sync brings in: the device sign-in
  canceled status (Silo-Server#1799) and invitation links without email delivery
  (Silo-Server#1788, approved as Silo-Server#1390). The fork's gate compares against the
  pre-sync fork main, so it still sees them.
- Give each fork row in the sample-entry admission table its own expected
  rejection. Upstream's Silo-Server#1869 now asserts its rows' message; the fork's
  extra rows are rejected by the fork's more specific checks.
- Type the incomplete person in the person page test as a real Person
  instead of casting a number id and a null birth date.
- Drop the two season plugin notice tests from the Silo-Server#700 draft; upstream's
  final Silo-Server#700 folded the same assertions into the image selection test.
- Fix changed-line lint on inherited upstream code: reuse the If-None-Match
  and header parameter constants, and name the image cache provider and
  content-type strings and the auto subtitle sync off value.
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