Skip to content

Commit 2edab31

Browse files
committed
fix: flatten codex account order shell
1 parent 69defe1 commit 2edab31

3 files changed

Lines changed: 31 additions & 3 deletions

File tree

docs-linhay/spaces/20260511-codex-account-list-tab/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@
100100
14. 后端新增 `ProbeCodexAccountRouting`:使用 relay API key 向 sidecar `/v1/chat/completions` 发送最小测试请求,通过请求前后 `auth-files``api-key-usage` 的 recent request 差量识别命中的 auth-file、codex-api-key 或 openai-compatible provider。
101101
15. OAuth/auth-file 账号详情的模型区域已从只读兼容模型改为可编辑模型映射:加载时合并 `GetAuthFileModels``ListOAuthModelAliases(provider)`,保存时调用 `UpdateOAuthModelAliases` 写回 `oauth-model-alias`;该配置按 provider/channel 生效,同一 `codex` OAuth 通道共享映射。
102102
16. 路由策略调试区按 Gemini 评审方案重构为“控制台 + 内联策略编辑”:默认先展示测试模型、测试按钮、候选顺序和最近路由命中;点击 `编辑策略` 后不再渲染第二套账号清单,而是在既有请求顺序账号行内直接显示默认/允许/排除与策略上移/下移控件;账号列表行同步显示 `路由 NN``跳过` 和策略模式,避免重复账号列表打断配置路径。
103+
17. 请求顺序 section 去掉外层重卡阴影,改为 `bg-surface` 承载、`bg-main` 标题/消息带和内层账号卡的层级组合,减少“卡中卡”观感,但不改账号行本身的卡片交互与排序逻辑。
103104

104105
## 验证记录
105106
1. `npm run typecheck`

frontend/src/features/codex/codexAccountList.test.mjs

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -581,6 +581,27 @@ test('Codex account order cards reuse the account attribution card and keep cust
581581
assert.match(source, /CodexAccountSpecialActionBar/);
582582
});
583583

584+
test('Codex account order section uses a lighter shell instead of a nested card shell', async () => {
585+
const source = await readFile(new URL('./components/CodexAccountOrderSection.tsx', import.meta.url), 'utf8');
586+
587+
assert.match(
588+
source,
589+
/CODEX_ACCOUNT_ORDER_SECTION_SHELL_CLASS =\n 'overflow-hidden border-2 border-\[var\(--border-color\)\] bg-\[var\(--bg-surface\)\]';/,
590+
);
591+
assert.match(
592+
source,
593+
/CODEX_ACCOUNT_ORDER_SECTION_HEADER_CLASS = 'border-b-2 border-\[var\(--border-color\)\] bg-\[var\(--bg-main\)\] xl:flex xl:items-stretch';/,
594+
);
595+
assert.match(
596+
source,
597+
/CODEX_ACCOUNT_ORDER_SECTION_MESSAGE_CLASS =\n 'border-b-2 border-\[var\(--border-color\)\] bg-\[var\(--bg-main\)\] px-5 py-3 font-mono text-\[length:var\(--font-size-ui-sm\)\] font-black uppercase tracking-wide text-\[var\(--text-primary\)\]';/,
598+
);
599+
assert.doesNotMatch(
600+
source,
601+
/<section className="border-\[3px\] border-\[var\(--border-color\)\] bg-\[var\(--bg-main\)\] shadow-\[8px_8px_0_var\(--shadow-color\)\]">/,
602+
);
603+
});
604+
584605
test('Codex account order row exposes direct top and bottom reorder actions', async () => {
585606
const source = await readFile(new URL('./components/CodexAccountOrderRow.tsx', import.meta.url), 'utf8');
586607

frontend/src/features/codex/components/CodexAccountOrderSection.tsx

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,12 @@ function EmptyState({ children }: { children: string }) {
3030
);
3131
}
3232

33+
const CODEX_ACCOUNT_ORDER_SECTION_SHELL_CLASS =
34+
'overflow-hidden border-2 border-[var(--border-color)] bg-[var(--bg-surface)]';
35+
const CODEX_ACCOUNT_ORDER_SECTION_HEADER_CLASS = 'border-b-2 border-[var(--border-color)] bg-[var(--bg-main)] xl:flex xl:items-stretch';
36+
const CODEX_ACCOUNT_ORDER_SECTION_MESSAGE_CLASS =
37+
'border-b-2 border-[var(--border-color)] bg-[var(--bg-main)] px-5 py-3 font-mono text-[length:var(--font-size-ui-sm)] font-black uppercase tracking-wide text-[var(--text-primary)]';
38+
3339
export function CodexAccountOrderSection({
3440
title,
3541
hint,
@@ -220,8 +226,8 @@ export function CodexAccountOrderSection({
220226
}
221227

222228
return (
223-
<section className="border-[3px] border-[var(--border-color)] bg-[var(--bg-main)] shadow-[8px_8px_0_var(--shadow-color)]">
224-
<header className="border-b-[3px] border-[var(--border-color)] bg-[var(--bg-surface)] xl:flex xl:items-stretch">
229+
<section className={CODEX_ACCOUNT_ORDER_SECTION_SHELL_CLASS}>
230+
<header className={CODEX_ACCOUNT_ORDER_SECTION_HEADER_CLASS}>
225231
<div className="px-5 py-4 xl:min-w-0 xl:flex-1">
226232
<h2 className="text-xl font-black uppercase leading-none tracking-normal text-[var(--text-primary)]">
227233
{title}
@@ -322,7 +328,7 @@ export function CodexAccountOrderSection({
322328
</header>
323329

324330
{message ? (
325-
<div className="border-b-2 border-[var(--border-color)] bg-[var(--bg-main)] px-5 py-3 font-mono text-[length:var(--font-size-ui-sm)] font-black uppercase tracking-wide text-[var(--text-primary)]">
331+
<div className={CODEX_ACCOUNT_ORDER_SECTION_MESSAGE_CLASS}>
326332
{message}
327333
</div>
328334
) : null}

0 commit comments

Comments
 (0)