Skip to content

fix: make MCP sessions table scrollable with sticky header and improved pagination UI - #4774

Merged
Pratham-Mishra04 merged 1 commit into
devfrom
06-29-fix_mcp_sessions_ui_fixes
Jun 30, 2026
Merged

fix: make MCP sessions table scrollable with sticky header and improved pagination UI#4774
Pratham-Mishra04 merged 1 commit into
devfrom
06-29-fix_mcp_sessions_ui_fixes

Conversation

@Pratham-Mishra04

Copy link
Copy Markdown
Collaborator

Summary

Improves the MCP Sessions page layout so the table fills the available viewport height and scrolls internally, rather than causing the entire page to scroll. The pagination controls are also refreshed for a cleaner appearance.

Changes

  • The sessions page container is now a full-height flex column (h-[calc(100dvh-50px)]), constraining the layout to the visible viewport.
  • The sessions table wrapper uses grow and overflow-hidden so the table expands to fill remaining space, with the table body scrolling independently via a sticky header.
  • The Table component receives a containerClassName of h-full overflow-auto and the TableHeader is made sticky (sticky top-0 z-20 bg-muted) so column headers remain visible while scrolling.
  • Pagination controls are updated: "Previous"/"Next" text labels are replaced with icon-only ghost buttons, and a "Page X of Y" indicator is added between them. Entry counts now use toLocaleString() for number formatting and the label is updated to "X–Y of Z entries".
  • Filter bar and header sections are wrapped with explicit mb-4 margins to maintain spacing within the new flex layout.

Type of change

  • Bug fix
  • Feature
  • Refactor
  • Documentation
  • Chore/CI

Affected areas

  • Core (Go)
  • Transports (HTTP)
  • Providers/Integrations
  • Plugins
  • UI (React)
  • Docs

How to test

Navigate to the MCP Sessions page with a sufficient number of sessions to trigger pagination. Verify that:

  1. The table fills the viewport height without the page itself scrolling.
  2. The table header remains sticky as you scroll through rows.
  3. Pagination shows "Page X of Y" with icon-only previous/next buttons, and entry counts are formatted with locale separators.
cd ui
pnpm i || npm i
pnpm build || npm run build

Screenshots/Recordings

Before/after screenshots of the MCP Sessions page showing the sticky header, viewport-constrained table, and updated pagination controls are recommended.

Breaking changes

  • Yes
  • No

Related issues

Security considerations

None.

Checklist

  • I read docs/contributing/README.md and followed the guidelines
  • I added/updated tests where appropriate
  • I updated documentation where needed
  • I verified builds succeed (Go and UI)
  • I verified the CI pipeline passes locally if applicable

@coderabbitai

coderabbitai Bot commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Summary by CodeRabbit

  • UI Improvements
    • Updated the sessions page to use a full-height, flexible layout for better space usage.
    • Refined the sessions table layout with improved spacing, sticky headers, and cleaner overflow handling.
    • Simplified pagination with a compact entries range, page indicator, and smaller previous/next controls.

Walkthrough

The MCP Sessions page outer wrapper switches to a flex column layout with a computed viewport height. SessionsTable is refactored to use flex/overflow layout with a sticky table header, and the pagination controls are replaced with a compact bar showing entry range, page indicator, and ghost icon-only previous/next buttons.

Changes

MCP Sessions layout and pagination

Layer / File(s) Summary
Page & table layout + pagination
ui/app/workspace/mcp-sessions/page.tsx, ui/app/workspace/mcp-sessions/views/sessionsTable.tsx
Page wrapper changes to flex flex-col h-[calc(100dvh-50px)]; table wrapper adopts grow overflow-hidden with sticky TableHeader and containerClassName; filter bar gains mb-4 wrapper; pagination redesigned to compact entry-range text, page indicator, and ghost icon-only Prev/Next buttons.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

🐇 Flexbox columns, sticky rows in sight,
Pagination shrinks to icons left and right,
The viewport height now neatly set,
A layout hop I won't forget —
Bouncing through the UI with delight! 🌿

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main UI change to the MCP Sessions table and pagination.
Description check ✅ Passed The description matches the template well and covers summary, changes, type, affected areas, testing, and other required sections.
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
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch 06-29-fix_mcp_sessions_ui_fixes

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

@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Pratham-Mishra04 commented Jun 29, 2026

Copy link
Copy Markdown
Collaborator Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@greptile-apps

greptile-apps Bot commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Confidence Score: 4/5

This is close, but the table scrolling fix should be completed before merging.

  • A full page of sessions can still make the table area expand past the available viewport.
  • Pagination can still end up below the visible table area instead of staying reachable.
  • The pagination button test IDs were preserved.

ui/app/workspace/mcp-sessions/views/sessionsTable.tsx

Important Files Changed

Filename Overview
ui/app/workspace/mcp-sessions/page.tsx Adds the viewport-height flex container for the MCP Sessions page.
ui/app/workspace/mcp-sessions/views/sessionsTable.tsx Refactors the sessions table layout and pagination, but the bounded scroll region can still expand with many rows.

Reviews (7): Last reviewed commit: "fix: mcp sessions ui fixes" | Re-trigger Greptile

Comment thread ui/app/workspace/mcp-sessions/views/sessionsTable.tsx Outdated
Comment thread ui/app/workspace/mcp-sessions/views/sessionsTable.tsx Outdated

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@ui/app/workspace/mcp-sessions/views/sessionsTable.tsx`:
- Line 262: The pagination container in the sessions table uses a generic test
id that breaks the local naming convention and can collide with other pages.
Update the `sessionsTable.tsx` pagination wrapper to use a namespaced
`data-testid` consistent with the other `mcp-sessions-*` selectors in this view,
and verify sibling test ids nearby so the new identifier follows the existing
`entity-element-qualifier` pattern used by Playwright tests.
- Around line 262-295: The pagination footer in sessionsTable’s pagination block
is forced into a single row, causing the count text, page indicator, and
navigation buttons to collide on narrow screens. Update the footer container and
its inner controls to allow wrapping or switch to a stacked layout at small
widths so the new internal-scroll view remains usable on mobile. Focus on the
flex wrappers around the pagination area and the Button/page indicator group,
keeping the existing pagination behavior intact.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: d23ca583-e19a-4756-b2aa-3d20bb5aed34

📥 Commits

Reviewing files that changed from the base of the PR and between b95a121 and eae8b64.

📒 Files selected for processing (2)
  • ui/app/workspace/mcp-sessions/page.tsx
  • ui/app/workspace/mcp-sessions/views/sessionsTable.tsx

Comment thread ui/app/workspace/mcp-sessions/views/sessionsTable.tsx Outdated
Comment thread ui/app/workspace/mcp-sessions/views/sessionsTable.tsx Outdated
coderabbitai[bot]
coderabbitai Bot previously approved these changes Jun 30, 2026
@Pratham-Mishra04
Pratham-Mishra04 force-pushed the 06-29-tests_adds_dummy_mcp_client_cli_for_testing branch from b95a121 to 9e56cfb Compare June 30, 2026 07:53
@Pratham-Mishra04
Pratham-Mishra04 force-pushed the 06-29-fix_mcp_sessions_ui_fixes branch from eae8b64 to 3d10adc Compare June 30, 2026 07:53
Comment thread ui/app/workspace/mcp-sessions/views/sessionsTable.tsx
@Pratham-Mishra04
Pratham-Mishra04 force-pushed the 06-29-fix_mcp_sessions_ui_fixes branch from 3d10adc to e3dc25b Compare June 30, 2026 07:56
Comment thread ui/app/workspace/mcp-sessions/views/sessionsTable.tsx
@Pratham-Mishra04
Pratham-Mishra04 force-pushed the 06-29-tests_adds_dummy_mcp_client_cli_for_testing branch from 9e56cfb to b87c24a Compare June 30, 2026 11:43
@Pratham-Mishra04
Pratham-Mishra04 force-pushed the 06-29-fix_mcp_sessions_ui_fixes branch from e3dc25b to 2de7853 Compare June 30, 2026 11:43
Comment thread ui/app/workspace/mcp-sessions/views/sessionsTable.tsx
@Pratham-Mishra04
Pratham-Mishra04 force-pushed the 06-29-fix_mcp_sessions_ui_fixes branch from 2de7853 to b197e08 Compare June 30, 2026 13:44
@Pratham-Mishra04
Pratham-Mishra04 force-pushed the 06-29-tests_adds_dummy_mcp_client_cli_for_testing branch from b87c24a to 74cf118 Compare June 30, 2026 13:44
Comment thread ui/app/workspace/mcp-sessions/views/sessionsTable.tsx

Pratham-Mishra04 commented Jun 30, 2026

Copy link
Copy Markdown
Collaborator Author

Merge activity

  • Jun 30, 1:53 PM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Jun 30, 2:41 PM UTC: Graphite rebased this pull request as part of a merge.
  • Jun 30, 2:42 PM UTC: @Pratham-Mishra04 merged this pull request with Graphite.

@Pratham-Mishra04
Pratham-Mishra04 changed the base branch from 06-29-tests_adds_dummy_mcp_client_cli_for_testing to graphite-base/4774 June 30, 2026 14:37
@Pratham-Mishra04
Pratham-Mishra04 changed the base branch from graphite-base/4774 to dev June 30, 2026 14:40
@Pratham-Mishra04
Pratham-Mishra04 dismissed coderabbitai[bot]’s stale review June 30, 2026 14:40

The base branch was changed.

@Pratham-Mishra04
Pratham-Mishra04 requested a review from a team as a code owner June 30, 2026 14:40
@Pratham-Mishra04
Pratham-Mishra04 force-pushed the 06-29-fix_mcp_sessions_ui_fixes branch from b197e08 to 2913b4d Compare June 30, 2026 14:40
@Pratham-Mishra04
Pratham-Mishra04 merged commit 74ba4ff into dev Jun 30, 2026
15 of 16 checks passed
@Pratham-Mishra04
Pratham-Mishra04 deleted the 06-29-fix_mcp_sessions_ui_fixes branch June 30, 2026 14:42
Comment on lines +175 to +176
<div className="flex grow flex-col overflow-auto">
<div className={`mb-2 grow overflow-auto rounded-sm border ${isFetching ? "opacity-70 transition-opacity" : ""}`}>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P1 Scroll region still expands

This still lets the table area grow to the rows' full content height. With a full page of sessions, these growing flex children keep their default min-height: auto, so the table viewport can refuse to shrink into the remaining page space. The pagination then can be pushed below the visible area, or scrolling can move to the wrong ancestor instead of staying inside the table region.

Suggested change
<div className="flex grow flex-col overflow-auto">
<div className={`mb-2 grow overflow-auto rounded-sm border ${isFetching ? "opacity-70 transition-opacity" : ""}`}>
<div className="flex min-h-0 grow flex-col overflow-auto">
<div className={`mb-2 min-h-0 grow overflow-auto rounded-sm border ${isFetching ? "opacity-70 transition-opacity" : ""}`}>

akshaydeo pushed a commit that referenced this pull request Jul 1, 2026
…ed pagination UI (#4774)

## Summary

Improves the MCP Sessions page layout so the table fills the available viewport height and scrolls internally, rather than causing the entire page to scroll. The pagination controls are also refreshed for a cleaner appearance.

## Changes

- The sessions page container is now a full-height flex column (`h-[calc(100dvh-50px)]`), constraining the layout to the visible viewport.
- The sessions table wrapper uses `grow` and `overflow-hidden` so the table expands to fill remaining space, with the table body scrolling independently via a sticky header.
- The `Table` component receives a `containerClassName` of `h-full overflow-auto` and the `TableHeader` is made sticky (`sticky top-0 z-20 bg-muted`) so column headers remain visible while scrolling.
- Pagination controls are updated: "Previous"/"Next" text labels are replaced with icon-only ghost buttons, and a "Page X of Y" indicator is added between them. Entry counts now use `toLocaleString()` for number formatting and the label is updated to "X–Y of Z entries".
- Filter bar and header sections are wrapped with explicit `mb-4` margins to maintain spacing within the new flex layout.

## Type of change

- [ ] Bug fix
- [ ] Feature
- [x] Refactor
- [ ] Documentation
- [ ] Chore/CI

## Affected areas

- [ ] Core (Go)
- [ ] Transports (HTTP)
- [ ] Providers/Integrations
- [ ] Plugins
- [x] UI (React)
- [ ] Docs

## How to test

Navigate to the MCP Sessions page with a sufficient number of sessions to trigger pagination. Verify that:
1. The table fills the viewport height without the page itself scrolling.
2. The table header remains sticky as you scroll through rows.
3. Pagination shows "Page X of Y" with icon-only previous/next buttons, and entry counts are formatted with locale separators.

```sh
cd ui
pnpm i || npm i
pnpm build || npm run build
```

## Screenshots/Recordings

Before/after screenshots of the MCP Sessions page showing the sticky header, viewport-constrained table, and updated pagination controls are recommended.

## Breaking changes

- [ ] Yes
- [x] No

## Related issues

## Security considerations

None.

## Checklist

- [ ] I read `docs/contributing/README.md` and followed the guidelines
- [ ] I added/updated tests where appropriate
- [ ] I updated documentation where needed
- [ ] I verified builds succeed (Go and UI)
- [ ] I verified the CI pipeline passes locally if applicable
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.

2 participants