* test(#291): add coverage for 3 critical untested components
- NavigationController dedup guard (line 45): 14 pure unit tests for
navigateTo, resetTo, goBack, primary-screen clearing, and null guards.
- NotificationReplyReceiver: 11 MockK-based tests covering the full
WS+Room+notification flow: valid reply sends WS message, persists to
Room with correct entity shape, shows replied confirmation notification,
finishes PendingResult, and gracefully handles null/blank inputs and
Room failures.
- ChatNotificationService isAppInForeground flag: 5 tests verifying
companion object toggle, volatile modifier (thread safety), default
false state, and idempotent calls.
- Fix: add @Volatile to isAppInForeground (was a plain var read from
background coroutine and written from UI thread)
Closes#291
* fix(#291): fix MockK type errors in test compilation
* fix(#291): fix test assertions and goAsync mock for CI
* fix(#291): wrap final BroadcastReceiver.goAsync() with open Kotlin wrapper
* chore: trigger CI on latest fix commit
* fix(#291): make NotificationReplyReceiver open so tests can subclass it
* fix(#291): extract buildReplyNotification() to avoid 'not mocked' framework error
NotificationCompat.Builder.build() internally calls android.app.Notification.Builder
methods (e.g. setWhen) that throw RuntimeException with 'Method setWhen in
android.app.Notification.Builder not mocked' in unit tests — the standard Android
unit test environment does not provide real framework implementations.
Extracting notification creation into an open method (same pattern as goAsyncCompat())
lets tests override it to return a mock Notification, avoiding the framework call
entirely.
* style: fix ktlint blank-line-before-declaration in test
---------
Co-authored-by: M57 <hy4ri@users.noreply.github.com>
* fix(#220): implement edit soul and set model dialogs
* fix(#211): make UI more compact and information dense
* fix(#211): make navigation drawer sidebar more compact
* feat(#252): move settings item to end of navigation drawer
* feat(#250): add bottom navigation bar display mode settings
* feat(#225): add search bar filtering to remaining screens
* fix: make bottom navigation bar display modes more compact
* fix: resolve compilation error in KanbanScreen by referencing assignedTo
* feat: add search to achievements screen and top padding for icon-only navigation bar
* fix: adjust icon-only bottom bar height and remove padding
* fix(#249): remove unused PaddingValues imports in 6 screens
---------
Co-authored-by: M57 <hy4ri@users.noreply.github.com>
* fix(#204): dynamically reset and reload chat title when creating or switching sessions
* fix(#204): refresh session list on message completion to catch auto-generated titles
* fix(#205): fix typing effect by checking actual streamed word counts and default it to enabled
* fix: correct import path of rememberSaveable to resolve build error
* fix: make typingDelayMs reactive using rememberUpdatedState in StreamingBubbleWithTypingEffect
* fix(#205): support message.delta event type to enable streaming text
* feat(#205): increase typing effect delay slider maximum to 1000ms
* fix(#205): continue animating completed streaming messages until all words are revealed
* fix(#205): revert slider delay maximum value back to 100ms
* 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
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>
Root cause: MainActivity had no onNewIntent override. When the app was
backgrounded and a notification was tapped, Android brought the existing
task to the foreground and delivered the intent via onNewIntent — but
since it wasn't overridden, the session ID from the notification was
silently dropped and the user saw the last-active session.
Fix:
1. Changed notificationSessionId from a local val to a Compose
mutableStateOf so it's observable across recompositions.
2. Added onNewIntent override that reads the session ID from the
incoming intent and updates the observable state.
3. Added FLAG_ACTIVITY_NEW_TASK | FLAG_ACTIVITY_CLEAR_TOP to the
notification PendingIntent for reliable task management.
GET /api/messaging/platforms returns a JSON object with a platforms
array inside, but the app expected a bare array. Wraps the response
in a new MessagingPlatformResponse model.
- Adds MessagingPlatformResponse.kt wrapper model
- Updates HermesApiService.kt return type + adds profile query param
- Updates ChannelsViewModel.kt to unwrap .platforms
- Updates E2eIntegrationTest.kt mock to match new response shape
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>
Extract the overly long `entryProvider` lambda out of `MainNavigation` into a separate `appEntryProvider` function to improve code readability and maintainability.
Extract logic from a single long method `cronToHumanReadable` into distinct parser helpers for shortcuts, day of month, days of week, and general time handling. Move repetitive static properties and small format helpers to the object scope.
- Extracted the hardcoded string "todo" to a `DEFAULT_COLUMN` constant in `KanbanScreen.kt` to improve code health and readability.
- Replaced the hardcoded string literal in the `viewModel.createTask` call with the new constant.
* ⚡ 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.
Replaces `.map { ... }.toSet()` with `.mapTo(mutableSetOf()) { ... }`
when resolving `bottomNavKeys` to avoid creating and discarding an
intermediate `ArrayList` during recomposition.
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.
* feat: move session history to a dedicated history screen
Closes#159.
* fix(ci): fix ktlint style issues and unresolved NavigationController reference