fix(desktop): restore pinned drag-reorder (regressed by server-side pins #186) - #189
Conversation
The server-side pin PR (#186) made $pinnedSessionIds a read-only computed atom, which dropped setPinnedSessionOrder + the sidebar's reorderPinned handler and hardcoded sortable={false} on the pinned list — losing drag-to-reorder. Restore it with a local $sidebarPinnedOrderIds order atom (mirrors $sidebarSessionOrderIds) layered over the server-synced pin SET via orderByIds: pin membership syncs across devices, visual order stays per-device. Keyed by durable lineage-root pin ids so order survives compression.
|
| Filename | Overview |
|---|---|
| apps/desktop/src/app/chat/sidebar/index.tsx | Wires local pinned order into pinned session rendering and drag reorder. |
| apps/desktop/src/store/layout.ts | Adds the persistent local pinned-order atom and guarded setter. |
| apps/desktop/src/store/layout.test.ts | Adds coverage for pinned visual order being separate from the synced pin set. |
| node_modules | Adds an absolute symlink to an author-local dependency directory. |
| apps/desktop/node_modules | Adds an absolute symlink inside the desktop workspace package. |
| apps/shared/node_modules | Adds an absolute symlink inside the shared workspace package. |
Reviews (1): Last reviewed commit: "fix(desktop): restore pinned drag-reorde..." | Re-trigger Greptile
| @@ -0,0 +1 @@ | |||
| /Users/alexgierczyk/.hermes/hermes-agent/node_modules No newline at end of file | |||
There was a problem hiding this comment.
This adds a tracked node_modules symlink to /Users/alexgierczyk/.hermes/hermes-agent/node_modules. On a fresh checkout outside that machine, the workspace starts with a broken dependency path, so npm workspace install/build tooling can fail or replace the tracked entry and leave the checkout dirty.
| @@ -0,0 +1 @@ | |||
| /Users/alexgierczyk/.hermes/hermes-agent/apps/desktop/node_modules No newline at end of file | |||
There was a problem hiding this comment.
This adds a tracked apps/desktop/node_modules symlink to an absolute path under /Users/alexgierczyk/.hermes/.... On other machines that target is missing, so desktop package scripts that resolve local dependencies can hit a broken workspace dependency directory before install or packaging runs.
| @@ -0,0 +1 @@ | |||
| /Users/alexgierczyk/.hermes/hermes-agent/apps/shared/node_modules No newline at end of file | |||
There was a problem hiding this comment.
This adds a tracked apps/shared/node_modules symlink to an author-local absolute path. Because apps/desktop depends on @hermes/shared through the workspace, fresh clones can see a broken dependency directory inside the shared package during workspace install or build resolution.
PR #189 committed three node_modules SYMLINKS (mode 120000, pointing at absolute paths on the author's machine). .gitignore already excludes node_modules/ but tracked files override the ignore. Any CI job that runs npm ci on a checkout containing them fails ENOTDIR ('npm warn reify Removing non-directory .../node_modules' then mkdir fails) — first hit by this PR because it's the first desktop-touching change since #189. Untrack all three; local installs recreate real directories.
…p search (#257) * feat(search): rank session-title matches above content hits in desktop search Titles are human-assigned intent (/title on any messaging platform, the desktop rename action), but session search had no title lane at all: - Server: /api/sessions/search only matched session IDs + FTS message content, so a session titled on Discord that scrolled out of the sidebar's loaded window was unfindable by its title from the desktop app (unless the words also appeared in message text). - Client: the sidebar filter matched title/id/preview/cwd equally with no ranking — a title hit didn't float above incidental content hits. Changes: - hermes_state.SessionDB.search_sessions_by_title(): case-insensitive LIKE substring over assigned titles, exact > prefix > substring ranking, recency tiebreak, sidebar visibility contract (subagent runs and compression children hidden), LIKE wildcards escaped. Plain scan by design — sessions is a small table, no FTS index warranted. - /api/sessions/search: title lane runs after ID matches, before FTS content matches; shares the lineage-root dedup keyspace so a title hit and a content hit on the same conversation collapse to one result. Result payload now carries for title-lane hits. - Desktop: SessionSearchResult.title threaded through searchResultToSession; sidebar merge ranks title-matching sessions first via rankTitleMatchesFirst (stable within groups). Tests: 6 new SessionDB title-search tests, endpoint title-vs-content ranking + dedup test, eventloop-affinity fake updated (11 sites), 4 new vitest cases. Full runs green: 663 pytest, 9 vitest, tsc clean. * fix(repo): remove accidentally-committed node_modules symlinks PR #189 committed three node_modules SYMLINKS (mode 120000, pointing at absolute paths on the author's machine). .gitignore already excludes node_modules/ but tracked files override the ignore. Any CI job that runs npm ci on a checkout containing them fails ENOTDIR ('npm warn reify Removing non-directory .../node_modules' then mkdir fails) — first hit by this PR because it's the first desktop-touching change since #189. Untrack all three; local installs recreate real directories. --------- Co-authored-by: Kyzcreig <9063726+Kyzcreig@users.noreply.github.com>
Ace reported pinned sessions can no longer be dragged to reorder after the pin-sync update. Root cause: PR #186 made $pinnedSessionIds a read-only computed atom and dropped setPinnedSessionOrder + the sidebar reorderPinned wiring (hardcoded sortable={false}).
Fix: local $sidebarPinnedOrderIds order atom (mirrors the existing $sidebarSessionOrderIds pattern) layered over the server-synced pin SET via orderByIds. Pin membership syncs across devices (unchanged); visual drag-order is per-device local — reordering on the MacBook won't reshuffle the Studio. Keyed by durable lineage-root pin ids so order survives compression. +test (order independent of pin set). typecheck+eslint+4 layout tests green. Reviewed by Apollo.