console: 任务列表服务端分页 + 控制台分页面签

任务列表分页(服务端 + 前端):
- GET /tasks 新增 limit(1..100,非法回 400)、offset、
  order=desc、status/executor/q 服务端过滤;回 total(过滤后
  计数)与 status_counts(全项目统计,不受过滤与分页影响,
  数据卡片不再把当前页当成全项目);无 limit 时旧行为不变
  (全量、正序,协调子任务与旧调用不受影响)。
- 前端每页 20 条、最新在前,上一页/下一页 + 页码;筛选与
  搜索改服务端过滤(搜索防抖 300ms),切筛选/切项目/派发
  后回第 1 页,10 秒刷新与刷新按钮停在当前页;新测试
  test_task_list_pagination.py 5 项。

分页面签:
- 顶栏锚点导航改成 5 个页签:工作台(派发 + 任务列表 +
  对话 + 详情)、项目(项目 + 成员)、环境与 Workers、
  技能与自动化(技能 + 自动化 + 分诊)、管理与 Key;
  数据卡片仍在页签上方常驻。选中任务存在 App 层 store
  里,切页不丢,回来仍是同一任务、10 秒刷新续同步;
  页签同步到 location.hash(#tab-workbench 等),刷新与
  分享链接落在同一页签;窄屏工作台仍保持派发在前的顺序。
- 工作台页签仍是左(任务)右(派发/对话/详情)两栏,
  沿用等高内部滚动规则;其它页签单列堆叠。
This commit is contained in:
host committed 2026-10-30 02:25:48 +08:00
1 parent 9a11ef27b8
commit e5b6c45c83
11 files changed
+443 -122

No files matched your search

+22
View File
@@ -56,6 +56,28 @@ button.danger:hover{background:var(--danger-bg);color:var(--danger)}
.dash-nav{display:flex;gap:4px;flex-wrap:wrap;margin-top:8px}
.dash-nav a{color:#fff;text-decoration:none;font-size:13px;font-weight:600;padding:6px 12px;border-radius:var(--radius)}
.dash-nav a:hover{background:rgba(255,255,255,.12);text-decoration:none}
/* Tab nav: buttons styled like the old anchor nav (dark header, white
text), active tab gets the hover background permanently. */
.tab-nav button{background:transparent;border:0;box-shadow:none;color:#fff;font-size:13px;font-weight:600;padding:6px 12px;border-radius:var(--radius)}
.tab-nav button:hover{background:rgba(255,255,255,.12)}
.tab-nav button.active{background:rgba(255,255,255,.18)}
/* Tab pages: the main page is a flex column (not the old 3-column
grid), so a tab's content spans the full width. The workbench tab
is a 2-column grid (tasks left, dispatch + conversation + detail
right) at >=900px and a single column below that; other tabs are
a single stacked column. Workbench columns keep the equal-height
rule from the wide/medium blocks (fixed height, internal scroll). */
.dash-page-tabs{display:flex}
.dash-page-tabs > .tab-content{grid-column:1 / -1;min-width:0;display:flex;flex-direction:column;gap:20px}
.tab-workbench{display:grid;grid-template-columns:320px minmax(0,1fr);gap:20px;align-items:start}
.tab-workbench > *{min-width:0}
@media (max-width:899px){
.tab-workbench{grid-template-columns:1fr}
/* Narrow workbench keeps the old single-column order (dispatch
first, then tasks, then conversation) even though the DOM now
groups tasks in the left column wrapper. */
.tab-workbench #sec-dispatch{order:1} .tab-workbench #sec-tasks{order:2} .tab-workbench #sec-conv{order:3}
}
.dash-page{max-width:1180px;margin:0 auto;padding:20px;display:flex;flex-direction:column;gap:20px}
.dash-page > *{min-width:0} /* grid/flex children must shrink, never push the page wider; long lines scroll inside pre/.trace-box/.table-wrap instead */
.dash-section > *{min-width:0}