Skip to content

UN-4073 [FIX] Make the organization list scrollable on the select-organization screen - #2272

Merged
jaseemjaskp merged 2 commits into
mainfrom
UN-4073-fix-set-org-list-scroll
Sep 1, 2026
Merged

UN-4073 [FIX] Make the organization list scrollable on the select-organization screen#2272
jaseemjaskp merged 2 commits into
mainfrom
UN-4073-fix-set-org-list-scroll

Conversation

@jaseemjaskp

Copy link
Copy Markdown
Contributor

What

Make the organization list on the "select an organization" screen (/setOrg) scrollable, so every org is reachable when a user belongs to more than ~5.

Why

.org-container is height: 100vh and .org-list is height: 100% — a fixed-height flex column. Neither of its flex children (.select-org-unstract-logo, .card-list-container) set min-height: 0 or any overflow, and both keep the default flex-shrink: 1.

So once the cards exceeded the panel height:

  • the card list could not shrink below its content, and the extra cards spilled out of the viewport and were clipped rather than scrolled — with no scrollbar, those orgs were unreachable;
  • the Unstract logo was squashed to zero height and disappeared.

Each row is ~104px tall (an 80px .org-avatar plus padding), so this triggered at roughly 5–6 organizations.

How

CSS only, frontend/src/components/set-org/SetOrg.css:

  • .card-list-container becomes the scroll region — flex: 1 1 auto, min-height: 0, overflow-y: auto. Its margin: 10% becomes margin: 5% 0; the horizontal part was redundant (width: 80% plus align-items: center on .org-list already centres it, and 80% + 2×10% exactly filled the row).
  • padding-bottom: 24px so the cards' box-shadow: 8px 8px 24px isn't clipped by the scroll box. Deliberately no horizontal padding — it narrowed the cards by 24px and worsened the pre-existing title/Connect-button overlap (see Notes).
  • .select-org-unstract-logo gets flex-shrink: 0 so it stays pinned.

No new scrollbar styling: frontend/src/index.css already defines the global thin 8px scrollbar that every other scroll region in the app uses.

Can this PR break any existing features? If yes, please list possible items. If no, please explain why.

No. The change is two rules in SetOrg.css, a stylesheet imported only by components/set-org/SetOrg.jsx, which renders only on the /setOrg route. No JS/JSX changes, no other selector touched, and none of these class names appear anywhere else in the codebase. Avatar size, card spacing, the right-hand panel and the gradient circles are unchanged.

Verified below that the short-list case (2 orgs) renders identically to main — no scrollbar, same spacing.

Relevant Docs

Related Issues or PRs

UN-4073 (parent epic UN-4047)

Dependencies Versions / Env Variables

None.

Notes on Testing

npm run build passes.

Verified in a browser against a live dev deployment (Vite HMR), driven through Chrome DevTools. /setOrg cannot be reached by URL — it renders null unless React Router state carries the org array — so the long-list case was produced by cloning the rendered .org-card-container nodes to 12 rows on the real page. That is a DOM-level simulation of a many-org account, not a real multi-org login. The two-org case below is real data.

Measured on the same live page, toggling the old rules back on via an injected stylesheet:

before after
scrollHeight > clientHeight false true (499px box, 1476px content)
logo height 0px 140px
last card, scrolled to end bottom at 1609px in a 796px viewport — off-screen fully visible

Restoring the old rules reproduced the reported symptom exactly (missing logo, no scrollbar, cards running off the bottom). Checked at 1568×796 and 1280×700, and with the real 2-org list for regression.

Pre-existing issue found but NOT fixed here (out of scope for a scroller fix, happy to raise separately): long org names overlap the Connect button on narrow viewports, because .ant-card-meta-title sets text-overflow: ellipsis without overflow: hidden / white-space: nowrap, making it inert. Measured 51px of glyph overlap before this change and 60px after — the 9px delta is the scrollbar gutter, which is inherent to the list scrolling at all.

Screenshots

Attaching separately.

Checklist

I have read and understood the Contribution Guidelines.

`.org-list` is a fixed-height (100vh) flex column, but neither of its flex
children set `min-height: 0` or any `overflow`. Past ~5-6 organizations the
card list could not shrink below its content, so the extra cards spilled out
of the viewport and were clipped rather than scrolled, and the Unstract logo
(default `flex-shrink: 1`) was squashed to zero height.

Make `.card-list-container` the scroll region and pin the logo. The global
thin scrollbar from index.css applies as-is; no other layout property changes.
- Use `flex: 1` instead of `flex: 1 1 auto` to match the scroll-region idiom
  used elsewhere in this frontend (68 occurrences vs 2). Behaviourally
  identical here: `.card-list-container` is the only growable item in
  `.org-list`, so both flex-basis values converge on the same used size.
- Raise `padding-bottom` 24px -> 32px. The shadow is offset 8px with a 24px
  blur, so ~8px of it was still clipped.
- Correct the comments: the 100vh is on `.org-container`, not `.org-list`;
  name `.org-card-container` rather than restating shadow numbers declared
  40 lines away; record that the dropped horizontal margin leaves card
  geometry unchanged; state that fixing `.ant-card-meta-title`'s inert
  `text-overflow` retires the no-horizontal-padding constraint.
@sonarqubecloud

sonarqubecloud Bot commented Sep 1, 2026

Copy link
Copy Markdown

@jaseemjaskp
jaseemjaskp marked this pull request as ready for review September 1, 2026 16:02
@github-actions

github-actions Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Frontend Lint Report (Biome)

All checks passed! No linting or formatting issues found.

@greptile-apps

greptile-apps Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR makes long organization lists scroll within the available viewport while preventing the Unstract logo from shrinking.

  • Converts .card-list-container into a bounded vertical scroll region.
  • Adjusts margins and bottom padding to preserve usable card and shadow spacing.
  • Pins the organization-selection logo at its intrinsic flex size.

Confidence Score: 5/5

The PR appears safe to merge, with the CSS changes correctly containing long organization lists in a scrollable region.

The changed styles bound the card list to the remaining viewport height, enable vertical scrolling, and prevent the logo from collapsing; no blocking or independently actionable non-blocking defect was identified.

Important Files Changed

Filename Overview
frontend/src/components/set-org/SetOrg.css Adds the flex sizing, overflow behavior, spacing, and logo shrink constraint needed to keep long organization lists reachable without introducing an actionable regression.

Reviews (1): Last reviewed commit: "UN-4073 fix: address self-review on the ..." | Re-trigger Greptile

@jaseemjaskp
jaseemjaskp merged commit eebaa03 into main Sep 1, 2026
14 checks passed
@jaseemjaskp
jaseemjaskp deleted the UN-4073-fix-set-org-list-scroll branch September 1, 2026 16:05
@github-actions

github-actions Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Unstract test results

Per-group results

Status Group Tier Passed Failed Errors Skipped Duration (s)
e2e-api-deployment e2e 3 0 0 0 21.0
e2e-coowners e2e 1 0 0 0 1.3
e2e-etl e2e 1 0 0 0 8.2
e2e-login e2e 2 0 0 0 1.6
e2e-prompt-studio e2e 1 0 0 0 4.7
e2e-smoke e2e 2 0 0 0 2.5
e2e-workflow e2e 1 0 0 0 16.4
ui e2e 0 1 0 0 0.0
TOTAL 11 1 0 0 55.7

Critical paths

⚠️ Critical paths not yet covered

  • workflow-execution-fan-out — Multi-file workflow execution fans out to file-processing workers and rejoins. (declared coverage: no groups declared)
💤 Covered, but not exercised in this build
  • adapter-register-llm — Register and validate an LLM adapter. (covered by integration-backend; no result reported in this build)
  • workflow-author — Create a workflow; its source+destination endpoints materialise and are configurable. (covered by integration-backend; no result reported in this build)
  • api-deployment-provision — Deploying a workflow as an API mints a usable key and a resolvable endpoint. (covered by integration-backend; no result reported in this build)
  • api-deployment-auth — Unauthenticated or mis-scoped API-deployment calls are rejected before dispatch. (covered by integration-backend; no result reported in this build)
  • mcp-server-auth — Unauthenticated or mis-scoped hosted-MCP calls are rejected before any tool runs. (covered by integration-backend; no result reported in this build)
  • mcp-platform-auth — The org-scoped MCP endpoint stays behind the platform-API-key middleware; unauthenticated or mis-scoped calls reach no tool. (covered by integration-backend; no result reported in this build)
  • prompt-studio-author — Create a Prompt Studio project and add a prompt to it. (covered by integration-backend; no result reported in this build)
  • connector-register-test — Connector credentials are validated against the live system and stored encrypted. (covered by integration-backend; no result reported in this build)
  • usage-aggregate-read — Per-run token usage aggregates correctly and stays scoped to its organization. (covered by integration-backend; no result reported in this build)
✅ Covered critical paths
  • auth-login — covered by e2e-login
  • co-owner-manage — covered by e2e-coowners
  • workflow-create-execute — covered by e2e-workflow
  • api-deployment-run — covered by e2e-api-deployment
  • prompt-studio-fetch-response — covered by e2e-prompt-studio
  • pipeline-etl-execute — covered by e2e-etl
  • usage-token-tracking — covered by e2e-api-deployment
  • callback-result-delivery — covered by e2e-api-deployment

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