Skip to content

feat(workbench): timeline dispatch & patrol cards, entity blue links, dispatch presets, and 6 core UX upgrades - #10266

Open
maxliux5 wants to merge 7 commits into
mainfrom
codex/workbench-timeline-bluelinks-presets
Open

maxliux5 wants to merge 7 commits into
mainfrom
codex/workbench-timeline-bluelinks-presets

Conversation

@maxliux5

@maxliux5 maxliux5 commented Dec 6, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Delivers LoopX Workbench's unified timeline/entity/presets foundation plus 6 core Workbench UX upgrades (reconciled cleanly with latest main at 9e4730c13f):

Core Foundation (Initial PR #10266)

  • In-Timeline Dispatch & Patrol Cards (TimelineLoopCards.tsx, timeline-stream.ts, ThreadView.tsx): Chronologically interleaves dispatched child task cards (TimelineDispatchCard) and supervision patrol records (TimelinePatrolCard / TimelinePatrolRoutineRow) inline inside the Goal main conversation stream, collapsing routine background checks into > 已在后台处理.
  • Entity Blue Links & Detail Drawer (markdown-links.ts, EntityMarkdown.tsx, EntityDetailDrawer.tsx, StewardConversation.tsx): Turns task://, todo://, goal:// links and matched entity titles into calm brand-blue interactive links opening a right-side desktop drawer or mobile sheet while preserving scroll position.
  • Dispatch Presets & --effort Support (dispatch-presets.ts, DispatchPresetDialog.tsx, steward-dispatch.ts, bin/loopx-context): Deterministic preset ordering ([thread] → [global] → [custom] → [builtin]) and end-to-end --effort propagation.

6 Core UX Upgrades (9aa3cd78f3 + edf012ae71)

  1. Default .html Sandbox Preview + 预览 | 源码 Toggle (threads.ts, App.tsx, ThreadView.tsx, PreviewPanel.tsx, FilesPanel.tsx, paths.ts)

    • Clicking .html / .htm links in chat opens the isolated-origin sandbox preview (PreviewPanel) by default instead of dumping plain text source.
    • Authorizes .html/.htm/.svg inside secondary browseRoots (e.g. .local/playground/*.html from a worktree via __root/<idx>/..., keeping sibling relative assets working) and explicitly referenced external single .html/.svg files via single-file __ref/<hash>/<basename> (preserving strict 404/403 isolation on sibling directory files, traversals, and non-previewable files).
    • Adds a prominent 预览 | 源码 segmented toggle to both PreviewPanel and FilesPanel top bars for .html/.htm/.svg.
  2. Compact Multi-Image Thumbnail Strip + Multi-Image Gallery Lightbox (ImageStrip.tsx, image-places.ts, Lightbox.tsx, ThreadView.tsx, styles.css)

    • Single image renders at a restrained max-height; ≥2 images (including multi-bullet and multi-paragraph image lists coalesced in image-places.ts) render as a single-row compact horizontal scrolling thumbnail strip (~82px tall).
    • Upgrades Lightbox to multi-image gallery mode (keeping single-image props backward-compatible) with i / N counter, filename header, prev/next buttons, desktop ← / → keyboard navigation, mobile horizontal touch swipe, interactive filmstrip, zoom, and download.
  3. Strict Task Status Bucketing & Persistent seenAt Auto-Fade (supervision.ts, MainConversationDock.tsx, App.tsx, workbench-surface.css)

    • Restricts 进行中 (in_progress) strictly to running and queued_workspace tasks; settled unblocked idle tasks move into lightweight 完成未看 (unseen_done) so finished tasks no longer inflate 进行中.
    • Persists per-task / per-thread seenAt timestamps in localStorage (calli.loop.taskSeenAt.v1): opening the child thread (seenAt >= settledAt/updatedAt) or supervision acceptance (completed / review_accepted) immediately fades the task into collapsed 已完成 (done) and persists across reloads.
  4. Minimalist Composer + Universal Bottom-Left + Menu (Composer.tsx, ComposerMenu.tsx, Popover.tsx, DispatchPresetDialog.tsx, App.tsx)

    • Removes the exposed right-side + 派工 button from the composer and the duplicate prominent + 派工 button from the 进行中 panel header.
    • Replaces the bottom-left paperclip button with a universal + Popover menu unifying Upload image/file, Manual dispatch, and Default dispatch presets (DispatchPresetDialog).
  5. Inline Dispatch Plan Card (TimelinePlanCard in TimelineLoopCards.tsx, timeline-stream.ts, steward-dispatch.ts, http.ts, api.ts)

    • Groups backend awaiting_approval tasks by planId (and supports user-initiated manual dispatch drafts) into a compact inline 派活计划 card anchored chronologically in the stream.
    • Supports per-task clickable Preset chips (Agent · model · effort backed by dispatch-presets.ts) and Permission / Workspace chips, remember policy (仅本次 / 设为本会话 / 设为全局), and 开始派发 / 取消. Extends POST /api/steward/plans/:planId/approve with validated per-task overrides; on confirm, collapses in-place into compact TimelineDispatchCard rows.
  6. Patrol Timeline Readability, Periodic Patrol Summary, & Fold.images (timeline-stream.ts, TimelineLoopCards.tsx, steward-supervision.ts, history.ts, work-images.ts, ThreadView.tsx)

    • Formats patrol cards with localized headlines and concise Chinese summaries (never exposing raw agent_reported: or snake_case codes on the first line; raw details tucked behind 展开 → 技术详情), while routine background checks stay folded under > 已在后台处理.
    • Adds deduplicated periodic patrol summary reporting (steward_loop_patrol_digest, periodic_patrol_summary) in steward-supervision.ts that posts a single concise Chinese summary only when the main conversation is idle and settled pending-review or blocked tasks exist (silent when nothing needs attention).
    • Extracts deduplicated local image paths from tool steps (both live in work-images.ts and persisted onto history.work in history.ts) and renders them as a shared compact horizontal thumbnail strip (Fold.images) directly beneath the work fold toggle, opening into the multi-image gallery Lightbox.

Delivery Brief

  • Owning Boundary: apps/workbench (@loopx/workbench-daemon and @loopx/workbench-web); all 3 i18n locales (zh.ts, en.ts, ja.ts) synced; no control-plane or Goal Authority contract changes.
  • Scope & Refactoring: Reused existing isolated preview port (preview.ts), dispatch-presets.ts settings contract, Lightbox, and Popover primitives; introduced shared ImageStrip (reused by both reply images and Fold.images) and work-images.ts extraction helper with full unit + Chromium parity.

First-Screen Visual Evidence

  • Tested revision: edf012ae71 (built @loopx/workbench-daemon + @loopx/workbench-web production bundle served on isolated ephemeral loopback app + preview ports with a synthetic Core server, LOOPX_WORKBENCH_LOCAL_SCAN=off, and synthetic loopx-demo workspace — no public preview link).
  • Viewports & themes: Desktop 1440×960 (Light & Dark) and Mobile 390×844 (Light & Dark), verified 0px horizontal overflow and 0 page/unexpected HTTP errors.
  • Attention & populated-page review:
    • Primary question answered: "What prototypes/screenshots were produced, what dispatch plan or task needs my action right now, and how do I preview, configure, or clear finished work without cluttering the composer?"
    • Verified with mixed states in one populated Goal thread: collapsed WorkGroup with Fold.images strip, clickable .local/playground/loopx-workbench-playground.html, 3-image bulleted list coalesced into an 82px horizontal strip, live running task (进行中 1), settled unblocked idle task (完成未看 1), 2-task awaiting_approval inline TimelinePlanCard, collapsed routine patrol row, substantive @督办巡检 pending-verification card (raw agent_reported: hidden behind 展开), and periodic patrol summary.
View Light Dark
Desktop (1440×960) — Inline Plan Card, Patrol Summary, Buckets & Minimalist Composer Desktop Light: inline PlanCard, readable Chinese patrol cards, strict in_progress and unseen_done pills, minimalist + composer Desktop Dark: inline PlanCard, readable Chinese patrol cards, strict in_progress and unseen_done pills, minimalist + composer
Desktop (1440×960) — .html Sandbox Preview & 预览 | 源码 Source Toggle + Fold.images & Compact Strip Desktop Light: .local/playground HTML rendered in isolated sandbox PreviewPanel alongside Fold.images and compact 3-image strip <img src="https://gist.githubusercontent.com/maxliux5/c1bd5c8bff8312a47bee4bddd271bf48/raw/50fbeb4515d767d60f2ffae99d17470b29755427/04-desktop-light-html-source.png" width="430" alt="Desktop Light: HTML source view in FilesPanel with Preview
Desktop (1440×960) — Multi-Image Gallery Lightbox & Inline Plan Card Preset Chooser Desktop Light: multi-image Lightbox showing 2 / 3 counter, filename, arrows, filmstrip, zoom and download Desktop Light: TimelinePlanCard preset chooser dropdown and remember policy
Desktop (1440×960) — Universal + Popover Menu & Post-Dispatch / seenAt Auto-Fade State Desktop Light: bottom-left + Popover menu housing Upload, Manual dispatch, and Default presets Desktop Light: after confirming plan dispatch and viewing finished task + page reload, unseen_done fades to 0 and moves into collapsed Done
Mobile (390×844) — Overview (Light) Mobile (390×844) — + Popover Menu (Light) Mobile (390×844) — Overview (Dark)
Mobile Light: inline PlanCard, patrol summary, strict buckets, minimalist composer, 0px overflow Mobile Light: universal + Popover menu above composer Mobile Dark: inline PlanCard, patrol summary, strict buckets, minimalist composer, 0px overflow

Verification

  • Typecheck (cd apps/workbench && npm run typecheck): PASS across all 6 workspaces (@loopx/workbench-daemon, @loopx/workbench-web, @calli/ext-board, @calli/ext-loopx, @calli/ext-memory, @calli/ext-voice).
  • Daemon tests (npx tsx --test): 198/198 PASS across preview.test.ts, history.test.ts, dispatch-presets.test.ts, main-conversations.test.ts, steward-inbox.test.ts, steward-supervision.test.ts, steward-dispatch.test.ts, steward-ledger.test.ts, steward-promote.test.ts, and api.test.ts.
  • Web unit tests (npm test -w @loopx/workbench-web): 900/900 PASS (including new workbench-ux-upgrades.test.ts, image-places.test.ts, i18n.test.ts, timeline-stream.test.ts, main-conversations.test.ts, loop-cycle-icon.test.ts).
  • Extension tests: @calli/ext-board 43/43 PASS, @calli/ext-loopx 4/4 PASS.
  • Production build (cd apps/workbench && npm run build): PASS (@loopx/workbench-daemon, @loopx/workbench-web, @calli/ext-loopx).
  • Real Chromium isolated-port E2E regression (built bundle at edf012ae71, synthetic Core):
    • Clicked .local/playground/loopx-workbench-playground.html → opened isolated sandbox PreviewPanel iframe (HTTP 200 on preview port), toggled 源码 → FilesPanel (预览 | 源码), and toggled back to 预览.
    • Verified compact multi-image strip (<= 115px tall) & Fold.images beneath collapsed WorkGroup; clicked 2nd thumbnail → gallery Lightbox (2 / 3, screen-2.png) → ArrowRight (3 / 3) → ArrowLeft (2 / 3) → Escape.
    • Verified 进行中 1 strictly excludes finished idle task (完成未看 1); clicked finished task → returned & reloaded page → 完成未看 stayed 0 and moved into collapsed 已完成 1.
    • Verified exposed + 派工 removed; bottom-left + Popover exposes Upload, Manual dispatch, and Default dispatch presets.
    • Verified TimelinePlanCard preset override (Claude 深度审查), thread default persistence, and in-place collapse into compact TimelineDispatchCard rows on 开始派发.
    • Verified @督办巡检 Chinese headline/summary (no raw agent_reported: on first line) with 展开 revealing 技术详情, plus 0px horizontal overflow and 0 page/unexpected HTTP errors across Desktop/Mobile Light/Dark.
  • Hygiene: python3 scripts/check_rfc_bilingual.py --base origin/main --head HEAD PASS; all new commits DCO-signed (git commit -s); diff & screenshots audited for zero private data or local paths.

Boundary Checklist

  • Neither the diff nor this PR body/attachments disclose private state, credentials, raw traces, internal links, or local machine paths (all captures use a synthetic loopx-demo workspace with LOOPX_WORKBENCH_LOCAL_SCAN=off).
  • Existing English/Chinese RFC pairs unchanged (check_rfc_bilingual.py passed).
  • First-screen visual evidence included for desktop and mobile in both light and dark themes.
  • Every commit includes a DCO Signed-off-by trailer (git commit -s).

…inks drawer, and dispatch presets

Signed-off-by: maxliux5 <5958865+maxliux5@users.noreply.github.com>
…esets

Signed-off-by: maxliux5 <5958865+maxliux5@users.noreply.github.com>

@loopx-agent loopx-agent 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.

Reviewer: model_agent · gpt-6.2-sol · OpenAI · runtime_reported · xhigh

[P2] 派工 preset 更新后,相同请求应继续读回原任务。 相同 clientRequestId 和完全相同的调用参数,第一次派工后仅修改线程 preset 的 effort,重试即从 reused=true 变为 409 client_request_id_conflict。现有分支先重算实时 preset,再将这些参数与已写入的任务比较。调用方因此无法用原请求读回已受理的任务。 受审实现

动机 / Motivation

该改动影响 Workbench 主对话里的派工操作者和使用稳定 request ID 的调用方。 主对话里的派工和巡检原先堆在输入框上方。操作者需要就地定位任务、打开详情,并少填重复的派工选项。 Timeline 在原时间位置展示活动,保留已失败项的原因,详情和 preset 继续使用 Workbench 已有入口。 本轮验证隔离本地入口与已发布首屏截图。 实证使用真实任务服务和 SQLite,审批保持挂起,未连接生产 Core 或真实模型。 现有幂等约定

改动思路 / Approach

复用现有 dispatch service、任务账本与线程跳转。新设置用于解析首次派工的默认 Agent、模型与 effort。 时间线将状态留在发生的位置,详情抽屉保留验收项、进度和跳转。本轮覆盖 Workbench Daemon、SQLite 任务账本与 Web,变更 32 个文件,新增 5,567 行,删除 120 行。 桌面时间线 · 桌面详情 · 窄屏时间线 · 窄屏详情

具体改动 / Changes

  • TIMELINE。交错展示派工与巡检,保留失败原因与跳转入口。

  • PRESET。线程优先的默认 preset 与显式选项在原派工入口生效。

  • IDEMPOTENT_REPLAY。重投相同派工意图读回原任务,设置变化不改变请求身份。

  • 时间线按已知 Turn 起始时间交错排列,例行巡检折叠,失败与需要处理的工作留在原位置。 Timeline 实现

  • 实体详情保留验收项、进度和原线程链接。相同标题的实体不会在普通正文中自动抢占链接。 详情实现

  • Daemon 通过已有派工入口接收显式的模型和 effort,省略值时优先采用线程 preset。 派工选项解析

对主干的风险 / Risks

第一次派工已在账本落成,重发完全相同的请求前,只把线程 preset 的 effort 从 medium 改为 high。 基线在修改设置后仍以 reused=true 返回原任务。两个版本都保留一条账本记录,测试中的待审批任务没有调用 createThread 或 startTurn。 候选第一次保存 medium,设置改变前也正常复用。改变后返回 409,账本仍只有原来的一条任务。独立运行 Web 888 项与 Daemon 48 项,全部通过。六个工作区 typecheck、生产构建和 git diff --check 通过。

我的整体评价 / Verdict

要求修改精确提交 e727f5c。首次派工保存规范化的调用意图,重试先按原 intent 校验并回读原任务。实时 preset 只用于首次接纳和原设计允许重新发起的情况。保留同一 ID 搭配不同请求时的冲突检查,并为旧账本记录保留兼容路径。

同一提交的公开桌面和窄屏截图覆盖默认对话与展开详情。 截图由作者在合成工作区采集。本轮独立检查像素与组件测试,实际浏览器滚动和焦点回位仍沿用作者证据。

English verdict: REQUEST_CHANGES at e727f5c. A byte-identical spawn retry must return the original task after a dispatch preset changes. Compare the persisted request intent before resolving current defaults.

Signed-off-by: maxliux5 <5958865+maxliux5@users.noreply.github.com>
…an overrides, periodic patrol summaries, and Fold.images history projection

Signed-off-by: maxliux5 <5958865+maxliux5@users.noreply.github.com>
…llery lightbox, seenAt fade, + menu, inline PlanCard, patrol & Fold.images)

Signed-off-by: maxliux5 <5958865+maxliux5@users.noreply.github.com>
@maxliux5 maxliux5 changed the title feat(workbench): timeline inline dispatch/patrol cards, entity blue links drawer, and dispatch presets feat(workbench): timeline dispatch & patrol cards, entity blue links, dispatch presets, and 6 core UX upgrades Dec 6, 2026
Signed-off-by: maxliux5 <5958865+maxliux5@users.noreply.github.com>
…from horizontal image thumbnails

Signed-off-by: maxliux5 <5958865+maxliux5@users.noreply.github.com>

This branch has not been deployed

No deployments
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