fix(profiles): keep the picker chrome-free

/profiles was unknown to the layout shell, so reaching it from Settings
rendered the bottom nav and global header over the picker -- letting
someone tab straight past the profile they were being asked to choose,
and offering an in-app mini player as a route back into the previous
profile's queue.

Grouped with /login throughout layoutShell: it is a gate, not a page. OS
lockscreen transport controls are unaffected, which is what keeps playing
audio controllable while the app is locked.
This commit is contained in:
2026-08-30 19:30:51 +02:00
parent da762da55d
commit fb3d0014ef
2 changed files with 51 additions and 5 deletions
+34
View File
@@ -202,3 +202,37 @@ describe("showHeaderSearch", () => {
expect(showHeaderSearch({ pathname: "/settings" })).toBe(false);
});
});
/**
* The profile picker is a gate, not a page. It must be chrome-free for the same
* reason /login is: bottom nav over a "who's watching" screen lets someone tab
* straight past the profile they were being asked to choose, and an in-app mini
* player on it would offer a route into the previous profile's queue. OS
* lockscreen transport controls are unaffected — those are what keep playing
* audio controllable while the app is locked (DR-275).
*
* TRACES: UR-082 | DR-276
*/
describe("profile picker chrome", () => {
const pathname = "/profiles";
it("shows no bottom nav, even authenticated", () => {
expect(showBottomNav({ pathname, isAuthenticated: true })).toBe(false);
});
it("shows no global mini player", () => {
expect(showGlobalMiniPlayer({ pathname })).toBe(false);
});
it("shows no global header", () => {
expect(showGlobalHeader({ pathname, isAuthenticated: true })).toBe(false);
});
it("owns its own layout", () => {
expect(routeOwnsLayout({ pathname })).toBe(true);
});
it("lets the shell reserve the bottom inset, since nothing else will", () => {
expect(shellReservesBottomInset({ pathname, isAuthenticated: true })).toBe(true);
});
});