cmux NEXT App Store: Chief in Sidebar

Merged
TE
16d ago
+383-10

Follows #22759 (merged): the sidebar's Chief item.

Summary

Leo asked (2026-10-20) for the sidebar's Chief item to be optional and off by default, with an App Store toggle. This PR adds that toggle: a Features card, Chief in Sidebar.

  • New switch kind. AppFeature.Switch gains .sidebarItem(String). The feature is on while the sidebar layout shows that built-in. The card's setting is sidebar.layout, where the item lives, so the source of truth stays the layout document, not a parallel key.
  • Get and Remove. Get runs sidebar.item.add item=chief and Remove runs sidebar.item.removeEverywhere on the chief item. Both run as the person's edit (origin: .user), so Undo takes them back. A refused edit shows on the card as "Not changed".
  • The bridge. The SettingsAppFeatures.sidebarItems hook answers for .sidebarItem features. ChiefSidebar.bind sets it:
    • isShown comes from ChiefSidebar.isPlaced, which SidebarModel.followTopItems reads from the window's layout, so it is observable.
    • Until the hook is set, the card is not listed. A sidebar item is never managed.
  • Size cap. CmuxNextApp does not grow (check-app-size.sh --base: OK).

Testing

  • AppStoreFeaturesTests:
    • everyFeatureIsAnExistingSettingWithAValidOnValue now covers .sidebarItem: the name is a SidebarBuiltIn, and the default layout does not show it.
    • New aSidebarItemCardAddsAndRemovesTheItem: the card is not listed without the hook; on follows the sidebar; Get and Remove run its edits; a refused edit throws.
  • prepush-gate.py: no new violations.

Observed / Not run

  • Observed: the static gate and the size cap, run locally.
  • Not run: the Swift build and the tests. Per the repo rules, they run on CI, not on this Mac. I have not dogfooded this in a tagged build.

Changelog

  • Added: The App Store's Features tab has Chief in Sidebar, which adds the Chief to the sidebar or removes it.

Strings: store.feature.chiefSidebarItem.name and .summary, in 21 locales.

Agent session: cosmic-gray

🤖 Generated with Claude Code