Skip to content

feat(ui): marketplace row expand — max tokens, price conversion, multi-key failover detail (v1.19 F) - #60

Merged
argszero merged 1 commit into
mainfrom
feat/ui-ue-round4-market-expand
Aug 17, 2026
Merged

argszero merged 1 commit into
mainfrom
feat/ui-ue-round4-market-expand

Conversation

@argszero

Copy link
Copy Markdown
Owner

Summary

UI/UE 4th-round deepening — item F: marketplace row expand details (rant 2026-08-17T20:39:30, v1.19).

Each marketplace row gets a +/− expand toggle (.row-expand in the first column). Clicking appends a detail row (.mk-detail, colspan=7, inline — no modal) showing:

  • Max tokens (single-call output cap from D.MODELS; "未公布" when unlisted)
  • Price conversion — 1M tokens ≈ N 点 (at output price) + input price /1M
  • Context length (D.ctxFmt)
  • Availability (可用/繁忙 + success rate)
  • Multi-key auto-failover note — shown only for multi models (architecture v0.2 routing policy)

Behavior:

  • Only one row expanded at a time — clicking another row switches; clicking the same row collapses
  • Expanded state lives in mkExpanded (data, not DOM) — survives search/filter re-renders
  • Event handled in the existing #mk-body click delegation ([data-mk-expand] branch, before [data-use-model])
  • Mobile card mode: detail td has no data-label (empty ::before), so the card shows just the detail grid; auto-fit columns adapt

Docs: docs/user-stories.md v1.19 (item F) + ui/README.md「市场行展开约定」. Verified by DOM-stub smoke test (21 assertions: initial state, expand/collapse, max tokens, price conversion, failover note, single-expand switching, max-unlisted fallback, data-state persistence across search re-render, CSS structure), cargo test, cargo fmt --check.

Rant (verbatim)

Rant: UI/UE 第四轮多角度深化 — 状态保持、信息密度、原生控件美化、帮助可达性(宿主 2026-08-17 第四轮指示:继续从多角度美化 UI、优化 UE)

F. 市场模型行展开详情

  • 市场表格每行加展开按钮(+/-):展开显示 max tokens、价格换算说明(1M tokens ≈ N 点)、可用性详情(多 key 故障转移说明)
  • 行内展开(tr 下追加一行),不弹窗;仅展开当前行,点其它行自动收起

Related

Tests

  • DOM-stub smoke test — 21/21 assertions pass
  • node --check ui/js/app.js
  • cargo test — 1 passed
  • cargo fmt --check

@argszero
argszero merged commit c6cff33 into main Aug 17, 2026
1 check passed
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