Skip to content

style(dashboard): KPI 卡片固定 6 列防折行 + 全页 UI/UX 加固#276

Merged
ThreeFish-AI merged 1 commit into
feature/1.x.xfrom
ThreeFish-AI/dashboard-cards-no-wrap-ui-optimization
Jul 4, 2026
Merged

style(dashboard): KPI 卡片固定 6 列防折行 + 全页 UI/UX 加固#276
ThreeFish-AI merged 1 commit into
feature/1.x.xfrom
ThreeFish-AI/dashboard-cards-no-wrap-ui-optimization

Conversation

@ThreeFish-AI

Copy link
Copy Markdown
Owner

背景与动机

Overview 页顶部 6 张 KPI 卡片(今日请求数 / Token 总量 / 输出 Token / 费用估算 / 故障转移 / 平均延迟)在视口宽度 < ~1289px 时会折行——根因是 .kpi-grid 使用了 grid-template-columns: repeat(auto-fit, minmax(200px, 1fr))auto-fit 在空间不足时会减少列数并换行。用户要求 6 卡片在桌面/笔记本/平板横屏下始终保持单行,并借此对整个 Dashboard 做一次系统性 UI/UX 加固。

改动全部收敛在单一文件 src/coding/proxy/server/dashboard.py(内联 CSS),未触碰任何 JS 逻辑、数据接口或 Chart.js 配置

主要变更

① 核心修复 · 6 卡片防折行

  • .kpi-grid 改为 repeat(6, minmax(0, 1fr))——minmax(0,…) 覆盖 grid 默认的 min-width:auto,杜绝内容撑爆列宽引发的横向溢出;gap 由 off-grid 的 5px 归一为 --gap-section(12px)。
  • .kpi-valueclamp(20px, 2.2vw, 32px) 平滑缩放,中宽度下数值不裁剪;费用卡 #kpi-cost-today 允许在 " + " 处换行,双币种始终完整可见。
  • 响应式降级:≤1023px → 3 列、≤480px → 2 列;headerflex-wrap 修复窄屏横向溢出。

② UX / 可访问性加固

  • .range-btn / .btn-refresh / .page-btn / .copy-btn 补键盘 :focus-visible 焦点环;新增 prefers-reduced-motion 动效降级。

③ 缺陷修复

  • 补定义两个此前未定义的 CSS 变量 --bg-secondary / --text-muted(消除 Model Calling 行透明背景回退);JetBrains Mono 补载 700 字重,修正 .kpi-value 合成粗体。

验证

Playwright 确定性布局校验覆盖 8 档宽度:1440 / 1280 / 1024 px 均为 6 列单行、无横向滚动、无数值裁剪(1024px 为旧折行点,现已确认修复);960~600px 降级 3 列、480/375px 降级 2 列。回归检查零控制台错误、4 张图表正常、Sessions 表 60 行正常、Tab 切换正常;Ruff lint/format 通过、Python AST 完整。

- 布局: .kpi-grid 由 auto-fit(minmax 200px) 改为 repeat(6, minmax(0,1fr)),
  使 6 张 KPI 卡在桌面/笔记本/平板横屏(≥1024px)恒定单行不折行,杜绝横向溢出;
  gap 5px 归一为 --gap-section(12px)。
- 排版: .kpi-value 采用 clamp(20px,2.2vw,32px) 平滑缩放,中宽度不裁剪数值;
  费用卡 #kpi-cost-today 允许在 " + " 处换行,双币种始终完整可见。
- 响应式: 新增 ≤1023px→3 列、≤480px→2 列 优雅降级; header 加 flex-wrap
  修复窄屏横向溢出。
- 可访问性: 为 .range-btn/.btn-refresh/.page-btn/.copy-btn 补 :focus-visible
  键盘焦点环; 新增 prefers-reduced-motion 降级动效。
- 缺陷修复: 补定义 --bg-secondary / --text-muted 两个未定义 CSS 变量
  (消除 Model Calling 行透明背景回退); JetBrains Mono 补载 700 字重,
  修正 .kpi-value 合成粗体。

🤖 Generated with [Claude Code](https://github.com/claude), [CodeX](https://openai.com), [Gemini](https://github.com/apps/gemini-code-assist)
Co-Authored-By: Aurelius Huang<threefish.ai@gmail.com>
@ThreeFish-AI ThreeFish-AI merged commit 2677b5e into feature/1.x.x Jul 4, 2026
6 checks passed
@ThreeFish-AI ThreeFish-AI deleted the ThreeFish-AI/dashboard-cards-no-wrap-ui-optimization branch July 4, 2026 05:51
ThreeFish-AI added a commit that referenced this pull request Jul 4, 2026
…/ Dashboard 拖拽排序 / 品牌图标重塑 (#277)

* feat(dashboard): Model Calling 实时监控扩展至全 vendor,修复排队队列长度不可见 (#253)

* refactor(concurrency): 统一并发抽象,支持 monitor / limited 双模式;

将 ModelConcurrencyLimiter 重构为 ModelConcurrencyController,新增 monitor
模式(config=None,仅计数不限流)与既有 limited 模式(Zhipu 等限流场景)。

- _ConcurrencySlot 增加 limit=None 分支,fast path 直接 in_use++;
- 新增 track() async ctx mgr 与 mode 属性,便于 executor 层 async with 包裹;
- 新增 _peak_samples 滑窗,get_diagnostics 输出最近 10s pending 峰值;
- BaseVendor 注入默认 monitor controller,新增 track_in_flight()
  / update_concurrency() 默认实现;get_diagnostics 自动合入 concurrency 字段;
- ZhipuVendor 删除内部 _maybe_acquire_concurrency_slot,统一委托 BaseVendor
  + executor 层包裹,slot 跨 429 重试自然持有;
- 保留 ModelConcurrencyLimiter 别名向后兼容。

🤖 Generated with [Claude Code](https://github.com/claude), [CodeX](https://openai.com), [Gemini](https://github.com/apps/gemini-code-assist)
Co-Authored-By: Aurelius Huang<threefish.ai@gmail.com>

* feat(dashboard): Model Calling 实时监控扩展至全 vendor / 全 model;

将 Model Calling 卡片从仅监控 Zhipu 扩展到所有 vendor 的所有模型(仅 CC 场景)。

- executor: 在 execute_stream / execute_message 调用 vendor.send_message[_stream]
  前用 async with vendor.track_in_flight(mapped_model) 包裹,覆盖所有 vendor
  (包括完全覆写 send 方法的 Copilot / Antigravity);
- dashboard: updateModelCalling 按 mode 字段区分渲染:
  - limited 模式(Zhipu)保留进度条 + limit 可编辑 + ⏳ pending 徽章;
  - monitor 模式(其他 vendor)仅显示 in_use 计数徽章,无可编辑控件;
  - 新增 mc-badge-peak「🕘 曾排队 N」灰色余晖徽章,覆盖 pending=0 但
    peak_pending_recent>0 的场景;
  - 轮询间隔由 5000ms 缩短至 1500ms,提升瞬时排队可观测性;
- routes: /api/concurrency PUT 在 monitor-only vendor 上返回 422(区别于参数
  非法的 400),错误消息明确指示不支持调整。

🤖 Generated with [Claude Code](https://github.com/claude), [CodeX](https://openai.com), [Gemini](https://github.com/apps/gemini-code-assist)
Co-Authored-By: Aurelius Huang<threefish.ai@gmail.com>

* test(concurrency): 适配并发抽象重构并补齐 monitor / executor 测试覆盖;

- test_zhipu_concurrency: 适配 Controller 重构(导入别名 + diagnostics 字段
  断言更新),新增 test_peak_pending_recent_tracking 验证余晖记录;
  ZhipuVendor 测试通过 _send_with_tracking / _stream_with_tracking 辅助函数
  模拟 executor 层 track_in_flight 包裹,行为等价;
- test_concurrency_monitor(新增): 覆盖 monitor 模式 acquire 不阻塞、
  pending 恒为 0、set_limit 抛 ValueError、100 并发峰值正确等场景;
  BaseVendor.track_in_flight 默认行为(空 model 名 no-op、非空委托 controller);
- test_executor_in_flight_tracking(新增): 用探针式 fake controller 验证
  executor 在调用 send_message[_stream] 前进入 track 上下文,
  调用结束(含异常)后正确退出;
- test_router_executor: _mock_vendor 新增 track_in_flight 字段(nullcontext)
  以适配 executor 调用约定。

🤖 Generated with [Claude Code](https://github.com/claude), [CodeX](https://openai.com), [Gemini](https://github.com/apps/gemini-code-assist)
Co-Authored-By: Aurelius Huang<threefish.ai@gmail.com>

* docs(changelog): 记录 Model Calling 监控扩展至全 vendor 的变更条目;

- 监控扩展:所有 vendor 在 CC 场景下都呈现 in_use 实时计数(monitor 模式);
- 限流收敛:Zhipu 保留 limit + FIFO 排队(limited 模式),其他 vendor 仅观察;
- 队列可见性:新增 peak_pending_recent 余晖追踪 + 轮询间隔由 5s 缩短至 1.5s;
- 抽象统一:ModelConcurrencyLimiter → ModelConcurrencyController(保留别名)。

🤖 Generated with [Claude Code](https://github.com/claude), [CodeX](https://openai.com), [Gemini](https://github.com/apps/gemini-code-assist)
Co-Authored-By: Aurelius Huang<threefish.ai@gmail.com>

* build(version): 版本号升级至 0.5.1a1;

🤖 Generated with [Claude Code](https://github.com/claude), [CodeX](https://openai.com), [Gemini](https://github.com/apps/gemini-code-assist)
Co-Authored-By: Aurelius Huang<threefish.ai@gmail.com>

* style(dashboard): 收窄并统一仪表板模块间垂直间距至 12px; (#254)

- 新增 CSS 变量 --gap-section: 12px 作为模块间距单一事实源
- 将 .time-range-bar / .kpi-grid / .model-calling-card / .charts-grid /
  .charts-grid-2 / .model-token-card 的 margin-bottom 统一指向该变量
- 消除底部 Token 用量卡片的 inline style,改用语义化 class

🤖 Generated with [Claude Code](https://github.com/claude), [CodeX](https://openai.com), [Gemini](https://github.com/apps/gemini-code-assist)

* build(version): 版本号升级至 0.5.1a2;

🤖 Generated with [Claude Code](https://github.com/claude), [CodeX](https://openai.com), [Gemini](https://github.com/apps/gemini-code-assist)
Co-Authored-By: Aurelius Huang<threefish.ai@gmail.com>

* feat(vendor-channels): 过渡管线诊断快照与 Anthropic 配对自检 (#255)

* diag(executor): 为语义拒绝路径增加请求体可疑参数诊断日志;

在 execute_message 和 execute_stream 的 semantic rejection 日志中
附加请求体参数快照(thinking/extended_thinking/reasoning_effort 顶层参数、
会话历史中 thinking blocks 数量、cache_control 存在情况、模型名、消息数),
用于定位 zhipu glm-4.7 [1210] 参数校验拒绝的具体祸根参数。

🤖 Generated with [Claude Code](https://github.com/claude), [CodeX](https://openai.com), [Gemini](https://github.com/apps/gemini-code-assist)
Co-Authored-By: Aurelius Huang<threefish.ai@gmail.com>

* diag(executor): 扩展语义拒绝诊断日志覆盖范围至 system/tools/sampling/metadata/content_types 等维度

PR #244 部署后的诊断日志反转了原推断:失败请求均不含 thinking/cache_control,
说明祸根在更细粒度的参数。扩展 _build_semantic_rejection_diagnostic 函数:

新增维度(仅存在时输出):
- system 形态(string/blocks + cache_control 计数)
- tools 数量 + tool_choice 形态
- 采样参数(max_tokens/temperature/top_p/top_k/stop_sequences)
- stream / metadata_keys
- messages.content 类型分布(含 string content)
- 请求体字节数估算(json.dumps)

新增 14 个单元测试(TestBuildSemanticRejectionDiagnostic)覆盖各字段组合
与真实失败请求形态。所有测试通过(1478 passed)。

* docs(agents): 记录 zhipu [1210] 诊断阶段进展(证据反转 + Step 1 v2)

* build(version): 版本号升级至 0.4.1a6;

* fix(zhipu): 兼容转换 thinking.type=adaptive 为 GLM 支持的 enabled 格式,修复 [1210] 语义拒绝

基于 2026-05-26 16:30–16:31 日志证据(8 次连续拒绝均含 thinking.type=adaptive),
在 ZhipuVendor._prepare_request 中实现兼容转换:
- adaptive → enabled(budget=16000):保留 thinking 能力,使用 GLM 原生确认支持的格式
- 新增 _build_zhipu_request_snapshot 诊断快照(成功/失败统一格式,可 diff 对比)
- 扩展语义拒绝日志错误体截断(200→500 字符),保留完整字段级诊断
- metadata 暂不处理,待进一步诊断确认兼容性

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* fix(executor): 删除旧版重复定义的 _build_semantic_rejection_diagnostic 函数

Step 1 v2 扩展版本与 Step 1 旧版本同名重复定义,Python 运行时后者覆盖前者
不报错但旧版成为死代码。删除旧版仅保留扩展版本。

🤖 Generated with [Claude Code](https://github.com/claude), [CodeX](https://openai.com), [Gemini](https://github.com/apps/gemini-code-assist)
Co-Authored-By: Aurelius Huang<threefish.ai@gmail.com>

* feat(vendor-channels): 新增过渡管线诊断快照与 Anthropic 配对自检;

在 prepare_zhipu_to_anthropic 管线中新增两个辅助函数:
1. _dump_message_digest: 输出各阶段消息结构摘要(DEBUG 级别),
   用于过渡管线变换前后的可观测性诊断
2. _validate_anthropic_pairing: 独立的 tool_use/tool_result 配对
   自检(纯检测,不修改),定位 enforce/sanity 未覆盖的边界 case

🤖 Generated with [Claude Code](https://github.com/claude), [CodeX](https://openai.com), [Gemini](https://github.com/apps/gemini-code-assist)
Co-Authored-By: Aurelius Huang<threefish.ai@gmail.com>

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* chore(docs): 迁移 Agent 协作文档至 docs/.agents/ 隐藏目录;

将 docs/agents/ 目录重命名为 docs/.agents/,同步更新 AGENTS.md 中所有相关引用链接。

🤖 Generated with [Claude Code](https://github.com/claude), [CodeX](https://openai.com), [Gemini](https://github.com/apps/gemini-code-assist)
Co-Authored-By: Aurelius Huang<threefish.ai@gmail.com>

* feat(routes): GET / 自动重定向至 /dashboard (#256)

* feat(routes): GET / 自动重定向至 /dashboard;

将根路径的 HEAD 与 GET handler 拆分:HEAD / 保持 200 响应(Claude Code 连通性探针依赖),
GET / 改为 307 Temporary Redirect 至 /dashboard,提升浏览器访问体验。
同步更新单元测试与 E2E 测试的断言。

🤖 Generated with [Claude Code](https://github.com/claude), [CodeX](https://openai.com), [Gemini](https://github.com/apps/gemini-code-assist)
Co-Authored-By: Aurelius Huang<threefish.ai@gmail.com>

* perf(dashboard): 模型调用状态轮询间隔从 1.5s 放宽至 10s 以降低后端负载;

🤖 Generated with [Claude Code](https://github.com/claude), [CodeX](https://openai.com), [Gemini](https://github.com/apps/gemini-code-assist)
Co-Authored-By: Aurelius Huang<threefish.ai@gmail.com>

* feat(pricing): 新增 claude-opus-4-8 模型定价配置;

🤖 Generated with [Claude Code](https://github.com/claude), [CodeX](https://openai.com), [Gemini](https://github.com/apps/gemini-code-assist)
Co-Authored-By: Aurelius Huang<threefish.ai@gmail.com>

* build(version): 版本号升级至 0.5.1a3;

🤖 Generated with [Claude Code](https://github.com/claude), [CodeX](https://openai.com), [Gemini](https://github.com/apps/gemini-code-assist)
Co-Authored-By: Aurelius Huang<threefish.ai@gmail.com>

* fix(session-title): 剥离 <session> 标签前缀并放大标题存储长度至 600 字符; (#257)

- 后端: _NOISE_TAG_PATTERN 新增 session 标签, 避免标题以 <session>... 开头;
- 后端: _SESSION_TITLE_MAX_LEN 从 30 放大至 600 (20x), 提升标题信息量;
- 前端: 展开详情行中 Title 独立为 .detail-title-row, 独占全宽行显示;
- 前端: 新增 -webkit-line-clamp: 3 多行截断样式, 超出部分以 ... 省略;
- 测试: 补充 <session> 标签剥离用例, 修复截断长度测试适配新上限;

🤖 Generated with [Claude Code](https://github.com/claude), [CodeX](https://openai.com), [Gemini](https://github.com/apps/gemini-code-assist)

* build(version): 版本号升级至 0.5.1a4;

🤖 Generated with [Claude Code](https://github.com/claude), [CodeX](https://openai.com), [Gemini](https://github.com/apps/gemini-code-assist)
Co-Authored-By: Aurelius Huang<threefish.ai@gmail.com>

* feat(session-title): 多层级回退标题提取与延迟补写,消除 Dashboard 空标题; (#258)

- 重构 _extract_session_title 为 4 级逐级回退策略:
  Level 1: user TEXT 噪声剥离(原有逻辑不变)
  Level 2: TOOL_RESULT 文本截取 → '[Tool output] <snippet>'
  Level 3: IMAGE 计数 → '[1 Image]' / '[N Images]'
  Level 4: 元数据兜底 → '[Tool call] Bash, Read' / '[Session] model'
- 噪声标签白名单新增 artifactMetadata、thinking
- 新增 update_empty_session_title 延迟补写机制,
  非首次请求也可为空标题 session 回填
- 补充 30 个测试用例覆盖全部回退级别与新噪声标签

🤖 Generated with [Claude Code](https://github.com/claude), [CodeX](https://openai.com), [Gemini](https://github.com/apps/gemini-code-assist)

* build(version): 版本号升级至 0.5.1a5;

🤖 Generated with [Claude Code](https://github.com/claude), [CodeX](https://openai.com), [Gemini](https://github.com/apps/gemini-code-assist)
Co-Authored-By: Aurelius Huang<threefish.ai@gmail.com>

* fix(session-title): 修复 <session> 标签包裹用户文本导致标题全部回退到元数据的问题; (#259)

当用户实际输入被 <session> 标签完整包裹时,首轮噪声剥离会将
整个 <session> 块连同用户文本一并删除,导致 Level 1 始终返回空。
新增二次回退机制:若首轮结果为空,仅去除 <session> 外壳标签,
保留内部文本后重新剥离噪声,确保用户文本可见。

🤖 Generated with [Claude Code](https://github.com/claude), [CodeX](https://openai.com), [Gemini](https://github.com/apps/gemini-code-assist)

* build(version): 版本号升级至 0.5.1a6;

🤖 Generated with [Claude Code](https://github.com/claude), [CodeX](https://openai.com), [Gemini](https://github.com/apps/gemini-code-assist)
Co-Authored-By: Aurelius Huang<threefish.ai@gmail.com>

* feat(session-routing): 新增基于 Session 标题前缀的可配置 Vendor 自动绑定; (#260)

当 Session 标题以配置前缀(默认「# 目标」)开头时,自动将该 Session
绑定到指定 vendor(默认 zhipu),不走默认 vendor 路由。前缀与目标
vendor 均通过 YAML 配置(session_policies.title_vendor_bindings),
支持多条规则、按顺序匹配首次命中生效、置空列表即禁用。

实现复用现有 SessionPolicyResolver.upsert() 运行时绑定机制,在标题
提取后、tier 解析前注入策略,仅对新 Session 首请求生效以避免覆盖手动
绑定。新增启动期 vendor 存在性校验(未知 vendor 告警而非硬失败)与
prefix/vendor 非空约束(杜绝空前缀全量误绑定)。

- config/session_policy.py: 新增 TitleVendorBinding 模型 + 配置字段
- config/config.default.yaml: 默认「# 目标」→ zhipu 绑定
- routing/executor.py: _apply_title_based_policy 方法、启动校验、双路径注入
- routing/router.py + server/app.py: 配置透传
- tests: 新增 17 个用例(前缀匹配/边缘/校验/流式与非流式端到端)

🤖 Generated with [Claude Code](https://github.com/claude), [CodeX](https://openai.com), [Gemini](https://github.com/apps/gemini-code-assist)

* build(version): 版本号升级至 0.5.1a7;

🤖 Generated with [Claude Code](https://github.com/claude), [CodeX](https://openai.com), [Gemini](https://github.com/apps/gemini-code-assist)
Co-Authored-By: Aurelius Huang<threefish.ai@gmail.com>

* feat(model-mapping): 调整多 Vendor 模型映射优先级并更新 GLM 映射与定价;

- 统一将 claude-opus-.* 映射规则前置于 claude-sonnet-.*,使 Opus 优先匹配
- 智谱 GLM 映射升级:opus→glm-5.2、sonnet→glm-5.1、haiku→glm-5.1
- 新增 claude-fable-5 与 glm-5.2 定价,并按新优先级重排 GLM 定价条目

🤖 Generated with [Claude Code](https://github.com/claude), [CodeX](https://openai.com), [Gemini](https://github.com/apps/gemini-code-assist)
Co-Authored-By: Aurelius Huang<threefish.ai@gmail.com>

* build(version): 版本号升级至 0.5.1a8;

🤖 Generated with [Claude Code](https://github.com/claude), [CodeX](https://openai.com), [Gemini](https://github.com/apps/gemini-code-assist)
Co-Authored-By: Aurelius Huang<threefish.ai@gmail.com>

* feat(zhipu): 将 529 过载异常纳入指数退避重试范畴; (#261)

Zhipu vendor 原仅对 429 限流做就地指数退避重试,529(Overloaded
并发过载)直接交由上层 failover。现扩展内部重试以涵盖 529,与 429
共用同一退避策略(max=5、1s→2s→4s→8s、Full Jitter、优先尊重 server
retry-after),降低请求失败率与不必要的 failover。

- 新增 _BACKOFF_RETRY_STATUS={429,529} 作为可重试状态码单一事实源
- 非流式/流式判定改用集合,日志带入真实状态码
- 修复流式延迟计算忽略 529 retry-after 的缺陷,并去重延迟逻辑
- 对称补全 529 非流式/流式重试与 retry-after 回归测试
- 同步 design-patterns.md §3.12 Vendor 级重试说明

🤖 Generated with [Claude Code](https://github.com/claude), [CodeX](https://openai.com), [Gemini](https://github.com/apps/gemini-code-assist)

* build(version): 版本号升级只 0.5.1a9;

* feat(dashboard): 将 favicon 与 logo 品牌图标替换为 Tabler terminal-2; (#262)

- 新增 /favicon.svg 路由(蓝紫渐变方块 + 白色 terminal-2 笔划),作为现代浏览器主选 favicon
- 重绘 /favicon.ico 为 32×32 terminal-2 光栅图(旧浏览器 / Safari 回退),沿用圆角透明
- 页面 logo 由字母「C」改为内联白色 terminal-2 SVG,沿用渐变方块容器
- 抽取 _TERMINAL2_PATHS 笔划常量作为单一事实源,供 favicon 与 logo 共享

🤖 Generated with [Claude Code](https://github.com/claude), [CodeX](https://openai.com), [Gemini](https://github.com/apps/gemini-code-assist)

* build(version): 版本号升级至 0.5.1;

🤖 Generated with [Claude Code](https://github.com/claude), [CodeX](https://openai.com), [Gemini](https://github.com/apps/gemini-code-assist)
Co-Authored-By: Aurelius Huang<threefish.ai@gmail.com>

* fix(zhipu): 将 429/529 兜底退避抖动从 Full Jitter 改为 Equal Jitter; (#263)

修复 529 过载重试延迟非单调问题(实测 418.8→1857.7→961.6→3769.7ms,
非递增)。根因为 calculate_delay 的 Full Jitter(random.uniform(0, ceiling))
本质非单调,且 529 通常无 Retry-After 头而落入该兜底分支。改为 Equal Jitter
(temp/2 + random(0, temp/2))后区间为 [500,1000]→[1000,2000]→[2000,4000]
→[4000,8000],单调非递减;429/529 共用退避路径同步受益,retry-after 优先级不变。

- 新增 tests/test_retry.py 独立单元测试(calculate_delay 此前零覆盖)
- 新增 test_zhipu.py::test_529_equal_jitter_delay_in_expected_band
- 同步更新 retry.py / zhipu.py docstring、CHANGELOG、issue.md

🤖 Generated with [Claude Code](https://github.com/claude), [CodeX](https://openai.com), [Gemini](https://github.com/apps/gemini-code-assist)

* build(version): 版本号升级至 0.5.2a1; (#264)

同步更新 CHANGELOG.md,新增 [v0.5.2a1] 条目(含 529 Equal Jitter fix 与补记的 v0.5.1 遗漏改动)。

🤖 Generated with [Claude Code](https://github.com/claude), [CodeX](https://openai.com), [Gemini](https://github.com/apps/gemini-code-assist)

* feat(session): 新增 Session 标题豁免前缀,过滤注入式 Prompt 候选; (#265)

在 session_policies 配置下新增可维护的 title_exempt_prefixes 名单:首条
user TEXT 经噪声剥离后若以任一豁免前缀开头则跳过,继续向后查找合适的
title 候选(典型如 "Write the title in the language..." 注入指令)。豁免
仅作用于 Level 1,Level 2/3/4 回退不受影响;经 _RouteExecutor 实例方法
注入,field_validator 与构造期双重归一化防空串 startswith 误豁免。

🤖 Generated with [Claude Code](https://github.com/claude), [CodeX](https://openai.com), [Gemini](https://github.com/apps/gemini-code-assist)

* build(version): 版本号升级至 0.5.2a2; (#266)

同步更新 CHANGELOG.md,新增 [v0.5.2a2] 条目(feat(session) Session 标题豁免前缀,#265)。

🤖 Generated with [Claude Code](https://github.com/claude), [CodeX](https://openai.com), [Gemini](https://github.com/apps/gemini-code-assist)

* fix(session): 标题豁免前缀扩展至全层级兜底标题; (#267)

* build(version): 版本号升级至 0.5.2a3; (#268)

* feat(session): 扩充标题豁免前缀,新增 [Session] 过滤注入式 Prompt 候选;

🤖 Generated with [Claude Code](https://github.com/claude), [CodeX](https://openai.com), [Gemini](https://github.com/apps/gemini-code-assist)
Co-Authored-By: Aurelius Huang<threefish.ai@gmail.com>

* chore(pricing): 更新智谱 GLM-5.2 模型定价配置;

🤖 Generated with [Claude Code](https://github.com/claude), [CodeX](https://openai.com), [Gemini](https://github.com/apps/gemini-code-assist)
Co-Authored-By: Aurelius Huang<threefish.ai@gmail.com>

* feat(dashboard): 供应商队列支持拖拽调整优先级且不重置当日配额; (#269)

- 新增 PUT /api/tier-order 纯重排序端点:复用 router.reorder_tiers,不触碰熔断器/配额守卫/rate limit,与 /api/reset 解耦
- 供应商状态列表基于 HTML5 DnD 在 #vendor-list 上做事件委托,渲染拖拽手柄与 draggable 属性
- 拖拽完成后乐观重排 DOM 并 PUT 新顺序;失败回滚至服务端真实顺序;拖拽/POST 未决期间跳过重渲染
- 新增 7 个 /api/tier-order 测试,覆盖成功、校验失败及配额守卫/熔断器保留断言

🤖 Generated with [Claude Code](https://github.com/claude), [CodeX](https://openai.com), [Gemini](https://github.com/apps/gemini-code-assist)

* build(version): 版本号升级至 0.5.2a4; (#270)

🤖 Generated with [Claude Code](https://github.com/claude), [CodeX](https://openai.com), [Gemini](https://github.com/apps/gemini-code-assist)

* fix(dashboard): 供应商队列拖拽改用 Pointer Events,修复无法拖动并实机验证 cc 优先级实时生效; (#271)

- 根因:原生 HTML5 DnD 机制脆弱(触屏不支持、跨浏览器易「拿不起来」)。经活体探针确认前端设置(draggable/data-vendor/事件委托/PUT 端点)与后端(单一全局 router 切片赋值、executor 共享引用)均无缺陷,#269 仅补后端单测、拖拽从未做浏览器验证 —— 唯机制本身不可靠。
- 交互:以 #vendor-list 上的 pointerdown/move/up/cancel 事件委托替换 dragstart/dragover/drop/dragend;手柄发起 + setPointerCapture + 4px 阈值 + 乐观实时重排;复用既有 _tierDrag 状态机、persistTierOrder(PUT /api/tier-order) 与失败回滚,顺序未变则跳过 PUT。
- 样式:手柄增加 touch-action:none(触屏可拖),移除失效的 [draggable] 与 drag-over-* 规则。
- 加固:/dashboard 响应加 Cache-Control:no-cache,避免浏览器缓存旧内联脚本掩盖前端修复。
- 测试:新增前端守卫断言(交付含 pointer 事件 + PUT、不含原生 draggable),补齐 #269 缺失的前端验证;test_app_routes.py 42 项全绿。
- 实机验证:独立端口拖拽使 DOM 与 /api/status 顺序同步翻转、PUT 200、无控制台报错,证明重排实时改变 cc 运行时优先级。

🤖 Generated with [Claude Code](https://github.com/claude), [CodeX](https://openai.com), [Gemini](https://github.com/apps/gemini-code-assist)

* style(branding): 重设计 logo/favicon 为淡色磨砂卡片 + 品牌渐变笔划; (#272)

将品牌图标由「深紫渐变实心块 + 白色 >_ 笔划」反转为「#f5f6fb 淡色磨砂卡片 +
品牌紫渐变(#667eea→#764ba2) >_ 笔划 + 细描边环」,使图标轮廓成为视觉主角,
更简约、小尺寸下更清晰(Linear/Vercel 风),强化 Coding 意向。

- 新增 _LOGO_DEFS 共享品牌渐变 <defs>,作为 favicon SVG 与页面 logo 单一事实源
- _build_favicon_svg:浅底 + 品牌描边环 + url(#cpBrand) 笔划
- _build_favicon (ICO):浅底光栅 + brand_at 按对角 t 计算品牌渐变笔划
- .logo CSS:浅底 + 品牌描边环 + 辉光调淡;内联 SVG 注入 {{LOGO_DEFS}}
- 保留 --gradient-primary 与 .vendor-avatar 不动(最小干预)

🤖 Generated with [Claude Code](https://github.com/claude), [CodeX](https://openai.com), [Gemini](https://github.com/apps/gemini-code-assist)

* build(version): 版本号升级至 0.5.2a5;

🤖 Generated with [Claude Code](https://github.com/claude), [CodeX](https://openai.com), [Gemini](https://github.com/apps/gemini-code-assist)
Co-Authored-By: Aurelius Huang<threefish.ai@gmail.com>

* style(branding): logo/favicon 容器玻璃雾卡化、>_ 笔划加粗提亮(醒目度优化) (#274)

* style(branding): logo/favicon 容器改玻璃雾卡、笔划加粗提亮以提升醒目度;

延续 #272 的品牌图标设计,针对「图标依旧不够醒目」反馈做容器透明化与笔划强化:

- 容器透明化:favicon rect 与 .logo 背景由实色 #f5f6fb 改为半透明白雾卡
  (SVG hex8 #ffffff14/#ffffff38、.logo rgba(.06/.12)),与深色毛玻璃 header
  (backdrop-filter)语言统一,消除「亮白贴片」压制感;box-shadow 改双层
  (黑投影补边界 + inset 顶部玻璃高光)
- 笔划醒目化:>_ terminal 笔划 stroke-width 2→2.5;chevron 左移、下划线右移并
  延长(M6/M13 l5)撑开间距至 4 单位避免粘连、下划线加长至 5 防止小尺寸退化为圆点
- 深端提亮:品牌渐变 #764ba2→#8b5fd0,深底对比达 WCAG 图形 3:1
- .logo 笔划新增 drop-shadow 柔和辉光;favicon 16px 小尺寸保持锐利不加 glow
- ICO 回退同步:深端 RGB 0x8B5FD0、底色 alpha 255→0xB0、笔划坐标
- favicon 跨浅/深浏览器 tab 双主题均可辨识(实机验证)
- 保留 --gradient-primary 与 .vendor-avatar 不动(最小干预)

🤖 Generated with [Claude Code](https://github.com/claude), [CodeX](https://openai.com), [Gemini](https://github.com/apps/gemini-code-assist)
Co-Authored-By: Aurelius Huang<threefish.ai@gmail.com>

* style(branding): logo/favicon 改通透青绿圆环 + prompt >_ 笔划(方案 d05);

按用户选定方案 d05 重设计品牌图标,替换前版玻璃雾卡:

- 通透青绿圆环:全透明底 + 青绿渐变(#22d3ee->#2dd4bf)细圆环
  (stroke 0.5,仅原 1/3、通透若隐) + 饱和青绿渐变 >_ 笔划(stroke 2.5),
  极细环与饱和笔划形成权重对比、>_ 为视觉主角;青绿承载终端/代码语义
- 基础笔划改用 Tabler prompt(chevron M5 7l5 5l-5 5 + 下划线 M13 17l6 0),
  下划线长 6 单位、不会小尺寸点化
- 修复下划线消失:渐变改 gradientUnits="userSpaceOnUse" 绝对坐标,
  规避纯水平下划线(包围盒高度 0)在默认 objectBoundingBox 渐变下不着色
- 单一事实源:_LOGO_DEFS / _PROMPT_PATHS 统一供 SVG favicon、ICO 回退
  (省略 0.5px 细环、保留饱和笔划)与页面 logo 消费
- .logo 容器改全透明、SVG 内嵌圆环 + 青绿 drop-shadow 辉光
- 实机验证:独立端口启动新代码,浏览器确认 favicon/logo 青绿 >_ 完整、
  下划线在位、圆环通透(不干扰既有 3392 实例)

🤖 Generated with [Claude Code](https://github.com/claude), [CodeX](https://openai.com), [Gemini](https://github.com/apps/gemini-code-assist)
Co-Authored-By: Aurelius Huang<threefish.ai@gmail.com>

* build(version): 发布 v0.5.2a6 — 品牌图标 d05 通透青绿圆环 + prompt >_ 笔划 (#275)

品牌图标迭代至方案 d05(通透青绿圆环 + Tabler prompt >_),修复水平下划线渐变消失(userSpaceOnUse),版本号升级至 0.5.2a6,CHANGELOG 定版。

* docs(readme): 页脚补充作者主页与 Apache 2.0 开源协议超链接;

🤖 Generated with [Claude Code](https://github.com/claude), [CodeX](https://openai.com), [Gemini](https://github.com/apps/gemini-code-assist)
Co-Authored-By: Aurelius Huang<threefish.ai@gmail.com>

* style(dashboard): KPI 卡片固定 6 列防折行 + 全页 UI/UX 加固; (#276)

- 布局: .kpi-grid 由 auto-fit(minmax 200px) 改为 repeat(6, minmax(0,1fr)),
  使 6 张 KPI 卡在桌面/笔记本/平板横屏(≥1024px)恒定单行不折行,杜绝横向溢出;
  gap 5px 归一为 --gap-section(12px)。
- 排版: .kpi-value 采用 clamp(20px,2.2vw,32px) 平滑缩放,中宽度不裁剪数值;
  费用卡 #kpi-cost-today 允许在 " + " 处换行,双币种始终完整可见。
- 响应式: 新增 ≤1023px→3 列、≤480px→2 列 优雅降级; header 加 flex-wrap
  修复窄屏横向溢出。
- 可访问性: 为 .range-btn/.btn-refresh/.page-btn/.copy-btn 补 :focus-visible
  键盘焦点环; 新增 prefers-reduced-motion 降级动效。
- 缺陷修复: 补定义 --bg-secondary / --text-muted 两个未定义 CSS 变量
  (消除 Model Calling 行透明背景回退); JetBrains Mono 补载 700 字重,
  修正 .kpi-value 合成粗体。

🤖 Generated with [Claude Code](https://github.com/claude), [CodeX](https://openai.com), [Gemini](https://github.com/apps/gemini-code-assist)

* build(version): 发布 v0.5.2a7 — Dashboard KPI 卡片固定 6 列防折行 + 全页 UI/UX 加固;

版本号升级至 0.5.2a7,CHANGELOG 定版。本版聚焦 Dashboard Overview 页 6 张
KPI 卡片防折行(repeat(6, minmax(0,1fr)) + clamp 排版 + 响应式降级),附带
键盘 :focus-visible / prefers-reduced-motion 可访问性加固、两个未定义 CSS
变量修复与 JetBrains Mono 700 字重补载,并纳入 README 页脚作者主页与
Apache 2.0 协议超链接。

🤖 Generated with [Claude Code](https://github.com/claude), [CodeX](https://openai.com), [Gemini](https://github.com/apps/gemini-code-assist)
Co-Authored-By: Aurelius Huang<threefish.ai@gmail.com>

* docs(readme): 用项目品牌图标替换 README H1 的 ⚡ 占位符;

- 新增 assets/logo.svg:从 favicon 单一事实源 _FAVICON_SVG(dashboard.py)派生,
  确保与线上 /favicon.svg 逐字符一致(青绿渐变 >_ prompt 笔划 + 通透圆环);
- README.md 与 docs/zh-CN/README.md 双语 H1 以 <img> 引用该图标,采用
  width/height=32 + align="absmiddle" 适配 GitHub 净化器(保尺寸生效、与文案垂直居中);
- 架构图 Mermaid 子图标签由 "⚡ coding-proxy" 改为纯文字 "coding-proxy",与去 emoji 的 H1 统一。

🤖 Generated with [Claude Code](https://github.com/claude), [CodeX](https://openai.com), [Gemini](https://github.com/apps/gemini-code-assist)
Co-Authored-By: Aurelius Huang<threefish.ai@gmail.com>

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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