Repository navigation
Theme packages: HUD chrome and style variants (workshop only) - #156
Merged
Merged
Conversation
Theme packages may now declare a top-level `chrome: {"style": "hud"}` and a
`variants` list (2-6 complete palettes, optional appearance overrides and a
background tint). Both stay outside `appearance`, so older clients and the
deployed workshop validator still accept the package and show the default
palette.
- themeHud.css draws cut-corner panels, neon frames, rulers, the notched
composer, code headers and syntax colors; every rule is scoped to
:root[data-theme-chrome="hud"] (guarded by themeHud.test.js).
- Variant tints recolor the three backgrounds with CSS color blending, so one
image set serves every variant.
- HudEffects plays a boot scan, a glitch interstitial on variant switches
(above dialogs) and a slow scan band; ambient motion is gated by the new
theme_effects switch.
- Settings > Appearance shows the variant picker and motion toggle;
web_ui.theme_variant / web_ui.theme_effects persist through
/api/config/ui-preferences and the Desktop bootstrap.
- diff2html colors follow the HUD palette (headers, tags, rails, tinted rows). - The scan band makes one pass, then waits 30 seconds. - Workshop-only capability, off by default: keep it out of the version notes.
There was a problem hiding this comment.
🔵 Needs a closer look
The reported C++ test failure has not been checked against clean master, so its regression status remains unresolved.
1 open issue
What changed in this PR
Adds optional HUD chrome and color variants to ACECode workshop theme packages, with persistent appearance controls. Ordinary themes retain their existing behavior.
Changes:
- Adds variant validation, palette overrides, background tinting, and HUD motion effects.
- Persists variant and motion preferences through settings, REST, and Desktop startup.
- Adds regression coverage, translations, and theme/API documentation.
| File | Description |
|---|---|
web/src/theme.jsx |
Resolves variants and mounts HUD effects. |
web/src/styles/globals.css |
Enables background tint blending. |
web/src/lib/themePackages.js |
Validates and applies optional theme features. |
web/src/lib/themeHud.test.js |
Tests variants, effects, and CSS scoping. |
web/src/lib/runTests.js |
Registers HUD tests. |
web/src/lib/hudEffects.js |
Defines animation trigger decisions. |
web/src/lib/colorThemeArchitecture.test.js |
Updates provider architecture assertions. |
web/src/lib/appearancePreferences.test.js |
Updates preference expectations. |
web/src/lib/appearancePreferences.js |
Normalizes and serializes new preferences. |
web/src/i18n/sourceCatalog.generated.js |
Adds localized appearance labels. |
web/src/components/SettingsPage.jsx |
Adds variant selection and motion controls. |
web/src/components/HudEffects.jsx |
Renders decorative HUD animations. |
web/src/App.jsx |
Connects controls to preference persistence. |
web/scripts/i18n-en-overrides.mjs |
Supplies English appearance translations. |
tests/web/web_server_smoke_test.cpp |
Tests REST persistence and validation. |
tests/config/config_web_ui_preferences_test.cpp |
Tests defaults, validation, and sparse saves. |
src/base/config/config.hpp |
Declares new preference fields. |
src/base/config/config.cpp |
Loads, validates, and saves preferences. |
src/apps/web/server_helpers.cpp |
Includes preferences in API responses. |
src/apps/web/routes/routes_misc.cpp |
Accepts and validates preference updates. |
src/apps/desktop/main.cpp |
Includes preferences in startup bootstrap. |
docs/themes.md |
Documents optional HUD package features. |
docs/daemon-api.md |
Documents new preference fields. |
CLAUDE.md |
Records theme implementation constraints. |
Review effort: Balanced
| <span key={index} className="w-5 h-5 rounded border border-border" style={{ background: color }} /> | ||
| ))} | ||
| </div> | ||
| <div className="text-[13px] font-semibold truncate">{option.name}</div> |
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.

主题包新增两个可选的顶层字段:
chrome: {"style":"hud"}和variants(2–6 套完整配色,可带外观覆盖和背景染色)。目前用于创意工坊的「荒坂公司」主题。这是工坊主题专用能力,默认不启用;按用户要求,不写进版本更新记录。
themeHud.css:切角面板、霓虹描边、标尺、凸台输入框、代码块标题条与语法配色、diff 配色。每条规则都限定在:root[data-theme-chrome="hud"]下,由themeHud.test.js守着。color混合,一套背景图对应所有风格。HudEffects:开屏扫描、风格切换过场(显示在设置窗口之上)、扫描光带(扫一遍后冷却 30 秒),受「动态效果」开关控制。web_ui.theme_variant/web_ui.theme_effects(REST 与 Desktop 首帧注入)。测试:
pnpm test3357 项通过,pnpm build通过;C++ 新增配置、REST 用例通过,快速档 5914 项中有 1 项失败,是TrayUnreadIcon.ReleasesIconsAndHandlesInvalidInputs(GDI 计数 9 对 8)。该测试来自 master 已有的托盘功能,与本改动无关,未在干净 master 上复测。