Skip to content

Separate the phone's bottom bar from the desktop sidebar; switched-off sidebar items stay listed - #53

Merged
ingoau merged 4 commits into
mainfrom
fix/desktop-order-list
Oct 9, 2026
Merged

ingoau merged 4 commits into
mainfrom
fix/desktop-order-list

Conversation

@ingoau

@ingoau ingoau commented Oct 9, 2026

Copy link
Copy Markdown
Owner

Why

Two bugs combined to break the desktop sidebar:

  • Phone bar overwrote the desktop sidebar. Saving the phone's bottom bar also wrote it into the synced actions.order.sidebar setting, so the desktop sidebar ended up with the phone's two to five places. The phone's Library place has no desktop view of its own and fell back to Albums, so desktop showed a "Library" that opened Albums, and Artists etc. were gone.
  • Switched-off items vanished for good. Desktop Settings → Customisation built its lists from Query.Actions, which returns only the chosen actions. Switching an item off dropped it from the list, so it could never be switched back on.

What

  • core: new synced setting nav.mobileBar for the phone's bottom bar: ordered place ids, [] means the default. Also added to both fake cores.
  • android: the bottom bar reads and writes nav.mobileBar through a new SyncedNavBarPrefs.
    • It still syncs between phones, but no longer touches actions.order.sidebar.
    • A bar saved device-locally (DataStore) before this is copied over once, if the account has no bar yet. The local copy is cleared either way.
    • NavItem.canonicalActionId existed only to feed the sidebar order, so it's removed.
  • desktop: the choose-and-order lists (sidebar, context menu, media buttons) now show the switched-off actions after the chosen ones.
    • Their labels and icons come from the palette.
    • The full set for each surface is in src/shared/action-orders.ts, which mirrors the core's default lists.

Existing accounts

An account whose actions.order.sidebar already holds the phone's list keeps it after this. With the desktop fix, the missing places now appear in Settings → Customisation → Sidebar items and can be switched back on.

Testing

  • cargo test -p hocket-core settings: 25 passed.
  • Android :app:testDebugUnitTest: 129 tests, 0 failures, 13 skipped (the same suites as before).
    • addReorderAndRemovePersistAcrossRecreation now checks that the bar saves to nav.mobileBar, that the sidebar order stays [], and that a fresh store over the same core restores the bar.
    • New test aDeviceLocalBarIsAdoptedOnce.
  • Desktop: typecheck passes, vitest 150/150 pass, eslint is clean on the touched files.
  • New e2e test chrome.spec.ts, "a sidebar place switched off in Settings stays listed and can be switched back on": it passes, and it fails without the fix.
  • Not tried on a device or against a real server.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Y13F1MZyepBvGTi1ceeGUc

ingoau and others added 4 commits October 9, 2026 17:27
The phone's bar gets its own synced key, so it no longer has to share
actions.order.sidebar with the desktop sidebar. Mirrored in both fake cores.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y13F1MZyepBvGTi1ceeGUc
Saving the bar used to overwrite the synced desktop sidebar order with the
phone's two to five places (Library showing up as Albums on desktop). The bar
now lives in its own synced setting, shared between phones, and the desktop
sidebar is left alone. A bar saved device-locally before this is adopted once
when the account has none yet.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y13F1MZyepBvGTi1ceeGUc
The choose-and-order lists were built from Query.Actions, which returns only
the chosen actions, so switching one off removed it from the list for good.
The switched-off rest of each surface's set is now listed after the chosen
ones, described by the palette.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y13F1MZyepBvGTi1ceeGUc
…playlist

Escape starts the dialog's exit animation; until it unmounts, its
"New playlist…" row also matches the Playlists view's New playlist button,
so the click raced the animation and failed under strict mode.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y13F1MZyepBvGTi1ceeGUc
@ingoau
ingoau merged commit 32a8745 into main Oct 9, 2026
4 checks passed
@ingoau
ingoau deleted the fix/desktop-order-list branch October 12, 2026 04:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant