perf: optimize data loading across Config, System, Profiles, and Billing tabs (#678)

* perf(model): optimize model tab load speed with two-phase fetch and loadQuick

* perf: optimize data loading across Config, System, Profiles, and Billing tabs

* chore: remove leftover bottom nav references and unused updatePrimaryScreens

* style: fix ktlint violations in Config/Profiles/Billing ViewModels

- property/argument-list wrapping for async(...) calls
- multiline-expression wrapping for async blocks
- remove unused import in ConfigViewModel
- break long error-message string literals to stay under 120 cols

---------

Co-authored-by: M57 <Hy4ri@users.noreply.github.com>
This commit is contained in:
M57andM57 authored and GitHub committed 2026-07-22 15:03:30 +03:00
1 parent f7afbfae85
commit 1cca7764cc
7 files changed
+222 -172

No files matched your search

@@ -191,7 +191,7 @@ class NavigationControllerTest {
assertNull(NavigationController.backStack)
}
// ── primaryScreens and updatePrimaryScreens ───────────────────────────
// ── primaryScreens ────────────────────────────────────────────────────
@Test
fun `isPrimaryScreen returns true for default screens`() {
@@ -208,22 +208,4 @@ class NavigationControllerTest {
assertFalse("LogsScreen should NOT be primary", NavigationController.isPrimaryScreen(LogsScreen))
assertFalse("ConfigScreen should NOT be primary", NavigationController.isPrimaryScreen(ConfigScreen))
}
@Test
fun `updatePrimaryScreens replaces the full screen set`() {
NavigationController.updatePrimaryScreens(setOf(ProfilesScreen, SystemScreen))
assertTrue("ProfilesScreen should now be primary", NavigationController.isPrimaryScreen(ProfilesScreen))
assertTrue("SystemScreen should still be primary", NavigationController.isPrimaryScreen(SystemScreen))
// Old defaults should no longer be primary
assertFalse("ChatScreen should no longer be primary", NavigationController.isPrimaryScreen(ChatScreen))
assertFalse("SkillsScreen should no longer be primary", NavigationController.isPrimaryScreen(SkillsScreen))
assertFalse("SettingsScreen should no longer be primary", NavigationController.isPrimaryScreen(SettingsScreen))
// Reset to defaults to avoid test pollution
NavigationController.updatePrimaryScreens(
setOf(ChatScreen, SkillsScreen, CronJobsScreen, SystemScreen, SettingsScreen),
)
}
}