feat: session source filter in Settings (checkbox-style)#74
Conversation
3e004d6 to
97648f0
Compare
rusty4444
left a comment
There was a problem hiding this comment.
Code Review Summary
Verdict: Changes Requested 🔴 (1 blocking issue, 1 suggestion)
PR: #74 — feat: session source filter in Settings (checkbox-style)
Author: @louquillio
Files changed: 3 (+97 -4)
🔴 Critical
- lib/core/services/connection_manager.dart:143-149 — The new client sends
GET /api/sessions?exclude_source=..., but the current Hermes Gateway/api/sessionshandler only readssource,limit,offset, andinclude_children; it does not implementexclude_source. As written, the Settings checkboxes are persisted locally but the session list response will be unchanged, so the feature appears to work in UI state while filtering nothing. Please either add/ship matching gateway API support forexclude_sourceor filter client-side from the returnedSession.sourcevalues until the backend supports it.
💡 Suggestions
- lib/core/services/connection_manager.dart:143-149 — Build the request with
Uriquery helpers rather than string concatenation, especially if multiple source values will be sent. That avoids future encoding issues and makes the API contract explicit (comma-separated value vs repeatedexclude_sourceparams). - lib/core/screens/settings_screen.dart:738 / session_list_screen.dart:56 — Consider scoping the persisted preference key by connection/profile if users can connect this app to multiple Hermes gateways; a global
excluded_session_sourcessetting may bleed one backend's preferences into another.
✅ Looks Good
- The UI defaults to showing all sources, preserving backwards-compatible behavior until the user changes settings.
flutter pub getcompleted, andflutter analyze --no-pub lib/core/screens/session_list_screen.dart lib/core/screens/settings_screen.dart lib/core/services/connection_manager.dartreported no issues.
Reviewed by Hermes Agent
The Android session list shows all Hermes sessions including scheduled tasks
and tool calls, making it noisy for mobile users who only want chat sessions.
Add a checkbox-style source filter in Settings. Each session origin type gets
a checkbox in plain English ("Scheduled tasks", "Signal messages", etc.):
unchecked sources are filtered client-side by Session.source.
Key design choices:
- Client-side filtering (no backend API dependency)
- Preference key scoped by connection ID (multi-gateway safe)
- Unknown source types always shown
- All sources shown by default (backward compatible)
97648f0 to
c6d4130
Compare
|
All three review items addressed in the force-push: 🔴 Critical — Backend 💡 Uri query helpers → No longer relevant since filtering is client-side — no URL params needed. 💡 Connection-scoped pref key → Implemented. Both the settings reader/writer and the session list filter use New diff: +98/-2, 2 files (connection_manager.dart unchanged). |
rusty4444
left a comment
There was a problem hiding this comment.
Code Review Summary
Verdict: Approved ✅
The updated implementation addresses the prior blocking review item by keeping filtering fully client-side and leaving connection_manager.dart unchanged.
Checked
SessionListScreen._fetchSessions()fetches all sessions, reloads the connection-scoped excluded source preference on each refresh, and filters bySession.sourcelocally.SettingsScreenstores checkbox state underexcluded_session_sources_<connection.id>, preventing cross-gateway preference bleed.- Unknown sources remain visible by default because only sources present in the excluded list are filtered.
- Existing Hermes UI structure is preserved; this is a small surgical settings/session-list change.
Validation
flutter pub get✅flutter analyze --fatal-infos✅ — no issuesflutter test --reporter=expanded✅ — 39 tests passedflutter build apk --release --split-per-abi✅ — built armeabi-v7a, arm64-v8a, and x86_64 APKs
Warnings observed are existing dependency/tooling warnings only: discontinued flutter_markdown, future Swift Package Manager/Kotlin Gradle Plugin notices.
Reviewed by Hermes Agent
Problem
The Android session list shows all Hermes sessions including scheduled tasks and developer tool calls, making it noisy for mobile users who only want their chat conversations.
Solution
Checkbox-style source filter in Settings. Each session origin type gets a checkbox (checked = visible). Unchecked sources are filtered client-side from the fetched session list by
Session.source— no backend API changes needed.Changes
2 files, +98/-2:
_SessionSourcesFilterwidget with 14 known source types, each with a plain-English label. Lives in a "Session Sources" section below Voice, above Connection. Preference key is scoped by connection ID so multi-gateway users don't bleed settings.connection_manager.dart intentionally unchanged — filtering is entirely client-side.
Design
excluded_session_sources_<connection.id>_VerboseToggleand_ThemeToggleSources covered
acp (Autonomous agents), api_server, cli, cron (Scheduled tasks), desktop, discord, gateway, mobile, signal, slack, telegram, tool, tui, whatsapp