Skip to content

fix: sidebar footer items stay as text when the sidebar is collapsed#550

Open
IliaAvdeev wants to merge 1 commit into
HKUDS:devfrom
IliaAvdeev:fix/sidebar-footer-collapse
Open

fix: sidebar footer items stay as text when the sidebar is collapsed#550
IliaAvdeev wants to merge 1 commit into
HKUDS:devfrom
IliaAvdeev:fix/sidebar-footer-collapse

Conversation

@IliaAvdeev

Copy link
Copy Markdown

Description

When auth is enabled and the sidebar is collapsed, the footer items (Admin and
Sign out) keep rendering as full-width text inside the narrow 60px rail instead
of shrinking to icons like the rest of the nav.

AdminLink and LogoutButton already have an icon-only mode behind a
collapsed prop, but SidebarShell renders footerSlot as a static node and
never passes the collapsed state down, so the prop stays false in both the
expanded and collapsed layouts.

This changes footerSlot to also accept a render function that receives the
current collapsed state, and updates both sidebars to forward it:

footerSlot={(collapsed) => (
  <>
    <AdminLink collapsed={collapsed} />
    <LogoutButton collapsed={collapsed} />
  </>
)}

Plain nodes are still accepted, so nothing else needs to change.

Before / After (collapsed sidebar)

Before After
image image

Reproducing

The footer items only render when auth is enabled, so reproduce with auth on
(e.g. npm run dev with auth configured), then collapse the sidebar — Admin and
Sign out overflow the rail as text.

In the Docker image you also need #549 for the footer to show up at all
(NEXT_PUBLIC_AUTH_ENABLED was being constant-folded to false), but the two
changes are independent — this one is purely the collapsed-rendering fix.


Notes:

  • Ran pre-commit run --all-files; my changes pass. The only failures are
    pre-existing on dev and unrelated to this change (a duplicate key in
    web/locales/{en,zh}/app.json, and Unix-only os attributes in
    runtime/launcher.py flagged by mypy on Windows).
  • No tests added: this is prop wiring for a presentational component. Can add a
    render test if you'd prefer.

Module(s) Affected

  • agents
  • api
  • config
  • core
  • knowledge
  • logging
  • services
  • tools
  • utils
  • web (Frontend)
  • docs (Documentation)
  • scripts
  • tests
  • Other: ...

Checklist

  • I have read and followed the contribution guidelines.
  • My code follows the project's coding standards.
  • I have run pre-commit run --all-files and fixed any issues.
  • I have added relevant tests for my changes.
  • I have updated the documentation (if necessary).
  • My changes do not introduce any new security vulnerabilities.

@IliaAvdeev IliaAvdeev force-pushed the fix/sidebar-footer-collapse branch from 1aa4f9c to b0b79b4 Compare June 8, 2026 17:33
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