Skip to content

refactor(styling): remove legacy sidebar and nav shell - #3564

Merged
baktun14 merged 2 commits into
mainfrom
refactor/styling-remove-legacy-sidebar-shell
Aug 7, 2026
Merged

refactor(styling): remove legacy sidebar and nav shell#3564
baktun14 merged 2 commits into
mainfrom
refactor/styling-remove-legacy-sidebar-shell

Conversation

@baktun14

@baktun14 baktun14 commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Why

The new top navigation shipped behind the ui_top_nav Unleash flag (#3448) and is now fully rolled out. The legacy shell (the Sidebar drawer plus the old Nav header rendered on the flag-off branch) is dead weight: unreachable for users, but still compiled and maintained.

What

  • Render TopNav unconditionally in Layout and retire ui_top_nav from the FeatureFlag union.
  • Delete the legacy shell subtree: Sidebar, SidebarGroupMenu, SidebarGroupMenuPopover, SidebarHoveredGroupMenu, SidebarRouteButton, MobileSidebarUser, ModeToggle, Nav (+ spec), the ISidebarGroupMenu/ISidebarRoute types, and the now-unreferenced public/images/akash-logo.svg.
  • Remove Layout state that only the sidebar consumed: isNavOpen with its localStorage persistence, the mobile drawer toggle, the media query, and the sidebar margin/offset styles.
  • Simplify the e2e AppNav page object to top-nav-only paths, dropping the dual-shell isTopNav() detection.

No visual change: the app renders exactly as it already does everywhere the flag is on (all environments). After this deploys, the ui_top_nav toggle can be archived in Unleash (server-side cleanup, no repo change).

Summary by CodeRabbit

  • Changes

    • Simplified the application layout to use a full-width top navigation.
    • Removed the sidebar, mobile navigation drawers, sidebar menus, theme toggle, and related account controls.
    • Updated deployment navigation flows to consistently use the top navigation.
    • Removed the retired navigation feature flag and associated types.
  • Tests

    • Updated layout coverage to verify the standard top navigation is rendered.
    • Removed tests for the retired sidebar and navigation modes.

@coderabbitai

coderabbitai Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: b855e385-5f4f-48bf-911c-fbd6adf3fc4f

📥 Commits

Reviewing files that changed from the base of the PR and between ee401aa and 1bde86b.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (1)
  • apps/deploy-web/package.json
💤 Files with no reviewable changes (1)
  • apps/deploy-web/package.json

📝 Walkthrough

Walkthrough

The deploy web shell now uses TopNav as its only navigation path. Sidebar components, responsive drawer behavior, related types, and the ui_top_nav flag were removed. UI navigation helpers and layout tests now target the top-navigation flow.

Changes

Top Navigation Migration

Layer / File(s) Summary
Top-navigation-only layout
apps/deploy-web/src/components/layout/Layout.tsx, apps/deploy-web/src/components/layout/Nav.tsx, apps/deploy-web/src/components/layout/Sidebar.tsx, apps/deploy-web/src/components/layout/Sidebar*.tsx, apps/deploy-web/src/components/layout/MobileSidebarUser.tsx, apps/deploy-web/src/components/layout/ModeToggle.tsx, apps/deploy-web/src/types/feature-flags.ts, apps/deploy-web/src/types/index.ts, apps/deploy-web/src/components/layout/Layout.spec.tsx, apps/deploy-web/package.json
LayoutApp always renders TopNav with a full-width content container. Sidebar and mobile navigation components, related exported types, and the ui_top_nav flag were removed. The layout test verifies minimal: false. The unused clsx dependency was removed.
Top-navigation test flow
apps/deploy-web/tests/ui/pages/AppNav.ts, apps/deploy-web/tests/ui/pages/HomePage.ts
Deployment, Alerts, and API Keys navigation now use top-navigation controls. Authenticated-shell detection now uses the top-navigation account menu.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Possibly related PRs

Suggested reviewers: ygrishajev

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch refactor/styling-remove-legacy-sidebar-shell

Comment @coderabbitai help to get the list of available commands.

@codecov

codecov Bot commented Aug 6, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 75.70%. Comparing base (c23cb72) to head (1bde86b).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3564      +/-   ##
==========================================
+ Coverage   75.39%   75.70%   +0.31%     
==========================================
  Files        1165     1157       -8     
  Lines       30316    30127     -189     
  Branches     7540     7471      -69     
==========================================
- Hits        22856    22809      -47     
+ Misses       6587     6460     -127     
+ Partials      873      858      -15     
Flag Coverage Δ
api 88.68% <ø> (+0.03%) ⬆️
deploy-web 65.60% <100.00%> (+0.43%) ⬆️
log-collector 85.85% <ø> (ø)
notifications 93.84% <ø> (ø)
provider-console 81.38% <ø> (ø)
provider-inventory 84.98% <ø> (ø)
provider-proxy 88.17% <ø> (ø)
tx-signer 86.72% <ø> (ø)
Files with missing lines Coverage Δ
apps/deploy-web/src/components/layout/Layout.tsx 93.33% <100.00%> (+7.87%) ⬆️

... and 4 files with indirect coverage changes

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM — clean removal of the dead legacy sidebar/nav shell now that ui_top_nav is fully rolled out.

What was reviewed: confirmed no remaining references to the deleted components (Sidebar, Nav, ModeToggle, MobileSidebarUser, SidebarRouteButton, etc.), the ISidebarGroupMenu/ISidebarRoute types, or the retired ui_top_nav flag anywhere in the codebase. Layout.tsx now renders TopNav unconditionally with the sidebar-only state (isNavOpen, media query, drawer toggle) removed, and the Layout spec/e2e AppNav page object were updated to match the single-shell behavior.

Extended reasoning...

Overview

Pure dead-code removal: deletes the legacy Sidebar/Nav shell and its supporting components/types now that the ui_top_nav flag is fully rolled out, and simplifies Layout.tsx and the e2e AppNav page object to the single top-nav path. No new logic is introduced.

Security risks

None. No auth, crypto, or permission-sensitive code is touched — this is UI shell cleanup only.

Level of scrutiny

Low-to-moderate is appropriate despite the XL size label: nearly all of the diff is deletions of components that were already unreachable behind a fully-enabled flag. I verified via grep that no remaining code references the deleted components, types, or the retired flag, so this is not a partial refactor leaving dangling imports.

Other factors

Test coverage was updated alongside the change (Layout.spec.tsx gained a TopNav-render assertion, Nav.spec.tsx was deleted with its subject, e2e AppNav/HomePage page objects simplified accordingly), and the PR description explicitly notes no visual change is expected since flag-on behavior is preserved as-is.

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM — clean, mechanical removal of dead code now that the top nav rollout is complete.

Reviewed the removal of the legacy Sidebar/Nav shell and the ui_top_nav flag: confirmed no remaining references to the removed components, types (ISidebarGroupMenu/ISidebarRoute), flag, akash-logo.svg, or clsx anywhere in apps/deploy-web. Layout.tsx now unconditionally renders TopNav, matching the always-on behavior described in the PR. Tests were updated accordingly (Layout.spec.tsx asserts TopNav renders; the e2e AppNav/HomePage page objects were simplified to drop dual-shell detection).

Extended reasoning...

Overview

This PR deletes the legacy sidebar/nav shell (Sidebar, SidebarGroupMenu, SidebarGroupMenuPopover, SidebarHoveredGroupMenu, SidebarRouteButton, MobileSidebarUser, ModeToggle, Nav) and the ui_top_nav feature flag, now that the top nav is fully rolled out and the flag-off branch is unreachable. Layout.tsx is simplified to always render TopNav, dropping the sidebar-only state (isNavOpen, mobile drawer toggle, media query, margin offsets). The e2e AppNav/HomePage page objects are simplified to drop dual-shell detection logic. Also removes the now-unused clsx dependency and akash-logo.svg asset.

Security risks

None. This is a pure UI dead-code removal with no auth, data-access, or crypto changes.

Level of scrutiny

Low-to-moderate is appropriate: this is a well-scoped refactor removing code that was already unreachable in production (flag fully rolled out), not new logic. I verified there are no dangling references to the removed components/types/flag/asset left in apps/deploy-web, and that the diff's own tests were updated to match (Layout.spec.tsx, e2e page objects).

Other factors

No prior CodeRabbit actionable comments, and the bug-hunting pass found no issues. The change is large in line count (size: XL label) but almost entirely deletions/simplifications rather than new logic, which lowers the actual review risk despite the size.

@baktun14
baktun14 added this pull request to the merge queue Aug 6, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to no response for status checks Aug 6, 2026
@baktun14
baktun14 added this pull request to the merge queue Aug 7, 2026
Merged via the queue into main with commit a32d1e8 Aug 7, 2026
59 checks passed
@baktun14
baktun14 deleted the refactor/styling-remove-legacy-sidebar-shell branch August 7, 2026 06:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants