Skip to content

feat: show open tasks and assignments in Ensemble sidebar - #44

Closed
vfeitoza wants to merge 16 commits into
hueyexe:mainfrom
vfeitoza:feat/tui-open-tasks
Closed

vfeitoza wants to merge 16 commits into
hueyexe:mainfrom
vfeitoza:feat/tui-open-tasks

Conversation

@vfeitoza

Copy link
Copy Markdown

What

Shows open tasks and assignments in the TUI/terminal sidebar and scopes TUI lookups to the displayed session location. Adds root entrypoints (index.ts/tui.tsx) for local OpenCode plugin loading and fixes 4 reviewed V2 issues from issue #40.

Why

Triaging without seeing openTasks + assignee in the sidebar forces extra RPC navigation. TUI was resolving team context from the wrong project when session/companion location was missing. Local checkout loading also lacked root entrypoints, and ctx.permission.rules / worktree fallback / task deps had degraded behavior on OpenCode 2.x.

How

  • src/tui-context.ts, src/tui-view.ts, src/tui.tsx, src/rpc.ts: add open-task + assignment rendering, bound density, loading/error states for sidebar; location-scoped team lookup.
  • src/v2-client.ts, src/v2-setup.ts: make permission.rules optional with explicit degraded-host warning; expose 9 member tools correctly under read-only agents.
  • src/tools/team-tasks-add.ts: validate depends_on atomically; surface worktree fallback in team_spawn result.
  • src/notify.ts, docs/VALIDATION.md: guard archived nudges and record local plugin activation.
  • Root index.ts, tui.tsx, package.json, tsconfig.json: expose entrypoints for local plugin discovery.

Verification

bun run typecheck && bun test && bun run build — green on branch tip fd61d25. New tests: test/local-entrypoints.test.ts, test/tui-context.test.ts, test/tui-view.test.ts, test/v2-client.test.ts, test/v2-setup.test.ts, test/purge-notifications.test.ts.

Risk

Low. TUI-only and validated fixes; no schema migration. Rollback: revert branch. Docs change is additive.

…Bug 1)

opencode >= 2.0.4 removed the permission.rules plugin API; every
team_spawn threw 'ctx.permission.rules is not a function' (issue hueyexe#40
Bug 1, ENSEMBLE-COMPATIBILITY.md). Feature-detect the call and skip the
re-assert when absent — session.create permissions still travel, only
the post-create re-assert that restored team tools for read-only agents
is omitted on 2.x (documented tradeoff; agent rules still win there).
Adds a regression test that fails on main and passes here (PR hueyexe#41).

Co-Authored-By: internal-model
…Bug 2)

worktree.create failures were downgraded to a TUI toast the lead never
saw — the tool returned 'spawned (branch:)' only when isolation actually
happened, leaving shared-directory teammates looking isolated. Append a
WARNING to the tool result when useWorktree && !worktreeBranch so the
lead sees 'shares your working directory' in the transcript. Adds two
regression tests that fail on main (PR hueyexe#41).

Co-Authored-By: internal-model
A typo in depends_on used to create a permanently blocked task that
claim and complete both reject, with no tool to edit it — only purge
freed it. Validate every depends_on id against the current team before
inserting anything; reject the whole call listing unknown ids and insert
nothing. Scoped by team_id so cross-team ids are rejected too (PR hueyexe#41).

Co-Authored-By: internal-model
…yexe#40 Bug 4)

Teammates in shutdown that were still alive when team_cleanup --purge
deleted the team kept firing notifyLead -> session.promptAsync synthetic
wakes to the lead, showing '[System: New team message from alpha]' on
repeat with team_message already empty. Guard notifyLead to no-op when
team.status != 'active' (archived or purged) so no wake or persist
happens after purge. handleSessionStatusEvent already ignores archived
teams; this closes the active-wake leak. Adds 7 regression tests.

Co-Authored-By: internal-model
@vfeitoza
vfeitoza requested a review from hueyexe as a code owner October 13, 2026 11:44
@vfeitoza vfeitoza closed this Oct 13, 2026
@vfeitoza
vfeitoza deleted the feat/tui-open-tasks branch October 13, 2026 11:50
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.

1 participant