Skip to content

Sidebar: an empty project can start an orchestrator or a terminal, and can be closed (#746) - #751

Merged
contursofran merged 2 commits into
mainfrom
agent/746-empty-project
Nov 11, 2026
Merged

contursofran merged 2 commits into
mainfrom
agent/746-empty-project

Conversation

@contursofran

Copy link
Copy Markdown
Owner

Fixes #746

Changes

  • Project row menu (D291): "New orchestrator" (only while the project has no orchestrator), "New terminal", separator, "Close all agents" (only while it has agents), "Close project". The two starts run in that project's folder through NewOrchestrator.StartIn and NewTerminal.Start.
  • "Hide project" is now "Close project". The toast says " closed". The projects modal says "Close" and "⌘⌫ close project". The behavior does not change.
  • A click on an empty project selects it. The empty terminal then shows "New orchestrator" and "New terminal ⌘T" for that project, and ⌘T opens there.
  • Specs ProjectRow.md and ProjectsModal.md updated. D291 added; D171, D174, D207 and D219 are marked as partly replaced.
  • New see.sh fixture empty-project.

Why "New orchestrator in " was missing

The item showed only for a group with Path set: a stored folder with no hc terminal at all. A project whose terminals held no agent (plain or ended terminals) had rows and no Path, so its menu had only a disabled "Close all agents" and "Hide project". That is the owner's screenshot.

Tests

  • Sidebar: TestProjectWithTerminalsButNoAgentsHasStartsAndNoCloseAll, TestProjectWithWorkersButNoOrchestratorStartsOneInItsFolder, TestProjectMenuNewTerminalOpensInThatProject, TestProjectMenuStartsAreOffWithNoHandler, TestAClickOnAnEmptyProjectSelectsIt, plus the updated menu tests.
  • Frame: TestEmptyTerminalWithAProjectRowSelectedStartsInIt and TestEmptyTerminalWithNoProjectRowSelectedKeepsItsTexts.
  • e2e: scripts/see.sh empty-project dark "site, nothing open"

Pre-check

  1. Tests: I undid each part of the change and saw these tests fail: TestProjectWithTerminalsButNoAgentsHasStartsAndNoCloseAll, TestEmptyProjectMenuHasHideAndNoCloseAll, TestProjectMenuClosesAllItsAgents, TestTheMenuKeyOnAProjectWithAgentsOpensItsMenu, TestProjectMenuNewTerminalOpensInThatProject, TestProjectWithWorkersButNoOrchestratorStartsOneInItsFolder, TestAClickOnAnEmptyProjectSelectsIt, TestEmptyTerminalWithAProjectRowSelectedStartsInIt.
  2. Plan: all three parts of the issue are done. Enter on an empty project started nothing before this PR (test-confirmed), so it still starts nothing.
  3. Contract: the menu labels match the issue exactly.
  4. Up to date: main is merged in. No open PR touches sidebar.go.
  5. Diff: I read it. There is no debug output.
  6. Coverage: every "Wanted" line of the issue is done.
  7. Duties: LabelNewIn is removed; its start is now the "New orchestrator" item.
  8. Evidence: tmp/see/empty-project-dark.png.

@contursofran
contursofran marked this pull request as ready for review November 11, 2026 22:03
@contursofran
contursofran merged commit 70c241c into main Nov 11, 2026
3 checks passed
@contursofran
contursofran deleted the agent/746-empty-project branch November 11, 2026 22:03
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.

Sidebar: an empty project can start an orchestrator or a terminal, and can be closed

1 participant