Navigator: the Browse open state is kept per screen class, like every other section
All checks were successful
Build pull request / Build pull request (pull_request) Successful in 3m42s

Libby's read of #67: Browse had no phone/wide split, so opening it on one screen class opened it on the other. The store keeps its name and localStorage key (a rename would drop saved state); the comment says what a key means.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
Void 2026-11-11 20:55:27 +00:00
commit 65d54d4bf4

View file

@ -213,11 +213,14 @@ function GroupSection({ tierId, group }: { tierId: string; group: EstateGroup })
/**
* Groups of rooms the user has not joined, behind one quiet entry. Closed until opened, on every screen; the opening is
* remembered per device like any other section.
* remembered per device and screen class like any other section.
*/
function Browse({ tierId, groups }: { tierId: string; groups: EstateGroup[] }) {
const mobile = useScreenSizeContext() === ScreenSize.Mobile;
const [toggled, setToggled] = useAtom(useClosedNavCategoriesAtom());
const key = makeNavCategoryId('estate', 'browse', tierId);
// The store holds sections flipped from their default (it keeps Cinny's name, and its localStorage key). Browse's
// default is closed, so a key here means open; like Collapsible it is kept per screen class.
const key = makeNavCategoryId('estate', mobile ? 'phone' : 'wide', 'browse', tierId);
const open = toggled.has(key);
const count = groups.reduce((n, g) => n + g.rooms.length, 0);