Skip to content

fix: collapse sidebar menu labels - #6286

Merged
ashrafchowdury merged 2 commits into
Agenta-AI:release/v0.114.1from
uchiha-suraj:fix/sidebar-collapse-6236
Aug 26, 2026
Merged

fix: collapse sidebar menu labels#6286
ashrafchowdury merged 2 commits into
Agenta-AI:release/v0.114.1from
uchiha-suraj:fix/sidebar-collapse-6236

Conversation

@uchiha-suraj

@uchiha-suraj uchiha-suraj commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Allows titles to shrink and truncate correctly when the sidebar is narrowed but not fully collapsed.
  • Prevents bottom navigation labels from wrapping or appearing cramped inside the collapsed sidebar.
  • Preserves the existing icons, links, tooltips, selected-item styling, and expanded-sidebar behaviour.

The issue occurred because the title remained rendered when the available sidebar width was reduced. The change conditionally renders the title only while expanded and uses min-w-0 with truncate to handle intermediate widths correctly.

Closes #6236

Testing

Verified locally

  • Ran Agenta locally using Docker and WSL.
  • Verified that titles are visible when the sidebar is expanded.
  • Verified that titles are hidden when the sidebar is collapsed.
  • Verified that icons remain visible in the collapsed state.
  • Verified that navigation links continue to work.
  • Verified that titles truncate instead of wrapping when the available width is reduced.
  • Verified that expanding the sidebar restores the labels correctly.

Added or updated tests

N/A — no automated tests were added. The sidebar behaviour was verified manually in the locally running application.

QA follow-up

  • Verify the sidebar at different viewport widths.
  • Verify the behaviour in supported browsers.
  • Confirm that tooltips, selected-item styling and keyboard navigation remain unchanged.

Demo

Agenta_Sidebar_issue_Recording.2026-08-26.063722.1.mp4

The demo shows:

  • the sidebar in its expanded state;
  • the sidebar being collapsed;
  • labels changing to the icon-only state without becoming cramped;
  • the sidebar being expanded again.

Checklist

  • I have included a video or screen recording for UI changes, or marked Demo as N/A
  • Relevant tests pass locally
  • Relevant linting and formatting pass locally
  • I have signed the CLA, or I will sign it when the bot prompts me

Contributor Resources

@dosubot dosubot Bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label Aug 26, 2026
@vercel

vercel Bot commented Aug 26, 2026

Copy link
Copy Markdown

@uchiha-suraj is attempting to deploy a commit to the agenta projects Team on Vercel.

A member of the Team first needs to authorize it.

@CLAassistant

CLAassistant commented Aug 26, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@coderabbitai

coderabbitai Bot commented Aug 26, 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: Repository YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro Plus

Run ID: 7f4b4a8e-ced7-4171-b1ee-3e3c96dcd6a9

📥 Commits

Reviewing files that changed from the base of the PR and between a09a0f0 and 6595380.

📒 Files selected for processing (1)
  • web/packages/agenta-navigation-ui/src/NavMenu.tsx

Included review availability: Your plan provides up to 8 included reviews per hour; 7 remain after this review.


📝 Walkthrough

Summary by CodeRabbit

  • Style
    • Improved navigation group title layout.
    • Long titles now truncate instead of wrapping.
    • Expanded group titles are left-aligned while suffixes and expand/collapse indicators remain aligned to the right.

Walkthrough

The navigation group trigger now shrinks within its flex row. Expanded group titles truncate instead of wrapping while suffixes and carets remain trailing.

Changes

Navigation title layout

Layer / File(s) Summary
Group trigger title constraints
web/packages/agenta-navigation-ui/src/NavMenu.tsx
The group trigger allows content shrinking. Expanded group titles use flexible width, left alignment, and truncation. Trailing controls retain their position.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Merge Risk: ⚪ Minimal · up to 65953

This change adjusts sidebar label rendering and truncation while preserving navigation and expanded or collapsed behavior; no actionable merge-blocking risk remains after normal checks and review.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Linked Issues check ✅ Passed The changes satisfy issue [#6236] by hiding labels in the collapsed sidebar and truncating labels at reduced widths while preserving icons and navigation behavior.
Out of Scope Changes check ✅ Passed All reported changes address sidebar label visibility, shrinking, truncation, and alignment. No unrelated changes are identified.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1…
Title check ✅ Passed The title clearly and concisely describes the main change: collapsing sidebar menu labels.
Description check ✅ Passed The description directly explains the sidebar label changes, affected behavior, testing, and linked issue.
Full details: Docstring Coverage

Explanation

No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1 files.

✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@dosubot dosubot Bot added the lgtm This PR has been approved by a maintainer label Aug 26, 2026
@bekossy
bekossy changed the base branch from main to release/v0.114.1 August 26, 2026 10:57
@ashrafchowdury
ashrafchowdury merged commit e132b9e into Agenta-AI:release/v0.114.1 Aug 26, 2026
4 of 5 checks passed
@ashrafchowdury

Copy link
Copy Markdown
Contributor

Thank you for the fix @uchiha-suraj

@all-contributors please add @uchiha-suraj for code

@allcontributors

Copy link
Copy Markdown
Contributor

@ashrafchowdury

I've put up a pull request to add @uchiha-suraj! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

frontend lgtm This PR has been approved by a maintainer size:XS This PR changes 0-9 lines, ignoring generated files. ui

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] : Sidebar Content get cramp up

4 participants