refactor(header): remove the ModuleName module-switcher pill

The user no longer wants the header's "FEED" pill (module label + accent dot + ◀/▶ module-step
arrows). Drop it everywhere — the header now starts with the module's SearchBar; module switching
stays on the nav rail.

Deletes ModuleName.tsx, the now-unused stepModule() in lib/modules, and the Header's
module-order/label/setPage plumbing that only fed it.
This commit is contained in:
2026-08-21 19:58:19 +02:00
parent c7b393901f
commit c3820a0b44
3 changed files with 3 additions and 123 deletions
-12
View File
@@ -145,15 +145,3 @@ export const SYSTEM_PAGES: readonly Page[] = MODULES.filter((m) => m.system).map
export function moduleOrder(me: Me): Page[] {
return MODULES.filter((m) => !m.gate || m.gate(me)).map((m) => m.id);
}
// Step to the next/previous module cyclically (wraps at both ends). `dir` = +1 forward, -1 back.
// If the current page isn't a primary module (e.g. Settings), forward lands on the first module
// and back on the last.
export function stepModule(me: Me, current: Page, dir: 1 | -1): Page {
const order = moduleOrder(me);
if (order.length === 0) return current;
const i = order.indexOf(current);
// order is non-empty (guarded above) and every index below is in-bounds, so none are undefined.
if (i === -1) return dir === 1 ? order[0]! : order[order.length - 1]!;
return order[(i + dir + order.length) % order.length]!;
}