Skip to content

feat: add project context menu actions#685

Merged
matt2e merged 3 commits intomainfrom
mark-unread
May 5, 2026
Merged

feat: add project context menu actions#685
matt2e merged 3 commits intomainfrom
mark-unread

Conversation

@matt2e
Copy link
Copy Markdown
Contributor

@matt2e matt2e commented May 5, 2026

🤖 Summary

  • Add right-click project actions for marking projects unread and removing projects from the list/sidebar.
  • Share delete-safety logic across project views and clear unread state after deletion.
  • Add unit coverage for project delete confirmation rules.

Tests

  • pre-push hooks: crates-fmt, crates-test, crates-lint, differ-ci, staged-ci

matt2e added 3 commits May 5, 2026 14:26
Signed-off-by: Matt Toohey <contact@matttoohey.com>
Add proper ARIA menu keyboard navigation so assistive technology
can interact with the context menu as expected:

- Focus the first menu item automatically when the menu opens
- ArrowDown/ArrowUp cycle through items with wrapping
- Home/End jump to first/last item
- Tab is trapped (closes the menu instead of escaping)
- Menu items use tabindex="-1" per the roving tabindex pattern

Signed-off-by: Matt Toohey <contact@matttoohey.com>
When a project is deleted via the context menu in ProjectsList or the
sidebar in ProjectHome, its unread flag was not being cleared. This left
stale entries in projectStateStore, inflating the dock badge count.

Call projectStateStore.markAsRead(id) immediately after a successful
backend delete in both delete paths so the persisted unread set and
badge are updated correctly.

Signed-off-by: Matt Toohey <contact@matttoohey.com>
@matt2e matt2e requested review from baxen and wesbillman as code owners May 5, 2026 04:49
Copy link
Copy Markdown

@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.

Reviewed commit: 302c1d9d42

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

hasUnpushedCommits,
onCheckError,
}: ProjectDeleteSafetyOptions): Promise<boolean> {
if (repoCount === 0) return true;
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Guard immediate deletion against stale repo counts

canDeleteProjectWithoutConfirmation now returns true as soon as repoCount === 0, but both new context-menu delete paths pass repo counts that are temporarily derived before repo hydration finishes (ProjectsList computes repoCountsByProject from async listProjectRepos and falls back to project.githubRepo). For projects where githubRepo is null, this can be 0 even when branches already exist, so remove-from-list/sidebar can skip confirmation and unpushed/unmerged checks and delete immediately. This should not treat repoCount === 0 as sufficient safety when branch data exists or repo counts are not authoritative yet.

Useful? React with 👍 / 👎.

@matt2e matt2e merged commit e6936d2 into main May 5, 2026
5 checks passed
@matt2e matt2e deleted the mark-unread branch May 5, 2026 04:56
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