Skip to content

feat: overview dynamic height for multi-agent sessions (+ #114 grip pill)#125

Merged
lis186 merged 6 commits into
mainfrom
feat/overview-multi-agent
Jul 4, 2026
Merged

feat: overview dynamic height for multi-agent sessions (+ #114 grip pill)#125
lis186 merged 6 commits into
mainfrom
feat/overview-multi-agent

Conversation

@lis186

@lis186 lis186 commented Jul 4, 2026

Copy link
Copy Markdown
Owner

繁體中文摘要

多 agent session(4–6 lanes)時,overview 固定 28px canvas 讓每條 lane 只剩 2–3px,活動分布幾乎不可見。本 PR:

  1. Overview 高度隨 lane 數動態:canvas 高 = clamp(28, lanes×7+6, 48)。單 lane session 維持 28px 不浪費垂直空間;4–6 lanes 升到 34–48px,每條 lane 得到 ~6px bar(原本 3px)
  2. 暗背景可見度:未選中 lane alpha 0.5→0.65(教訓總表 fix: count skill invocations from all 3 trigger paths #2「深色背景吃掉低亮度信號」)、min bar width 0.5→1px、bar 高上限 6→8px
  3. fix: swimlane readability — lane height, font sizes, resize handle, minimap #114 收尾:#wf-resize 4→8px + 永久顯示的 grip pill(原本 hover 才有回饋)

否決的方向:sub-agent 聚合活動帶(直接消滅使用者要觀察的 per-agent 分布)、per-lane 對齊左側 lane 標籤(等於把 swimlane 複製進 overview,P13 同款職責重疊)。>10 lanes 時 bar 回到 2px floor——接受,per-lane 分析是泳道的職責,overview 只管全局定位。

Zone 三色、brush-zoom / viewport 拖移 / 邊緣 resize / click 選 turn / accent cursor 全部保留(互動程式碼讀 live canvas 的 MW/MH,自動適應)。

Overview height

Before (fixed 28px, 6 lanes)         After (dynamic, 6 lanes -> 48px)
┌────────────────────────────┐       ┌────────────────────────────┐
│ ▪▪ ▪   ▪▪▪  (2-3px each)   │       │ ▮▮ ▮    ▮▮▮▮   ▮▮  (6px)   │
│ ·· ·    ···  barely visible│       │ ▮▮ ▮▮                      │
└────────────────────────────┘       │   ▮▮   ▮▮▮                 │
                                     │      ▮       ▮▮            │
1 lane  -> 28px (unchanged)          │   ▮▮▮  ▮                   │
4 lanes -> 34px                      │        ▮▮▮▮                │
6 lanes -> 48px (cap, #114)          └────────────────────────────┘
18 lanes -> 48px, bars floor at 2px

Details (EN)

  • wfOverviewHeight(laneCount) = min(48, max(28, laneCount*7+6)); applied via canvas.style.height at the top of wfRenderOverview, so it re-adapts on every render (session switch, streaming lane additions) with no extra plumbing
  • Bar height formula cap raised 6→8: single-lane sessions get an 8px band, 6 lanes ≈ 6.3px, 18-lane extreme sessions floor at 2px (accepted — the overview is global positioning; per-lane analysis is the swimlane's job, same responsibility split as P13)
  • Unselected-lane alpha 0.65 (was 0.5, sank into #161b22); selected stays 0.9 so the selected-lane emphasis survives
  • All overview interactions untouched: they parameterize on MW/MH read from the live canvas
  • #wf-resize: 8px tall, permanent centered grip pill (::after, 32×3px, var(--border)var(--dim) on hover)
  • Docs synced: docs/workflow-view-design.md (Overview Bar section + P12 form table), prototype/swimlane/DESIGN-DECISIONS.md decision 23

Verification

  • Unit: wfOverviewHeight clamp cases in test/workflow-timeline.test.js (14/14 pass); full suite 979/980 — the 1 fail is the known flaky test: codex-adapter rate_limits fixture fails intermittently (expected 1, got 0) #119 codex-adapter fixture time bomb, unrelated
  • Browser smoke (isolated CCXRAY_HOME, port 5602, real logs incl. session 157c0faa 482 turns / 6 lanes):
    • 6-lane session → 48px canvas, ~6px per-lane bars, distribution readable
    • 2-lane session → 28px (compact case preserved)
    • Brush-to-zoom, viewport pan, edge resize, small-brush click-select, selection cursor, duration badge — all verified working post-change
    • Grip pill visible on #wf-resize without hover

Closes #114

Justin Lee and others added 6 commits July 4, 2026 19:45
… legibility

6-lane sessions rendered 2-3px per-lane slivers in the fixed 28px overview
canvas — per-agent activity distribution was unreadable. Canvas height is
now clamp(28, lanes*7+6, 48): single-lane sessions stay compact, 4-6 lane
sessions get ~6px bars. Also raises unselected-lane alpha 0.5 -> 0.65
(sank into the dark bg), min bar width 0.5 -> 1px, bar height cap 6 -> 8px.

All overview interactions (brush-zoom, viewport pan/resize, click-select,
selection cursor) read MW/MH from the live canvas and are unaffected.

Covers the minimap-height item of #114.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Handle was 4px with hover-only affordance — invisible until discovered.
Now 8px with an always-visible centered grip pill.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…clips

Codex R1: barH floor 2 + fixed 1px gap meant laneCount*3 could exceed
canvas height (18 lanes at 48px drew 54px, clipping the last two lanes;
pre-existing at 28px too, where 9+ lanes clipped). Geometry extracted to
wfOverviewBarGeom(MH, laneCount): the 1px gap compresses away and barH
shrinks toward 1px when slots get tight, keeping startY + n*laneStep <= MH.

Also syncs stale doc values codex flagged (4px resize handle, 32px
overview) with the new dynamic sizes.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…eight (codex R3)

Lane count is a session-level property; the stability test (rapid
agent/turn clicks never resize containers) still holds.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@lis186

lis186 commented Jul 4, 2026

Copy link
Copy Markdown
Owner Author

Codex review trail

  • R1: 2 findings — (Medium) barH floor 2 + fixed 1px gap clipped trailing lanes once laneCount*3 > MH (pre-existing at 28px too: 9+ lanes clipped); fixed via wfOverviewBarGeom gap compression + regression test. (Low) stale doc sizes (4px resize / 32px overview) synced.
  • R2: R1 confirmed resolved; (Low) "2-8px" wording vs 1px floor — aligned.
  • R3: (Low) docs/design-principles.md layout-stability line contradicted dynamic height — qualified as session-level property (rapid agent/turn clicks still never resize).
  • R4: (Medium) _wfNearestTurn start-x-only hit test misses clicks inside long bars — pre-existing from PR feat: v8 ctx-split swimlane — dashboard integration (#91) #124, zero occurrences in this diff; filed fix: swimlane click/hover hit-test measures distance to turn start only, misses inside long bars #126, out of scope here.
  • R5: PASS.

@lis186 lis186 merged commit a3a102c into main Jul 4, 2026
2 checks passed
@lis186 lis186 deleted the feat/overview-multi-agent branch July 4, 2026 12:16
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.

fix: swimlane readability — lane height, font sizes, resize handle, minimap

1 participant