Skip to content

Commit 1012e48

Browse files
committed
revert(frontend): restore the playground divider and drop the narrow-panel collapse
Keeps only the sticky-header fix from the previous commit: config panel headers still span the panel edge to edge across the reserved scrollbar gutter. Restored: the 12px gutter divider with its persistent grip, the 20% minimum config width, and the full labels on section rows, list rows and the Deploy/Commit buttons.
1 parent 2d91a3c commit 1012e48

5 files changed

Lines changed: 40 additions & 96 deletions

File tree

web/oss/src/components/Playground/Components/MainLayout/index.tsx

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -367,10 +367,7 @@ const PlaygroundMainView = ({
367367
<SplitterPanel
368368
defaultSize={configDefaultSize}
369369
size={configCollapsed ? 0 : undefined}
370-
// Agent config collapses to icon + summary rows below 320px (see the
371-
// `config` container query in globals.css), so it can go much narrower
372-
// than the percentage floor the prompt playground needs.
373-
min={isAgentConfig ? 240 : "20%"}
370+
min="20%"
374371
max={configMaxSize}
375372
className="!h-full"
376373
collapsible={splitCollapsible}
@@ -380,13 +377,10 @@ const PlaygroundMainView = ({
380377
The notice lives OUTSIDE the scroller, so it sits at the pane's bottom
381378
edge regardless of content height or scroll position. */}
382379
<div
383-
className={clsx(
384-
"@container/config flex h-full min-h-0 w-full flex-col",
385-
{
386-
// Config = the raised authoring surface (covers the notice too).
387-
"ag-panel-raised": isAgentConfig,
388-
},
389-
)}
380+
className={clsx("flex h-full min-h-0 w-full flex-col", {
381+
// Config = the raised authoring surface (covers the notice too).
382+
"ag-panel-raised": isAgentConfig,
383+
})}
390384
>
391385
<section
392386
ref={setConfigPanelRef}

web/oss/src/components/Playground/Components/PlaygroundVariantConfig/assets/PlaygroundVariantConfigHeader.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -203,10 +203,8 @@ const PlaygroundVariantConfigHeader = ({
203203
// agent name), so this bar reads as the config panel's "Configuration" header.
204204
// Also the neutral header while agent-ness is unknown, so the prompt chrome below
205205
// never flashes on load for an agent.
206-
// "Configuration" shortens to "Config" once the panel is too narrow for it.
207206
<span className="text-[13px] font-semibold text-[var(--ant-color-text)]">
208-
<span className="ag-config-title-long">Configuration</span>
209-
<span className="ag-config-title-short">Config</span>
207+
Configuration
210208
</span>
211209
) : (
212210
<>
@@ -269,7 +267,7 @@ const PlaygroundVariantConfigHeader = ({
269267
</>
270268
)}
271269
</div>
272-
<div className="ag-config-actions flex items-center justify-end gap-2 shrink-0 grow min-w-0">
270+
<div className="flex items-center justify-end gap-2 shrink-0 grow min-w-0">
273271
{extraActions}
274272
{hasPresets && onLoadPreset && (
275273
<Button size="small" onClick={onLoadPreset}>

web/oss/src/styles/globals.css

Lines changed: 29 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -155,38 +155,23 @@ body {
155155
opacity: 0.4 !important;
156156
}
157157

158-
/* Agent playground: the divider between Config and Chat is a hairline in the app's frame colour,
159-
so both panels butt straight against it and their headers read as one row. The bar itself stays
160-
1px; the dragger overhangs it to give a comfortable grab zone without widening the seam. */
161-
.playground-splitter-agent > .ant-splitter-bar {
162-
background: var(--ag-shell-line) !important;
163-
flex-basis: 1px !important;
164-
width: 1px !important;
165-
overflow: visible !important;
166-
}
167-
.playground-splitter-agent .ant-splitter-bar-dragger {
168-
position: absolute !important;
169-
left: 50% !important;
170-
right: auto !important;
171-
width: 11px !important;
172-
transform: translateX(-50%) !important;
173-
background: transparent !important;
174-
}
175-
/* Rest: the seam is just the bar. Hover and drag brighten it and float a short grip on it, so the
176-
resize affordance shows up exactly when the pointer is there and stays invisible otherwise. */
158+
/* Agent playground: the collapse pill is disabled (Build/Chat switch lives in the header), so the
159+
drag handle is the ONLY resize affordance and must be discoverable on its own. Render a persistent
160+
centered grip on the divider — neutral at rest, then an accent TINT + taller on hover/drag — so it
161+
reads as a draggable handle without turning into a loud bar. Geometry is fully specified so it
162+
doesn't depend on antd's default pseudo-element placement. */
177163
.playground-splitter-agent .ant-splitter-bar-dragger::before {
178164
content: "" !important;
179165
position: absolute !important;
180166
top: 0 !important;
181167
bottom: 0 !important;
182168
left: 50% !important;
183169
right: auto !important;
184-
width: 1px !important;
170+
width: 2px !important;
185171
height: auto !important;
186172
border-radius: 0 !important;
187173
transform: translateX(-50%) !important;
188-
background: transparent !important;
189-
transition: background 150ms ease;
174+
background: var(--ag-colorBorderSecondary) !important;
190175
}
191176
.playground-splitter-agent .ant-splitter-bar-dragger::after {
192177
content: "" !important;
@@ -195,16 +180,22 @@ body {
195180
bottom: auto !important;
196181
left: 50% !important;
197182
right: auto !important;
198-
width: 3px !important;
199-
height: 28px !important;
183+
width: 4px !important;
184+
height: 24px !important;
200185
border-radius: 9999px !important;
201186
transform: translate(-50%, -50%) !important;
202187
background: var(--ag-colorTextTertiary) !important;
203-
opacity: 0 !important;
204188
transition:
189+
background 150ms ease,
205190
opacity 150ms ease,
206-
background 150ms ease;
207-
}
191+
height 150ms ease;
192+
}
193+
/* Hover + active: the full-height DIVIDER only strengthens to a neutral border tone — a long line in
194+
the accent colour reads as too loud. The small GRIP takes the accent (`colorPrimary`), softened to a
195+
TINT via opacity so it stays a clear-but-quiet handle in both themes (the tinted-primary border
196+
token blended into the dark divider; the full colour was too strong). `:not(-active)` mirrors the
197+
base `.playground-splitter` hover rule's specificity so we win the tie by source order — otherwise
198+
that base rule would swap the divider to a faint fill on hover (the fade). */
208199
.playground-splitter-agent
209200
.ant-splitter-bar-dragger:hover:not(.ant-splitter-bar-dragger-active)::before,
210201
.playground-splitter-agent .ant-splitter-bar-dragger-active::before {
@@ -213,10 +204,18 @@ body {
213204
.playground-splitter-agent
214205
.ant-splitter-bar-dragger:hover:not(.ant-splitter-bar-dragger-active)::after,
215206
.playground-splitter-agent .ant-splitter-bar-dragger-active::after {
216-
opacity: 1 !important;
217-
}
218-
.playground-splitter-agent .ant-splitter-bar-dragger-active::after {
207+
height: 36px !important;
219208
background: var(--ag-colorPrimary) !important;
209+
opacity: 0.7 !important;
210+
}
211+
/* Agent playground: the divider is the GUTTER between the raised Config panel and the recessed
212+
Chat canvas — a real ~12px channel (not a hairline) that says "two workspaces". Widen the bar and
213+
tint it the near-black/soft-grey gutter tone; the grip pseudo-elements above still read as the
214+
handle. */
215+
.playground-splitter-agent > .ant-splitter-bar {
216+
background: var(--ag-surface-gutter) !important;
217+
flex-basis: 12px !important;
218+
width: 12px !important;
220219
}
221220

222221
/* ── Agent Playground surface classes ──────────────────────────────────────────────────────────
@@ -951,45 +950,3 @@ body {
951950
width: calc(100% + var(--ag-scroll-gutter, 0px));
952951
margin-inline-end: calc(-1 * var(--ag-scroll-gutter, 0px));
953952
}
954-
955-
/* Narrow agent config panel. The `config` container is declared on the config pane
956-
(`@container/config` in MainLayout), so these rules only fire for the panel and never for
957-
the same components elsewhere. Below 320px the panel drops every label it can spare and
958-
keeps the icons and the values, so it stays readable while the user drags it small. */
959-
.ag-config-title-short {
960-
display: none;
961-
}
962-
963-
@container config (max-width: 320px) {
964-
.ag-config-title-long {
965-
display: none;
966-
}
967-
968-
.ag-config-title-short {
969-
display: inline;
970-
}
971-
972-
/* Section rows keep the leading icon and the right-hand summary (the harness and model
973-
stay visible); only the title drops out. */
974-
.ag-section-title {
975-
display: none;
976-
}
977-
978-
/* Deploy and Commit become icon buttons. antd renders the label as a bare text node next
979-
to the icon span, so zeroing the button's font size is the only way to drop the text
980-
without changing every call site. The accessible name stays in the DOM. */
981-
.ag-config-actions .ant-btn {
982-
gap: 0;
983-
font-size: 0;
984-
}
985-
986-
.ag-config-actions .ant-btn .ant-btn-icon {
987-
font-size: 14px;
988-
}
989-
990-
/* List rows (tools, MCP servers) drop their second line and their transport tag, so the
991-
name itself survives instead of truncating to two characters. */
992-
.ag-row-secondary {
993-
display: none;
994-
}
995-
}

web/packages/agenta-entity-ui/src/DrillInView/SchemaControls/agentTemplate/ItemRow.tsx

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ export function ItemRow({
125125
{descriptor.description ? (
126126
<Typography.Text
127127
type="secondary"
128-
className="ag-row-secondary block truncate text-xs leading-tight"
128+
className="block truncate text-xs leading-tight"
129129
>
130130
{descriptor.description}
131131
</Typography.Text>
@@ -134,7 +134,7 @@ export function ItemRow({
134134
<div className="flex shrink-0 items-center gap-1.5">
135135
{status ? <StatusTag status={status} /> : null}
136136
{descriptor.tags.map((tag) => (
137-
<Tag key={tag} className="ag-row-secondary m-0 text-[11px]">
137+
<Tag key={tag} className="m-0 text-[11px]">
138138
{tag}
139139
</Tag>
140140
))}
@@ -283,10 +283,7 @@ export function InstructionsFileRow({
283283
<span className="truncate font-mono text-[13px] font-medium leading-tight">
284284
{filename}
285285
</span>
286-
<Typography.Text
287-
type="secondary"
288-
className="ag-row-secondary shrink-0 text-[11px]"
289-
>
286+
<Typography.Text type="secondary" className="shrink-0 text-[11px]">
290287
{meta}
291288
</Typography.Text>
292289
{status ? <StatusTag status={status} /> : null}

web/packages/agenta-ui/src/components/presentational/section/ConfigAccordionSection.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -271,9 +271,7 @@ export function ConfigAccordionSection({
271271
) : null}
272272
<Text
273273
className={cn(
274-
// `ag-section-title` is a hook for narrow layouts that drop the title
275-
// and keep the icon + summary (see the `config` container query).
276-
"ag-section-title min-w-0 truncate font-medium",
274+
"min-w-0 truncate font-medium",
277275
size === "compact" ? "text-xs" : "text-sm",
278276
)}
279277
>

0 commit comments

Comments
 (0)