Sidebar date dividers, growing pinned section, and opt-in stale-session auto-archive - #70822
Merged
Conversation
Contributor
૮ >ﻌ< ა ci reviewran on 4cd4b3e all good! |
Group the flat recents list and entered-project lanes by recency: an unlabelled head of the newest run of sessions (cut at a real break in activity, sized toward the most recent handful), then one divider per coarse calendar range — Earlier today / Yesterday / Earlier this week / Last week / Earlier this month / month / month + year. Empty ranges are skipped, the first rendered group is never labelled, branch clusters never split, and hand-ordered lists / pinned / project previews stay divider-free.
The pinned list was hard-capped at max-h-44 with an invisible scrollbar; cap it at half the viewport instead so every pin is visible.
New sessions.auto_archive / auto_archive_days config: soft-hide (never
delete) sessions with no activity for N days, aging on last activity
rather than creation so an old-but-active chat is spared. Sweeps are
throttled through state_meta and fire from CLI startup, gateway startup
+ hourly housekeeping, and the serve/dashboard backend (opportunistic
on session list + an hourly lifespan ticker), so every surface honours
one setting.
A new pinned column (declaratively migrated) exempts sessions from the
sweep; PATCH /api/sessions/{id} accepts pinned and flips the whole
compression lineage as a unit, mirroring set_session_archived.
Sessions settings gain an "Auto-archive stale chats" toggle with a configurable idle threshold, persisted to sessions.* in config.yaml so the backend sweep owns the policy. Sidebar pins (localStorage) are mirrored to the backend pinned flag at boot and on every change — pre-existing pins migrate transparently — so the sweep can never hide a pinned chat.
…cape The gateway startup maintenance block gained a maybe_auto_archive call in the same provably-off-loop __init__ site as maybe_auto_prune_and_vacuum; bump the reviewed sync-escape count from 3 to 4.
OutThisLife
force-pushed
the
bb/session-date-dividers
branch
from
July 24, 2026 15:46
d48c89f to
4cd4b3e
Compare
7 tasks
7 tasks
randlee
pushed a commit
to randlee/hermes-agent
that referenced
this pull request
Aug 11, 2026
…te-dividers Sidebar date dividers, growing pinned section, and opt-in stale-session auto-archive
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.
Summary
max-h-44with an invisible scrollbar; it now grows up to half the viewport.sessions.auto_archive/sessions.auto_archive_daysconfig (off by default): soft-hide — never delete — sessions with no activity for N days, aging on last activity rather than creation. Sweeps are state_meta-throttled and fire from CLI startup, gateway startup + hourly housekeeping, and the serve/dashboard backend (opportunistic on session list + an hourly lifespan ticker). A newpinnedcolumn (declaratively migrated) exempts sessions;PATCH /api/sessions/{id}acceptspinnedand flips the whole compression lineage as a unit. Desktop adds the settings toggle and transparently mirrors its localStorage sidebar pins to the backend flag so the sweep can never hide a pinned chat.Test plan
started_atfallback (session-date-groups.test.ts,time.test.ts)session-pin-sync.test.ts); desktop suite for touched areas (899 tests), typecheck, eslintset_session_pinnedlineage propagation,archive_stale_sessionsguards (pinned exemption, idempotence, compression tips),maybe_auto_archivethrottling, PATCHpinned, config-gated sweep on GET /api/sessions (scripts/run_tests.sh tests/test_hermes_state.py tests/hermes_cli/test_web_server.py)