Fix inverted cancel guard in cockpit project loader #104

Merged
weichen merged 9 commits from fix/cockpit-cancel-guard into main 2026-10-17 04:58:22 +00:00
Owner

Why: #102 把 if (!c) setProjects(...) 重写为多行回调时引入 if (!c) return 早退——正常路径(未取消,c=false)直接 return,setProjects 永不执行,驾驶舱停在「加载中」。I4 e2e 场景 1 捕获。

Evidence: tsc/vitest 324/324/build 绿(SELF);七场景浏览器套件复跑记录在 Dev I4 卡。

Impact: cockpit 入口。

Refs: rollout I4

Why: #102 把 `if (!c) setProjects(...)` 重写为多行回调时引入 `if (!c) return` 早退——正常路径(未取消,c=false)直接 return,`setProjects` 永不执行,驾驶舱停在「加载中」。I4 e2e 场景 1 捕获。 Evidence: tsc/vitest 324/324/build 绿(SELF);七场景浏览器套件复跑记录在 Dev I4 卡。 Impact: cockpit 入口。 Refs: rollout I4
weichen added 1 commit 2026-10-17 02:28:54 +00:00
Why: #102 rewrote the bare-array fallback into a multi-line callback and
turned 'if (!c) setProjects(...)' into an early 'if (!c) return', which
skips setProjects on the normal (non-cancelled) path — the cockpit then
hangs on 加载中 forever, caught by I4 e2e scenario 1.

Evidence: tsc clean, vitest 324/324, build green (SELF); seven-scenario
browser suite rerun recorded on the Dev I4 card.

Impact: cockpit entry only.

Refs: rollout I4
weichen added 1 commit 2026-10-17 02:59:28 +00:00
Why: the cockpit rendered the project dropdown with no project selected
and an empty main area — the design's 首屏 default (first visible project
drives the overview) was never implemented; caught by I4 e2e scenario 1
which got past the project list but never saw .cockpit-stats.

Evidence: tsc clean, vitest green, build green (SELF); seven-scenario
rerun to be recorded on the Dev I4 card.

Impact: cockpit entry only.

Refs: rollout I4
weichen added 1 commit 2026-10-17 03:17:04 +00:00
Why: the local ProjectView interface invented 'id'; rdm.project.list
returns projectId. Every option value was undefined, so auto-select set
pid to undefined and the overview request was never issued — cockpit
showed 加载概览… forever after the project list loaded (I4 e2e scenario 1).

Evidence: tsc clean, vitest green, build green (SELF); network probe shows
rdm.cockpit.overview 200 and .cockpit-stats rendered; seven-scenario rerun
to be recorded on the Dev I4 card.

Impact: cockpit entry only.

Refs: rollout I4
weichen added 1 commit 2026-10-17 03:59:16 +00:00
Why: rdm.cockpit.node projects empty conflicts as items:null (Go nil
slice) while sources arrive as []; the panel read items.length on null
and crashed, so the conflicts empty state never rendered (I4 e2e
scenario 3).

Evidence: tsc clean, vitest green, build green (SELF); seven-scenario
rerun to be recorded on the Dev I4 card.

Impact: cockpit panel only.

Refs: rollout I4
weichen added 1 commit 2026-10-17 04:08:10 +00:00
Why: the I4 scenarios assert the version collapsible for a selected
section in the panorama (not only the reader); the panorama node view
had no version block, so .cockpit-versions-toggle never existed there.
Also normalize null list projections in the panorama node detail fetch
(same Go nil-slice issue fixed for the panel earlier).

Evidence: tsc clean, vitest green, build green (SELF); seven-scenario
rerun to be recorded on the Dev I4 card.

Impact: cockpit panorama only.

Refs: rollout I4
weichen added 1 commit 2026-10-17 04:21:48 +00:00
Why: scenario 4 relied on a pending draft proposal advancing the
snapshot watermark, but rdm.draft.propose commits nothing (wm:58 before
and after) and draft adoption is high-danger (client cannot forge
Confirmed). rdm.reqs.import with a unique probe item is a committed
low-danger mutation that advances the watermark — the honest DV-R05
driver.

Evidence: tsc clean, vitest green, build green (SELF); wm 58->60 probe
against the seeded data recorded in session.

Impact: e2e spec only.

Refs: rollout I4
weichen added 1 commit 2026-10-17 04:30:45 +00:00
Why: the cockpit refresh reloaded overview and tree but left the node
detail at its old snapshot, so the 刷新对齐 banner persisted after
refreshing (DV-R05 wants every projection to advance). PanoramaNode now
refetches when the overview snapshotRevision advances. Scenario 4 also
scoped its tree clicks to the 验证主体报告 branch — the unscoped first
caret expanded an unrelated rdm-self doc.

Evidence: tsc clean, vitest green, build green (SELF); seven-scenario
rerun to be recorded on the Dev I4 card.

Impact: cockpit panorama + e2e spec.

Refs: rollout I4
weichen added 1 commit 2026-10-17 04:40:30 +00:00
Why: at 390px the compact layout swaps the sidebar for an icon rail; the
cockpit entry remains reachable as an icon button but not as .tsb-tool,
so scenario 7 timed out waiting for the sidebar form.

Evidence: tsc clean, vitest green, build green (SELF); seven-scenario
rerun to be recorded on the Dev I4 card.

Impact: e2e spec only.

Refs: rollout I4
weichen added 1 commit 2026-10-17 04:48:39 +00:00
Why: at 390px the single-pane layout lands on 对话 after login and hides
the whole context sidebar (both sidebar and rail forms); scenario 7 must
switch to the 上下文 pane via the top bar before the entry exists.

Evidence: tsc clean, vitest green, build green (SELF); seven-scenario
rerun to be recorded on the Dev I4 card.

Impact: e2e spec only.

Refs: rollout I4
weichen merged commit 8b59998d3c into main 2026-10-17 04:58:22 +00:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: weichen/Agent-System-Frontend#104