feat(dashboard): cross-profile sessions, profile-aware status, offline platforms, time filter - #31427
feat(dashboard): cross-profile sessions, profile-aware status, offline platforms, time filter#3142702356abc wants to merge 2 commits into
Conversation
Why this approachRe: #10674 — this PR follows a single-process with request-scoped profile context model rather than a supervisor + worker architecture. Three reasons:
Isolation mechanismUnlike the cron implementation, which mutates global module variables under a lock, this PR passes |
…based filtering
- gateway/status.py: read_runtime_status() accepts optional status_path for
reading other profiles' gateway_state.json
- hermes_cli/profiles.py: ProfileInfo gains gateway_state, gateway_platforms,
gateway_updated_at; add _read_profile_runtime_status()
- hermes_cli/web_server.py:
- get_status(profile): profile-aware status with aggregate mode (all),
specific profile mode, and backward-compatible default mode
- _get_status_for_profile_dir(): read status from arbitrary profile dir
- get_sessions(profile, since): cross-profile session listing with
time-based filtering (7D/30D/90D/ALL)
- search_sessions(profile, since): cross-profile session search with
time-based filtering
- _list_sessions_for_profile(): per-profile session read using
SessionDB(db_path=...) instead of os.environ mutation (fixes caching bug)
- _search_sessions_for_profile(): per-profile search with since filter
- _session_profile_home() / _annotate_session(): profile resolution helpers
- _profile_to_dict(): expose gateway fields to frontend
Co-Authored-By: 02356abc <198679067+02356abc@users.noreply.github.com>
…platform display
- web/src/lib/api.ts:
- getStatus(profile): pass profile to /api/status endpoint
- getSessions(profile, since): cross-profile + time filter params
- searchSessions(profile): cross-profile search param
- SessionInfo / SessionSearchResult: add profile, profile_name,
hermes_home, is_default_profile fields
- web/src/components/PlatformsCard.tsx: add offline state mapping
(outline badge, WifiOff icon, muted-foreground color)
- web/src/pages/SessionsPage.tsx:
- Profile dropdown selector (All profiles / specific profile)
- Time filter buttons (ALL / 7D / 30D / 90D), default 30D
- Profile badges on session rows
- Pass selectedProfile to getStatus, getSessions, searchSessions
- Filter placement in page content area (below title)
Co-Authored-By: 02356abc <198679067+02356abc@users.noreply.github.com>
cdae7c6 to
8f2fa63
Compare
|
Closing to re-evaluate approach. Will reopen or create a new PR after further refinement. |
Summary
This PR adds multi-profile support to the Hermes web dashboard:
started_at.Backend changes
gateway/status.py:read_runtime_status()accepts optionalstatus_pathfor reading other profiles' state.hermes_cli/profiles.py:ProfileInfogainsgateway_state,gateway_platforms,gateway_updated_at.hermes_cli/web_server.py:get_sessions(),search_sessions()acceptprofileandsinceparameters.get_status()acceptsprofileparameter for profile-specific status.SessionDBpath caching bug by passingdb_pathdirectly.Frontend changes
web/src/lib/api.ts:getSessions()andsearchSessions()acceptprofileandsince.web/src/pages/SessionsPage.tsx: Profile dropdown + time filter buttons moved to page content area.Test plan
COUNT(*) WHERE started_at >= ?🤖 Generated with Claude Code