feat: auto-scroll long chat title once on load + on tap (#612)

* feat: auto-scroll long chat title once on load + on tap

* fix: resolve state delegate + suspension compile errors in AutoScrollingTitleText

* fix: use Int scroll offset for animateScrollTo

* fix: measure real container width for title marquee (was always Infinity)

* fix: ease the title marquee scroll (FastOutSlowInEasing + glided return)

* fix: address agy review — cancel overlapping scrolls + one-shot on-load guard + clickable on box

* fix(ui): smooth out top app bar collapse transition

Use dynamic layout padding based on scroll offset to prevent blank gap at the top of content when app bar collapses.

---------

Co-authored-by: M57 <hy4ri@users.noreply.github.com>
This commit is contained in:
M57andM57 authored and GitHub committed 2026-07-16 21:45:13 +03:00
1 parent 228431d57a
commit 3030e431f2
3 files changed
+199 -4

No files matched your search

@@ -133,6 +133,7 @@ import com.m57.hermescontrol.data.ws.ConnectionStatus
import com.m57.hermescontrol.data.ws.HermesWsClient
import com.m57.hermescontrol.notification.NotificationHelper
import com.m57.hermescontrol.theme.LocalHermesStatusColors
import com.m57.hermescontrol.ui.common.AutoScrollingTitleText
import com.m57.hermescontrol.ui.common.CredentialWarningBanner
import com.m57.hermescontrol.ui.common.EmptyState
import com.m57.hermescontrol.ui.common.HermesScaffold
@@ -346,14 +347,13 @@ fun ChatScreen(
pinTopBar = true,
title = {
Row(verticalAlignment = Alignment.CenterVertically) {
Text(
AutoScrollingTitleText(
text = state.chatTitle,
modifier = Modifier.weight(1f),
style =
MaterialTheme.typography.titleMedium.copy(
fontWeight = FontWeight.Bold,
),
maxLines = 1,
overflow = TextOverflow.Ellipsis,
)
// Connection status dot — red when offline, hidden when connected
if (!state.isConnected) {