Skip to content

(sidebar): key remote project hiding by alias, not path alone - #237

Merged
devsuitup merged 1 commit into
mainfrom
fix/hidden-project-identity
Sep 9, 2026
Merged

(sidebar): key remote project hiding by alias, not path alone#237
devsuitup merged 1 commit into
mainfrom
fix/hidden-project-identity

Conversation

@devsuitup

Copy link
Copy Markdown
Owner

Hiding a project that lives on a remote SSH host had two defects. Neither
changes the behaviour of hiding a local project.

The cleanup deleted the wrong folder

The handler derived the cache key from the path alone:

const folder = encodeProjectPath(projectPath);
deleteCachedFolder(folder);
deleteSearchFolder(folder);

For a remote group that yields -tmp-x where the real key is
planificator::-tmp-x. Nothing matched, silently: the hidden project kept its
rows in session_cache and its entries in the search index, so its sessions
still came back in search results after being hidden.

The renderer now passes the group's folder key, which is used verbatim when
present. Without it the previous behaviour stands, so every other caller is
unaffected.

The hidden identity did not match the group identity

Sidebar groups are keyed on alias + projectPath — two hosts can hold the same
absolute path, and so can this machine. The hidden list held bare paths, so
hiding a remote /srv/x also hid a local /srv/x.

A hidden entry is now either a bare path, which keeps its legacy meaning of
hiding that path everywhere, or <alias>::<projectPath>, which hides it on
that host only. Existing entries are left as they are — they keep working.
One helper, isProjectHidden, carries the test for all three filter sites.

Verification

Mutation-pinned in both directions:

  • Reverting session-cache.js alone turns red exactly the two tests asserting
    that a host-qualified hide leaves the identically-named local group alone.
    The legacy bare-path test stays green, which is the point: that behaviour is
    unchanged.
  • Reverting the four wiring files turns red all four tests covering the folder
    key's path from the sidebar to the handler.

task check: 1153 passed, 0 failed, 8 pre-existing skips, lint 0 errors.

remove-project derived the cache/search folder key from projectPath
alone, missing the alias::path prefix a remote group's key actually
carries, so hiding a remote project left its rows and search entries
behind. Hidden-project identity was also path-only while groups are
keyed by alias+path, so hiding a remote /x also hid a local /x.
remove-project now takes the group's folder key, cleans the right
cache entry, and writes an alias-qualified hidden entry for remote
groups; the three group filters in session-cache.js now match either
form through one helper.
@devsuitup
devsuitup merged commit aba2976 into main Sep 9, 2026
10 checks passed
@devsuitup
devsuitup deleted the fix/hidden-project-identity branch September 9, 2026 11:01
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