Repository navigation
fix(desktop): prevent Agent Graph Selected results label from shrinking to min-content #3966
Description
What happened
The Selected results / 已选择结果 row at the bottom of the Desktop Agent Graph panel wraps instead of staying on one line.
- At the panel's full measure
min(680px, calc(100% - 32px))with no narrowing at all,Selected resultsalready wraps to two lines when thecodesibling holds twograph_record_*ids. Thespanlabel has noflex-shrink: 0/white-space: nowrap, so it shrinks tomin-contentas soon as thecodeis long enough.zhis the louder symptom(one character per line),enwraps to two lines — same shrink, not a separatezh-only case. Captured at both 430px and 980px in fix(desktop): keep Agent Graph results label from shrinking #3970.
Root cause in apps/desktop/src/renderer/agent-graph-panel.tsx:484:
<div className="maka-agent-graph-results">
<span>{copy.selectedResults}</span>
<code>{snapshot.finish.resultIds.join(', ')}</code>
</div>paired with apps/desktop/src/renderer/styles/agent-graph.css:40:
.maka-agent-graph-heading,
.maka-agent-graph-heading > div,
.maka-agent-graph-results { display:flex; align-items:center; gap:var(--space-2); }
.maka-agent-graph-results code { min-width:0; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }code is a single-line graph_record_xxx, graph_record_yyy with white-space: nowrap. The span defaults to min-width: auto; flex: 0 1 auto without white-space: nowrap. Under flex shrink the label collapses to min-content (one character for scripts without break opportunities), producing the vertical layout.
This affects all locales. The current shipped locales in packages/core/src/ui-locale.ts are ['zh', 'en'] (UI_LOCALES), and the panel only branches on locale === 'zh'. The mechanism holds for any script without break opportunities, but the observed cases are zh and en only.
How to reproduce
- Start Desktop and trigger a task that produces an
Agent Graphfinish(--graphor TUI/graph <task>) sosnapshot.finish.resultIdscontains two or more longgraph_record_*ids. - Open the session and look at the
Selected resultsrow at the bottom of the panel. - At the default width
min(680px, calc(100% - 32px))with no resize, the label already wraps. Narrowing is not required foren; two ids are sufficient at 680px.zhshows the vertical per-character wrapping,enshows a two-line wrap.
Stable reproduction, no specific model required. Reproducible at both 430px and 980px (see #3970).
Environment
- Maka version or commit:
c66846ddb(fix/shell-run-legacy-visibility-tolerancebranch, 2026-08-27) - OS and version: Linux
- Surface: Desktop
- Node.js version: >=22.19.0 (when running from source)
Logs, screenshots, or additional context
- Screenshot:
- Expected:
spanstays on one line,codetakes the remaining space withellipsis. Suggested fix:
.maka-agent-graph-results > span { flex: 0 0 auto; white-space: nowrap; }
.maka-agent-graph-results code { flex: 1 1 0; min-width: 0; }- Related files:
apps/desktop/src/renderer/agent-graph-panel.tsx:94,484,apps/desktop/src/renderer/styles/agent-graph.css:40,174 - Label suggestion:
bug

Activity
heeoneie commentedon Aug 27, 2026
I'd like to take this one.
Reproduced the shrink behaviour in isolation from the rules at
agent-graph.css40 and 174-186. One thing worth adding to the report: this is not zh-only. The label<span>has neitherflex-shrink: 0norwhite-space: nowrap, so it shrinks to min-content in every locale — CJK just has no break opportunities, which is why it degrades to one character per line:So the fix reads better as "the label never shrinks" than as "add nowrap for Chinese".
Planning exactly what you proposed:
Will attach before/after covering zh, en and ko.
me2seeks commentedon Aug 27, 2026
@heeoneie Thx for grabbing this! Since you're testing multiple languages, any chance you'd be interested in helping with our i18n? AI translations can be a bit weird sometimes, so a native speaker's touch would be amazing.
docs(issue): add apache#3966 Agent Graph 已选择结果竖排截图
heeoneie commentedon Aug 27, 2026
One more thing from building the fix, since it widens what this issue reports: en breaks without any narrowing.
At the panel's full measure —
min(680px, 100% - 32px), no resize at all —Selected resultsalready wraps to two lines. The label has noflex-shrink: 0, so it shrinks to min-content as soon as thecodesibling is long enough, and twograph_record_*ids already are at 680px.So this reproduce step:
is not a narrowing precondition for en — it is already true at the default width. zh is the louder symptom (one character per line), but it is the same shrink, not a separate zh-only case.
Captured at both 430px and 980px in #3970.
heeoneie commentedon Aug 27, 2026
Correction to my first comment: I listed a
korow as if Korean were a shipped locale. It isn't —UI_LOCALESinpackages/core/src/ui-locale.tsis['zh', 'en'], and this panel only branches onlocale === 'zh'. The mechanism holds for any script without break opportunities, but I shouldn't have presented ko as an observed case. #3970 covers zh and en only.@me2seeks On i18n — yes, I'd be glad to help. Korean is my native language, so if
kois something the project wants to add I can carry the copy. For the existing zh/en surfaces I can review wording rather than translate.Where would you like me to start — is there an issue tracking the locale catalogs, or should I open one? I noticed #3962 is already working the presentation boundary for built-in tool names, so I'd want to avoid cutting across that.
And thanks for the screenshot on a fork branch — that made the zh case reproducible without your local file.
[-]fix(desktop): Agent Graph 已选择结果因 flex 挤压竖排显示[/-][+]fix(desktop): prevent Agent Graph Selected results label from shrinking to min-content[/+]me2seeks commentedon Aug 27, 2026
Hi @heeoneie — thanks so much for picking up #3966, and for the really thorough digging you did!
Really appreciate how you caught the
encase at full width and how you corrected thekonote — that kind of care withUI_LOCALESbeing['zh','en']is exactly the standard we try to keep here. Your proposed fixlooks spot-on, and the before/after you put in #3970 (430 + 980 ×
zh/en) makes it super easy to review.You kindly asked about i18n — yes, we'd love your help! Korean is a native perspective we don't have on the team, and even a wording review for the existing
zh/ensurfaces would be wonderful.To make it easy to get started without bumping into other work, I've opened a tracking issue for the new locale:
#3974 feat(i18n): add Korean (ko) locale — it reuses the typed
UiCatalog<T>contract from #2672 and thezh-TWpattern from #3853, so no new framework or global file.It's split into six small slices so you can claim just one at a time:
UiLocale)Totally up to you where you'd like to begin — even starting with a review on slice 1 would be a huge help, and you can just comment
I'd like to take #3975(or whichever slice you prefer) on the relevant issue and I'll assign it right away. No rush at all.Thanks again for the great work on #3966 and for offering to help with Korean — it really means a lot to the project!
fix(desktop): keep Agent Graph results label from shrinking (apache#3970