Skip to content

[fix] Make the project list in the account menu scrollable [AGE-4148] - #6110

Merged
ashrafchowdury merged 4 commits into
release/v0.112.2from
fix/account-menu-project-list-scroll
Aug 19, 2026
Merged

[fix] Make the project list in the account menu scrollable [AGE-4148]#6110
ashrafchowdury merged 4 commits into
release/v0.112.2from
fix/account-menu-project-list-scroll

Conversation

@ashrafchowdury

@ashrafchowdury ashrafchowdury commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

Context

An account with more than three projects could not reach most of them from the account menu. The project list was capped at three rows (max-h-24) and the switcher hid its own scrollbar, so the rest of the list was cut off with nothing on screen to suggest there was more below. The founder's screenshot shows a project row ending above "Switch organization" with no scrollbar in sight.

Changes

One class constant does the work.

Before:

"flex max-h-24 flex-col overflow-y-auto [&::-webkit-scrollbar]:hidden [scrollbar-width:none]"

After:

"flex max-h-56 flex-col overflow-y-auto ag-scroll-quiet"

max-h-56 is 224px, or seven rows. "Switch organization", "New project", theme and logout sit outside the scroller, so they stay put however long the list gets. The menu only outgrows the window below a 404px viewport height.

The two hand-rolled scrollbar-hiding utilities gave way to ag-scroll-quiet, the class the playground already uses for this. At rest the menu looks the same as it did with no scrollbar at all. Put the pointer in the list and a slim thumb appears to say more projects follow, and the reserved gutter means nothing shifts when it does.

Row gained an active prop that carries the selected fill and scroll-initial-target: nearest, so a capped list opens on the project you are actually in rather than at the top. That property is Chromium-only. Firefox and Safari open the list at the top, which is what every browser does today, and the scrolling itself works everywhere.

Both panels use the same list, so the organization switcher gets all of this too.

Tests / notes

  • pnpm lint-fix clean, pnpm types:check clean for the touched file.
  • The issue asks for unit coverage of the overflow case. It is not in this PR and is worth a follow-up.
  • Out of scope: keyboard focus cannot easily reach the menu at all, because antd portals the dropdown to <body> and Tab walks the rest of the page first. Real arrow-key navigation would mean rebuilding the menu around aria-activedescendant, the way useRovingList does for the slash palette. Worth its own issue.

What to QA

  • Open the account menu in an org with more than seven projects. The list stops at seven rows and every project is reachable by scrolling. The scrollbar appears when the pointer is in the list, not at rest.
  • "Switch organization", "New project", Theme and Logout stay visible and clickable while you scroll the list.
  • In Chrome, pick a project far down the list, then reopen the menu. It opens scrolled to that project, with the check mark on it. In Firefox and Safari it opens at the top, which is expected.
  • Same checks on the "Switch organization" panel, which uses the same list.
  • Regression: an org with two or three projects looks unchanged, and the collapsed sidebar still opens a readable 220px panel.

Closes #6097

The switcher capped its list at three rows and hid the scrollbar, so an
account with more projects than that had no way to see the rest and no
sign there was more. Raise the cap to seven rows (40vh on short
viewports, keeping the actions below on screen), drop the local
scrollbar-hiding utilities so the app's global thumb paints, and scroll
the project in effect into view when the menu opens.

Closes #6097
@linear-code

linear-code Bot commented Aug 19, 2026

Copy link
Copy Markdown

AGE-4148

@dosubot dosubot Bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Aug 19, 2026
@vercel

vercel Bot commented Aug 19, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
agenta-documentation Ready Ready Preview Aug 19, 2026 9:45am

Request Review

@coderabbitai

coderabbitai Bot commented Aug 19, 2026

Copy link
Copy Markdown

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: 147a8e7f-31a4-4277-9779-2c6ddf7d1305

📥 Commits

Reviewing files that changed from the base of the PR and between 1baa8be and ee70a83.

📒 Files selected for processing (1)
  • web/oss/src/components/Sidebar/components/ProjectOrgSwitcher/index.tsx
🚧 Files skipped from review as they are similar to previous changes (1)
  • web/oss/src/components/Sidebar/components/ProjectOrgSwitcher/index.tsx

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


📝 Walkthrough

Summary by CodeRabbit

  • Bug Fixes
    • Improved project and organization switcher scrolling on smaller screens.
    • Ensured action controls remain visible while browsing long lists.
    • Improved visual highlighting and scroll positioning for the currently selected item.

Walkthrough

The project and organization switcher now limits scrollable lists to 224px. Shared rows receive active state directly and apply selected styling with Chromium scroll targeting. Scrollbars remain available.

Changes

Project and organization switcher

Layer / File(s) Summary
Shared list and row behavior
web/oss/src/components/Sidebar/components/ProjectOrgSwitcher/index.tsx
Scrollable lists use a 224px maximum height. Row applies active styling and Chromium scroll-initial-target behavior.
Project and organization row integration
web/oss/src/components/Sidebar/components/ProjectOrgSwitcher/index.tsx
Project and organization rows pass ITEM_ROW_CLASS and isActive separately to Row.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: 🔵 Low · up to ee70a

The scrollable project list fixes access to long project lists, but its fixed height can still push account-menu actions below the fold on very short screens. The PR is mergeable with explicit owner awareness or follow-up for this bounded UI issue.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Linked Issues check ⚠️ Warning Scrolling and fixed actions are implemented, but overflow tests are absent and active-project keyboard scrolling only uses Chromium-specific behavior. Add frontend coverage for oversized project lists and implement cross-browser keyboard behavior that scrolls the active project into view.
✅ Passed checks (4 passed)
Check name Status Explanation
Out of Scope Changes check ✅ Passed The changes remain within the shared account-menu list behavior and support the linked issue without unrelated code changes.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description check ✅ Passed The description clearly explains the account-menu scrolling changes, affected controls, browser behavior, testing notes, and QA steps.
Title check ✅ Passed The title clearly identifies the primary change: making the account-menu project list scrollable.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/account-menu-project-list-scroll

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.

The capped list is one class constant, so it belongs beside the panel's
other constants rather than in a component of its own. Replace the
scroll-into-view effect with scroll-initial-target on the active row:
Chromium opens the list on the current project, other browsers open it
at the top.

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

🧹 Nitpick comments (1)
web/oss/src/components/Sidebar/components/ProjectOrgSwitcher/index.tsx (1)

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

Add the required overflow regression test.

Add frontend coverage for at least eight projects, a short viewport, visible fixed actions, and an active row loaded below the initial viewport. Issue #6097 explicitly requires this scenario.


ℹ️ Review info
⚙️ Run configuration

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

Review profile: CHILL

Plan: Pro Plus

Run ID: 2eb6f2c0-54e7-4a0e-8b6c-b5612ac4f9b2

📥 Commits

Reviewing files that changed from the base of the PR and between 1df3eed and e99ca31.

📒 Files selected for processing (1)
  • web/oss/src/components/Sidebar/components/ProjectOrgSwitcher/index.tsx

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

@github-actions

github-actions Bot commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

Railway Preview Environment

Preview URL https://gateway-pr-6110.up.railway.app/w
Project agenta-oss-clone-spike
Image tag pr-6110-7f2fb8a
Status Deployed
Railway logs Open logs
Workflow logs View workflow run
Updated at 2026-08-19T09:53:31.392Z

min(40vh,224px) only shrank the list below a 560px viewport, while the
menu does not outgrow the window until about 404px, so the viewport half
never did useful work and left the list ending mid-row when it did.
max-h-56 is the same 224px on whole rows.

@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 (1)
web/oss/src/components/Sidebar/components/ProjectOrgSwitcher/index.tsx (1)

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

Add overflow-specific frontend coverage.

Render at least eight projects in a constrained viewport. Verify that the list scrolls and that Switch organization, New project, theme, and logout remain reachable. Also test an active project outside the initial visible rows.


ℹ️ Review info
⚙️ Run configuration

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

Review profile: CHILL

Plan: Pro Plus

Run ID: 377416c3-5246-462e-a2f7-0862aa0aa783

📥 Commits

Reviewing files that changed from the base of the PR and between e99ca31 and 1baa8be.

📒 Files selected for processing (1)
  • web/oss/src/components/Sidebar/components/ProjectOrgSwitcher/index.tsx

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

Comment thread web/oss/src/components/Sidebar/components/ProjectOrgSwitcher/index.tsx Outdated
@ashrafchowdury
ashrafchowdury changed the base branch from main to release/v0.112.2 August 19, 2026 09:40
The menu reads cleaner without a thumb sitting in it at rest, but the
list still has to say that more projects follow. ag-scroll-quiet, the
class the playground already uses, reserves a stable gutter and paints
the thumb on hover or focus.
@ashrafchowdury
ashrafchowdury changed the base branch from release/v0.112.2 to main August 19, 2026 09:44
@ashrafchowdury
ashrafchowdury changed the base branch from main to release/v0.112.2 August 19, 2026 09:46
@ashrafchowdury
ashrafchowdury merged commit 975f67f into release/v0.112.2 Aug 19, 2026
43 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

frontend size:M This PR changes 30-99 lines, ignoring generated files. ui

Projects

None yet

Development

Successfully merging this pull request may close these issues.

(bug) Make the project list scrollable in the account menu

1 participant