Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,13 @@ Write each change in both `### English` and `### 中文` under `## Unreleased`.

- Make the Overview traffic chart taller so the area/line plot is readable
- Give the Overview traffic chart a full-width row so the series can use the console width
- Close the add-account dialog after a Trae callback succeeds, and give the pasted callback URL a fixed-height field

### 中文

- 加高概览流量图,面积折线更容易看清
- 概览流量图单独占一行,折线铺满控制台宽度
- Trae 提交回调成功后关闭添加账号弹窗,并把粘贴框改成固定高度的多行输入

## 0.2.18 - 2026-08-29

Expand Down
15 changes: 10 additions & 5 deletions frontend/src/components/AddAccountModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,11 @@ export function AddAccountModal({ isOpen, onClose, onAdded }: Props) {
onClose()
}

function finishAndClose() {
reset()
onClose()
}

function goLogin(next: TabKey) {
if (busy || !typesReady) return
setTab(next)
Expand Down Expand Up @@ -277,7 +282,7 @@ export function AddAccountModal({ isOpen, onClose, onAdded }: Props) {
setPhase('done')
setMessage(t('wizardAccountReady'))
onAdded()
window.setTimeout(close, 900)
window.setTimeout(finishAndClose, 900)
} catch (error) {
setPhase('idle')
setMessage(error instanceof Error ? error.message : String(error))
Expand All @@ -298,7 +303,7 @@ export function AddAccountModal({ isOpen, onClose, onAdded }: Props) {
setPhase('done')
setMessage(t('wizardAccountReady'))
onAdded()
window.setTimeout(close, 900)
window.setTimeout(finishAndClose, 900)
} catch (error) {
setPhase('polling')
setMessage(error instanceof Error ? error.message : String(error))
Expand All @@ -317,7 +322,7 @@ export function AddAccountModal({ isOpen, onClose, onAdded }: Props) {
setPhase('done')
setMessage(t('patDone'))
onAdded()
window.setTimeout(close, 700)
window.setTimeout(finishAndClose, 700)
} catch (error) {
setPhase('idle')
setMessage(error instanceof Error ? error.message : String(error))
Expand Down Expand Up @@ -363,7 +368,7 @@ export function AddAccountModal({ isOpen, onClose, onAdded }: Props) {
setPhase('done')
setMessage(t('accountImported'))
onAdded()
window.setTimeout(close, 700)
window.setTimeout(finishAndClose, 700)
} catch (error) {
setPhase('idle')
setMessage(error instanceof Error ? error.message : String(error))
Expand Down Expand Up @@ -615,7 +620,7 @@ export function AddAccountModal({ isOpen, onClose, onAdded }: Props) {
<div className="space-y-2">
<p className="text-[11px] leading-4 text-[var(--app-faint)]">{t('wizardCallbackLead')}</p>
<TextArea
className="min-h-20 font-mono text-xs"
className="h-28 w-full resize-none font-mono text-xs leading-5"
value={callbackUrl}
onChange={(event) => setCallbackUrl(event.target.value)}
placeholder={t('wizardCallbackPh')}
Expand Down
6 changes: 3 additions & 3 deletions frontend/src/components/account/AccountCard.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { useLayoutEffect, useRef } from 'react'
import { Button, Chip, Input, Tooltip } from '@heroui/react'
import { Button, Chip, Input, TextArea, Tooltip } from '@heroui/react'
import {
ArrowClockwise,
ArrowSquareOut,
Expand Down Expand Up @@ -245,8 +245,8 @@ export function AccountCard({
{account.provider === 'trae' && onSubmitCallback && onCallbackChange ? (
<div className="mt-3 space-y-2">
<p className="text-[11px] leading-4 text-[var(--app-faint)]">{t('wizardCallbackLead')}</p>
<Input
className={ACCOUNT_INPUT_CLASS}
<TextArea
className="h-24 w-full resize-none font-mono text-xs leading-5"
value={callbackUrl || ''}
onChange={(event) => onCallbackChange(event.target.value)}
placeholder={t('wizardCallbackPh')}
Expand Down
6 changes: 5 additions & 1 deletion frontend/src/pages/AccountsPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -148,12 +148,16 @@ export function AccountsPage() {
setNoteById((current) => ({ ...current, [id]: t('wizardCallbackPh') }))
return
}
await run(id, 'callback', async () => {
const ok = await run(id, 'callback', async () => {
setNoteById((current) => ({ ...current, [id]: t('wizardStartingSession') }))
await completeLoginCallback(id, pasted)
setCallbackById((current) => ({ ...current, [id]: '' }))
await refresh(undefined, { silent: true })
})
if (ok) {
setAuthPanelId((current) => (current === id ? null : current))
setNoteById((current) => ({ ...current, [id]: '' }))
}
}

async function onPat(id: string) {
Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions internal/webui/static/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link href="https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500&family=Outfit:wght@400;500;600;700&display=swap" rel="stylesheet" />
<script type="module" crossorigin src="/assets/index-BLu1oRxf.js"></script>
<link rel="stylesheet" crossorigin href="/assets/index-DaLLqKNi.css">
<script type="module" crossorigin src="/assets/index-C3mI_kb1.js"></script>
<link rel="stylesheet" crossorigin href="/assets/index-CkXdScGJ.css">
</head>
<body>
<div id="root"></div>
Expand Down
Loading