Skip to content

Conversation

@ammar-agent
Copy link
Collaborator

Replace delete with archive in the sidebar for a safe, reversible operation.
Archived workspaces are hidden from the sidebar but visible on the welcome
page where they can be restored or permanently deleted.

Changes

  • Add archived/archivedAt fields to workspace schemas
  • Add archive/unarchive API endpoints and handlers
  • Update ProjectSidebar to archive instead of delete
  • Filter archived workspaces from sidebar display
  • Add ArchivedWorkspaces component for welcome page
  • Add custom ArchiveIcon/ArchiveRestoreIcon SVG components
  • Remove ForceDeleteModal from sidebar (archiving is safe)

Behavior

  1. Archive replaces delete in the sidebar - safe and reversible
  2. Archived workspaces are hidden from the main sidebar
  3. Archived workspaces appear on the welcome page grouped by project
  4. Delete is only available for archived workspaces, with confirmation
  5. Unarchiving restores the workspace to the sidebar and selects it

Generated with mux • Model: anthropic:claude-opus-4-5 • Thinking: high

Replace delete with archive in the sidebar for a safe, reversible operation.
Archived workspaces are hidden from the sidebar but visible on the welcome
page where they can be restored or permanently deleted.

Changes:
- Add archived/archivedAt fields to workspace schemas
- Add archive/unarchive API endpoints and handlers
- Update ProjectSidebar to archive instead of delete
- Filter archived workspaces from sidebar display
- Add ArchivedWorkspaces component for welcome page
- Add custom ArchiveIcon/ArchiveRestoreIcon SVG components
- Remove ForceDeleteModal from sidebar (archiving is safe)

---
_Generated with `mux` • Model: `anthropic:claude-opus-4-5` • Thinking: `high`_
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment on lines 570 to 573
// Filter out archived workspaces from the sidebar
const allWorkspaces = (
sortedWorkspacesByProject.get(projectPath) ?? []
).filter((w) => !w.archived);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Propagate archived flag to metadata or sidebar filter is a no-op

The sidebar now hides archived workspaces via !w.archived, but archive() only updates config and getAllWorkspaceMetadata() (src/node/config.ts) never copies archived/archivedAt into the WorkspaceMetadata it returns. That means w.archived is always undefined in the frontend list API, so archived workspaces still appear in the sidebar and the welcome-page archived list never renders. This breaks the core “archive hides from sidebar” behavior after the commit.

Useful? React with 👍 / 👎.

Extract workspace creation + archived workspaces into a dedicated ProjectPage
component that shows when a project is selected but no workspace is active.

- Creates ProjectPage.tsx combining ChatInput (creation) with ArchivedWorkspaces
- Simplifies App.tsx by delegating to ProjectPage
- Removes unused imports and refs from App.tsx
- Filter archived workspaces out of workspaceMetadata map during load
- Backend workspace.list now filters by archived status (archivedOnly param)
- ProjectPage fetches archived workspaces separately via API
- Add onWorkspacesChanged callback to refresh after unarchive/delete
- Remove redundant sidebar filter (archived already excluded from map)
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