Lead show moved pane despite unsent text

This commit is contained in:
Ian Gulliver
2026-10-18 09:20:01 -07:00
parent 1363a3604d
commit 5716077869
5 changed files with 61 additions and 8 deletions
+13 -2
View File
@@ -37,6 +37,7 @@ type Manager struct {
store *store.Store
worktreeRoot string
leadRoot string
handsRoot string
codexHome string
status func(context.Context) (api.Status, error)
addProject func(ctx context.Context, name, repoPath, createdBy string) (api.Project, error)
@@ -122,11 +123,12 @@ func (l *live) implementer() bool {
return l.owner == "" && l.reviewID == ""
}
func New(st *store.Store, worktreeRoot, leadRoot, codexHome string, status func(context.Context) (api.Status, error), addProject func(ctx context.Context, name, repoPath, createdBy string) (api.Project, error), clientRegistry *clients.Registry) *Manager {
func New(st *store.Store, worktreeRoot, leadRoot, handsRoot, codexHome string, status func(context.Context) (api.Status, error), addProject func(ctx context.Context, name, repoPath, createdBy string) (api.Project, error), clientRegistry *clients.Registry) *Manager {
m := &Manager{
store: st,
worktreeRoot: worktreeRoot,
leadRoot: leadRoot,
handsRoot: handsRoot,
codexHome: codexHome,
status: status,
addProject: addProject,
@@ -768,7 +770,11 @@ func (m *Manager) startLive(ctx context.Context, sess api.AgentSession, task api
return nil, err
}
g += screenshotGuidance
stdio = []mcp.Stdio{handsMCP(media), playwrightMCP(media)}
hands, err := m.handsMCP(sess.Id, media)
if err != nil {
return nil, err
}
stdio = []mcp.Stdio{hands, playwrightMCP(media)}
}
if sess.Role == api.Reviewer {
r, err := m.store.ReviewBySession(ctx, sess.Id)
@@ -819,6 +825,11 @@ func (m *Manager) pump(l *live) {
l.sess.drive(m, l)
err := os.RemoveAll(m.handsDir(l.id))
if err != nil {
slog.Error("remove session's byre-hands", "session", l.id, "err", err)
}
m.mu.Lock()
delete(m.live, l.id)
closing := m.closing