Skip to content

feat(web): separate platform runner bar from available runners - #1348

Merged
crispinhu27 merged 3 commits into
mainfrom
feat/runners-ui-layout
Nov 25, 2026
Merged

crispinhu27 merged 3 commits into
mainfrom
feat/runners-ui-layout

Conversation

@crispinhu27

Copy link
Copy Markdown
Collaborator

Summary

  • Split the platform cloud runner out of #runnersList into a dedicated 平台机器 (#platformRunnerSection / #platformRunnerHost) section above 可用机器, rendering it as a full-width horizontal strip with status, editable concurrency limit, and project-default toggle.
  • Keep #runnersList and #runnerCount strictly for bound/shared machines and align card action footers at the bottom of each grid row.
  • Update design.md, web/i18n-en.js, and webtest/tests/mcp-sops-runners.test.mjs to match the new layout.

Verification

  • npm --prefix webtest test (Node v22.23.2): 306 passed, 0 failed
  • node web/run_queue_test.js && node web/runner_default_rule_test.js: passed
  • bash scripts/build-chatbot.sh: 62 test files (531 tests) passed and rebuilt web/native-chat
  • go test ./web -count=1: passed
  • Headless Chromium check across 1440×900 (light & dark themes), 760×900, and 390×844 with zero horizontal overflow

@Robert0622 Robert0622 left a comment •

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CR + 本机部署实测:LGTM ✅(head a692e95d)

代码审查:平台执行机器从 #runnersList 拆到独立的 #platformRunnerSection / #platformRunnerHost,并发上限输入框和项目默认按钮的事件绑定改成在 platformHost 和 list 两处都挂,焦点恢复和 refreshRunners 的轮询保护([data-platform-run-limit])在新位置仍然生效;#runnerCount 只统计可绑定/共享机器;「在此项目使用」统一改为「设为项目默认」,仓库里没有其他地方再引用旧文案或旧选择器。后端未改。

部署实测:本机部署 PR 二进制(MariaDB 新库、平台本地执行),另起一个 main 058a530b 的平台做对照。注册 2 台真实 agentflow-runner(dev-box-01 属于管理员,build-server-02 共享到项目),成员 B 以项目 member 角色登录。用 Chromium 跑了 72 项检查,全部通过:

  • 布局:「平台机器」分区位于「接入新机器」下方、「可用机器」上方;平台卡不在 #runnersList 里;#runnerCount = 2(管理员)/ 1(成员 B),和列表卡片数一致;绑定机器卡片的底部操作栏都对齐到卡片底部(main 上平台卡和机器卡底部差 132px)
  • 交互(管理员):并发上限改成 7 → PUT /api/runners/platform/run-limit 200,刷新后仍为 7;「设为项目默认」→ 显示「此项目默认」,按钮变为「清除项目默认」,/api/runners/default?projectId=demo 返回 projectRunnerMode=platform;再点「清除项目默认」恢复原状;绑定机器卡片的按钮也显示「设为项目默认」
  • 权限:成员 B 看到只读的「最多同时运行 7 条」,没有输入框
  • 响应式:1440 / 1024 / 760 / 600 / 390 / 360 宽度,亮色和暗色主题下页面都没有横向溢出;控件互不重叠、没有被截断、没有超出卡片;≤1024 宽时控件行换到下方;鼠标悬停 ? 时提示框在视口内
  • 边界:没有可用机器时,平台横条仍然显示,下方显示「还没有机器」,计数为 0;英文界面显示 Platform machine / Shared across all projects / Set as project default,没有截断
  • 本地把最新 main(78cdab43,含 #1342/#1343 对 index.html、i18n-en.js 的改动)合进来没有冲突,合并后 runners 相关 webtest 13/13 通过
  • npm --prefix webtest test 306/306、node web/run_queue_test.js、node web/runner_default_rule_test.js、go test ./web 都通过;控制台没有 pageerror

CI:core、browser、platform-required 失败的原因和 main 058a530b 自己的 platform 运行完全相同:sop_executors_test.go:446/531/556 not enough arguments(#1339/#1291 的问题,#1345 在修),以及 route coverage 85.0% 低于 85% 的门槛。本 PR 只改了前端,没有新增或删除路由,所以这两项都不是本 PR 引入的。

P3(不阻塞):开启「自动分配」后,状态行里的「在线可用机器数」仍然把平台机器算进去(runners.filter(...).length + (platform online ? 1 : 0)),而标题旁的 #runnerCount 现在不包含平台机器。比如本次实测里,标题显示「可用机器 2」,状态行却是 3 台在线可用。建议在文案里写明「含平台机器」,或者把两处口径统一。

截图(PR 管理员 1440 亮色 / 设为项目默认后 / 暗色 / 390 宽 / 成员 B 只读 / main 对照):

PR 1440 亮色
设为项目默认后
PR 1440 暗色
PR 390 宽
成员 B 只读上限
main 对照

@crispinhu27
crispinhu27 merged commit 832e2be into main Nov 25, 2026
16 checks passed
@crispinhu27
crispinhu27 deleted the feat/runners-ui-layout branch November 25, 2026 15:52
Robert0622 pushed a commit that referenced this pull request Nov 25, 2026
Four user-visible errors that arrived with main (#1342 work branch naming,
#1343/#1348 runner auto-assign, #1301 child artifacts) still said SOP.

Co-Authored-By: Claude Code <noreply@anthropic.com>
Robert0622 added a commit that referenced this pull request Nov 26, 2026
* feat: rename SOP to LOOP across LoopForge

* Apply LOOP terminology to copy merged from main and fix CHANGELOG anchor

Rename the user-visible SOP copy that main added for the enterprise IM
channels, observability dashboard and docs, following the same rules as
the rest of this branch (routes, JSON fields and identifiers unchanged).

Keep accepting the old wording where it can still arrive: notification
cards skip both LOOP and SOP header lines, chat drafts recognise both
(LOOP:…) and (SOP:…) notes, and the clarification command accepts
"保存并启动 LOOP" as well as "保存并启动 SOP".

Point the CHANGELOG link at #updating-existing-public-loops.

Co-Authored-By: Claude Code <noreply@anthropic.com>

* Renumber the LOOP terminology migration to 043 and re-apply the rename to main's new copy

main added 042_project_credentials.sql and 042_skill_bodies_to_files.sql,
so the terminology migration becomes 043_loop_terminology.sql; the
installer, its test and the deployment guide follow.

Rename the user-visible SOP copy from #1264, #1294, #1295, #1296 and
#1298 (project roles, join requests, project credentials, workspace
preview messages) with the same rules as the rest of the branch.

Co-Authored-By: Claude Code <noreply@anthropic.com>

* Restore the legacy (SOP:…) draft note check clobbered by the rename sweep

Co-Authored-By: Claude Code <noreply@anthropic.com>

* fix(chatbot): recognize proposal receipts saved before the LOOP rename

Conversations saved before the rename still hold the SOP wording of the
declined and timed-out proposal receipts. The chat matched only the new
LOOP text, so these internal resume turns showed up as user messages.
Accept both wordings.

Rooms also parse LOOP「…」 authors with the correct length and keep
recognizing legacy SOP「…」 authors.

Co-Authored-By: Claude Code <noreply@anthropic.com>

* Apply LOOP terminology to the chat attribution copy merged from main

#1300 added a clarification test that expects the bot reply "已启动 SOP" and a comment that says "a SOP started". This branch already renders "已启动 LOOP", so the test failed after merging main.

Co-Authored-By: Claude Code <noreply@anthropic.com>

* Resume paused children marked before the LOOP rename

The child-resume marker merged from #1327 now reads "等待继续子 LOOP". A parent paused on a build that stored "等待继续子 SOP" still resumes its child after admission.

Co-Authored-By: Claude Code <noreply@anthropic.com>

* test: cover run evaluation before approval

* test: exercise five previously uncovered platform routes

* fix: translate LOOP evaluation and runner allocation messages

* fix(engine): name LOOP in the remaining auto-assign errors

The default-executor fallback label and the no-compatible-sandbox
error still said SOP after the main merge.

Co-Authored-By: Claude Code <noreply@anthropic.com>

* fix: name LOOP in errors merged from main

Four user-visible errors that arrived with main (#1342 work branch naming,
#1343/#1348 runner auto-assign, #1301 child artifacts) still said SOP.

Co-Authored-By: Claude Code <noreply@anthropic.com>

* fix(migrations): preserve customized LOOP template copy

* test(install): copy migration 043 into the live install fixture

install-schema-extensions.sh now replays migrations/043_loop_terminology.sql,
but test-install-live.sh only copied 001/033/038/042 into its trimmed
fixture, so every live install identity stopped at the first install with
'cat: migrations/043_loop_terminology.sql: No such file or directory'.

Copy 043 as well, and add a test-install.py check that every migration the
installer replays is in the live fixture's copy list, so CI catches the
next one.

Co-Authored-By: Claude Code <noreply@anthropic.com>

* Name LOOP in comments and test copy merged from main

The merge of main kept the product copy for requirements without a LOOP,
but comments, test fixtures and failure messages around #1411's sopMode
still said SOP. Use the LOOP terminology there too; protocol values such as
sopMode none/sop and Go identifiers keep their names.

Co-Authored-By: Claude Code <noreply@anthropic.com>

---------

Co-authored-by: roberttwang <roberttwang@tencent.com>
Co-authored-by: roberttwang <u_dc6754cd1ee5@users.noreply.local>
Co-authored-by: Claude Code <noreply@anthropic.com>
Co-authored-by: Codex <codex@users.noreply.github.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.

2 participants