feat(#439): enrich sessions tab with dashboard features (#460)

* feat(#439): enrich sessions tab with dashboard features

Add session stats (total/active counts), per-session source icons,
active session badges, inline rename, bulk selection with toolbar,
prune old sessions dialog with configurable days threshold,
session prompt copy, single-session delete, and search highlighting.

- SessionInfo model: add source field
- New models: SessionStatsResponse, SessionRenameRequest,
  BulkDeleteRequest, PruneRequest, SessionPromptResponse
- HermesApiService: add stats, rename, bulk delete, prune, prompt endpoints
- SessionsViewModel: stats loading, bulk select, rename, delete, prune
- SessionsScreen: stats row, source icons, active border, rename inline,
  bulk mode with animated toolbar, prune dialog, search highlight
- strings.xml: new resources for all sessions UI features

* fix(#439): resolve CI compile errors

- Add explicit icon imports for Code, Language, Terminal
- Add missing clickable import
- Make highlightText non-composable by passing color params
- Fix combinedClickable usage on SessionCard

* fix(#439): address review findings

- Remove unused background import
- Add dedicated DELETE /api/sessions/{id} endpoint
- Refactor deleteSession to use dedicated endpoint
- Add confirmation dialogs for both single-session and bulk delete
- Surface statsError in the UI when stats load fails
- Add string resources for delete confirmation dialogs

* fix(#439): fix delegated property smart cast errors

- Capture statsError, errorMessage, sessionToDeleteConfirm in local vals
  before null checks to avoid 'Smart cast impossible' on delegated props

* fix(#439): remove copy and rename buttons, keep delete only

* fix(#439): restore CheckCircle import

---------

Co-authored-by: M57 <hy4ri@users.noreply.github.com>
This commit is contained in:
M57andM57 authored and GitHub committed 2026-07-03 17:55:26 +03:00
1 parent 41fde55c11
commit e2349eca22
5 files changed
+981 -77

No files matched your search

+22
View File
@@ -293,6 +293,28 @@
<string name="history_empty_desc">Previous chat sessions from Hermes will appear here.</string>
<string name="history_untitled">Untitled</string>
<string name="history_message_count">%1$d messages</string>
<string name="history_load_more">Load more sessions…</string>
<!-- Sessions Stats -->
<string name="sessions_search_placeholder">Search sessions…</string>
<string name="sessions_stat_total">Total</string>
<string name="sessions_stat_active">Active</string>
<string name="sessions_action_prune">Prune</string>
<string name="sessions_prune_title">Prune Old Sessions</string>
<string name="sessions_prune_desc">Delete sessions older than the specified number of days.</string>
<string name="sessions_prune_days_label">Days threshold</string>
<string name="sessions_prune_confirm">Prune</string>
<string name="sessions_delete_title">Delete Session?</string>
<string name="sessions_delete_message">Are you sure you want to delete \"%1$s\"? This can\'t be undone.</string>
<string name="sessions_bulk_delete_title">Delete Sessions?</string>
<string name="sessions_bulk_delete_message">Are you sure you want to delete %1$d session(s)? This can\'t be undone.</string>
<string name="sessions_action_select_all">Select All</string>
<string name="sessions_action_deselect_all">Deselect</string>
<string name="sessions_action_delete_n">Delete %1$d</string>
<string name="sessions_action_copy_prompt">Copy prompt</string>
<string name="sessions_rename_placeholder">New title…</string>
<string name="content_desc_enter_selection">Select sessions</string>
<string name="content_desc_exit_selection">Exit selection</string>
<!-- Toolsets Screen -->
<string name="toolsets_empty_title">No toolsets reported</string>