8000 fix(web): keep detail labels horizontal and show sub-cent costs for 0.12.8 by InfinityPacer · Pull Request #57 · InfinityPacer/meterleaf · GitHub
[go: up one dir, main page]

Skip to content

fix(web): keep detail labels horizontal and show sub-cent costs for 0.12.8 - #57

Merged
InfinityPacer merged 1 commit into
mainfrom
fix/ledger-detail-layout-and-cost-precision
Oct 26, 2026
Merged

InfinityPacer merged 1 commit into
mainfrom
fix/ledger-detail-layout-and-cost-precision

Conversation

@InfinityPacer
Copy link
Copy Markdown
Owner

问题

  1. 请求明细的详情在手机上使用侧边栏布局时,一条较长的源记录 ID 把字段名挤成一字一行,详情无法阅读。
  2. 请求明细的账户筛选列出了已归档账户,与总览的账户列表不一致。
  3. 费用固定两位小数,deepseek 这类低价模型的单次费用都显示成 $0.00,无法区分。

变化

  • 详情字段列表的标签列按内容取宽,标签不再换行,长 ID 在数值列内折行;手机布局里重复的列宽覆盖一并删除。
  • 账户筛选只列使用中的账户。已归档账户作为当前筛选时保留一项并标注「已归档」,从归档列表钻取请求仍然可用;手机筛选摘要同步显示该标注。
  • 费用按金额大小决定小数位,低于一美分逐级展开并省略末尾的零,常规金额仍保留两位;单次平均费用和账户趋势的临时格式统一到同一个函数。
  • 版本 0.12.8。数据库结构未变,升级无需备份。使用说明与更新日志已同步。

验证

  • bun run typecheck、bun test tests(570 pass)、bun run build 通过,所改文件 Prettier 检查通过。
  • 新增 tests/request-detail-layout.browser.ts,在 320、393、441、1440 四个宽度检查详情标签横排、长 ID 在数值列内折行、抽屉与页面都不横向溢出。把旧的 1fr auto 规则临时放回时该检查失败,恢复修复后通过。
  • 用演示数据在浏览器里复核三项行为,详情来源记录 ID 完整折行,账户筛选菜单没有已归档账户(当前筛选时显示「Studio(已归档)」),费用列显示 $0.0014、$0.000805 等。
  • 截图保留在本地 test-results/request-detail-layout/ 与 test-results/ledger-detail-fixes/,未纳入仓库。
  • 视觉复核通过,未发现新增的溢出、错位或对比度问题。

🤖 Generated with Claude Code

….12.8

The request detail sheet used a fixed two-column grid, so a long source record
ID widened the value column until the Chinese labels wrapped one character per
line. Labels now take their content width and never wrap, long values wrap
inside the value column, and the duplicate mobile column override is gone.

The account filter now lists only active accounts. A selected archived account
stays as one extra option labelled 已归档, so opening its requests from the
archived list still names the account instead of showing a bare ID.

USD amounts derive their fractional digits from magnitude and drop the zeros
beyond the two-decimal floor, so cheap model requests show $0.0014 instead of
$0.00. The insights per-request and account trend formatters share the same
helper.

Co-Authored-By: Claude Code <noreply@anthropic.com>
@InfinityPacer
InfinityPacer merged commit 8b56883 into main Oct 26, 2026
2 checks passed
@InfinityPacer
InfinityPacer deleted the fix/ledger-detail-layout-and-cost-precision branch October 26, 2026 15:53
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

0