Skip to content

Commit 17e8988

Browse files
Centralize page width/margins in one layout container
Move width + side-margin control to a single universal page wrapper in App so every section is consistent (and stays that way going forward), removing the per-page max-width wrappers. Widen to max-w-6xl to cut the excess side space. Move the loop builder's Back button to the top-left and capitalize it (Back / All loops) with an arrow icon. Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 5688fd6 commit 17e8988

5 files changed

Lines changed: 40 additions & 30 deletions

File tree

packages/app/src/App.tsx

Lines changed: 26 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -331,26 +331,33 @@ function Shell(): React.ReactElement {
331331
</div>
332332
</header>
333333
<div className="flex min-h-0 flex-1">
334-
<div className="min-h-0 flex-1 overflow-y-auto p-5">
335-
{nav === 'overview' && <OverviewArea />}
336-
{nav === 'chat' && (
337-
<ChatPage
338-
chatId={chatId}
339-
project={project}
340-
projects={allProjects}
341-
onProjectChange={setProject}
342-
onAddFolder={() => void openExistingFolder()}
343-
onChanges={setChanges}
344-
onSessionCreated={(id) => {
345-
setChatId(id);
346-
setChatsKey((k) => k + 1);
347-
if (project) setExpanded((e) => new Set(e).add(project));
348-
}}
349-
/>
334+
<div className="min-h-0 flex-1 overflow-y-auto">
335+
{nav === 'chat' ? (
336+
<div className="h-full px-6 py-5">
337+
<ChatPage
338+
chatId={chatId}
339+
project={project}
340+
projects={allProjects}
341+
onProjectChange={setProject}
342+
onAddFolder={() => void openExistingFolder()}
343+
onChanges={setChanges}
344+
onSessionCreated={(id) => {
345+
setChatId(id);
346+
setChatsKey((k) => k + 1);
347+
if (project) setExpanded((e) => new Set(e).add(project));
348+
}}
349+
/>
350+
</div>
351+
) : (
352+
// Universal page container: one place controls width + side
353+
// margins for every section so they stay consistent.
354+
<div className="mx-auto w-full max-w-6xl px-6 py-5">
355+
{nav === 'overview' && <OverviewArea />}
356+
{nav === 'loops' && <LoopsPage projects={allProjects} project={project} />}
357+
{nav === 'plugins' && <PluginsPage project={project} />}
358+
{nav === 'settings' && <SettingsArea onBack={() => setNav(prevNav)} />}
359+
</div>
350360
)}
351-
{nav === 'loops' && <LoopsPage projects={allProjects} project={project} />}
352-
{nav === 'plugins' && <PluginsPage project={project} />}
353-
{nav === 'settings' && <SettingsArea onBack={() => setNav(prevNav)} />}
354361
</div>
355362
{sidePanelOpen && (
356363
<aside className="w-96 shrink-0 border-l border-border bg-panel">

packages/app/src/pages/Loops.tsx

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import React, { useEffect, useState } from 'react';
22
import {
3+
ArrowLeft,
34
ArrowUpCircle,
45
Bug,
56
Check,
@@ -164,13 +165,13 @@ const LOOP_EXAMPLES: Array<{ icon: LucideIcon; title: string; desc: string; prom
164165
/** Hand-holding empty state: what a loop is, how it works, and ready-to-run examples. */
165166
function LoopsEmpty({ onStart }: { onStart: (request?: string) => void }): React.ReactElement {
166167
return (
167-
<div className="mx-auto max-w-3xl pb-10">
168+
<div className="pb-10">
168169
<div className="mb-3 inline-flex items-center gap-2 rounded-full border border-border bg-panel2 px-3 py-1 text-xs font-medium text-muted">
169170
<Repeat className="h-3.5 w-3.5 text-accent" strokeWidth={2.5} />
170171
Autonomous loops
171172
</div>
172173
<h2 className="text-2xl font-semibold tracking-tight">Hand off a goal — CodeRouter works until it’s actually done.</h2>
173-
<p className="mt-3 text-sm leading-relaxed text-muted">
174+
<p className="mt-3 max-w-3xl text-sm leading-relaxed text-muted">
174175
A loop is an agent on autopilot <span className="text-text">with a finish line</span>. You describe the outcome you
175176
want — “make the tests pass”, “get coverage to 80%”, “clear all the type errors”. CodeRouter turns it into a plan
176177
you approve, then repeats <span className="text-text">edit → run your checks → fix what failed</span> over and
@@ -292,9 +293,10 @@ function NewLoop({
292293
};
293294

294295
return (
295-
<div className="mx-auto max-w-3xl">
296-
<button className="mb-4 text-sm text-muted hover:text-text" onClick={onCancel}>
297-
← back
296+
<div>
297+
<button className="mb-4 flex items-center gap-1.5 text-sm text-muted transition-colors hover:text-text" onClick={onCancel}>
298+
<ArrowLeft className="h-4 w-4" strokeWidth={2} />
299+
Back
298300
</button>
299301

300302
<Section title="What do you want done?">
@@ -495,9 +497,10 @@ function LoopDetail({ cwd, id, onBack }: { cwd: string; id: string; onBack: () =
495497
const running = loop.status === 'running' || loop.status === 'queued';
496498

497499
return (
498-
<div className="mx-auto w-full max-w-5xl">
499-
<button className="mb-4 text-sm text-muted hover:text-text" onClick={onBack}>
500-
← all loops
500+
<div>
501+
<button className="mb-4 flex items-center gap-1.5 text-sm text-muted transition-colors hover:text-text" onClick={onBack}>
502+
<ArrowLeft className="h-4 w-4" strokeWidth={2} />
503+
All loops
501504
</button>
502505

503506
<div className="mb-4 flex items-start justify-between gap-4">

packages/app/src/pages/OverviewArea.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { UsagePage } from './Usage';
77
export function OverviewArea(): React.ReactElement {
88
const [tab, setTab] = useState('overview');
99
return (
10-
<div className="mx-auto w-full max-w-5xl">
10+
<div>
1111
<Tabs
1212
tabs={[
1313
{ id: 'overview', label: 'Overview' },

packages/app/src/pages/Plugins.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { AssetsPage } from './Assets';
77
export function PluginsPage({ project }: { project: string | null }): React.ReactElement {
88
const [tab, setTab] = useState('installed');
99
return (
10-
<div className="mx-auto w-full max-w-5xl">
10+
<div>
1111
<Tabs
1212
tabs={[
1313
{ id: 'installed', label: 'Plugins' },

packages/app/src/pages/SettingsArea.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { SpendingPage } from './Spending';
99
export function SettingsArea({ onBack }: { onBack?: () => void }): React.ReactElement {
1010
const [tab, setTab] = useState('general');
1111
return (
12-
<div className="mx-auto w-full max-w-5xl">
12+
<div>
1313
{onBack && (
1414
<button
1515
onClick={onBack}

0 commit comments

Comments
 (0)