fix(desktop): surface pins hidden by profile scope - #75488
Open
davewilliamson wants to merge 2 commits into
Open
fix(desktop): surface pins hidden by profile scope#75488davewilliamson wants to merge 2 commits into
davewilliamson wants to merge 2 commits into
Conversation
teknium1
reviewed
Jul 31, 2026
teknium1
left a comment
Contributor
There was a problem hiding this comment.
Thanks for tracing the scoped-recents and remote-pagination paths. The current-main premise is valid: hermes_cli/web_routers/profiles.py:290-299 only returns recents for the concrete scope, so sibling durable pins are absent from the sidebar cache.
Problems
apps/desktop/src/app/chat/sidebar/index.tsx:1093hides every session section when the concrete profile has no rows or projects. The new hidden-pin notice is inside that gated subtree, so the exact empty-profile case has no+Nindicator or Show all profiles recovery action.- Cloned IDs remain ambiguous after the proposed route to All profiles.
apps/desktop/src/store/session-pin-sync.ts:75-91reconciles global, unqualified pin ids, andapps/desktop/src/app/chat/sidebar/session-index.ts:24-29overwrites direct-id collisions. A siblingpinned: falserow can therefore remove or mask the other profile's durable pin.
Suggested changes
- Include the hidden-pin count in the session-section visibility condition and cover an empty scoped profile with a sibling pin.
- Scope persisted pin identity by profile (with migration) and cover same-id cloned profiles with opposing pin states.
This is an automated hermes-sweeper review.
| @@ -312,6 +326,7 @@ export function ChatSidebar({ | |||
| // profile while scope is still ALL (persisted), the rail is hidden and they'd | |||
Contributor
There was a problem hiding this comment.
crossProfilePinCount also needs to participate in showSessionSections. Otherwise an empty concrete profile has no rendered Pinned section, so this count and its Show all profiles action are unreachable.
davewilliamson
force-pushed
the
fix/cross-profile-pinned-sessions
branch
from
August 2, 2026 05:35
c062ea5 to
b56bd71
Compare
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.
What does this PR do?
Keeps profile-scoped Desktop recents isolated while making durable pins in sibling profiles visible as a summary instead of silently making those conversations look deleted.
The sidebar returns a cheap
hidden_pinned_count, shows+Nbeside Pinned, and offers Show all profiles. It deliberately does not merge sibling-profile rows into a concrete profile's recents: cloned profiles can legitimately contain identical session IDs.Desktop pin persistence now uses profile-qualified identities, with conservative migration of legacy unqualified IDs. This lets cloned profiles sharing a session ID retain independent, opposing pin states without one profile's row overwriting or unpinning the other. Empty selected profiles also retain the hidden-pin notice and recovery action.
The Electron remote-profile merge preserves pinned backfills beyond the normal recency window and computes the same hidden-pin summary for remote configurations.
Related Issue
Related to #51685 and #74760.
This addresses the profile-scope/remote-pagination discovery path; no session-row deletion was demonstrated. It also resolves both issues from the automated review on the first revision: empty-profile notice visibility and cloned-ID pin ambiguity.
Type of Change
Changes Made
SessionDB.session_count(..., pinned_only=True)summary path.profile + lineage-root-ididentities across sidebar, tab, command-centre, drag-order, archive/delete, and sync paths.How to Test
+1plus Show all profiles without profile A's ordinary recents leaking into B.scripts/run_tests.sh tests/test_hermes_state.py tests/hermes_cli/test_web_server_sidebar_sessions.py -q— 142 passednpx vitest run --project ui— 3,298 passednpx vitest run --project electron— 935 passed, 2 skippednpm run typecheck— passed (renderer, Electron, E2E)npm run lint— 0 errors (82 existing warnings outside this change)npm run build— passeduv run ruff check hermes_state.py hermes_cli/web_routers/profiles.py tests/test_hermes_state.py tests/hermes_cli/test_web_server_sidebar_sessions.py— passedChecklist
Code
fix(scope):,feat(scope):, etc.)pytest tests/ -qand all tests passDocumentation & Housekeeping
docs/, docstrings) — N/A; no user configuration changescli-config.yaml.exampleif I added/changed config keys — N/ACONTRIBUTING.mdorAGENTS.mdif I changed architecture or workflows — N/AScreenshots / Logs
The empty-profile notice, cloned-ID indexing/migration, scoped hydration, UI interaction, and Electron pagination paths have automated regression coverage. The production Desktop build completes successfully.