Merge pull request #206 from cita-777/codex/proxy-logs-model-badge-width

[codex] match proxy log model badge width to model name
This commit is contained in:
Cita
2026-03-20 16:32:17 +08:00
committed by GitHub
2 changed files with 28 additions and 1 deletions
@@ -193,6 +193,33 @@ describe('ProxyLogs server-driven page', () => {
}
});
it('keeps the model badge sized to the model name in desktop rows', async () => {
let root: ReturnType<typeof create> | null = null;
try {
await act(async () => {
root = create(
<MemoryRouter initialEntries={['/logs']}>
<ToastProvider>
<ProxyLogs />
</ToastProvider>
</MemoryRouter>,
);
});
await flushMicrotasks();
const modelBadge = root!.root.find((node) => (
node.type === 'span'
&& collectText(node) === 'gpt-4o'
&& node.props.style?.display === 'inline-flex'
));
expect(modelBadge.props.style?.alignSelf).toBe('flex-start');
} finally {
root?.unmount();
}
});
it('re-queries the server for status, client, and search changes instead of filtering locally', async () => {
let root: ReturnType<typeof create> | null = null;
+1 -1
View File
@@ -823,7 +823,7 @@ export default function ProxyLogs() {
</td>
<td>
<div style={{ display: 'flex', flexDirection: 'column', gap: 4 }}>
<ModelBadge model={log.modelRequested} />
<ModelBadge model={log.modelRequested} style={{ alignSelf: 'flex-start' }} />
{downstreamKeySummary ? (
<div style={{ fontSize: 11, lineHeight: 1.45, color: 'var(--color-text-muted)' }}>
{downstreamKeySummary}