Skip to content

Commit e588ef0

Browse files
committed
Update layout to three columns
1 parent d34d070 commit e588ef0

3 files changed

Lines changed: 65 additions & 26 deletions

File tree

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ Core loop:
2626
- Error-to-entity links via `VIOLATES` edges (`python/graph/ingest.py`)
2727
- Agent tooling to inspect errors, traverse graph context, read source, and output correction prompts (`python/agents/*`)
2828
- Live, non-blocking agent run indicators in the desktop UI (phase updates + progress bars while fix suggestions are generated)
29+
- Three-column desktop workspace layout: errors (left), graph (center, primary), and a suggestion panel (right) that appears only after an agent workflow run starts
2930

3031
## Agent Workflow (Implemented in `python/agents`)
3132

src/frontend/app/App.tsx

Lines changed: 34 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ export default function App() {
2424
service: tauriCodeHealthService
2525
});
2626
const [copyStatus, setCopyStatus] = useState("");
27+
const hasAgentWorkflowRun = Boolean(latestSuggestion || agentRunProgress || resolvingErrorId);
2728

2829
async function handleCopySuggestion() {
2930
if (!latestSuggestion) {
@@ -70,7 +71,11 @@ export default function App() {
7071
{state.error ? <div className="card error">{state.error}</div> : null}
7172
{agentRunProgress ? <AgentProgressPanel progress={agentRunProgress} /> : null}
7273

73-
<section className="layout-grid">
74+
<section
75+
className={`layout-grid ${
76+
hasAgentWorkflowRun ? "layout-grid-with-suggestion" : "layout-grid-without-suggestion"
77+
}`}
78+
>
7479
<div className="column-left">
7580
<ErrorListPanel
7681
graph={state.graph}
@@ -98,26 +103,35 @@ export default function App() {
98103
onNodeClick={handleNodeClick}
99104
/>
100105
</div>
101-
</section>
102-
103-
{latestSuggestion ? (
104-
<section className="card panel suggestion-panel">
105-
<h2>Agent Suggestion</h2>
106-
<p className="suggestion-meta">
107-
Error: <code>{latestSuggestion.errorId}</code> ({latestSuggestion.ruleCode}) | Model:{" "}
108-
{latestSuggestion.model}
109-
</p>
110-
<div className="suggestion-actions">
111-
<button type="button" onClick={() => void handleCopySuggestion()}>
112-
Copy Suggestion
113-
</button>
114-
<span className="suggestion-copy-status" aria-live="polite">
115-
{copyStatus}
116-
</span>
106+
{hasAgentWorkflowRun ? (
107+
<div className="column-suggestion">
108+
<section className="card panel suggestion-panel">
109+
<h2>Agent Suggestion</h2>
110+
{latestSuggestion ? (
111+
<>
112+
<p className="suggestion-meta">
113+
Error: <code>{latestSuggestion.errorId}</code> ({latestSuggestion.ruleCode}) | Model:{" "}
114+
{latestSuggestion.model}
115+
</p>
116+
<div className="suggestion-actions">
117+
<button type="button" onClick={() => void handleCopySuggestion()}>
118+
Copy Suggestion
119+
</button>
120+
<span className="suggestion-copy-status" aria-live="polite">
121+
{copyStatus}
122+
</span>
123+
</div>
124+
<pre>{latestSuggestion.suggestion}</pre>
125+
</>
126+
) : (
127+
<p className="suggestion-empty-state">
128+
Agent workflow is running. Suggestion will appear here when generation completes.
129+
</p>
130+
)}
131+
</section>
117132
</div>
118-
<pre>{latestSuggestion.suggestion}</pre>
119-
</section>
120-
) : null}
133+
) : null}
134+
</section>
121135
</main>
122136
);
123137
}

src/frontend/styles/styles.css

Lines changed: 30 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -111,14 +111,22 @@ h1 {
111111
.layout-grid {
112112
margin-top: 1rem;
113113
display: grid;
114-
grid-template-columns: minmax(280px, 360px) 1fr;
115114
gap: 1rem;
116115
flex: 1;
117116
min-height: 0;
118117
}
119118

119+
.layout-grid-without-suggestion {
120+
grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
121+
}
122+
123+
.layout-grid-with-suggestion {
124+
grid-template-columns: minmax(260px, 340px) minmax(0, 1.9fr) minmax(320px, 1fr);
125+
}
126+
120127
.column-left,
121-
.column-right {
128+
.column-right,
129+
.column-suggestion {
122130
display: grid;
123131
gap: 1rem;
124132
min-width: 0;
@@ -133,6 +141,10 @@ h1 {
133141
grid-template-rows: minmax(0, 1fr);
134142
}
135143

144+
.column-suggestion {
145+
grid-template-rows: minmax(0, 1fr);
146+
}
147+
136148
.error-panel {
137149
min-height: 0;
138150
display: grid;
@@ -494,9 +506,11 @@ h1 {
494506
}
495507

496508
.suggestion-panel {
497-
margin-top: 1rem;
509+
height: 100%;
510+
min-height: 0;
498511
display: grid;
499-
gap: 0.55rem;
512+
grid-template-rows: auto auto auto minmax(0, 1fr);
513+
gap: 0.6rem;
500514
}
501515

502516
.suggestion-meta {
@@ -526,10 +540,19 @@ h1 {
526540
white-space: pre-wrap;
527541
overflow-wrap: anywhere;
528542
line-height: 1.4;
529-
max-height: 220px;
543+
max-height: none;
530544
overflow: auto;
531545
}
532546

547+
.suggestion-empty-state {
548+
margin: 0;
549+
color: #486581;
550+
border: 1px solid #d9e2ec;
551+
border-radius: 8px;
552+
padding: 0.75rem;
553+
background: #f8fbff;
554+
}
555+
533556
button {
534557
border: 1px solid #7aa5d2;
535558
background: #eef6ff;
@@ -562,7 +585,8 @@ button:disabled {
562585
}
563586

564587
.column-left,
565-
.column-right {
588+
.column-right,
589+
.column-suggestion {
566590
min-height: initial;
567591
}
568592

0 commit comments

Comments
 (0)