Skip to content

fix(frontend): shared page gutters and centered max-width column - #5836

Merged
mmabrouk merged 5 commits into
release/v0.112.0from
fix/large-screen-layout
Aug 9, 2026
Merged

fix(frontend): shared page gutters and centered max-width column#5836
mmabrouk merged 5 commits into
release/v0.112.0from
fix/large-screen-layout

Conversation

@mmabrouk

@mmabrouk mmabrouk commented Aug 9, 2026

Copy link
Copy Markdown
Member

What

Pages felt cramped since Dec 2025, when the 24px layout-level side padding was dropped (2f77dc9) and pages inherited only PageLayout's 16px. And on very large screens nothing capped the content, so lines ran the full monitor width.

One shared rule now owns both, in @agenta/ui (components/page-width):

  • pageGutterClass = 56px top, 64px sides, 32px bottom (Mahmoud's spec). PageLayout applies it by default, so every PageLayout page gets it; pages that deliberately go edge-to-edge (!p-0 overrides like the playground) keep winning.
  • pageContentWidthClass = a centered 1120px content column (1248px box including its own gutters). It engages only above ~1490px viewport; laptops keep their full width. Applied to Settings, home, and sessions now; other pages can opt in with one class.

Settings drops its private gutter scale and its private 1120 table cap for the shared ones (its variant="table" is gone; forms still cap at 640px). The page title aligns to the same centered column as the content.

Empty-table scrollbar

Every empty table showed a horizontal scrollbar: rc-table hands its empty-state body the numeric scroll.x, which on a bordered table is a pixel wider than the body's viewport. The IVT container now suppresses horizontal overflow only while the table has no rows.

Base

Stacked on #5833 (the sessions toolbar revert) because the sessions page wrapper line builds on it; this PR's diff is exactly the nine layout files.

Screenshots

Verified at 2560x1400 and 1440x900 on the rel112 QA stack: settings (projects, API keys, preferences, audit log), home, sessions, observability, agents. Settings/home/sessions center above ~1490px; observability and agents keep full width with the new gutters.

@dosubot dosubot Bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Aug 9, 2026
@vercel

vercel Bot commented Aug 9, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
agenta-documentation Error Error Aug 9, 2026 8:56pm

Request Review

@coderabbitai

coderabbitai Bot commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Summary by CodeRabbit

  • UI Improvements
    • Standardized page spacing, gutters, and centered content widths across agent, session, settings, and overview pages.
    • Improved settings layouts with consistent form sizing and simplified full-width tab behavior.
    • Ensured agent grid rows maintain equal heights for a more balanced layout.
    • Improved empty table presentation by preventing unwanted horizontal overflow.
  • Refactor
    • Consolidated shared page layout styling for consistent appearance across the application.

Walkthrough

The PR adds shared page gutter and content-width classes. It applies them across agent, session, overview, and settings pages. It simplifies settings variants, equalizes agent grid rows, and hides horizontal overflow for empty virtual tables.

Changes

Page layout standardization

Layer / File(s) Summary
Shared layout primitives
web/packages/agenta-ui/src/components/pageWidth.ts, web/packages/agenta-ui/src/components/PageLayout.tsx, web/packages/agenta-ui/src/components/index.ts, web/packages/agenta-ui/package.json
The package defines and exports shared gutter and capped content-width classes. PageLayout uses the shared gutter class instead of fixed padding.
Page content integration
web/oss/src/components/pages/agent-home/StripHome.tsx, web/oss/src/components/pages/agents/*, web/oss/src/components/pages/sessions/SessionsPage.tsx, web/oss/src/pages/w/[workspace_id]/p/[project_id]/apps/[app_id]/overview/index.tsx
Page layouts use the shared content-width class. Local padding is removed from StripHome. Agent grid rows now use equal implicit heights.
Settings layout integration
web/oss/src/components/pages/settings/components/SettingsPageShell.tsx, web/oss/src/pages/w/[workspace_id]/p/[project_id]/settings/index.tsx
The settings shell uses shared spacing and content width. The variant type now supports "full" and "form", and non-form tabs use "full".
Empty table overflow handling
web/packages/agenta-ui/src/InfiniteVirtualTable/components/InfiniteVirtualTableInner.tsx
The virtual table wrapper hides horizontal overflow for empty Ant Design table bodies.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.
Title check ✅ Passed The title clearly summarizes the main change: shared page gutters and a centered maximum-width content column.
Description check ✅ Passed The description directly explains the shared layout rules, affected pages, settings changes, and empty-table scrollbar fix.
✨ 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/large-screen-layout

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.

@mmabrouk

mmabrouk commented Aug 9, 2026

Copy link
Copy Markdown
Member Author

@coderabbitai review

@mmabrouk

mmabrouk commented Aug 9, 2026

Copy link
Copy Markdown
Member Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Aug 9, 2026

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@github-actions

github-actions Bot commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

Railway Preview Environment

Status Destroyed (PR closed)

Updated at 2026-08-09T21:22:24.113Z

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

🧹 Nitpick comments (2)
web/packages/agenta-ui/src/components/pageWidth.ts (2)

27-27: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win

Make the shared width contract independent of global box-sizing.

Line [27] combines max-w-[1248px] with the px-16 padding from Line [8]. The documented 1120px inner column is correct only with box-sizing: border-box; CSS otherwise applies the width to the content box and places padding outside it. (w3.org) PageLayout.tsx also notes that Tailwind preflight is disabled. Add box-border here, or verify that the global reset covers every consumer. Tailwind provides box-border for this purpose. (tailwindcss.com)

Proposed fix
-export const pageContentWidthClass = "mx-auto w-full max-w-[1248px]"
+export const pageContentWidthClass = "mx-auto box-border w-full max-w-[1248px]"

Source: MCP tools


1-7: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Shorten the new in-code layout rationale.

The changed comments contain historical and design context that is too long for in-code comments. Keep concise contract documentation in the code. Move durable rationale to external documentation or an ADR.

  • web/packages/agenta-ui/src/components/pageWidth.ts#L1-L7: Replace the gutter history with a short description of the exported class.
  • web/packages/agenta-ui/src/components/pageWidth.ts#L10-L26: Replace the width rationale and example block with concise usage documentation.
  • web/oss/src/components/pages/settings/components/SettingsPageShell.tsx#L7-L17: Remove the hard-coded page-count rationale and keep only the shell contract.
  • web/oss/src/components/pages/settings/components/SettingsPageShell.tsx#L53-L54: Reduce the two-line rationale to one short constraint comment.

As per coding guidelines, “Keep in-code comments to at most one short line; use longer comments only for genuinely surprising constraints such as bugs, races, or ordering requirements.”

Source: Coding guidelines


ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: d0dc6ffa-1773-419c-b192-806bd99d282a

📥 Commits

Reviewing files that changed from the base of the PR and between c1b7e45 and bfcc5f0.

📒 Files selected for processing (13)
  • web/oss/src/components/pages/agent-home/StripHome.tsx
  • web/oss/src/components/pages/agents/AgentsGrid.tsx
  • web/oss/src/components/pages/agents/AgentsPage.tsx
  • web/oss/src/components/pages/agents/ArchivedAgentsPage.tsx
  • web/oss/src/components/pages/sessions/SessionsPage.tsx
  • web/oss/src/components/pages/settings/components/SettingsPageShell.tsx
  • web/oss/src/pages/w/[workspace_id]/p/[project_id]/apps/[app_id]/overview/index.tsx
  • web/oss/src/pages/w/[workspace_id]/p/[project_id]/settings/index.tsx
  • web/packages/agenta-ui/package.json
  • web/packages/agenta-ui/src/InfiniteVirtualTable/components/InfiniteVirtualTableInner.tsx
  • web/packages/agenta-ui/src/components/PageLayout.tsx
  • web/packages/agenta-ui/src/components/index.ts
  • web/packages/agenta-ui/src/components/pageWidth.ts

@mmabrouk
mmabrouk force-pushed the fix/large-screen-layout branch from bfcc5f0 to 01bdd5c Compare August 9, 2026 19:47
@mmabrouk
mmabrouk changed the base branch from fix/sessions-page-design-revert to fix/sessions-page-polish August 9, 2026 20:15
One rule owns page spacing now: pageGutterClass (56px top, 64px sides, 32px
bottom - Mahmoud's spec) applied by PageLayout for every page that uses it,
and pageContentWidthClass (1120px content column, engaging above ~1490px)
for the centered cap. Settings drops its own gutter scale and 1120 table cap
for the shared ones; home and sessions wrap in the shared column. Also stop
empty tables growing a horizontal scrollbar: rc-table hands the empty-state
body its numeric scroll.x, one pixel wider than a bordered table's viewport,
so suppress overflow-x while there are no rows.
AgentsPage and ArchivedAgentsPage opt into pageContentWidthClass like home,
sessions and settings, so the agents list centres above ~1490px instead of
running the full monitor width.
The h-full cards stretch to their row, and the create cell's min-h-[148px]
made the last row taller than every other. auto-rows-fr sizes all rows the
same, so every card matches.
The agent overview's hand-rolled insets (!pl-[4.5rem] !pr-14) give way to
pageContentWidthClass, so its title and columns share Home's centred 1120px
column and gutters. The prompt-app/evaluator overview branch stays full
width for its charts and tables.
Preflight is off app-wide, so a plain div is content-box: w-full + px-16
sizes the box 128px wider than its parent and the 1248px cap yields a
1376px real box. box-border makes the gutters and the cap mean what the
comments say.
@mmabrouk
mmabrouk force-pushed the fix/large-screen-layout branch from 01bdd5c to 5e10fb5 Compare August 9, 2026 20:56
@mmabrouk
mmabrouk changed the base branch from fix/sessions-page-polish to release/v0.112.0 August 9, 2026 21:17
@mmabrouk
mmabrouk merged commit 4eb924f into release/v0.112.0 Aug 9, 2026
67 of 70 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

frontend size:L This PR changes 100-499 lines, ignoring generated files. ui

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant