Skip to content

Merge profiles by name across includes, packages and the main file #24

Closed

Description

@Seb-GRAF

Problem

Top-level arrays replace earlier ones, except widgets, which concatenate, and packages, which merge by ID (README "Modules, templates and overrides"; ConfigurationLayer.merge in Sources/StableBar/ConfigurationLoader.swift). profiles is replaced like any other array:

  • A main file with any profiles drops every profile from its includes and packages. A module's dark appearance profile disappears as soon as the main file adds a laptop profile.
  • Customize → Editor → Profiles works around this: editing an imported profile writes the full combined list into the main file (README "Theme tokens and automatic profiles", feat: add yabai workspaces, profile editing, app icon and MIT license #21). The copies then hide later changes to the module and stay after the module is removed.
  • Pick a theme from installed theme packages #19 makes this more visible. A theme's light and dark variants are profiles, so they vanish when the user has a profile of their own, and the profile editor copies them into the main file, where they stay after switching themes.

Proposal

  • Merge top-level profiles by name, as packages merge by ID: a later profile with an existing name merges into it, with later values winning, and keeps its position; new names append in order.
  • Let a later layer turn off an inherited profile, for example with "enabled": false, as package selections and widgetOverrides do.
  • Have the profile editor save only the profiles the user added or changed into the main file, not the combined list.
  • Update the merge rule in the README.

Possible today

Keep every profile in one file, or copy the imported profiles into the main file (what Customize does) and keep the copies in sync by hand.

Related

#19 (theme packages): its branch documents this as a limitation of theme profiles. #9 / #21 (profile editing, released in 0.4.0) introduced writing the full list to the main file.

Triaged by Claude Code (Claude Opus 5.5).

Activity

  1. added
    enhancement
    on Oct 16, 2026
  2. stablebar-releases commented on Oct 21, 2026

    @stablebar-releases

    🎉 This issue has been resolved in version 0.5.0 🎉

    The release is available on GitHub release

    Your semantic-release bot 📦🚀

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

    enhancementreleased

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions