You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 8fb1532
Browse filesBrowse the repository at this point in the historyBrowse files
fix: roll back task-side mode writes when the view mode pin write fails,
rebuild re-pinned siblings' tasks, keep headless task creation working
Review-round fixes on the shared code this unit carries: (1) when the
view's durable mode pin write rejected inside handleModeSwitchUnlocked,
the task-history write and the in-memory task mode had already landed and
the caller delivered the submitted message with the new task mode against
the view's unchanged mode and mode-linked API configuration - the failure
now restores the pre-switch task mode and history entry before
rethrowing. (2) rePinViewLocalStateForDeletedProfile updated each
sibling's buffer but not its running task: the posted state prefers the
task's own apiConfiguration, so a conversation in a view pinned to the
deleted profile kept sending the deleted profile's settings - the re-pin
now rebuilds the sibling's API handler with the replacement's settings and
re-points the task's sticky profile name. (3) The view-state readiness
bound rejected every startNewTask whose webview never launched, breaking
headless API callers - the bound now only rejects when the webview has
launched, and the IPC StartNewTask listener catches rejections since
IpcServer does not await async listeners. (4) The mode-ordering test only
checked the end state - it now asserts the switch has not been called
before the pending initialization state is released.
Proofs: ClineProvider.spec 294/294, sticky-mode 34/34 (new pin-write-
failure rollback test), parallel-mode 40/40 (sibling re-pin test asserts
the task handler rebuild and sticky-name re-point), Task.spec 187/187,
api-task-control 25/25 (headless-fallback and launched-stuck tests);
negative controls: dropping the rollback call reddens exactly the
rollback test, dropping the rebuild reddens exactly the re-pin test,
dropping the waitForModeInitialization await reddens exactly the ordering
test's in-flight assertion, making the readiness timeout unconditional
reddens exactly the headless-fallback test, restores byte-exact (hash
match); eslint --max-warnings=0 clean; prettier clean.
0 commit comments