Repository navigation
[bugfix] providers: keep each model's capability check on one line - #604
Zhangbo-cn wants to merge 17 commits into
Conversation
Selecting many models in the add-service form expanded every capability card, so a single screen held one or two models while the user only wanted to know whether the service answers. Fold the availability and capability detail behind a per-row summary, keep the test result on the row, and drop the duplicated fetch status line and the selection filter from this dense form. Refs ThinkFlowLab#574
Expanding a model in the service form cost six lines: a fold summary, an expired banner, one row per capability and the check time, so a two-model service filled the panel. The fold summary also shared its row with the model name, and a shrink-to-fit detail squeezed that name into a one-character column. Put the check action on the model line: it reads "check" before the first observation and the result afterwards. Each capability becomes a chip that carries its own state (supported, unsupported, unknown) with a colour and a dot, so the three states are readable in one line instead of three rows. An expired observation is already visible on every chip, so it no longer repeats a banner; a never-checked model keeps its one sentence. The check lives in useDraftAvailability so the row action and the card read the same observation. Tests: the browser workflows that opened the removed fold now assert the row action and the chip states; capability discovery checks the chip state counts. Refs ThinkFlowLab#574
david6666666
left a comment
There was a problem hiding this comment.
把测试状态放回模型名称旁、避免重复拉取提示,方向对。但 #574 的核心验收是多选后每个模型保持一行、能力详情默认收起;现在能力卡仍常显,非 Chat 行的「测试」与卡片的「检查/刷新」还会同时出现。另有两个现在就能从 diff 确认的问题:过期结果只剩灰色横线,搜索后的可见数被标成实际拉取数。细节已留在对应代码行。
已读 14 个变更文件、关联 Issue 与中英文文案。作者报告隔离夹具、构建和双语检查通过;本轮未独立运行浏览器或调用真实 provider。当前 head 的 Release checks 仍进行中,实际 merge base 6e0b22ad9e462faf5275567733a7746d5c4f1331,落后当前 main 9 个提交。PR 里只有截图文件名和本地路径,暂不能核验实际布局。
当前证据暂定 27/100(非批准分):范围 1/3,正确性 1/3,验证 2/3,主张证据 0/3,简洁性 0/3(新增解释性代码注释)。优先按 #574 补默认折叠、单一测试入口,并附同一窗口多选的前后截图。
Dot,代表 @david6666666。
| value={draft.value} | ||
| checking={draft.checking} | ||
| error={draft.error} | ||
| onRefresh={draft.check} |
There was a problem hiding this comment.
这张卡现在始终展开,而且非 Chat 行上面已经有「测试」,这里还会再渲染「检查/刷新」,两颗按钮跑的是同一个方法。建议把能力详情默认折起来,只留行内一个测试入口。用 #574 的「全选 9 个模型」验一下,每个未展开行应只有一行。
| ? null | ||
| : error || (notice ? availabilityReason(notice) : null); | ||
| : error || | ||
| (notice && notice !== "observation_expired" |
There was a problem hiding this comment.
过期时 availabilityRow 会把共享原因显示成「—」,这里又去掉了唯一讲明「已过期」的文本。用户只看到灰横线,行上却仍是「已测试」。可以不加一整行 banner,但至少留一个可读的「已过期,需刷新」标签,并在中英文测试里断言这段文字。
| <span> | ||
| {t("generation.picker.count", { count: visible.length })} | ||
| {denseCount && loaded && !loading && !error && available.length | ||
| ? t("generation.picker.fetched", { count: visible.length }) |
There was a problem hiding this comment.
这里的 visible.length 会随搜索变化,也会算进手工添加的模型,所以「已获取 N 个模型」不一定是服务返回的数量。比如服务返回 9 个,搜索只剩 1 个时会变成「已获取 1 个」。这行可以叫「当前显示 N 个」,或用 available.length 保留原来的「已获取」语义。
david6666666
left a comment
There was a problem hiding this comment.
补记本轮变化:同一 head 的 Release checks 已全部通过,CodeQL 和 DSH 也绿了。测试确认了行内入口,但现有浏览器用例仍等能力卡常显,没验证 #574 要的多选后默认折叠。当前实际合并基点是 6e0b22ad,仍落后 main 9 个提交;未独立运行浏览器,PR 中也仍只有截图文件名、本地路径。
当前证据暂定 27/100(非批准分):范围 1/3、正确性 1/3、验证 2/3、主张证据 0/3、简洁性 0/3。优先按原行内意见把详情默认收起,让每行只留一个测试入口,再补多选后的前后对照截图。
English: Release checks are green; the collapsed-by-default acceptance criterion and visual evidence remain outstanding.
Dot,代表 @david6666666。
… label ModelRowDetails reads useDraftAvailability directly, so the wrapper component and the summary label for a details element that no longer exists had no reader.
david6666666
left a comment
There was a problem hiding this comment.
这次已直接核对作者补的截图,素材不是缺失。截图确实显示了模型名称和能力标签更紧凑,但 添加服务截图 里,两个已选模型都仍然展开服务能力卡,而且每个模型行的「测试」与卡内「检查」同时出现。新提交的 ModelRowDetails 仍然同时渲染这两处,搜索后可见数也仍被标成拉取数。原行内意见仍适用,不重复贴。
暂定 27/100(非批准分):范围 1/3、正确性 1/3、验证 2/3、主张证据 0/3、简洁性 0/3。证据零分原因改为截图没有证明 #574 的核心验收已满足,不是链接打不开。已对齐当前 main;本轮未独立跑浏览器,当前 Release checks 状态为 in_progress。建议用一次多选的前后对照,证明默认折叠、行内只有一个测试入口。
English: Screenshots are readable, but they confirm that the target rows still show expanded details and two check controls.
Dot,代表 @david6666666。
tests/test_agent_job_lineage.py::test_one_turn_records_every_job_it_accepted_and_nothing_else failed with filelock.Timeout under load; the same test passes locally on this tip in 3.5s.
david6666666
left a comment
There was a problem hiding this comment.
REQUEST CHANGES 22030fb Refs #574
这次已对齐当前 main,Release checks、CodeQL 和 DSH 都绿了。上轮核对过的截图仍与当前实现一致:选中多行后能力区默认展开;非 Chat 行内的「测试」和卡内「检查」仍同时存在。CI 没覆盖 #574 要求的折叠交互,原行内意见不重复贴。
27/100:范围 1/3、正确性 1/3、验证 2/3、主张证据 0/3、简洁性 0/3。截图可读,但显示的是尚未达成验收的状态。未独立跑浏览器。最重要的是用「全选 9 项」补一条回归:默认每条一行、只有一个测试入口、需要时再展开能力详情。
English: Current checks are green, but the screenshots and code still show expanded details and duplicate controls on selected non-Chat models.
Dot,代表 @david6666666。
…er row The row action and the card's refresh button called the same draft check, and the card stayed open under every selected model. Fold the card and the per-kind parameters behind the '服务能力与参数' summary, keep the row action as the only check entry, keep a readable sentence when an observation expires, and count the models the service returned instead of the filtered view. Refs ThinkFlowLab#574
The fold contains a second details element for input capabilities, so the bare summary selector matched two nodes under Playwright strict mode.
The card and its input-rule fold now live inside the row fold, and the row action replaced the card's check button, so the workflows open the row first and click the single row action.
david6666666
left a comment
There was a problem hiding this comment.
REQUEST CHANGES 896a191 Refs #574
当前证据暂定 65/100,非批准分:范围 3/3、正确性 2/3、验证 2/3、主张证据 2/3、简洁度 0/3。下载核对了新版两张图,九个选中项默认都收起,展开也没有第二颗检查按钮。代码把计数固定到服务返回的列表,展开后也恢复了双语过期文案。上轮这三处不重复提。
还有一项验收没闭环:非 Chat 行对任意检查回执统一显示「已测试」,无法在不展开的情况下区分通过、不支持和未知,也不显示耗时;详见行内。新图只显示「测试」,没展示检查后的行。新增解释性代码注释按量表计硬零。
当前 Release checks 尚未全绿;前端、静态、三个浏览器检查、CodeQL 和 DSH 已通过。未独立运行应用。
English: The collapsed layout and single action are verified. Keep the actual result and timing visible in the collapsed non-Chat row.
Dot,代表 @david6666666 作非表决复审。
| : draft.error | ||
| ? "availability.reason.query_failed" | ||
| : draft.value | ||
| ? "availability.rowTested" |
There was a problem hiding this comment.
收起后这里会把所有拿到回执的非 Chat 模型都显示成「已测试」,即使三项能力都不支持或结果未知;耗时也没显示。这样用户还是得逐行展开才能看 #574 要的测试结果。能否从现有检查回执导出一个简短的行内结果(含耗时,拿不到就明确不显示),再补一个「保持折叠时通过/失败可区分」的浏览器断言?
test_agent_visual_gate.py::test_real_opencode_native_visual_input timed out in the 60s worker twice; the same case passes in 15.8s locally on this tree with OPENDIRECTOR_REAL_CLI=1.
david6666666
left a comment
There was a problem hiding this comment.
REQUEST CHANGES e7974b3 Refs #574
当前证据暂定 72/100,非批准分:范围 3/3、正确性 2/3、验证 3/3、主张证据 2/3、简洁度 0/3。
本次提交的 Release checks、CodeQL 和 DSH 已经绿了。前轮核验的折叠和单入口证据仍适用;浏览器选择器修正确实更新了测试路径。非 Chat 行仍把任何成功返回的观测显示为「已测试」,不区分通过、不支持或未知,也没显示耗时,原行内不重复。简洁度按新增解释性注释硬零。未独立运行浏览器。
English: CI is now green, but the collapsed non-Chat row still hides the actual test outcome.
Dot,代表 @david6666666 作非表决审查。
|
Author-side self-review in candidate review mode (base REQUEST CHANGES e7974b3 Refs #574
Everything else holds up on this tip: one action per row ( Ran: Release checks green on e7974b3 (all 14 checks: static, python, frontend, browser isolated/voice/assistant, Not run: local Advisory score: 90/100. Scope 3 (Refs #574: same goal by a different layout, both requested deletions done, no unrelated behavior). Correctness 3. Validation 3. Claim evidence 3 (before/after on the reported reproduction path, all links reachable). Simplicity 0 (explanatory comments added in |
david6666666
left a comment
There was a problem hiding this comment.
COMMENT(非表决) 49ad4d0 Refs #574
当前证据暂定 85/100,非批准分(范围 3、正确性 2、验证 2、主张证据 3、简洁度 3)。我下载看了六张新版中英文截图:通过和不支持已经有不同标识并显示耗时,过期也有可读标签。之前「只显示已测试」的问题大体解决了。
建议把真正的请求失败也补齐:成功返回“不支持”会显示 × 和耗时,但断网或接口异常走另一条分支,只显示查询失败,不显示本次耗时。我在对应行留了建议。同版 Release 的 Python core 仍在 shard 校验处红灯;未独立运行浏览器。
English: 85/100 provisional. The visible results improved; thrown check failures still omit their duration.
Dot,代表 @david6666666。非表决评审。
| > | ||
| {draft.checking | ||
| ? t("availability.checking") | ||
| : draft.error |
There was a problem hiding this comment.
这里的“不支持”有 × 和耗时,但网络或接口错误进入 draft.error 后就只剩「查询失败」,而且 hook 的 catch 不保存这次时间。建议把失败结果也带上本次用时,不沿用上一条成功的时间;浏览器回归可以先测成功,再让同一行的请求失败,核对耗时更新。
david6666666
left a comment
There was a problem hiding this comment.
COMMENT(非表决) ec5e395 Refs #574
92/100(范围 3、正确性 2、验证 3、主张证据 3、简洁度 3)。这版补齐 Python shard 登记,候选树 169 个模块与清单完全一致,同 SHA Release、CodeQL 和 DSH 都已通过。上一轮下载核对的双语截图仍适用,DraftAvailabilityCheck 和 ModelRowDetails 的文件内容没有变化。
技术意见仍是建议修完再合:接口异常只显示查询失败,没显示本次耗时,和 #574 的行内验收不一致。已有行内意见,不重复贴。没有独立重跑浏览器。
Dot,代表 @david6666666。
david6666666
left a comment
There was a problem hiding this comment.
当前证据暂定 93/100,非批准分(范围 3、正确性 3、验证 2、主张证据 3、简洁度 3)。上条行内 的缺口在代码里已补:请求抛异常也按本次开始时间记耗时;按钮、title 和 aria-label 一致。新增浏览器用例先成功,再让同一行返回延迟 503,检查失败状态和耗时,不会吃到上一轮成功的数字。
先前下载的双语截图覆盖原有成功、不支持和过期状态;本次失败分支我核了源码和 fixture,没有独立运行浏览器或把旧截图当成 503 证据。当前 Release 的 isolated browser 还在跑。Dot,代表 @david6666666,非表决复审。
david6666666
left a comment
There was a problem hiding this comment.
当前证据暂定 93/100,非批准分(范围 3、正确性 3、验证 2、主张证据 3、简洁度 3)。同 SHA Release checks 12 项已全绿,CodeQL / DSH 也通过。此前行内指出的失败耗时已修。本轮挡住的是 GitHub 对当前 main 报 dirty,并非单纯落后:PR 在旧的显式 core 清单插入测试,而 #700 把整段改成 default_shard: core。
保留 main 的默认分片规则即可:Ark 和 trace 不需要手工登记为 core,只保留有意放入 agent-cli 的项。解决这个实际冲突后,新 SHA 再核对 CI。不要求为了追平 main 反复 rebase。这里未独立重跑浏览器。
Dot,代表 @david6666666。
| "tests/test_self_hosted_proxy.py", | ||
| "tests/test_self_hosted_queue.py", | ||
| "tests/test_structure_reference.py", | ||
| "tests/test_trace_job_queries.py", |
There was a problem hiding this comment.
这里插入的是旧版显式 core 列表,main 的 #700 已经把整段换成默认 core。GitHub 现在报 dirty。解决时保留 default_shard: core,Ark/trace 让默认规则收集就行;不要恢复整份 core 清单。
What changed
A selected model in the service form spent six lines on itself: a fold summary, an expired banner, one row per capability, and the check time. Two models filled the panel, and the fold summary shared its line with the model name — a shrink-to-fit detail squeezed that name into a one-character column.
useDraftAvailabilityis shared by the row action and the card, so the row state and the chip states cannot disagree.最近检查 / Last checked stays on its own line.
Issue fit
#574 suggests folding each model's capability block into a
<details>labelled 服务能力与参数. This tip reaches the same goal differently: the row keeps the check action and one chip per capability, and the input details stay in their own<details>. A summary label for the never-built outer<details>is therefore removed instead of shipped as dead copy.Review round 2
david6666666's three findings are addressed in this revision:
服务能力与参数summary; the card no longer renders its own check/refresh button, so the row action is the only entry. With the service's nine chat models the list is nine 42px rows.检查结果已过期,请刷新/Results expired. Refresh to check again.stays visible; the chips go stale and the row action reads 已过期 / Expired.available.length, so typing a search term no longer rewrites 已获取 9 个 into 已获取 1 个.Screenshots
Before — the reported layout. Expanding a row squeezes the model name into a one-character column and lays the capability card beside it:
Before — after folding the detail. One summary line plus a banner, three capability rows and the check time for every model:
After — the check action on the model line. One line per model until the service answers:
After — one chip per capability. 支持 (green), 不支持 (red) and 待确认 (grey) each carry a dot, and the check time stays on its own line:
After — the same compact line in the service overview, so several services fit on one screen:
Review round 3
✓29ms, so a passing, unsupported or unknown result is distinguishable without opening the card. The full localized outcome stays in the tooltip and accessible name.检查结果已过期,请刷新/Results expired. Refresh to check again.Validation
npm test— 1032 tests pass.npm run check:i18n— 3464 keys, 0 problems.npx tsc --noEmitandnpm run build— pass.node tests/browser/capability_discovery.mjswithCREATION_SCREENSHOTset — passes locally on the isolated fixture; it asserts the folded row'sdata-outcomeand duration for passed, unsupported and expired states in both locales.capability_discovery,provider_settings,minimax_h3,kling_video,higgsfield_open— pass. These workflows used to open the removed fold; they now assert the row action and the chip state counts, andcapability_discoveryalso covers the expired observation (chips go stale instead of showing a banner).origin/main(through 04a770c) into the branch, then removed the wrapper component and the summary label the refactor left without a reader;tsc, 1052/1053 local tests (the failure istests/browserHost.test.ts's installed-server env probe, which also fails on main in a worktree without.venv),check:i18nandvite buildpass on the merge.filelock.Timeoutand later a 60s timeout intest_agent_visual_gate.py::test_real_opencode_native_visual_input, which passes locally on this tree in 15.8s withOPENDIRECTOR_REAL_CLI=1; the browser lane failed once on a strict-mode selector that matched the card's inner summary, fixed in 9a1a14a.Review round 4
/api/model-configs/availability/checkresponse), the row showsCheck failed · 312msand exposesdata-outcome="failed"; the hook records the duration in the failure path instead of leaving the previous successful observation's time on the row.tests/browser/capability_discovery.mjsruns a successful check, then a failure held for 300ms on the same row, and asserts the row reports the failed attempt's duration.npx tsc --noEmitpasses;npm test1114/1115 (the one failure is the knowntests/browserHost.test.tsinstalled-server probe in a worktree without.venv, which also fails onmain);capability_discovery.mjspasses with 25 queries.7889c0f3(the exact tip);e7974b3ewas an earlier tip.Refs #574
main(8cdf67ec) omitstests/test_ark_availability.py,tests/test_wait_outcome.py, andtests/test_trace_job_queries.pyfromscripts/ci/python_shards.json, sochecks / python (core)and the aggregatechecks / checksfail onmainand on every PR. This tip lists the three modules;pytest tests/test_ci_layers.py— 21 passed.7889c0f3includes that repair; its Release checks are green, so the shard list is no longer pending.