diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index 07e4b7b..64093c9 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx @@ -1643,27 +1643,18 @@ export default function App() { ) : null} {activeTab === 'log' ? ( -
-
+
+

{t('log.title')}

-

- {logDetailOpen && selectedLogTrace - ? `${t('log.detailTitle')}: #${selectedLogTrace.id}` - : traceStatus || t('log.subtitle')} -

+

{traceStatus || t('log.subtitle')}

-
- {t('log.count', { count: requestTraces.length })} - {logDetailOpen ? ( - - ) : null} +
+ {t('log.count', { count: requestTraces.length })}
-
+
{requestTraces.length === 0 ? (

{t('log.empty')}

@@ -1671,28 +1662,50 @@ export default function App() {
) : null} {requestTraces.map((trace) => ( - +
))}
@@ -1700,26 +1713,18 @@ export default function App() { ) : null} {activeTab === 'network' ? ( -
-
+
+

{t('network.title')}

-

- {networkDetailOpen && selectedNetworkTrace - ? `${t('network.detailTitle')}: #${selectedNetworkTrace.id}` - : traceStatus || t('network.subtitle')} -

+

{traceStatus || t('network.subtitle')}

-
- {networkDetailOpen ? ( - - ) : null} +
+ {t('network.count', { count: requestTraces.length })}
-
+
{requestTraces.length === 0 ? (

{t('log.empty')}

@@ -1727,21 +1732,44 @@ export default function App() {
) : null} {requestTraces.map((trace) => ( - +
))}
@@ -2571,7 +2599,7 @@ export default function App() {
{(selectedLogTrace.attempts || []).map((attempt) => (
-
+
{t('log.attemptLabel', { attempt: attempt.attempt })} {attempt.result || '-'} diff --git a/frontend/src/i18n/locales/en.json b/frontend/src/i18n/locales/en.json index 79ca53b..32c71a5 100644 --- a/frontend/src/i18n/locales/en.json +++ b/frontend/src/i18n/locales/en.json @@ -271,6 +271,7 @@ "network": { "title": "Network detail", "subtitle": "Inspect URL, timing, status, headers, and params without exposing model IO content.", + "count": "{{count}} requests", "detailTitle": "Network inspector", "detailSubtitle": "Each attempt shows technical metadata captured around the upstream call.", "url": "URL", diff --git a/frontend/src/i18n/locales/zh-CN.json b/frontend/src/i18n/locales/zh-CN.json index 25f5a7c..a5c4305 100644 --- a/frontend/src/i18n/locales/zh-CN.json +++ b/frontend/src/i18n/locales/zh-CN.json @@ -271,6 +271,7 @@ "network": { "title": "网络详情", "subtitle": "查看 URL、时延、状态码、请求头与参数,同时避免暴露模型输入输出正文。", + "count": "共 {{count}} 条请求", "detailTitle": "网络检查器", "detailSubtitle": "每次尝试都会展示调用上游时采集到的技术元数据。", "url": "URL", diff --git a/frontend/src/styles.css b/frontend/src/styles.css index 182de63..84f5723 100644 --- a/frontend/src/styles.css +++ b/frontend/src/styles.css @@ -503,15 +503,10 @@ dd { } .sync-layout, -.trace-layout, .settings-layout { grid-template-columns: repeat(2, minmax(0, 1fr)); } -.trace-layout { - grid-template-columns: minmax(300px, 0.78fr) minmax(0, 1.22fr); -} - .settings-layout { grid-template-columns: minmax(0, 1.7fr) minmax(280px, 0.85fr); align-items: start; @@ -532,45 +527,6 @@ dd { grid-column: 1 / -1; } -.trace-list-panel { - min-width: 0; -} - -.trace-list { - display: grid; - gap: 0.85rem; - max-height: calc(100vh - 18rem); - overflow: auto; - padding-right: 0.2rem; -} - -.trace-row { - display: grid; - gap: 0.6rem; - width: 100%; - padding: 0.9rem; - border-radius: 18px; - text-align: left; - background: var(--panel-muted); -} - -.trace-row.active { - border-color: var(--accent); - box-shadow: var(--shadow-sm); -} - -.trace-row-top, -.trace-row-summary { - display: flex; - align-items: center; - justify-content: space-between; - gap: 0.75rem; -} - -.trace-row-summary { - color: var(--text-muted); - font-size: 0.9rem; -} .trace-hero { display: grid; @@ -602,11 +558,6 @@ dd { gap: 0.8rem; } -.trace-pill-warn { - background: var(--warning-soft); - color: var(--warning); -} - .compact-header { margin-bottom: 0; } @@ -841,6 +792,12 @@ html[data-theme='dark'] button.ghost-danger:hover { gap: 0.8rem; } +.trace-scroll-list { + max-height: none; + padding-right: 0; + overflow: visible; +} + .resource-card { display: grid; gap: 0.88rem; @@ -979,6 +936,17 @@ html[data-theme='dark'] button.ghost-danger:hover { line-height: 1.45; } +.trace-card-subtitle { + display: flex; + align-items: center; + justify-content: space-between; + gap: 0.75rem; +} + +.trace-card-subtitle span:last-child { + flex-shrink: 0; +} + .detail-panel { display: grid; align-content: start; @@ -1564,7 +1532,6 @@ html[data-theme='dark'] .detail-empty-card { .overview-layout, .sync-layout, - .trace-layout, .providers-layout, .aliases-layout, .stats-grid, @@ -1622,7 +1589,6 @@ html[data-theme='dark'] .detail-empty-card { .nav-list, .overview-layout, .sync-layout, - .trace-layout, .settings-layout, .stats-grid, .card-grid-list, @@ -1660,12 +1626,6 @@ html[data-theme='dark'] .detail-empty-card { min-height: auto; } - .trace-row-top, - .trace-row-summary { - flex-direction: column; - align-items: stretch; - } - .detail-backdrop { align-items: stretch; justify-content: stretch;