Skip to content

Dead code: sidebarMarkup() and badgeFor() in ui/pages/index.js have no callers #540

Description

@richard-devbot

Found while promoting Approvals into the nav (#537).

sidebarMarkup() in src/observability/dashboard/ui/pages/index.js renders a legacy flat sidebar — one nav-link per page, with an approvals badge via badgeFor(id). Neither function has a caller anywhere in src/. The live navigation is the #278 destination shell (navigationGroups/desktopNavigationMarkup in ui/navigation.js), which renders .destination-link + .secondary-link and filters on !child.hidden.

pageMarkup() in the same file is live — only sidebarMarkup and its badgeFor helper are orphaned.

Why it is worth removing rather than leaving: it is actively misleading. It renders every page unconditionally, ignoring the hidden flag, and carries badge-approvals/badge-alerts element ids that look like the live badge wiring. While investigating #537 it read as evidence that Approvals was already reachable — it is not.

Small and self-contained: delete both functions, confirm no test references sidebarMarkup or the badge-approvals/badge-alerts ids it emits (the live topbar chips are separate elements — check before deleting), run the gates.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions