Skip to content

feat(projects): navigate to adjacent project immediately on deletion - #551

Merged
matt2e merged 2 commits into
mainfrom
navigate-on-project-deletion
Mar 31, 2026
Merged

feat(projects): navigate to adjacent project immediately on deletion#551
matt2e merged 2 commits into
mainfrom
navigate-on-project-deletion

Conversation

@matt2e

@matt2e matt2e commented Mar 31, 2026

Copy link
Copy Markdown
Contributor

Summary

  • When a project is deleted, immediately navigate to the next adjacent project (or the previous one) instead of waiting for the backend deletion to complete
  • Skip projects that are already being deleted when choosing the navigation target
  • Fall back to the home screen if no other projects remain

Test plan

  • Delete a project that has neighbors — verify you land on the next project instantly
  • Delete the last project in the list — verify you land on the previous project
  • Delete the only remaining project — verify you land on the home screen
  • Rapidly delete multiple projects — verify already-deleting projects are skipped

🤖 Generated with Claude Code

matt2e and others added 2 commits March 31, 2026 10:49
Instead of waiting for the backend deletion to complete before
navigating away, immediately select the next project in the list
(or previous if deleting the last one, or home if no projects remain).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…etion

When choosing which project to navigate to after deletion, filter out
projects that are already mid-deletion (tracked in deletingProjectNames)
so the user lands on a live project.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@matt2e
matt2e requested review from baxen and wesbillman as code owners March 31, 2026 00:02

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

Copy link
Copy Markdown

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.

Reviewed commit: 668e7d8ec3

ℹ️ 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".

if (alive.length > 0) {
// Prefer the next project after the current one; fall back to the closest earlier one
const next = alive.find((p) => projects.indexOf(p) > currentIndex) ?? alive[alive.length - 1];
selectProject(next.id);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Avoid forcing detail navigation when deleting on home view

confirmDeleteProject now unconditionally calls selectProject(next.id) whenever another project exists, which also runs when the user is on the all-projects home screen (selectedProjectId is null). In that context, deleting one project should keep the list view, but this change unexpectedly jumps into a single project and persists it as the last-viewed project, regressing the bulk-management flow. This redirect should be gated to cases where the deleted project is the actively selected detail view.

Useful? React with 👍 / 👎.

@matt2e
matt2e merged commit a904622 into main Mar 31, 2026
4 checks passed
@matt2e
matt2e deleted the navigate-on-project-deletion branch March 31, 2026 00:27
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