fix: hide phantom projects from showing in the frontend when deleted#3136
Merged
Conversation
Member
Author
This stack of pull requests is managed by Graphite. Learn more about stacking. |
Contributor
|
Container images for this PR have been built successfully!
Built from commit 69fbdf8 |
github-actions Bot
added a commit
to ShobuPrime/home-assistant-apps
that referenced
this pull request
Jul 5, 2026
## Arcane Docker Manager Update This automated PR updates Arcane from `2.3.1` to `2.3.2`. ### Changelog ### Bug fixes * dialog now owning there own close states, cause mutiple to show at one time([d253fc5](getarcaneapp/arcane@d253fc5) by `kmendell`) * hide phantom projects from showing in the frontend when deleted ([#3136](getarcaneapp/arcane#3136) by `kmendell`) * keep modals and menus opaque in dark mode when Glass & Blur is off ([#3139](getarcaneapp/arcane#3139) by `othyn`) * nested compose files discovery permission issues ([#3096](getarcaneapp/arcane#3096) by `kmendell`) * ntfy tls regression, image update notifcation flag not be recognized ([#3143](getarcaneapp/arcane#3143) by `kmendell`) * notification sending rework for reliability ([#3144](getarcaneapp/arcane#3144) by `kmendell`) * use explicit context for notifications([6987b5e](getarcaneapp/arcane@6987b5e ### Changes - Updated `config.yaml` version - Updated `build.yaml` ARCANE_VERSION - Updated `Dockerfile` ARCANE_VERSION - Updated documentation files - Updated CHANGELOG.md ### Release Notes Full release notes: https://github.com/getarcaneapp/arcane/releases/tag/v2.3.2 --- This PR was automatically generated by the Update Arcane workflow Auto-merged by GitHub Actions
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Checklist
mainbranchm.*())What This PR Implements
Fixes:
Changes Made
Testing Done
AI Tool Used (if applicable)
Additional Context
Disclaimer Greptiles Reviews use AI, make sure to check over its work.
To better help train Greptile on our codebase, if the comment is useful and valid Like the comment, if its not helpful or invalid Dislike
To have Greptile Re-Review the changes, mention
greptileai.Greptile Summary
This PR fixes phantom project re-imports that occurred when a project was deleted without removing its files — the original directory remained on disk and was picked back up by the filesystem watcher. It does this by renaming deleted-but-preserved project directories to a
.arcane-trash-*sibling and teaching the discovery walker to skip that prefix.project_service.go): after the DB row is successfully deleted, the project directory is atomically renamed to.arcane-trash-<name>-<unix>so discovery never re-imports it. The rename is correctly placed after the DB delete, avoiding the stale-path inconsistency that would have occurred if the rename had been done first.discovery.go): the walker now skips.arcane-trash-*directories with a targeted prefix check, leaving legitimate dot-named user directories (e.g..hidden) visible — confirmed by the new test.CleanupOrphanedSyncsOnStartupsweeps sync records whose environment no longer exists;DeleteEnvironmentnow clears associated syncs and project references inside a single transaction;RegisterAutoSyncJobsOnStartupfilters out orphan-backed syncs via a subquery.Confidence Score: 5/5
Safe to merge. The quarantine rename is correctly ordered after the DB delete, the discovery filter is surgical, and the GitOps sync cleanup is wrapped in a transaction.
All three functional changes (soft-delete quarantine, discovery filter, and orphaned-sync cleanup) are logically sound, well-tested, and consistent with the existing codebase patterns. No new unsafe orderings or data-loss paths are introduced.
No files require special attention.
Comments Outside Diff (1)
backend/internal/services/project_service.go, line 2348-2365 (link)The rename to
.arcane-trash-*at line 2354 happens before the database row is deleted at line 2363. Ifs.db.Delete(proj)fails, the project record survives in the DB withPathpointing to the original directory (which no longer exists there), while the actual files sit in the trash path. The project will still appear in the frontend but every operation that touchesproj.Pathwill break. Previously, withremoveFiles=false, nothing was moved so a DB failure left both sides consistent. This PR introduces the inconsistency.Move the quarantine block to after
s.db.Deletesucceeds. If the quarantine fails after a successful DB delete it can be logged as a warning instead of returned as an error — the project is already gone from the DB and a failed rename is less harmful than leaving the DB record with a stale path.Prompt To Fix With AI
Reviews (2): Last reviewed commit: "fix: hide phantom projects from showing ..." | Re-trigger Greptile