feat(automations): align layout with Codex - #501
Conversation
Greptile SummaryThe PR redesigns Automations into a searchable, responsive master-detail surface embedded within the persistent Desktop and Webview shells.
Confidence Score: 3/5The PR should not merge until the narrow master-detail layout and stale Webview Resources column are corrected. Narrow Automations viewports can make the selected detail or creation form unreachable, while wide Webview layouts can retain session-specific Resources beside the replacement Automations surface. Files Needing Attention: packages/client/workbench/src/automations/automations-view.tsx; apps/webview/src/shell/web-workbench-shell.tsx
|
| Filename | Overview |
|---|---|
| packages/client/workbench/src/automations/automations-view.tsx | Introduces the searchable master-detail layout, but the narrow expanded state stacks two full-height sections and can place details outside the clipped viewport. |
| apps/webview/src/shell/web-workbench-shell.tsx | Embeds Automations in the persistent shell, but leaves the active session's floating Resources column visible on that route. |
| apps/desktop/src/renderer/src/shell/desktop-shell.tsx | Moves Automations into the workspace while preserving the sidebar and correctly suppresses session resource presentation. |
| apps/desktop/src/renderer/src/shell/layout/workspace.tsx | Adds an inert workspace overlay above the existing main, right, and bottom panes. |
| packages/presentation/ui/src/shell/pane-transition.ts | Promotes the existing transition state machine to shared UI and makes optional geometry updates usable by Automations. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart LR
Nav[Automations navigation] --> Shell{Application shell}
Shell -->|Desktop| Overlay[Workspace overlay]
Shell -->|Webview| Main[ShellFrame mainContent]
Overlay --> View[AutomationsView]
Main --> View
View --> Search[Searchable schedule/loop index]
Search --> Select[Select or create]
Select --> Detail[Master-detail pane]
Detail --> Thread[Open run thread]
Thread --> Session[Workbench session selection]
Comments Outside Diff (1)
-
apps/webview/src/shell/web-workbench-shell.tsx, line 43 (link)Resources persist across Automations
When Resources is open in the floating layout and the user navigates to
/automations,resourcesFloatingOpenremains true, leaving the active session's Resources card visible and narrowing the Automations surface after its header control disappears.Knowledge Base Used: Webview interface and presentation
Reviews (1): Last reviewed commit: "feat(automations): align layout with Cod..." | Re-trigger Greptile
| <div | ||
| className={cn( | ||
| 'grid h-full min-h-0 grid-cols-1 bg-background lg:[container-type:inline-size] lg:transition-[grid-template-columns] motion-reduce:transition-none', | ||
| expanded ? 'lg:grid-cols-[22rem_calc(100%_-_22rem)]' : 'lg:grid-cols-[100%_0%]', | ||
| )} |
There was a problem hiding this comment.
Narrow details render offscreen
When an automation is selected or created below 1024px, both full-height sections occupy implicit rows in the fixed-height single-column grid, placing the detail form below the clipped viewport along with its close control.
Knowledge Base Used: Webview interface and presentation
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
There was a problem hiding this comment.
Pull request overview
Redesigns the Automations surface into a Codex-style searchable index that expands into a master–detail layout, while keeping the app sidebar persistent on Desktop and Web. It also centralizes the shared pane transition logic so Automations can match existing open/close and reduced-motion behavior.
Changes:
- Add shell support for “main content override” (Automations) while keeping the shell sidebar visible and correctly highlighted.
- Rework Automations UI to a searchable index with an expandable master–detail layout, plus new i18n strings.
- Share/export the pane transition utility from
@linkcode/uiand update desktop/web shells + tests to consume it.
Reviewed changes
Copilot reviewed 21 out of 21 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| packages/presentation/ui/src/shell/shell-frame.tsx | Adds mainContent override and automationsActive to keep sidebar + allow Automations to replace the thread surface. |
| packages/presentation/ui/src/shell/session-sidebar.tsx | Threads the automationsActive state into the sidebar’s Automations entry. |
| packages/presentation/ui/src/shell/pane-transition.ts | Makes size optional and generalizes the pane transition hook for non-resizable consumers. |
| packages/presentation/ui/src/shell/index.ts | Re-exports the pane transition utilities from the shell barrel. |
| packages/presentation/i18n/src/locales/zh-cn.ts | Adds Automations description/search/matching strings in zh-CN. |
| packages/presentation/i18n/src/locales/en.ts | Adds Automations description/search/matching strings in English. |
| packages/client/workbench/src/automations/store.ts | Adds a collapse() action and updates selection semantics for the new layout. |
| packages/client/workbench/src/automations/schedule/pane.tsx | Converts schedule list to a searchable index list (no embedded detail). |
| packages/client/workbench/src/automations/pane-layout.tsx | Updates master button + skeleton styling to match the new index layout. |
| packages/client/workbench/src/automations/loop/pane.tsx | Converts loop list to a searchable index list (no embedded detail). |
| packages/client/workbench/src/automations/automations-view.tsx | Implements the new expandable index ↔ master–detail Automations layout and shared transition handling. |
| apps/webview/src/shell/web-workbench-shell.tsx | Mounts Automations inside the shell via mainContent and keeps sidebar persistent; updates navigation behaviors. |
| apps/webview/src/routes/workbench-route.tsx | Updates page title handling so /automations uses the Automations title while rendering the workbench shell. |
| apps/webview/src/routes/automations.tsx | Removes the dedicated full-page Automations route (now integrated into the shell). |
| apps/webview/src/router.tsx | Routes /automations through the workbench route tree (same shell, different pathname). |
| apps/desktop/src/renderer/src/shell/layout/workspace.tsx | Adds workspaceOverlay slot that covers workspace panes while preserving the persistent app sidebar. |
| apps/desktop/src/renderer/src/shell/desktop-shell.tsx | Mounts Automations as a workspace overlay and wires sidebar active state; disables resources while Automations is open. |
| apps/desktop/src/renderer/src/index.css | Updates documentation comment to reference @linkcode/ui’s SHELL_TRANSITION. |
| apps/desktop/src/renderer/src/automations/automations-view.tsx | Removes the dedicated full-page Automations desktop overlay component. |
| apps/desktop/src/renderer/src/app.tsx | Removes Automations from the “full-page overlay” underlay behavior; Settings remains the only full-page overlay. |
| apps/desktop/src/renderer/src/tests/pane-transition.test.ts | Switches pane transition tests to use the shared @linkcode/ui exports. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| <div className="min-h-0 flex-1"> | ||
| <AutomationsView onOpenSession={onSelectSession} /> | ||
| </div> |
There was a problem hiding this comment.
ℹ️ Minor suggestions only — nothing blocking.
Reviewed changes
- Read the full diff (21 files) end to end: the two deleted full-page surfaces, the desktop
workspaceOverlaygrid cell, the webview pathless layout route, thepane-transition.tsmove intopackages/presentation/ui, and theAutomationsViewrework. - Confirmed
pane-transition.tsis a genuine rename — the oldapps/desktop/.../shell/layout/path is gone and the newpackages/presentation/ui/src/shell/one is present, even though the formatted diff omits the rename header. - Traced every exit path now that the explicit Back button is deleted. Sidebar thread select and new-draft both funnel through
applySelection/startDraftinpackages/client/workbench/src/surface/use-workbench-sessions.ts, which callsetOverlay(null); the desktop titlebar back arrow (shell/chrome/chrome.tsx:524) traverses history to the same place. Users are not stranded. - Checked the translucent-shell ghosting invariant from
.claude/rules/frontend.md: the overlay cell is opaquebg-backgroundand correctly stacked atz-40above thez-10/z-20panes inside theisolatecontext, anddockedInertnow trips onworkspaceOverlayOpenso the covered panes and sashes are inert. The sidebar sash staying live is correct here. - Reviewed the
usePaneTransitionphase machine against the newopen: expanded && splitLayoutinput plus thegrid-template-columns-guardedtransitionrun/transitionend/transitioncancelhandlers — no stuck-phase or double-fallback path. - Verified the webview overrides for
onSelectSession/onStartDraftare placed after{...props}so thenavigate('/')wrappers actually win. - Built a Chromium repro of the sub-
lgstacked layout at 940×700 (desktopMIN_WINDOW_SIZE.widthis 940, below the 1024pxlgbreakpoint the new layout switches on) at 3/8/12/20 rows, because I suspected the twoautogrid rows would overflow the fixed-height container and clip the detail pane. They don't:align-content: stretchyields two 350px rows, both the listuland the detail scroller become scrollable, and the close button stays visible. No issue.
The layout work looks solid. Three small observations that have no single diff line to anchor to:
ℹ️ No Escape binding for desktop Automations
Deleting apps/desktop/src/renderer/src/automations/automations-view.tsx removed the only explicit dismissal affordance for this surface on desktop. Settings — the sibling overlay — binds CLOSE_SETTINGS_SHORTCUT = { key: 'Escape' } at settings-view.tsx:55. Automations now relies entirely on picking a thread, starting a draft, or the titlebar back arrow. Worth adding the same Escape binding for symmetry; not blocking since no path strands the user.
ℹ️ New pure helpers land without unit tests
collapse() in automations/store.ts and the new getAutomationDetailTarget / detailTargetIdentity helpers plus the list query filter are all pure and cheap to test, and the repo already unit-tests helpers of exactly this shape (sidebar/ordering.ts, navigation/history.ts). collapse() in particular encodes the behavior change away from "null falls back to the first item", which is the kind of thing a test pins down.
ℹ️ Desktop chrome still describes the covered thread
While the workspace overlay is up, the titlebar keeps rendering the hidden thread's title, DiffStatChip, and panel toggles. The panes underneath are correctly inert, so this is cosmetic rather than a ghosting problem — but the chrome is describing something the user can't see. May well be intentional for this iteration; flagging in case it isn't.
Claude Opus | 𝕏
| pageTitle: 'Automations', | ||
| description: 'Schedule agent work or run tasks in a loop until verification passes.', | ||
| back: 'Back', | ||
| closeDetails: 'Close details', |
There was a problem hiding this comment.
back on the line above is now a dead key — this PR deleted both of its call sites (apps/desktop/src/renderer/src/automations/automations-view.tsx and apps/webview/src/routes/automations.tsx), and grep finds no remaining t('back') in the workbench.automations namespace (the other hits are the settings, dialog, and browser-pane namespaces). Same in zh-cn.ts. Worth dropping both while the context is fresh.
For contrast, pageTitle is still live — apps/webview/src/routes/workbench-route.tsx:16 reads it for the /automations path.
The persistent DesktopChrome never suppressed its right-rail panel toggles or session title/menu while the Automations overlay covers the workspace, so they kept showing on top of it. Null out rightControls and titleContent while automationsOpen, matching the existing !automationsOpen gate already used for the Resources control.
…i-select - Move Loop's agent/harness selector out of Advanced settings into the primary flow, alongside project selection. - Move Schedule's timezone field into Advanced settings now that it's confirmed load-bearing for cadence calculation (DST-aware next-run math), not cosmetic. - Convert the misfire policy control from a radio group to a dropdown. - Support selecting several weekdays for a weekly schedule: the form model now carries an array, the cadence builder joins them into a comma-separated cron field (croner already parses that), and the preset recognizer round-trips a multi-weekday cron expression back into the friendly weekly UI. Adds a new TaskMultiSelect checklist popover to back the picker.
- New ResizeHandle (packages/presentation/ui): a standalone drag divider that reads no sibling DOM geometry and owns no styling contract, unlike the desktop shell's Sash — any panel can report a clamped size through onResize/onResizeEnd and decide how to render and persist it. Live drag frames stay local to the caller; only the settled size needs persisting. - New persisted useAutomationDetailWidthStore backing the Automations detail pane's width (420-960px, default 640). - automations-view.tsx: the list pane is now the fluid grid column and the detail pane is the fixed, user-resizable one, mirroring how the session view's own right panel works. Also adds a fixed top-right slot (DetailHeaderSlotProvider) next to the close button for detail views to portal contextual header actions into, and removes the list pane's masterDetailVisible-driven title/button/padding swap so expanding or collapsing the detail pane only animates the outer grid track — nothing inside the list has to reflow or pop. - Drop the max-w-xl cap on the create-form pane so its content fills the resizable width instead of re-centering at a fixed 576px.
- Schedule and Loop detail views now portal their AutomationActions overflow menu into the fixed slot next to the close button instead of rendering it inline in their own scrollable header — the two controls were only ever coincidentally adjacent, and scrolled apart as soon as the panel's content moved. - Split Schedule's run history out of the disclosure that used to sit after the Save/Cancel row into its own "Run history" tab, alongside an "Edit" tab holding the existing form — nothing renders below Save now. - Remove the duplicate heading text repeated inside the Loop log and Schedule run-history disclosures (the trigger already shows it). - Give the discard-unsaved-changes and delete-confirmation dialogs their missing padding via AlertDialogHeader/AlertDialogFooter, matching every other dialog in the codebase. - Drop the now-unused "title" string; the in-page <h1> it backed was removed together with the list pane's other content that swapped on selection.
The status badge sat inline with the truncated name (top-aligned with the rest of the row), while the sibling "more actions" button is vertically centered against the row's full height — visibly offset once the list pane is wide enough for a two-line row to have real height to spare. A container query on the row now moves the badge to a trailing, self-centered column past 380px of row width, matching the actions button; narrower rows keep the existing inline placement.

Summary
Linear: CODE-649
Verification
pnpm check:cipnpm test— 3040 passed, 1 skippedpnpm -F @linkcode/webview buildChecklist
pnpm check:ciandpnpm testboth pass