[PR #2176] [MERGED] fix(nav): show shared sub-projects in sidebar when the parent is inaccessible #9818

Closed
opened 2026-04-23 09:13:54 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/go-vikunja/vikunja/pull/2176
Author: @kolaente
Created: 1/28/2026
Status: Merged
Merged: 1/28/2026
Merged by: @kolaente

Base: mainHead: fix-shared-subprojects-sidebar


📝 Commits (3)

  • 7d167e3 fix(frontend): show shared sub-projects in sidebar when parent inaccessible
  • e561758 fix(frontend): preserve parentProjectId for orphaned sub-projects when reordering
  • 30892eb refactor(frontend): use isOrphanedSubProject in notArchivedRootProjects filter

📊 Changes

3 files changed (+245 additions, -2 deletions)

View changed files

📝 frontend/src/components/home/ProjectsNavigation.vue (+2 -1)
frontend/src/stores/projects.test.ts (+223 -0)
📝 frontend/src/stores/projects.ts (+20 -1)

📄 Description

Summary

  • When a sub-project is shared with a user but its parent project is not accessible, the sub-project now appears in the sidebar navigation as a "virtual root" project
  • Prevent accidental reparenting: when reordering orphaned sub-projects in the sidebar, preserve the original parentProjectId instead of setting it to 0
  • Added helper functions isOrphanedSubProject and getEffectiveParentProjectId to the project store
  • Added 13 unit tests covering the new functionality

Test plan

  • Unit tests pass (pnpm test:unit src/stores/projects.test.ts)
  • Lint passes
  • Manual verification with Playwright confirmed sub-project appears in sidebar for user without access to parent

Fixes #2175


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/go-vikunja/vikunja/pull/2176 **Author:** [@kolaente](https://github.com/kolaente) **Created:** 1/28/2026 **Status:** ✅ Merged **Merged:** 1/28/2026 **Merged by:** [@kolaente](https://github.com/kolaente) **Base:** `main` ← **Head:** `fix-shared-subprojects-sidebar` --- ### 📝 Commits (3) - [`7d167e3`](https://github.com/go-vikunja/vikunja/commit/7d167e3dad8293cd8f68115ba63cf7d397f00c7b) fix(frontend): show shared sub-projects in sidebar when parent inaccessible - [`e561758`](https://github.com/go-vikunja/vikunja/commit/e5617587866b5a9902f0cef6843b724e4c05d7f2) fix(frontend): preserve parentProjectId for orphaned sub-projects when reordering - [`30892eb`](https://github.com/go-vikunja/vikunja/commit/30892eb3b97dc00d781e0dca15634a8e515b4906) refactor(frontend): use isOrphanedSubProject in notArchivedRootProjects filter ### 📊 Changes **3 files changed** (+245 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `frontend/src/components/home/ProjectsNavigation.vue` (+2 -1) ➕ `frontend/src/stores/projects.test.ts` (+223 -0) 📝 `frontend/src/stores/projects.ts` (+20 -1) </details> ### 📄 Description ## Summary - When a sub-project is shared with a user but its parent project is not accessible, the sub-project now appears in the sidebar navigation as a "virtual root" project - Prevent accidental reparenting: when reordering orphaned sub-projects in the sidebar, preserve the original `parentProjectId` instead of setting it to 0 - Added helper functions `isOrphanedSubProject` and `getEffectiveParentProjectId` to the project store - Added 13 unit tests covering the new functionality ## Test plan - [x] Unit tests pass (`pnpm test:unit src/stores/projects.test.ts`) - [x] Lint passes - [x] Manual verification with Playwright confirmed sub-project appears in sidebar for user without access to parent Fixes #2175 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-23 09:13:54 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/vikunja#9818