Store custom app themes under .bb/theme/<name>/theme.css#305
Open
SawyerHood wants to merge 2 commits into
Open
Store custom app themes under .bb/theme/<name>/theme.css#305SawyerHood wants to merge 2 commits into
SawyerHood wants to merge 2 commits into
Conversation
Move custom theme storage from a DB-stored CSS blob to named themes on disk under <data-dir>/theme/<name>/theme.css (mirroring user skills at <data-dir>/skills). The server discovers themes and resolves their CSS from disk; the DB stores only the active palette selection. - Remove `bb theme set-custom`; add `bb theme dir`; `theme list` and the Settings picker enumerate discovered custom themes. - Add GET /settings/themes catalog and customThemes to /system/config; PUT /settings/appearance now takes a theme id selection. - Drop the now-unused app_theme.custom_css column (migration 0043). - Update bb-cli skill + theming reference to the new convention. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The ThreadListEntry fixture in thread-open.test.ts was missing the `activity` field (required since #276). It stayed green on main because cli's turbo typecheck cache was never busted there; touching apps/cli in this branch forced a real re-typecheck and surfaced it. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Moves custom app-theme storage out of the database and onto disk, following the BB
.bbconvention: custom themes now live under<data-dir>/theme/<name>/theme.css(the packaged app uses~/.bb/theme/…), mirroring how user skills live under<data-dir>/skills/. The folder name is the palette id.This is a breaking change (as requested): the old
bb theme set-custom --filepath and the DB-stored custom CSS blob are removed. Custom themes are now created/edited by writing the file and selected by name.Behavior
<data-dir>/theme/*/theme.css, resolves the active theme's CSS from disk, and broadcasts it live. A selected theme whose folder is deleted falls back to the default palette.appearancein/system/configis resolved server-side; addedcustomThemesto the config and a newGET /settings/themescatalog ({dir, custom, active}).PUT /settings/appearancenow takes a theme-id selection and validates it (400 for an unsafe id, 404 for a missing custom theme, with the expected path in the message).theme listenumerates built-ins + discovered custom themes + the dir;theme set <id>accepts a custom theme name; newtheme dir; removedtheme set-custom.app_theme.custom_csscolumn (migration0043); the table stores only the active selection.bb-cliskill + theming reference to establish the.bb/theme/<name>/theme.csshabit and the create/edit/select workflow.Tests
@bb/db— 307 passed (incl. migration journal/folder checks validating0043).@bb/servertheme tests — 13 passed (appearance+ newcustom-themesservice: discovery, disk resolve, delete-fallback, size cap, 404 missing, 400 unsafe name).@bb/domain,@bb/db,@bb/server-contract,@bb/sdk,@bb/server,@bb/app,@bb/desktop— all clean.customThemesin config, the picker lists a samplesunsettheme, and selection applies live.Notes / risks
../separators); CSS is size-capped to keep the broadcast payload bounded.apps/cli/.../thread-open.test.ts(missingactivityfield from Change thread open to resolve workspace paths #276) — confirmed present on a clean tree, untouched here.🤖 Generated with Claude Code