Skip to content

Design review: opt-in UI theme and decoration extensions #507

Closed as not planned

Description

@devswha

Problem

Reviewing the droplet-effect PR #442 raised the question of how far the core app should go in supporting the visual customization users want.

#442 starts with tabs and wires the effect into many areas: the sidebar, menus, the command palette, Settings, question cards and more. Even when it is off by default, the effect's code and CSS ship in the app, and every UI change would have to keep checking position, overlap, focus, scrolling and input-method compatibility. The cost of the SVG filters and animations that run while the effect is on and the selection moves would also have to be verified on every supported device.

#442 in its current scope is held back from the core, and is considered instead as a candidate for a UI extension that users add themselves. This issue discusses that direction; the implementation approach and schedule are not decided yet.

Proposal

First see what a small theme pack can cover, and widen to decoration extensions only if the need is confirmed.

  • Theme packs: change a limited set of looks (colors, corner radii and the like) through public style tokens.
  • Opt-in install and activation: load only extensions the user added. The design goal is that an extension that is not installed or is disabled has none of its code or styles requested or run.
  • Decoration effects: start with a few areas such as tabs and work out the extension points they need. Internal CSS classes and the whole DOM structure are not an external API.
  • App and extension responsibilities: the app owns a small public contract and the default selection and focus indicators; an extension owns its own rendering, animation and cleanup. Separating extensions does not remove the cost of maintaining the public contract, so its scope stays small.

What is reviewed here is the look of the browser UI. herdr's PTY ownership, terminal attach, input delivery and server permissions keep their current behavior.

Where

Settings / Appearance, tabs, sidebar and navigation; browser UI extension loading and lifecycle.

Review criteria

  • Without any extension, the current UI and its input and selection behavior stay as they are.
  • A decoration never hides the real selection or keyboard focus, and never changes click targets or a list's scroll range.
  • Touch and prefers-reduced-motion behavior are specified and verified.
  • Disabling or removing an extension cleans up its styles, event listeners, animations and added DOM.
  • The scope of the public contract, version compatibility, and how a failed extension falls back to the default UI are defined.
  • Rendering cost is measured with the enabled effect in motion, and the test environments (high-DPI screens, low-end devices) are recorded.

Questions to settle first

  1. Can this start with declarative theme packs only? What additional demand would justify JavaScript decoration extensions?
  2. Which tokens and decoration areas are right to make public first?
  3. How do users add, disable and remove extensions, and what distribution can be trusted?

Workarounds and alternatives

Related: #442, #443

Activity

  1. added
    enhancement
    on Oct 6, 2026
  2. WOULDU-pres commented on Oct 6, 2026

    @WOULDU-pres
    Contributor

    검토 감사합니다! 내용 확인했습니다. #442 만들면서 느낀 점 몇 가지 남겨봅니다.

    테마 팩으로 변경하는게 좋은 생각인 것 같습니다!!
    다만 지금은 터미널 색이랑 PWA 상단바 색이 settings.ts에 따로 적혀 있어서, CSS만 바꾸는 팩이면 터미널 색은 그대로 남아요. 팩을 JSON 같은 데이터로 두고 앱이 한 번에 적용하는 쪽이 나을 것 같습니다. #443 만들 때도 팔레트 하나 추가하는데 파일을 9개나 건드려야 해서, 팩으로 되면 훨씬 편할 것 같고요.

    장식 쪽은 짚어주신 버그들이 결국 물방울이 지금 선택된 항목을 스스로 추측하다가 생긴 거라, 확장 지점을 만든다면 앱이 현재 항목이랑 그릴 자리를 직접 넘겨주는 게 맞는 것 같아요. #442는 내부 클래스를 그대로 잡아서 쓴 거라 확장으로 가면 그 방식은 못 쓸 거고요. 처음엔 탭 정도만 열고, 명령 팔레트처럼 키보드로 선택이 움직이는 목록은 나중에 보는 게 좋겠습니다.

    그리고 JS 확장은 앱이랑 같은 권한으로 돌아가서 터미널 입력까지 건드릴 수 있으니, 테마 팩은 데이터만, JS 확장은 로컬에 직접 넣은 것만 허용하는 식으로 나누면 어떨까 싶어요.

  3. devswha commented on Oct 6, 2026

    @devswha
    OwnerAuthor

    The overall UI is being reworked right now, so I'd like to keep this as a later feature. I've filed it as an issue for now. As you suggested, I'm considering that approach for JS extensions.

  4. reopened this on Oct 6, 2026
  5. SpiffyEight77 commented on Oct 7, 2026

    @SpiffyEight77

    @devswha
    I’d like to contribute Rosé Pine / Moon, with Dawn for light mode.
    Since the UI is being updated, I’m happy to wait for the theme-pack design rather than add another built-in palette now.

  6. devswha commented on Oct 14, 2026

    @devswha
    OwnerAuthor

    Sharing the policy for core palettes.

    • The core app's color palettes are fixed at three: Amber (default), Charcoal and Catppuccin (refactor(settings): keep three color palettes #1078). Dark report, Lilac and Forest were removed; settings that used them open in Amber.
    • Each palette is a light and a dark block, so every later token change has to fill in every palette. CONTRIBUTING therefore says new palette PRs are not accepted.
    • Other themes (Dracula, Rosé Pine and so on) go through this issue's theme packs (opt-in installs that change only colors through public style tokens). Question 1's "start with declarative theme packs" is the first step.
  7. demrom commented on Oct 14, 2026

    @demrom
    Contributor

    Following up on #976: I'd like to help get the declarative theme pack started, with Dracula as the first pack.

    #976 can serve as a worked example of what a pack has to carry. It maps Dracula Classic (dark) and Alucard Classic (light) onto every current token, and the PR has screenshots of both. Building it ran into what @WOULDU-pres described above: a palette lives in three places, the CSS token blocks in styles.css plus the xterm theme and the PWA theme color in settings.ts. A CSS-only pack would leave the terminal in the old colors, so a pack would be one JSON file holding all three.

    A possible shape:

    • A pack has an id, a name, and a dark and a light block. Each block holds values for the public tokens, an xterm theme and a theme color.
    • The app checks the file against a fixed list of public tokens, sets them as custom properties on <html> and passes the terminal theme to xterm. It ignores unknown keys, and a token the pack leaves out keeps the default palette's value, so adding a token later does not break existing packs.
    • The bridge could keep packs as JSON files in its state directory and serve them to paired clients. A pack added once on the PC would then show up on every device, and the app would only ever load what the user put on their own machine. Which pack is active stays a per-device choice, like the palette today, and import and remove buttons in Settings → Appearance would write to the same directory.
    • A pack is data and runs no code.

    Before writing anything I'd need to know which tokens you are willing to keep stable as the public set. If you can name them, or would rather settle the contract yourself first, I can then open a draft PR with the loader and the Dracula pack converted from #976.

  8. changed the title [-]선택 설치형 UI 테마·장식 확장 설계 검토[/-] [+]Design review: opt-in UI theme and decoration extensions[/+] on Oct 14, 2026
  9. devswha commented on Oct 14, 2026

    @devswha
    OwnerAuthor

    Thanks for the detailed proposal, and for #976 as a worked example. We have settled the direction:

    • The public contract is a Base16-style seed set, not our internal tokens. A pack gives about 16 base colors per variant (background shades, foreground shades and the 8 accent hues), plus optional terminal ANSI colors. The app derives every other token from those seeds (hover, dim text, borders, status tints, syntax colors), so we can rename or split internal tokens without breaking any pack, and existing Base16 schemes (Dracula, Rosé Pine, Nord, ...) should work almost as-is.
    • A pack is data only: one JSON file with an id, a name and a dark and/or light block. No code runs. Unknown keys are ignored, and a missing seed falls back to the default palette.
    • Packs live outside this repository. Users keep a pack file on their PC and import it in Settings → Appearance; later, packs shipped inside herdr plugins can be read too. This repository gets the loader, not the themes, so it does not grow with every new theme and does not take a PR per theme. At most one small example pack goes into the docs for tests. JavaScript decoration extensions are out of scope for now.

    The first step is on our side: rebuilding the three core palettes on top of seeds, so the derivation exists and is tested. Once that lands, a PR with the pack loader would be very welcome, and your Dracula conversion from #976 would make a good first pack to publish from your own repository. I'll post here when the seed contract is merged.

    One question for you, since you already mapped Dracula onto every token: would a Base16-style seed set be enough to express it? If any part of the UI or the terminal needed a color that 16 seeds plus the ANSI colors cannot give, please list it, and we will consider adding a seed for it.

  10. devswha commented on Oct 14, 2026

    @devswha
    OwnerAuthor

    Update: the plan is to offer every theme herdr ships as a setting, using herdr's dark/light model (a dark theme and a light theme picked separately). It changes the UI a lot, so it is on hold while larger UI work lands first. The plan is tracked in #1121.

  11. devswha commented on Oct 17, 2026

    @devswha
    OwnerAuthor

    Superseded by #1121: the app now offers herdr's own themes (#1253-#1256) with a separate dark and light pick, and #1078 kept the core to three palettes. A user pack loader and JavaScript decoration extensions are not planned for now.

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

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions