Skip to content

refactor(frontend): SidebarShell and the logo move into @agenta/navigation-ui — one shell for desktop and mobile - #5878

Draft
ardaerzin wants to merge 2 commits into
pkg/entity-ui-drivefrom
pkg/navigation-shell
Draft

refactor(frontend): SidebarShell and the logo move into @agenta/navigation-ui — one shell for desktop and mobile#5878
ardaerzin wants to merge 2 commits into
pkg/entity-ui-drivefrom
pkg/navigation-shell

Conversation

@ardaerzin

Copy link
Copy Markdown
Contributor

SidebarShell and the logo were the last piece of the rail still owned by the app. They move
into @agenta/navigation-ui, so desktop and /m mount the same shell instead of two that have
to be kept in sync by hand.
Not run in a browser — static gates only (pnpm lint-fix 24/24, tsc --noEmit clean
for @agenta/shared, ui, entities, entity-ui, settings-ui, oss, ee, mobile).

Stacked on pkg/entity-ui-drive; review only this lane's diff.

@ardaerzin

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@vercel

vercel Bot commented Aug 10, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
agenta-documentation Error Error Aug 11, 2026 5:10am

Request Review

@coderabbitai

coderabbitai Bot commented Aug 10, 2026

Copy link
Copy Markdown
⚠️ Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai

coderabbitai Bot commented Aug 10, 2026

Copy link
Copy Markdown

Review Change Stack

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro Plus

Run ID: da72694d-1c1f-4763-971a-693c09734523

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
📝 Walkthrough

Summary by CodeRabbit

  • New Features
    • Added shared sidebar navigation across mobile and desktop experiences.
    • Added mobile navigation for Agents, Recent sessions, Settings, and Help & Docs.
    • Added responsive sidebar branding with expanded and collapsed logo states.
    • Added shared Help & Docs destinations, including documentation, community support, and live chat.
  • Improvements
    • Improved navigation group headings and session organization with clear Pinned and Recent sections.
    • Sidebar sizing, positioning, and collapse behavior are now more consistent across views.

Walkthrough

Changes

Sidebar navigation migration

Layer / File(s) Summary
Navigation contracts and shared entries
web/packages/agenta-navigation/src/types.ts, web/packages/agenta-navigation/src/supportLinks.ts, web/packages/agenta-navigation/src/dynamic/*, web/packages/agenta-navigation/src/index.ts
The navigation contracts now support group labels and sidebar callbacks. Shared Help & Docs entries and Pinned/Recent session groups are added.
Shared sidebar shell and branding
web/packages/agenta-navigation-ui/src/*, web/packages/agenta-navigation-ui/package.json
The package now provides SidebarShell and SidebarLogo. Group labels, navigation callbacks, custom rail classes, sticky geometry, and Jotai package contracts are updated.
Mobile navigation scope and integration
web/mobile/src/features/nav/*
Mobile navigation now uses SidebarShell, adds an Agents entry, labels recent sessions, adds bottom navigation, and wires project switching and shared branding. NavPanel is removed.
OSS sidebar integration
web/oss/src/components/Sidebar/*
The OSS sidebar uses the shared shell and logo, wires the toggle button, and builds Help & Docs entries through the shared helper. The old local logo is removed.

Estimated code review effort: 4 (Complex) | ~45 minutes

Sequence Diagram(s)

sequenceDiagram
  participant NavDrawer
  participant useMobileNavScope
  participant SidebarShell
  participant NavMenu
  NavDrawer->>useMobileNavScope: create workspace/project navigation scope
  NavDrawer->>SidebarShell: pass route, atoms, and scope
  SidebarShell->>NavMenu: render scoped navigation items
  NavMenu-->>SidebarShell: render grouped and bottom navigation
Loading

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: moving SidebarShell and the logo into @agenta/navigation-ui for shared desktop and mobile use.
Description check ✅ Passed The description explains the shared shell migration, affected platforms, validation performed, and browser-testing limitation.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch pkg/navigation-shell

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@ardaerzin

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Aug 10, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai coderabbitai 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.

Actionable comments posted: 1

🧹 Nitpick comments (4)
web/packages/agenta-navigation/src/supportLinks.ts (1)

28-32: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Reduce the explanatory comment to one short line.

These lines describe normal composition behavior. The implementation already shows this behavior. Keep only a short constraint comment if needed.

As per coding guidelines, “Keep in-code comments to at most one short line.”

Source: Coding guidelines

web/packages/agenta-navigation-ui/src/SidebarLogo.tsx (2)

13-13: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Replace raw SVG fill colors with supported theme tokens.

fill-[#1E1C1D] and dark:fill-[#F2F25C] bypass the shared color system. Use a supported semantic token or var(--ag-color*) value for both appearance states.

As per coding guidelines, “do not use raw hex colors.”

Source: Coding guidelines


34-38: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Reduce the toggle behavior comment to one short line.

The JSX expresses the expanded and collapsed behavior. Keep a short comment only if a non-obvious constraint remains.

As per coding guidelines, “Keep in-code comments to at most one short line.”

Source: Coding guidelines

web/mobile/src/features/nav/useMobileNavItems.tsx (1)

59-63: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Reduce narrative comments to one short line.

These comments describe expected component structure. They do not document a surprising constraint.

  • web/mobile/src/features/nav/useMobileNavItems.tsx#L59-L63: Remove the block or replace it with one short constraint-focused comment.
  • web/mobile/src/features/nav/NavDrawer.tsx#L20-L24: Remove the block or replace it with one short constraint-focused comment.
  • web/mobile/src/features/nav/NavRail.tsx#L7-L11: Remove the block or replace it with one short constraint-focused comment.

As per coding guidelines, “Keep in-code comments to at most one short line; use longer comments only for genuinely surprising constraints such as bugs, races, or ordering requirements.”

Source: Coding guidelines


ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro Plus

Run ID: 14b98250-6119-47db-8207-8eadf0cac54b

📥 Commits

Reviewing files that changed from the base of the PR and between 892272f and 7125323.

📒 Files selected for processing (20)
  • web/mobile/src/features/nav/NavDrawer.tsx
  • web/mobile/src/features/nav/NavPanel.tsx
  • web/mobile/src/features/nav/NavRail.tsx
  • web/mobile/src/features/nav/mobileNavScope.tsx
  • web/mobile/src/features/nav/useMobileNavItems.tsx
  • web/oss/src/components/Sidebar/Sidebar.tsx
  • web/oss/src/components/Sidebar/components/SidebarLogo.tsx
  • web/oss/src/components/Sidebar/hooks/useWorkflowSwitcher.tsx
  • web/oss/src/components/Sidebar/scopes/bottomSection.tsx
  • web/oss/src/components/Sidebar/scopes/mainScope.tsx
  • web/packages/agenta-navigation-ui/package.json
  • web/packages/agenta-navigation-ui/src/NavMenu.tsx
  • web/packages/agenta-navigation-ui/src/SidebarLogo.tsx
  • web/packages/agenta-navigation-ui/src/SidebarShell.tsx
  • web/packages/agenta-navigation-ui/src/index.ts
  • web/packages/agenta-navigation/src/dynamic/registry.ts
  • web/packages/agenta-navigation/src/dynamic/useSidebarDynamicChildren.ts
  • web/packages/agenta-navigation/src/index.ts
  • web/packages/agenta-navigation/src/supportLinks.ts
  • web/packages/agenta-navigation/src/types.ts
💤 Files with no reviewable changes (2)
  • web/oss/src/components/Sidebar/components/SidebarLogo.tsx
  • web/mobile/src/features/nav/NavPanel.tsx

Comment on lines +90 to +104
const distinctGroups = new Set(visibleRefs.map((ref) => entity.getGroup?.(ref) ?? null))
const groupsAreInformative = distinctGroups.size > 1
const children: SidebarConfig[] = []
let currentGroup: string | null = null
for (const ref of visibleRefs) {
// Headings are inserted, not sorted — an entity supplying `getGroup` must already order
// its refs by group, or the same heading would appear more than once.
const group = entity.getGroup?.(ref) ?? null
if (group && group !== currentGroup) {
if (groupsAreInformative && group && group !== currentGroup) {
children.push({
key: `${entity.parentKey}-group-${group}`,
title: group,
icon: icon(),
disabled: true,
isDynamic: true,
isPlaceholder: true,
isGroupLabel: true,

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Do not treat ungrouped entries as a separate labelled group.

Line 90 counts null as a distinct group. Lines 98-104 do not render a label for null. A provider that groups only some references can render one named heading above unlabelled entries.

Enable group labels only when every visible reference has a group label. Otherwise, add an explicit label for ungrouped entries.

…ation-ui — one shell for desktop and mobile
…t some

distinctGroups counted the ungrouped null as a group, so a provider that
labels only part of its list cleared the size > 1 bar and rendered one named
heading above an unlabelled remainder — the stray row the sessions registry
avoids by naming both halves.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant