Commit Graph
63 Commits
Author SHA1 Message Date
M57 2f5a31d3cb fix(#213): scroll-to-bottom FAB now targets absolute list bottom (#245) 2026-06-21 19:16:32 +03:00
M57 bfef3613fa fix(#240): parse session_id from params root (#242)
* fix(#240): parse session_id from params root

Allows correct session mapping when opening app via notification.

* fix(#240): set MainActivity launchMode to singleTop

Prevents activity destruction and WebSocket reconnection when tapping notifications.

* fix(#240): save inline notification replies to Room database

* fix(#240): refresh current session when app comes to foreground

* fix(#240): use uppercase role string to match Mapper mapping expectations

* style: format NotificationReplyReceiver.kt to satisfy ktlint
2026-06-21 19:04:54 +03:00
M57andM57 d7ca7b084e fix(#240): notification tap race condition opens new chat instead of correct session (#241)
Two-pronged fix for the race between GatewayReady auto-creating a session
and ChatScreen LaunchedEffect calling switchSession:

1. ChatViewModel: added `initialSessionId` field. GatewayReady now checks
   this before auto-creating a session — if set, it calls switchSession
   instead. The field is set synchronously by ChatScreen via SideEffect
   during composition, before any WS event can be processed.

2. ChatScreen: LaunchedEffect now keys on state.connectionStatus and
   waits for CONNECTED before calling switchSession. This prevents the
   SESSION_RESUME message from being dropped (webSocket is null before
   onOpen, so send() is a silent no-op).

Fixes #240

Co-authored-by: M57 <hy4ri@users.noreply.github.com>
2026-06-21 18:32:29 +03:00
Hy4ri 315e1097b2 fix(#207): dynamic contrast adjustments for chat bubbles legibility 2026-06-21 12:43:15 +03:00
Hy4ri cdad31b555 refactor(#78): extract UI strings for chat, settings, connect, kanban, and skills screens 2026-06-21 11:38:33 +03:00
Hy4ri 19d44c077b chore: format codebase with ktlint 2026-06-21 10:57:18 +03:00
M57andM57 a5c070b353 ux: swap positions of new chat and search buttons in top bar (Issue #212) (#226)
Swapped the order of the Search toggle and New Chat icon buttons
in the ChatScreen top bar actions slot. Search is now on the left
(right-side outer position) which matches user expectations —
the new chat button was accidentally tapped when reaching for search.

Fixes #212

Co-authored-by: M57 <hy4ri@users.noreply.github.com>
2026-06-21 10:24:32 +03:00
M57 5e90a4d1a7 fix(chat): conditional auto-scroll on new messages (#131) (#193) 2026-06-21 00:29:26 +03:00
M57 60c4096e9c Performance improvement for chat search filtering (#188) 2026-06-21 00:00:36 +03:00
M57 045932ca8b Optimize collection creation in Navigation.kt (#180)
* ⚡ Optimize collection creation in Navigation.kt

Replaced uses of `.map { ... }.toSet()` with `.mapTo(mutableSetOf()) { ... }` in Navigation.kt. This avoids the creation of intermediate ArrayList objects, saving unnecessary memory allocations.

* ⚡ Optimize collection creation in Navigation.kt

Replaced uses of `.map { ... }.toSet()` with `.mapTo(mutableSetOf()) { ... }` in Navigation.kt. This avoids the creation of intermediate ArrayList objects, saving unnecessary memory allocations. Fixed ktlint formatting issues causing CI failure.
2026-06-20 23:44:39 +03:00
M57 838b888f9b ⚡ Optimize Set creation in ChatViewModel (#181)
Refactored `chatMessages.map { it.id }.toSet()` to `chatMessages.mapTo(HashSet(chatMessages.size)) { it.id }` to avoid creating and discarding an unnecessary intermediate ArrayList.

Benchmark results show a ~31% performance improvement on 5000 iterations for typical sizes.
2026-06-20 23:38:36 +03:00
M57 64a047f095 feat: move session history to a dedicated history screen (#175)
* feat: move session history to a dedicated history screen

Closes #159.

* fix(ci): fix ktlint style issues and unresolved NavigationController reference
2026-06-20 22:27:54 +03:00
M57 8763271056 fix(#101): collect events once in init to prevent duplicate collectors on reconnect (#169) 2026-06-20 17:32:24 +03:00
M57 74714fc1df fix(#99): gate tool and clarify events by session id to prevent leaks (#168) 2026-06-20 17:27:34 +03:00
M57 6cb4e17882 fix(#127): serialize tool event data to JSON for pretty formatting (#167)
* fix(#127): serialize tool event data to JSON for pretty formatting

* fix(test): format tool start test case to satisfy ktlint
2026-06-20 17:22:28 +03:00
M57andM57 3c5fcf504c feat(#154): add word-by-word typing effect toggle and speed slider in settings (#165)
* feat(#154): add word-by-word typing effect toggle and speed slider in settings

* fix(settings): import Slider to fix build failure

---------

Co-authored-by: M57 <hy4ri@users.noreply.github.com>
2026-06-20 17:09:42 +03:00
M57andM57 ff4649b601 fix(#130): fix compilation errors in scroll-to-bottom FAB (#166)
* fix(#130): fix compilation errors in scroll-to-bottom FAB

* fix(#130): add missing R import, context, and string resources

* fix(#130): use stringResource() instead of context.getString() for Compose lint

---------

Co-authored-by: M57 <hy4ri@users.noreply.github.com>
2026-06-20 16:45:05 +03:00
M57andM57 03cfcf8504 feat(#125): fix clarify input pre-filling and parse/route clarify_id (#156)
* feat(#125): fix clarification input pre-filling and parse/route clarify_id

* fix(#156): fix ktlint violations in ChatViewModelTest.kt

---------

Co-authored-by: M57 <hy4ri@users.noreply.github.com>
2026-06-20 16:35:58 +03:00
M57andM57 4544d88f8d feat(#130): add scroll-to-bottom FAB that appears when user scrolls up (#163)
Co-authored-by: M57 <hy4ri@users.noreply.github.com>
2026-06-20 14:12:25 +03:00
M57andM57 87392f5e57 fix(#148): prevent chatTitle being overwritten by response handlers (#161)
Co-authored-by: M57 <hy4ri@users.noreply.github.com>
2026-06-20 14:04:59 +03:00
Hy4ri cbd743a5c9 feat(#125): pre-fill clarification input and route response via clarify.respond 2026-06-20 12:51:44 +03:00
Hy4ri 8d31e37baa feat(#125): add free-form text input and option tap/long-press behavior to ClarifyDialog 2026-06-20 12:28:14 +03:00
Hy4ri 98b8588d41 fix(#146): finalize active streaming message before tool execution or new message start 2026-06-20 12:16:11 +03:00
Hy4ri 58ee32cbd1 fix(chat): remove extra closing brace in ChatViewModel.kt 2026-06-20 12:04:42 +03:00
Hy4ri 890ca05d16 fix(chat): align block indents and format multiline expressions 2026-06-20 11:18:08 +03:00
Hy4ri 5ba266cefd fix(chat): resolve compilation errors and formatting violations 2026-06-20 11:12:34 +03:00
Hy4ri d0eedf053f refactor(chat): stabilize streaming, session loading, and connection status
Optimize streaming message updates, correct session load merging, and derive connection state reactively. Add reconnection UI banner.
2026-06-20 11:04:56 +03:00
M57andM57 f5edf1569c fix(#141): notification tap opens original session instead of new session (#147)
Co-authored-by: M57 <hy4ri@users.noreply.github.com>
2026-06-20 10:10:10 +03:00
M57andM57 ae62b05e6d fix(#144): add timestamp to tool/command message bubbles (#145)
Co-authored-by: M57 <hy4ri@users.noreply.github.com>
2026-06-20 10:01:44 +03:00
M57andM57 7248f66abf feat(#136): visible copy button overlay on long-press of message bubbles (#143)
Co-authored-by: M57 <hy4ri@users.noreply.github.com>
2026-06-20 09:46:10 +03:00
M57andronia 261ee6379a feat(#132): dynamic session title with ellipsis truncation (#139)
Co-authored-by: ronia <ronia@m57>
2026-06-20 02:37:55 +03:00
M57andronia 913c6fa878 fix(#134): remove settings button from chat top bar (#138)
Co-authored-by: ronia <ronia@m57>
2026-06-20 02:28:36 +03:00
M57andronia 27ac4d72a4 fix(#133): only show status dot red when offline, hide when connected (#137)
Co-authored-by: ronia <ronia@m57>
2026-06-20 02:25:29 +03:00
M57 61d49d2355 fix(chat): don't reload cached msgs on SESSION_RESUME ack 2026-06-20 00:54:16 +03:00
M57 0fabad820d fix(chat): fix old session resume losing server session ID
* fix(chat): reset agent typing status when resuming old sessions

* fix(chat): fix race condition in websocket request registration

* test(chat): update mocks for new send/sendMessage onSent callback

* style(chat): use named onSent param instead of trailing lambda

* style(chat): fix import ordering for ConcurrentHashMap

* test(chat): fix remaining 2-arg verify calls for send()
2026-06-20 00:40:16 +03:00
M57 46b24593f9 feat(#58): implement skill markdown/yaml editor UI (#121) 2026-06-19 23:58:34 +03:00
Hy4ri 45f78443ab feat(#60): format tool output JSON for readability 2026-06-19 23:28:16 +03:00
Hy4ri 508aea8bfa fix(#79): centralize retrofit error handling with NetworkResult 2026-06-19 22:58:33 +03:00
M57andM57 43df3c6e73 fix(#64): call wsClient.disconnect() directly in onCleared() instead of launching on cancelled scope (#94)
Co-authored-by: M57 <hy4ri@users.noreply.github.com>
2026-06-19 22:18:04 +03:00
M57andM57 abcec14cb5 feat(#76): add testTag identifiers to composable elements for UI test targeting (#98)
Adds testTag modifiers to key interactive elements across the core
composables, enabling Espresso/Compose UI tests to locate them:

Navigation.kt  — 'nav_*' on bottom bar items, 'drawer_*' on drawer items
HermesScaffold — 'back_button', 'menu_button', 'refresh_button'
StateViews.kt  — 'loading_state', 'loading_spinner', 'error_retry_button',
                 'empty_state_action'
ChatScreen.kt  — 'chat_input', 'send_button', 'interrupt_button'

Co-authored-by: M57 <hy4ri@users.noreply.github.com>
2026-06-19 22:15:53 +03:00
M57andM57 cc52442be3 fix(#65): request POST_NOTIFICATIONS runtime permission on Android 13+ (#97)
* fix(#65): request POST_NOTIFICATIONS runtime permission on Android 13+

On API 33+ the manifest declaration alone is not enough — the app must
request POST_NOTIFICATIONS via ActivityResultContracts.RequestPermission
at runtime before it can show any notification, including the foreground
service notification from ChatNotificationService.

- Added rememberLauncherForActivityResult for POST_NOTIFICATIONS
- Added LaunchedEffect(Unit) that fires the permission request on first
  composition when running on API 33+ and permission is not yet granted
- The next lifecycle event (ON_STOP → NotificationHelper.start) picks
  up the permission if granted

* fix: add missing import android.os.Build for POST_NOTIFICATIONS permission check

* fix: add missing import for rememberLauncherForActivityResult (androidx.activity.compose)

---------

Co-authored-by: M57 <hy4ri@users.noreply.github.com>
2026-06-19 22:15:47 +03:00
Hy4ri 23ff263641 Fix WebSocket connection stuck on subsequent launches (Issue #45) 2026-06-19 19:56:50 +03:00
Hy4ri 80578b93d6 Render SearchBarRow inside the main Column container below the top app bar 2026-06-19 19:36:20 +03:00
Hy4ri 3734cb361f Use height-constrained CompactSearchInput inside SearchBarRow to prevent topbar height dynamic expansion 2026-06-19 19:17:55 +03:00
Hy4ri 11c5da260d Pin top app bar in ChatScreen and support pinTopBar parameter in HermesScaffold 2026-06-19 19:09:04 +03:00
Hy4ri f7132a76cd Fix chat search breaking vertical scrolling and layout (Issue #44) 2026-06-19 18:59:43 +03:00
Hy4ri 54ebe8714e fix(chat): remove double padding and zero out nested Scaffold window insets 2026-06-19 18:37:48 +03:00
Hy4ri 3a610c7c80 fix(ci): fix trailing spaces and revert visibility/padding changes 2026-06-19 18:23:17 +03:00
Hy4ri 9e3a7ab339 fix: always show bottom bar, resolve chat input double padding, and format codebase 2026-06-19 18:14:41 +03:00
M57andronia 59e0d4f817 feat: search within chat history (Issue #31) (#39)
- Add search icon toggle in top bar with animated search field
- Real-time message filtering on search query match
- Match counter with previous/next navigation arrows
- Case-insensitive text highlighting in user and assistant bubbles
- Dismiss search restores full message list
- Empty state for no search results

Co-authored-by: ronia <ronia@m57>
2026-06-19 16:35:07 +03:00