Skip to content

fix(web): contain dialog content and localize agent fork dialog - #567

Open
Yevanchen wants to merge 1 commit into
mainfrom
fix/web-dialog-overflow-and-fork-i18n
Open

fix(web): contain dialog content and localize agent fork dialog#567
Yevanchen wants to merge 1 commit into
mainfrom
fix/web-dialog-overflow-and-fork-i18n

Conversation

@Yevanchen

Copy link
Copy Markdown
Collaborator

Fill what changed. Use N/A for irrelevant or maintainer-only items. See CONTRIBUTING.md for branch, CLA, generated file, and CI rules.

Summary

  • Contain every dialog's content inside the dialog: DialogContent's grid had no column template, so the implicit auto column floored at the widest child's min-content contribution (nowrap truncate targets in AgentAssignField, the field-sizing-content composer Textarea). The New Thread dialog's assign-to control and composer extended ~760px past the dialog edge and pushed Dispatch off-screen. Fixed at the shared boundary with grid-cols-[minmax(0,1fr)] — no viewport-specific fixed widths.
  • Localize the Change Agent type (fork) dialog: it rendered raw keys (AGENTLIFECYCLE.KINDCATTLETAGLINE, agentLifecycle.forkCarried*, forkAddedSandbox, forkStays*, assistantSandboxState) and an uninterpolated Fork as {{kind}} button. The kind chips now reuse the canonical agent.assistantAgent / agent.taskAgent labels and agent.kind*Tagline taglines, the seven missing agentLifecycle entries were added to en / zh-CN / zh-TW / ja, and the confirm label passes the kind variable the forkAs catalog entry expects.
  • Regression coverage in apps/web/tests/reported-i18n-layout-regressions.test.ts: every key referenced by the fork dialog must resolve in every locale, the forkAs call must pass {{kind}}, and the shared dialog grid must keep its shrinkable column.

Why

  • Two reported production regressions: Runs → New thread overflows horizontally with a published Agent that has a long description (Dispatch can leave the viewport), and the fork dialog shows raw i18n keys/placeholders in both fork directions.

Verification

  • Commands:
    • just test-package @mosoo/web — 236 pass / 0 fail
    • just test-file apps/web/tests/reported-i18n-layout-regressions.test.ts and apps/web/tests/i18n-catalog-parity.test.ts — pass
    • just tc-package @mosoo/web, just fmt-check, git diff --check, just commit-check — pass
  • Manual steps: local browser acceptance via Playwright against just dev with the loopback @mosoo.ai login. Before fix at 1440×900 the dialog's right edge was at 1100px while the assign control / composer / Dispatch measured 1840 / 1857 / 1872px (Dispatch outside the 1440px viewport, expand toggle unclickable). After fix: 1047 / 1064 / 1079px, all inside the dialog; verified in normal, expanded, 1024×800, and 390×844 layouts, with long descriptions truncating without changing dialog width. Fork dialog audited in both directions (Assistant → Task and Task → Assistant) in en, zh-CN, zh-TW, ja: zero raw namespace.key or {{var}} tokens; before/after screenshots attached on the tracking issue.
  • Not run: just check full gate stops on 12 pre-existing apps/driver ACP/watchdog test failures that also fail on clean main with this change stashed (environment-dependent process-supervision fixtures); fmt, doc links, lint, tc, and GraphQL freshness stages pass.

Impact

  • User/API/contract changes: user-visible only — dialog layout containment (all dialogs share DialogContent) and fork dialog copy in four locales. No API or contract changes.
  • Generated files / GraphQL / DB / lockfile: none.
  • Env or config changes: none.
  • Risk and rollback: grid-cols-[minmax(0,1fr)] affects every dialog; dialogs always had definite widths (w-full + max-w-*), so the column template only stops children from outgrowing the popup. Revert the single commit to roll back.

Review

  • Closest review areas: apps/web/src/shared/ui/dialog.tsx (shared grid template), apps/web/src/routes/agent/lifecycle/kind-fork-dialog.tsx (key reuse + {{kind}} interpolation), translation catalogs.
  • Known trade-offs: the fork dialog now shares kind labels/taglines with the kind selector (agent.* keys) instead of carrying duplicate agentLifecycle.kind*Tagline copy — one canonical name per concept.

The New Thread dialog let its assign-to control and composer surface grow
far past the dialog's right edge, pushing Dispatch off-screen. The shared
DialogContent grid had no column template, so the implicit auto column
floored at the widest child's min-content contribution (nowrap truncation
targets and the content-sized composer textarea). Constrain the single
grid column with minmax(0,1fr) so every dialog child resolves against the
dialog's own width and inner truncate/min-w-0/wrap rules apply.

The Change Agent type (fork) dialog rendered raw i18n keys and an
uninterpolated 'Fork as {{kind}}' action. Reuse the canonical agent kind
labels and taglines (agent.assistantAgent, agent.taskAgent,
agent.kindAssistantTagline, agent.kindTaskTagline), add the missing
agentLifecycle fork entries to en, zh-CN, zh-TW, and ja, and pass the
kind variable the forkAs catalog entry expects.

Add reported-regression coverage: every fork dialog key must resolve in
every locale, the forkAs call must pass {{kind}}, and the dialog grid
must keep its shrinkable column.
@Yevanchen
Yevanchen force-pushed the fix/web-dialog-overflow-and-fork-i18n branch from f8f0202 to 9fd494a Compare August 21, 2026 16:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant