What happened
A task with no project shows a "Remove from project" entry inside the "Move to project" submenu of its row's ⋯ menu, when the submenu itself should not be there at all: the task has no project to leave, and none of the visible projects contain it.
The rail shows a ⋯ → 移动到项目 → 移出项目 submenu on a task that visually sits in the "no project" section.
The task carries a truthy projectId that no longer names any project the current scopes know about (deleted, archived, or relocated upstream). Both guards that build the menu read "is this in a project?" as "is projectId truthy?":
apps/desktop/src/renderer/features/session-navigation/ui/session-navigation-provider.tsx pushed the projectId: null exit whenever session.projectId was truthy, regardless of whether the project's scope still existed
packages/ui/src/session-history-list.tsx dropped the exit only when currentProjectId === null, with the same orphan-id blind spot
When the visible Project scopes filter down to zero available targets, the top-level "Move to project" item disappears but the null entry still rides inside the submenu, rendering as a lone "Remove from project" row for a task that already reads project-less.
How to reproduce
- Create a task in a project (so the session carries a real
projectId).
- Outside the row (delete or archive the project from Settings, or move its directory) such that the rail's
projectScopes no longer include that project, while the session row still points at its id.
- Reopen the task's ⋯ menu → "Move to project" shows a submenu whose only entry is "Remove from project".
Environment
- Maka version or commit:
93cc6b875 (fix(ui): use catalog activity for session branch recency (#5705))
- OS and version: macOS
- Surface: Desktop
What happened
A task with no project shows a "Remove from project" entry inside the "Move to project" submenu of its row's ⋯ menu, when the submenu itself should not be there at all: the task has no project to leave, and none of the visible projects contain it.
The rail shows a ⋯ → 移动到项目 → 移出项目 submenu on a task that visually sits in the "no project" section.
The task carries a truthy
projectIdthat no longer names any project the current scopes know about (deleted, archived, or relocated upstream). Both guards that build the menu read "is this in a project?" as "isprojectIdtruthy?":apps/desktop/src/renderer/features/session-navigation/ui/session-navigation-provider.tsxpushed theprojectId: nullexit wheneversession.projectIdwas truthy, regardless of whether the project's scope still existedpackages/ui/src/session-history-list.tsxdropped the exit only whencurrentProjectId === null, with the same orphan-id blind spotWhen the visible Project scopes filter down to zero available targets, the top-level "Move to project" item disappears but the
nullentry still rides inside the submenu, rendering as a lone "Remove from project" row for a task that already reads project-less.How to reproduce
projectId).projectScopesno longer include that project, while the session row still points at its id.Environment
93cc6b875(fix(ui): use catalog activity for session branch recency (#5705))