refactor(agent-form): add tab navigation inside Edit modal; pair short fields in 2 columns; delete dead hidden input
The Edit modal was still a vertical scroll of 5 stacked sections (12+
form fields + an embedded Heartbeat card + action bar) even after C5
named the sections. A modal is a transient affordance — making the
user scroll inside it was the wrong design. Same IA move we made for
the Settings page one round ago: add tabs.
Tabs inside the modal:
Identity | Runtime | Budget & scope | Behavior
Each tab swaps the pane. Tab label carries the section context, so
every section body lost its SectionHeader wrapper — the nested
"card-in-a-card" look around HeartbeatSection is gone; Behavior tab
just renders the heartbeat controls directly.
Field-level polish bundled in the same pass because it hit the same
render paths:
- Identity tab: Name + Role paired in a 2-column grid; Department +
Reports To paired. Title spans full width because its values are
often longer. The modal no longer grows tall just to fit two short
inputs side by side.
- Runtime tab: Status stands alone at the top (high-frequency
control — pause/resume). Connector + Model paired; Thinking Effort
+ Workspace paired. Each paired row keeps its inline hint (connector
issue / effort-not-supported) tied to the field it belongs to,
instead of appearing as loose paragraphs between fields.
- Budget tab: Budget input + BudgetBar + burn line cluster into one
grouped column so typing a new cap updates the visual context in
place.
- Behavior tab: HeartbeatSection rendered at the tab root — no
SectionHeader wrapper around it. The card's "Continuous Execution"
title + Wake-now button now read as the primary content of the
tab, not as something buried beneath a header.
Also removed:
- `<input type="hidden" data-agent-id={agent.id} />` in RuntimeSection
— dead code, zero semantic purpose, leftover from an earlier
experiment. Caught during the audit.
- `SectionHeader.tsx` — no more callers after sections stopped
wrapping themselves in it. File deleted.
Added i18n keys (zh + en):
agent.form.tabsAria.
Tab-label copy reuses the existing `agent.form.sectionIdentity`,
`sectionRuntime`, `sectionConstraints`, `sectionBehavior` keys —
same strings that the removed SectionHeader rendered, now carried
by the tab labels.
Covers EJ1 / EJ2 / EJ3 / EJ4 / EJ5 / ES1 / ES3 / ES4 from the
second-round Edit-modal audit.
This commit is contained in:
1 parent
1933fd6192
commit
50685b952c
7 files changed
+213
-177
No files matched your search
@@ -1390,6 +1390,7 @@ export const en: Record<string, string> = {
|
||||
"agent.form.sectionRuntime": "Runtime",
|
||||
"agent.form.sectionConstraints": "Budget & scope",
|
||||
"agent.form.sectionBehavior": "Behavior",
|
||||
"agent.form.tabsAria": "Agent edit categories",
|
||||
"agent.form.statusIdle": "Idle",
|
||||
"agent.form.statusActive": "Active",
|
||||
"agent.form.statusRunning": "Running",
|
||||
|
||||
@@ -1390,6 +1390,7 @@ export const zh: Record<string, string> = {
|
||||
"agent.form.sectionRuntime": "运行时",
|
||||
"agent.form.sectionConstraints": "预算与范围",
|
||||
"agent.form.sectionBehavior": "行为",
|
||||
"agent.form.tabsAria": "成员编辑分类",
|
||||
"agent.form.statusIdle": "空闲",
|
||||
"agent.form.statusActive": "活跃",
|
||||
"agent.form.statusRunning": "运行中",
|
||||
|
||||
Reference in new issue
Block a user