Lỗi xóa lane có working tree #28
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Thông báo như sau: Lane action failed: lane is not listed as a worktree in /home/khoenv/smartgift/twitter/twitter-execution

Đã sửa trong v1.6.12: https://git.smartgift.io.vn/Smartgift-AI/AgentHub/releases/tag/v1.6.12
Nguyên nhân. Khi xóa lane,
POST /api/lanes/:id/removegọiremoveWorktree→assertDestroyable(server/lib/worktree.js), mà check thứ 3 của nó bắt buộc thư mục của lane phải có tronggit worktree list --porcelaincủa source repo. Lane managed mà git không (còn) liệt kê là worktree sẽ nhậnENOTWORKTREE→ HTTP 400 "lane is not listed as a worktree in …", và không bao giờ xóa được khỏi dashboard.Cách sửa.
removekhông còn hủy bất cứ thứ gì: nó dừng run + stack, dọn bookkeeping runtime của chính AgentHub trongLANES_ROOT/.state/lane<slot>/, rồi xóa row. Working tree, nhánh, bản ghi worktree của git và database của lane đều giữ nguyên — xóa chúng là việc của bạn, bằng tay (git worktree remove/git branch -d/ drop DB). Nhờ vậy không còn đường nào tớiENOTWORKTREEtừremove, không preflight blocker nào chặn nó, và cổng force cho unpushed commits giờ chỉ còn áp choreset.UI đi kèm: nút đổi thành "Delete lane record" cho cả hai loại lane, modal ghi rõ thứ gì được giữ lại, bỏ checkbox Force khi xóa.
Có regression test đúng kịch bản của issue trong
server/__tests__/lane-lifecycle.test.js("removes a managed lane whose directory git no longer lists as a worktree (issue #28)").Cập nhật lên v1.6.12 rồi thử xóa lại giúp mình nhé — nếu vẫn còn lỗi thì mở lại issue này.