You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This makes Manual session ordering reachable and safe across Hermes Desktop sidebar views. It preserves existing single profile behavior while adding connection and profile scoped persistence plus strict drag payload validation for supported grouped views.
Related Issue
Addresses #87994. This pull request covers Manual mode reachability and safe session ordering. It does not add independent profile group order customization or redesign drag feedback.
Type of Change
Bug fix
New feature
Security fix
Documentation update
Tests
Refactor
New skill
Changes Made
Always expose Manual ordering in the sidebar filter menu.
Route Manual mode to a compatible reorder surface.
Persist manual session order by connection and profile, with migration from the legacy global order.
Preserve hidden, filtered, pinned, paginated, and not yet loaded order slots during reconciliation.
Accept only the exact rendered root session identifiers and reject duplicate, incomplete, foreign, or stale drag payloads.
Keep branch children attached to their root sessions and nonsortable.
Cover archived sessions through the authoritative active session pool.
PR #84984 covers profile group ordering, which is a separate part of #87994. PR #43661 and PR #70223 are adjacent work around flat lists, pinned rows, and drag behavior. They do not provide this connection and profile scoped persistence or strict payload contract.
How to Test
From apps/desktop, run the six focused sidebar and layout test files listed in this pull request.
Run the complete UI suite, Desktop platform suite, Desktop packaging suite, and plugin tests.
Run type checking, lint, Prettier, and the production build.
Verification on Debian 13 Linux x86_64:
Focused sidebar and layout verification passed 67 tests.
The complete UI suite passed.
The Desktop platform suite passed after installing the Electron binary. An earlier harness run used npm ci --ignore-scripts, which intentionally skipped the Electron installer and produced two import errors; this was dependency provenance, not a source failure.
The Desktop packaging suite and plugin tests passed.
Type checking, lint, Prettier, and the production build passed.
The build stamp records exact candidate 5ddcfb210bf27139e8322f11301dc712e62e5a90 with dirty: false.
Manual Desktop drag interaction was not recorded.
Checklist
Code
I read the Contributing Guide.
The commits follow Conventional Commits.
I searched for existing pull requests and disclosed adjacent work.
This pull request contains only Manual ordering changes.
Governing Desktop tests pass on the exact candidate.
Regression tests cover the changed behavior.
Automated verification ran on Debian 13 Linux x86_64.
Documentation & Housekeeping
User documentation is not affected.
cli-config.yaml.example is not affected.
Architecture and contributor workflow documentation are not affected.
Cross platform impact was considered. The implementation uses existing React, TypeScript, state, and drag contracts.
Tool descriptions and schemas are not affected.
Screenshots / Logs
No screenshot is included because manual Desktop drag interaction was not recorded. Automated component coverage verifies ordering, persistence scope, stale payload rejection, and nonsortable child rows.
AI code review — automated review for reference; please use your judgment.
apps/desktop/src/store/layout.ts:setSidebarOrdering — UX nit worth weighing: leaving Manual mode clears $sidebarSessionOrderIdsByProfile entirely, so one accidental sort-key click destroys every profile's hand-picked order at once — a much bigger blast radius than the legacy single-list version had. Suggestion: retain per-profile orders while inactive and only clear when the user re-enters and drags (or add an explicit reset), since the storage cost of keeping them is trivial.
Overall — Positive: this is careful state engineering for a deceptively fiddly feature. Profile-keyed orders with normalized keys solve bare-id collisions between profiles; the legacy global order seeds each profile exactly once as a migration; reorderSubset/reorderProfileSessionOrder fail closed by reference identity on duplicates, foreign ids, stale rendered snapshots, and missing sortable ids — every one of those failure shapes has a test, including the filter→drag→clear-filter and first-page-drag→load-tail lifecycles that usually regress silently. The Manual-in-all-profiles grouping auto-switch (and its scoped-project fallback to date) is also pinned by tests.
Thank you. I implemented this in commit 7c16ffcdc100eb047cd9d3bd1d7c61e3f828b7c9.
Switching to another sort mode now leaves $sidebarSessionOrderIdsByProfile intact, so returning to Manual restores each profile's saved order. The legacy global migration list is still cleared, and Reset remains the explicit destructive path. I also added regression coverage for multiple profiles, legacy state, mode switching, and reset behavior.
Verification passed with 68 focused tests, all Desktop TypeScript configurations, ESLint, Prettier, and the diff check.
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
comp/desktopElectron desktop app (apps/desktop/*)P3Low — cosmetic, nice to havetype/bugSomething isn't working
3 participants
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?
This makes Manual session ordering reachable and safe across Hermes Desktop sidebar views. It preserves existing single profile behavior while adding connection and profile scoped persistence plus strict drag payload validation for supported grouped views.
Related Issue
Addresses #87994. This pull request covers Manual mode reachability and safe session ordering. It does not add independent profile group order customization or redesign drag feedback.
Type of Change
Changes Made
PR #84984 covers profile group ordering, which is a separate part of #87994. PR #43661 and PR #70223 are adjacent work around flat lists, pinned rows, and drag behavior. They do not provide this connection and profile scoped persistence or strict payload contract.
How to Test
apps/desktop, run the six focused sidebar and layout test files listed in this pull request.Verification on Debian 13 Linux x86_64:
npm ci --ignore-scripts, which intentionally skipped the Electron installer and produced two import errors; this was dependency provenance, not a source failure.5ddcfb210bf27139e8322f11301dc712e62e5a90withdirty: false.Checklist
Code
Documentation & Housekeeping
cli-config.yaml.exampleis not affected.Screenshots / Logs
No screenshot is included because manual Desktop drag interaction was not recorded. Automated component coverage verifies ordering, persistence scope, stale payload rejection, and nonsortable child rows.