Skip to content

feat(app): add command palette project close action#17018

Open
anduimagui wants to merge 6 commits intoanomalyco:devfrom
anduimagui:feat/project-close-command-palette
Open

feat(app): add command palette project close action#17018
anduimagui wants to merge 6 commits intoanomalyco:devfrom
anduimagui:feat/project-close-command-palette

Conversation

@anduimagui
Copy link

@anduimagui anduimagui commented Mar 11, 2026

Issue for this PR

Closes #17021

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

This adds a project.close command to the layout command registry and wires it into the existing project-close flow. The command only shows as enabled when a project is open, and the palette row now uses a generic description instead of the active worktree path.

Closing a project from either the command palette or the sidebar menu now always shows the same confirmation dialog before closing. When there are active sessions, the dialog also shows the current session count.

I also added the new project.close copy to the existing app locale files so the palette action and confirmation dialog render correctly in every supported language.

The shared close-project logic and dialog were refactored out of layout.tsx into packages/app/src/pages/layout/project-close.tsx, with focused coverage in packages/app/src/pages/layout/project-close.test.ts.

Questions

  • Should this warning dialog be shown generally before closing any project?
  • Or should it only be shown when the project still has active sessions?

How did you verify your code works?

GitHub Actions passed typecheck, unit (linux), and unit (windows) on this PR.

Locally in this environment I ran:

  • bun run typecheck in packages/app
  • bun test --preload ./happydom.ts ./src/pages/layout/project-close.test.ts in packages/app
  • bun run typecheck in packages/opencode
  • pre-push bun turbo typecheck

Screenshots / recordings

Not included. This updates command-palette and sidebar close flows and reuses the same close behavior after confirmation.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

@github-actions github-actions bot added the needs:compliance This means the issue will auto-close after 2 hours. label Mar 11, 2026
@github-actions github-actions bot removed the needs:compliance This means the issue will auto-close after 2 hours. label Mar 11, 2026
@github-actions
Copy link
Contributor

Thanks for updating your PR! It now meets our contributing guidelines. 👍

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.

[FEATURE]: close project from the command palette

1 participant