Repository navigation
release(1.x.x): v0.6.6 → v0.6.7 —— Overview 简化改造、Config 页第一批体验改造、Model Bind 目录补 GLM 5.4 - #318
Merged
Merged
Conversation
- 路由区只留该 vendor 的可用状态:正常(圆点加灰字)、熔断 ×N、半开、限速中、配额超限;多个条件并存时全部列出,无异常的行不再铺绿色胶囊。 - 不再常驻 tier 名与配额守卫用量格(1d / 7d):tier 名、熔断失败次数、限速剩余时间、各窗口已用百分比与阈值收进悬停详情;纯供应商行去掉「供应商状态」标注。 - 配额超限(quota_exceeded)保留为状态,它与熔断、限速一样让 vendor 不可用(routing/tier.py 的可用性判断把三者并列)。 - renderQuotaBar、cbStateClass、cbStateLabel 失去调用方,删除;路由区容器仍是 class="vendor-badges tier-zone"(滚动位置键与拖拽测试依赖它)。 - 测试:10 条断言随新语义改写,补配额超限、半开、失败 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>
- 六张卡合成一个表面,格间只留 hairline;去掉 emoji 图标、六色数值、彩色顶线与 hover 光晕,数值统一穿文字色。 - 标签统一成「今日 X」(后两张原为「X(今日)」);副行从「本周 / 本月」改为「近 N 天」,与区间按钮、趋势页签说明、分布图标题同一口径(新增 rangeLabel,自选区间看历史窗口时写起止日期)。 - 副行拆成区间标签与数值两段,费用按「 + 」拆成两段:放不下时只在段之间换行,不再出现省略号截断;费用列略宽。 - 响应式:1023px 及以下 3 列两行,519px 及以下 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>
- 每行不再是独立 mini 卡片:vendor、模型、并行度条、在途/上限、排队五列逐行对齐,1280px 及以上且不少于 3 行时排两列,760px 及以下折成两行;模型名不再被挤到截断。 - 行节点按 vendor/model 键复用,只改文字与条宽,不再每 10 秒整体重建 DOM;排队用琥珀胶囊,monitor 模式写明「仅监控 · 不限并行度」;标题去掉 emoji,右侧标注「每 10 秒刷新」。 - 修复并行度编辑:轮询不再打断编辑并提交半截输入(实测想把 10 改成 12、刚敲「1」时会发出 limit:1);每次编辑只发一个 PUT(原实现回车后失焦又提交一次);上限是可键盘聚焦的按钮,结束后焦点回到按钮;只接受 1 到 20 的整数(7.5、1e2 不再被截断后提交);请求带在途守卫与 8 秒超时;成功后就地重算这一行并拉一次状态;结果用静态色标并写进 role=status 节点供读屏播报。 - 新增小字统一用 --text-secondary(--text-tertiary 在卡片底色上只有 4.02:1);输入框不再引用未定义的 --bg-primary。 🤖 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>
- 两张卡放进同一个 .status-row 网格(右列 clamp(280px, 24vw, 360px)),1179px 及以下改为上下堆叠;分布卡随订阅卡等高,图形区吃掉余量。 - 订阅区放不下的行仍在区内横向滚动(单行硬约束不变),右缘渐隐提示「后面还有」,滚到头提示消失;行重绘由多处触发,用 MutationObserver 统一同步,不改渲染函数。 - 原 .charts-grid-2 网格成为死代码,删除;趋势卡保留 class="card timeline-card"(测试用它做订阅卡片段的结束分隔)。 🤖 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>
- 请求量、Token(按供应商)、Token(Vendor / 模型)共用一个图位,下划线式页签;键盘 ← → 循环、Home / End 到首尾,焦点移到哪个页签就选中哪个;当前页签跨刷新与跨时间区间保持。
- 页签类名另起 trend- 前缀:.tab-btn / .tab-pane 被页首主页签的状态逻辑按类名全文档匹配,借用会被误伤。
- 面板由隐藏变可见后依次 resize、stop、update('none'):Chart.js 在 resize 里建的 attach 动画要先停掉,否则每次首次切入都重播约 1 秒。
- 折线改为真堆叠面积(每条线填到上一条堆叠线);请求量图补上空态;销毁图表实例后随即清空引用,空态返回后不会再对已销毁的实例调用 update;空态提示去掉 emoji。
- 960px 及以下图位高度定死,不再塌成 150px;600px 及以下页签折行、区间说明收起。
- 系统开启「减少动态效果」时关闭 Chart.js 的画布动画。
- 测试:test_dashboard_charts 把请求量图纳入空态往返并断言堆叠填充;新增 test_dashboard_overview,覆盖 KPI 区间标签与副行、Model Calling 行复用与并行度编辑全流程、页签切换与键盘、订阅区溢出提示。
🤖 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/guide/dashboard.md:KPI 改为 strip 的说明(卡片名、副行的区间标签写法、双币种换行);新增「Model Calling 实时状态」一节(五列、两列与窄屏断点、monitor 模式、修改并行度);图表改为页签图位与堆叠面积;订阅状态按右栏可用状态重写;状态复位表里的用量说法;时间区间栏位置更正;页签的键盘操作。 - docs/arch/subscription-status.md:卡片行模型补「可用状态」的取值、顺序与呈现,路由区不再有 tier 名与用量格;测试锚点随订阅卡测试更新。 - docs/arch/testing.md:补 test_dashboard_overview.py 的覆盖说明,test_dashboard_charts.py 的覆盖范围加上堆叠填充与请求量图。 - docs/.agents/issue.md:新增 I-014(编辑并行度时轮询提交半截输入、每次编辑连发两个 PUT)。 🤖 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>
- 2880×2632(视口 1440×1316 CSS px,deviceScaleFactor 2)。页面从七段纵排收成四行:KPI 条、Model Calling 列表、订阅状态与供应商请求分布并排、三张趋势图并为页签。 - 视口宽从 1404 改为 1440:并排布局下截图数据的各行都不需要在订阅区内横向滑动。 - 版本徽标仍是 v0.6.6(当前已发布的最新版本),发布新版本时按惯例重拍。 🤖 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>
- 根因:Model Bind 下拉 = 内置 vendor 目录 ∪ session_policies.bindable_models,pricing 与调用记录都不是来源;内置 zhipu 目录停在 GLM 5.3,glm-5.4 因此不出现。 - 处理:_ZHIPU 补 glm-5.4(随目录自动获得 zhipu 锁定与 identity 映射规则);补目录、identity 规则、/api/status 三处回归断言,补完先红后绿。 🤖 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>
- 记录根因(内置目录滞后于上游新模型,pricing 与调用记录不是目录来源)、处理、验证与后续防范(新 native 模型同步补目录,用户侧用 Bindable Models 自救)。 🤖 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>
- 目录来源扩为 内置 ∪ pricing 行(仅 native vendor 且在激活链,配价即入下拉)∪ bindable_models;按 model 去重,派生条目 label 用 model 名、tiers 锁定 vendor、自动获得 identity 规则。 - pricing 行新增 online 字段(缺省 true):false 只标记 offline——不进下拉、PUT 拒绝新绑(文案指明 offline),executor 锁定链与热切换迁移改用 get_known_models()(含下线),已绑会话保留。 - get_bindable_models() 只返回可选项(/api/status 与 PUT 校验来源)。 🤖 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>
- 服务端 ConfigService._plan 增加「pricing 不可缩减」:删除、改名、恢复默认丢行一律拒绝(loc=pricing,只带条数不回显值),config import 整体替换不在其限;CLI config set / reset 同经此门。 - Config 页 Pricing 表:新增 Status 列(Online/Offline);已保存行去掉「删除」、vendor/model 只读,改「下线/上线」;未保存新增行仍可撤销;「恢复默认」改为「恢复默认价格并保留自定义行」。 - config.js listBlock 支持 deletable 行级开关与 rowActions 行内按钮。 🤖 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>
- session-model-bind.md:目录来源扩为 内置 ∪ pricing ∪ bindable_models,补下线(offline)语义、pricing 不可删除规则与测试锚点。 - config-reference.md:ModelPricingEntry 补 online 字段与写入边界(不可删除),11.1/11.2 同步目录合成口径。 - issue.md:I-014 增量登记第二步实施与端到端验证。 🤖 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(ModelBind): pricing 并入可绑定目录,下线开关替代删除
- `saveImpact`:把一次保存会被用户感知的后果整理成清单(密钥写入或清空、目标地址变更清空已存密钥、在途请求、熔断 / 限流 / 配额状态重置、运行中优先级与 Tiers 不一致、待生效 section 一并生效、移除 vendor),清单为空即例行保存。 - `changedRows`:按 section 分组列出字段级新旧值;vendors 按 vendor 名配对,列表型 section 按行键配对(Pricing 用 vendor + model、Model Mapping 用 pattern 等),配不上的行记为新增或移除,vendors 仅顺序变化时给出顺序行。 - 两个函数经 `module.exports` 导出;本次只加入口与 Node 用例,界面行为不变。 - 测试:`test_config_js_pure_helpers_under_node` 补两类纯函数的触发条件与配对规则断言。 🤖 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>
- 保存栏:待保存范围改为可读名称(「待保存:Vendors › zhipu、Pricing(3 处)」),按钮只写「保存」;保存时按阶段显示「等待确认…」「保存中…」。 - 结果态:成功 / 需重启 / 失败都显示在底部保存栏(圆点 + 文案 + 运行时重置明细 +「关闭」),不自动消失,点「关闭」或再次编辑后清除;失败时保留修改与「保存」按钮,可直接重试。顶部 Banner 只留模式类提示,加载失败的致命视图仍保留结果提示。 - 确认框:后果清单非空才弹,并列出每个字段的新旧值(超过 8 行折叠);破坏性后果(清空密钥、目标地址变更)用红色主按钮。删掉原先无条件输出的两句运行时套话,并发上限重置改由保存后的结果明细报告。 - 页面内确认框 `askConfirm`:不支持 `<dialog>` 时回退 `window.confirm` 并同步执行;打开时焦点落在「取消」。 - 保存结果写入常驻的 `role=status` 播报节点(挂在 `#config-root` 之外,不随重绘丢失),保存完成后焦点落在结果上。 - 保存栏常驻期间设置 `scroll-padding-bottom`,键盘聚焦到页面底部的控件时不被它盖住。 - 测试:Node DOM harness 步骤 6 / 7 / 9 的结果断言改到保存栏,并新增「例行保存不弹确认」「结果态可关闭」断言。 🤖 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>
- 焦点找回:整页重绘前记录焦点控件的「容器路径 + 控件角色」,重绘后按同一键还给同一控件;找不到时依次退到同容器里的同类按钮(「编辑」变「收起」)、同容器首个可聚焦控件、当前激活的 pill,禁用的控件跳过(排序到首行后落到同行的「下移」)。 - 显式落点:列表「添加」滚到新行并聚焦它自己的编辑表单,新行高亮 2 秒;上移 / 下移焦点跟随被移动的行;切换 section 或 vendor 落到新的激活项;密钥菜单操作后焦点留在该行;Per-Model 添加后焦点回到「模型名」输入框。 - 焦点原由键盘获得时,重绘后用 `data-focus-ring` 补回焦点环;`:focus-visible` 在旧浏览器会抛错,已做兜底。 - 表单卡不再重放全局 `.card` 的入场动画与 hover 阴影(只在 `config.css` 覆盖,Overview 不受影响);拖选表格文字后的点击不再触发行展开。 - 测试:DOM harness 的 `focus()` 记录落点,新增「排序后焦点跟随」「展开行旁点添加后焦点落在新行」两条断言。 🤖 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>
- Vendors 子 pill 行的「恢复默认」改名「全部恢复默认」并降为透明底按钮,写明作用于全部 vendor,且总是先确认;vendor 级与其他 section 的「恢复默认」只在会替换已保存的自定义值时确认。 - 移除 vendor 先确认,说明会移出 Tiers 链路及当前位次、已存密钥不删除;移除表格行与 Per-Model 行不确认,动词统一为「移除」。 - 单级撤销:保存栏出现「撤销」,把被移除的行、模型上限或 vendor 插回原位(vendor 连同 Tiers 位次),不影响其后的其它编辑;保存、放弃修改、锁定、重新加载、添加、排序或重新添加 vendor 后入口清掉,保存进行中禁用。 - 放弃修改、锁定、脏态刷新三处原生 `window.confirm` 改用页面内确认框;破坏性确认使用 `alertdialog` 并通过 `aria-describedby` 关联正文与后果清单。 - 测试:DOM harness 新增三组场景:行级移除可撤销、Per-Model 行移除可撤销、移除 vendor 后撤销恢复原位且重新添加会清掉撤销入口。 🤖 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>
- `.cfg-row` 的 label 列由固定 1/12 改为 `minmax(104px, calc(100% / 12))`:卡片内宽约 1250px 以上(视口约 1314px 以上)仍是精确的 1/12,更窄时停在 104px,不再截断(1024 宽下 vendor 页 22 个 label 截断 11 个降为 0,768 宽 15 个降为 0)。 - 视口 640px 以下 label 与 ⓘ 占第一行、控件独占第二行(390 宽下 22 个截断降为 0);说明气泡改为在该行下方展开并限宽,不再伸出视口。 - 被截断的文本在渲染完成后立即补 `title`(原先只在鼠标移入时补,键盘与触屏拿不到);表单行 ⓘ 的说明首行带上完整 label。 🤖 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/design/config-tab-ux-batch1.md`:保存反馈与确认框、操作后的焦点与落点、破坏性操作的确认与撤销、label 列宽下限的设计取舍、测试计划与外部依据。 - 新增两张 Archify 图(A 档四件套):保存流程改造前后(workflow)与编辑撤销状态机(lifecycle),均通过 finalize 四道门禁,设计文档以双主题 SVG 嵌入。 - `docs/guide/dashboard.md` 的 Config 小节同步保存栏、确认框、撤销、恢复默认与键盘行为,截图按当前界面重拍;`docs/arch/testing.md`、`docs/.agents/knowledge-map.md` 同步索引。 - pre-commit 的空白类 hook 排除 `docs/diagrams/`:Archify 图产物与校验回执按字节绑定,被 hook 改写后回执失效。 🤖 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>
- 带入 PR #315(Model Bind:pricing 行不可删除与下线 / 上线),它与本分支同时改了 `config.js` 的列表行操作单元格和同一份 Node DOM harness。 - 冲突解决:行操作单元格同时保留上游的 `o.rowActions`(下线 / 上线)、`o.deletable`(已保存的 pricing 行不可移除)与本分支的「移除 + 撤销」;已保存的 pricing 行不出「移除」,新增行可移除并撤销。 - 焦点找回补一条规则:按钮文案变化(下线 ↔ 上线)时按它在同类按钮里的序号找回同一位置的按钮。 - 测试:行级移除撤销的断言从步骤 1(已保存的 pricing 行)移到步骤 12 的新增行上;原场景 12 / 13 顺延为 13 / 14。 - 文档:设计文档与 `docs/guide/dashboard.md` 注明已保存的 pricing 行只能下线 / 上线。 🤖 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): Config 页保存反馈、操作落点、破坏性操作与 label 列宽第一批改造
- 区间标签一律「近 N 天」并取自实际取数的天数,不再把自选区间写成接口取不到的起止日期;自选默认日期改用本地日期,天数封顶 90 - 刷新途中改了时间区间时,当前轮结束后按新区间补刷一次(取数失败不补刷) - 编辑并行度时点另一行的上限,当前提交完成后接着打开那一行,不再要点两次;播报节点改写进模板 - 分布图图例按实测标签宽度在窄列移到图下方,不再被画布右缘裁掉;分布卡图形区 flex-basis 取 0,行高可回落 - 三张趋势图与分布图的 canvas 加 role=img 与文字摘要;趋势面板去掉被覆盖的 aria-label,补 :focus-visible 焦点环 - 模型名最多折两行;页签文字与卡片标题左对齐、下划线盖住 hairline;手机两列 KPI 内边距对齐;删除无引用的 .sb-ok 与三个 CSS 变量 - 测试:新增区间补刷、本地日期、编辑接力、图表摘要与图例位置 4 个用例,收紧捕获阶段与 _card 边界断言 🤖 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 5.5 <noreply@anthropic.com>
🤖 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 5.5 <noreply@anthropic.com>
🤖 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 5.5 <noreply@anthropic.com>
issue.md 的 I-014 与基线新增的 I-014(Model Bind 下拉缺 GLM 5.4)撞号,并行度编辑那条改登记为 I-015。 🤖 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 5.5 <noreply@anthropic.com>
feat(Dashboard): Overview 简化改造,KPI strip、Model Calling 对齐列表、两栏并排与趋势页签
🤖 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 5.5 <noreply@anthropic.com>
🤖 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 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
发布内容
将 feature/1.x.x 自 v0.6.6 以来的变更合入 master,作为 v0.6.7 发布基线:
bindable_models三源合成;pricing 行只能下线、不能删除以上均来自三个 feature PR(均以 merge commit 合入,保留独立提交,共 26 个提交)。预合并提交 3790423 已把 master 的 v0.6.6 版本提交带入 feature/1.x.x。
验证
pytest2284 passed(v0.6.6 基线 2248);uv build产物正常(wheel 125 个文件,含static/config/config.{css,js})。git diff origin/master <预合并提交> -- pyproject.toml CHANGELOG.md为空;相对合并前的 feature/1.x.x 头只多pyproject.toml与CHANGELOG.md两个文件。knowledge-map.md里讲格式的示例文字[...](path),master 上原本就有,不是断链);CHANGELOG 条目按 PR 分组并与实际改动文件对照。发布计划
风险与注意
config.js仍会显示「删除」,刷新后消失。🤖 Generated with Claude Code