Skip to content

Agent Mode: Remove projects from the sidebar without deleting tasks #682

Description

@marksftw

Summary

Add a non-destructive Remove Project action to Agent Mode. Removing a project should declutter the sidebar without deleting its folder, files, tasks, or task-specific state.

Explicitly adding the same folder again should restore its existing tasks.

User story

As an Agent Mode user, I want to remove a folder-backed project that I no longer need in my sidebar, without deleting its files or tasks, so I can keep the sidebar focused and restore the project later if needed.

Current behavior

  • Agent Mode projects remain in the sidebar after they have been added.
  • Individual tasks can be permanently deleted, but the project itself cannot be removed.
  • Projects can remain visible even when their folders have been deleted or their drives are disconnected.
  • Project rows have selection, expansion, ordering, and New Task controls, but no project-level menu.

Desired behavior

Add a project-level ellipsis menu containing Remove Project.

Selecting it opens a confirmation dialog:

Remove ?

/full/path/to/project

Removing this project from Maple won’t delete its files or existing tasks. Add the same folder again to restore its tasks on this account and device.

Actions:

  • Cancel
  • Remove

After confirmation:

  • The project and its tasks disappear from the Agent sidebar and project selectors.
  • The removal persists across app restarts and Chat/Agent mode switches.
  • The project folder, files, tasks, task history, task MCP state, and saved project-skills trust decision remain untouched.
  • If the removed project was selected, Maple selects the next adjacent project. If there is no following project, it selects the previous one.
  • If no projects remain, Maple shows the folder-selection empty state and does not restore the removed project through the previous runtime, default project, or remembered task.
  • The relative order of all remaining projects stays unchanged.
  • A project can be removed even when its folder is missing, offline, or otherwise inaccessible.

If any task belonging to the project is running, removal is disabled and the UI explains that the Agent must be stopped first.

When the user explicitly adds the same canonical folder again:

  • The project is restored at the top of the project list.
  • Its existing tasks reappear and remain loadable and resumable.
  • Its saved project-skills trust decision and task-specific state remain intact.
  • The project is treated as restored only when its canonical folder path matches. Moving or renaming a folder does not automatically reconnect its previous tasks.

Acceptance criteria

  • Every Agent project row has an accessible project actions menu.
  • The menu includes Remove Project.
  • The confirmation dialog displays both the project name and full folder path.
  • The dialog clearly states that files and existing tasks will not be deleted.
  • Removal is disabled while any task in the project is running.
  • Confirming removal hides the project and its tasks from the sidebar and project selectors.
  • Removal remains in effect after relaunching Maple or switching workspace modes.
  • Folder contents, task sessions, task history, task MCP state, and project-skills trust remain unchanged.
  • Removing the selected project chooses the defined adjacent fallback.
  • Removing the final project produces the folder-selection empty state without resurrecting the removed root.
  • Remaining projects retain their relative order.
  • Missing or offline project folders can still be removed.
  • Adding the same canonical folder again restores its tasks and places the project at the top.
  • A moved or renamed folder is treated as a different project.
  • A persistence failure leaves the project visible and reports an error instead of partially removing it.
  • Removed-project state remains isolated by account and device.

Implementation context

Agent projects are currently identified by canonical folder paths rather than stable project IDs. Tasks are persisted separately as Goose sessions and retain their working-directory path.

Simply removing a path from recent_roots.json is insufficient because the Agent sidebar currently synthesizes project rows from saved task roots and the active root. The implementation therefore needs account-scoped removed/hidden-root state, or equivalent filtering, which is cleared when that folder is explicitly added again.

Removal must not invoke the existing destructive task-deletion flow.

Out of scope

  • Deleting project folders or files.
  • Permanently deleting all tasks belonging to a project.
  • Relinking tasks after a folder is moved or renamed.
  • Cross-device project or task synchronization.
  • A separate screen for managing removed projects.
  • Changes to Chat Mode project deletion.
  • Restoring a project to its former list position.

Related work

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions