fix: tab reloads actually reload — kanban switch spam, plugins/skills refresh, ws mint (#897)

- ws: ticket-mint response body was read on the calling (main) thread —
  the socket read threw NetworkOnMainThreadException, the mint failed,
  and the kanban events stream never connected (board stuck Offline).
  execute() + body read now run entirely on Dispatchers.IO; same fix in
  DashboardSessionTokenRefresher.fetch (loopback mint path).
- kanban: re-selecting the already-active board reloads data and
  reconnects events WITHOUT the redundant POST /boards/{id}/switch that
  refresh fired on every tap.
- plugins: top-bar Refresh + pull-to-refresh wired through HermesScaffold
  (previously no reload control at all).
- skills: Refresh icon now does a plain GET reload; the heavy hub-update
  POST moved to the cloud icon so refresh is no longer disguised as update.
- test: mock the 3-arg Log.w overload (catch now logs the full stack).

Co-authored-by: M57 <hy4ri@users.noreply.github.com>
This commit is contained in:
M57andM57 authored and GitHub committed 2026-08-13 14:27:36 +03:00
1 parent 9c7bb8635f
commit 90c1e8dc5f
6 files changed
+131 -106

No files matched your search

@@ -28,7 +28,6 @@ import androidx.compose.material.icons.filled.CloudDownload
import androidx.compose.material.icons.filled.CloudOff
import androidx.compose.material.icons.filled.Edit
import androidx.compose.material.icons.filled.Extension
import androidx.compose.material.icons.filled.Refresh
import androidx.compose.material.icons.filled.Save
import androidx.compose.material.icons.filled.Search
import androidx.compose.material.icons.filled.Shield
@@ -113,11 +112,19 @@ fun SkillsScreen(
modifier = modifier,
title = { Text(stringResource(R.string.skills_screen_title)) },
navigationIcon = NavIcon.Menu(onOpen = onOpenDrawer),
isRefreshing = state.isLoading,
onRefresh = {
if (state.viewMode == SkillsViewMode.INSTALLED) {
viewModel.loadSkills()
} else {
viewModel.loadHubSources()
}
},
actions = {
if (state.viewMode == SkillsViewMode.INSTALLED) {
IconButton(onClick = { viewModel.updateSkillsFromHub() }) {
Icon(
imageVector = Icons.Filled.Refresh,
imageVector = Icons.Filled.CloudDownload,
contentDescription = stringResource(R.string.content_desc_update_skills_hub),
)
}