fix(android): unblock first device test — auth contrast + dynamic base URL
Two regressions surfaced on the first real device run.
1. Contrast on ServerUrl + Login screens: both wrapped content in a
bare Box(fillMaxSize), no Surface. The obsidian background never
painted (rendered against the system root view's default),
LocalContentColor cascade fell through to Material's default
contentColor — the screens rendered as near-invisible dark text
on dark grey. Wrap both in Surface(color = background, contentColor
= onBackground) so the bg paints AND the M3 contentColor pipeline
flows correctly through OutlinedTextField labels / cursor /
placeholders + the Button content tint.
2. The bigger bug: NetworkModule.provideRetrofit read
authStore.baseUrl.value ONCE at Retrofit creation. AuthStore loads
from Room async, so at injection time the value was still the
localhost:8080 placeholder. Result: even after the user typed
their real server URL on the ServerUrl screen, every API call
kept hitting localhost:8080 ("Failed to connect to
localhost/127.0.0.1:8080" on the login attempt). The pre-fix
NetworkModule comment even acknowledged it — *"Server-URL
changes require an app relaunch"*.
Fix: per-request rewrite. New BaseUrlInterceptor reads the live
AuthStore.baseUrl.value on every request and rewrites
scheme/host/port of the outgoing URL. Retrofit now keeps a
placeholder baseUrl ("http://placeholder.invalid/") solely to
satisfy its parser; the actual target host is dynamic. Order in
OkHttp chain: BaseUrl first → Auth → logging, so the cookie
interceptor sees the final URL.
New:
- api/BaseUrlInterceptor.kt — per-request scheme/host/port rewrite
from AuthStore.baseUrl. Falls through to the original request
when the stored URL is unparseable.
Modified:
- api/NetworkModule.kt — adds BaseUrlInterceptor to the OkHttp
chain. Drops the AuthStore dependency from provideRetrofit;
swaps baseUrl for the placeholder.
- auth/ui/ServerUrlScreen.kt — Box → Surface wrap.
- auth/ui/LoginScreen.kt — Box → Surface wrap.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
BIN
Binary file not shown.
+1
@@ -0,0 +1 @@
|
||||
-keep,allowobfuscation,allowshrinking class com.fabledsword.minstrel.admin.ui.AdminLandingViewModel
|
||||
+1
@@ -0,0 +1 @@
|
||||
-keep,allowobfuscation,allowshrinking class com.fabledsword.minstrel.admin.ui.AdminLandingViewModel
|
||||
+1
@@ -0,0 +1 @@
|
||||
-keep,allowobfuscation,allowshrinking class com.fabledsword.minstrel.admin.ui.AdminQuarantineViewModel
|
||||
+1
@@ -0,0 +1 @@
|
||||
-keep,allowobfuscation,allowshrinking class com.fabledsword.minstrel.admin.ui.AdminQuarantineViewModel
|
||||
+1
@@ -0,0 +1 @@
|
||||
-keep,allowobfuscation,allowshrinking class com.fabledsword.minstrel.admin.ui.AdminRequestsViewModel
|
||||
+1
@@ -0,0 +1 @@
|
||||
-keep,allowobfuscation,allowshrinking class com.fabledsword.minstrel.admin.ui.AdminRequestsViewModel
|
||||
+1
@@ -0,0 +1 @@
|
||||
-keep,allowobfuscation,allowshrinking class com.fabledsword.minstrel.admin.ui.AdminUsersViewModel
|
||||
+1
@@ -0,0 +1 @@
|
||||
-keep,allowobfuscation,allowshrinking class com.fabledsword.minstrel.admin.ui.AdminUsersViewModel
|
||||
+1
@@ -0,0 +1 @@
|
||||
-keep,allowobfuscation,allowshrinking class com.fabledsword.minstrel.auth.ui.AuthGateViewModel
|
||||
+1
@@ -0,0 +1 @@
|
||||
-keep,allowobfuscation,allowshrinking class com.fabledsword.minstrel.auth.ui.AuthGateViewModel
|
||||
+1
@@ -0,0 +1 @@
|
||||
-keep,allowobfuscation,allowshrinking class com.fabledsword.minstrel.auth.ui.LoginViewModel
|
||||
+1
@@ -0,0 +1 @@
|
||||
-keep,allowobfuscation,allowshrinking class com.fabledsword.minstrel.auth.ui.LoginViewModel
|
||||
+1
@@ -0,0 +1 @@
|
||||
-keep,allowobfuscation,allowshrinking class com.fabledsword.minstrel.auth.ui.ServerUrlViewModel
|
||||
+1
@@ -0,0 +1 @@
|
||||
-keep,allowobfuscation,allowshrinking class com.fabledsword.minstrel.auth.ui.ServerUrlViewModel
|
||||
+1
@@ -0,0 +1 @@
|
||||
-keep,allowobfuscation,allowshrinking class com.fabledsword.minstrel.discover.ui.DiscoverViewModel
|
||||
+1
@@ -0,0 +1 @@
|
||||
-keep,allowobfuscation,allowshrinking class com.fabledsword.minstrel.discover.ui.DiscoverViewModel
|
||||
+1
@@ -0,0 +1 @@
|
||||
-keep,allowobfuscation,allowshrinking class com.fabledsword.minstrel.history.ui.HistoryTabViewModel
|
||||
+1
@@ -0,0 +1 @@
|
||||
-keep,allowobfuscation,allowshrinking class com.fabledsword.minstrel.history.ui.HistoryTabViewModel
|
||||
+1
@@ -0,0 +1 @@
|
||||
-keep,allowobfuscation,allowshrinking class com.fabledsword.minstrel.home.ui.HomeViewModel
|
||||
+1
@@ -0,0 +1 @@
|
||||
-keep,allowobfuscation,allowshrinking class com.fabledsword.minstrel.home.ui.HomeViewModel
|
||||
+1
@@ -0,0 +1 @@
|
||||
-keep,allowobfuscation,allowshrinking class com.fabledsword.minstrel.library.ui.AlbumDetailViewModel
|
||||
+1
@@ -0,0 +1 @@
|
||||
-keep,allowobfuscation,allowshrinking class com.fabledsword.minstrel.library.ui.AlbumDetailViewModel
|
||||
+1
@@ -0,0 +1 @@
|
||||
-keep,allowobfuscation,allowshrinking class com.fabledsword.minstrel.library.ui.ArtistDetailViewModel
|
||||
+1
@@ -0,0 +1 @@
|
||||
-keep,allowobfuscation,allowshrinking class com.fabledsword.minstrel.library.ui.ArtistDetailViewModel
|
||||
+1
@@ -0,0 +1 @@
|
||||
-keep,allowobfuscation,allowshrinking class com.fabledsword.minstrel.library.ui.LibraryViewModel
|
||||
+1
@@ -0,0 +1 @@
|
||||
-keep,allowobfuscation,allowshrinking class com.fabledsword.minstrel.library.ui.LibraryViewModel
|
||||
+1
@@ -0,0 +1 @@
|
||||
-keep,allowobfuscation,allowshrinking class com.fabledsword.minstrel.likes.ui.LikedTabViewModel
|
||||
+1
@@ -0,0 +1 @@
|
||||
-keep,allowobfuscation,allowshrinking class com.fabledsword.minstrel.likes.ui.LikedTabViewModel
|
||||
+1
@@ -0,0 +1 @@
|
||||
-keep,allowobfuscation,allowshrinking class com.fabledsword.minstrel.player.ui.PlayerViewModel
|
||||
+1
@@ -0,0 +1 @@
|
||||
-keep,allowobfuscation,allowshrinking class com.fabledsword.minstrel.player.ui.PlayerViewModel
|
||||
+1
@@ -0,0 +1 @@
|
||||
-keep,allowobfuscation,allowshrinking class com.fabledsword.minstrel.playlists.ui.PlaylistDetailViewModel
|
||||
+1
@@ -0,0 +1 @@
|
||||
-keep,allowobfuscation,allowshrinking class com.fabledsword.minstrel.playlists.ui.PlaylistDetailViewModel
|
||||
+1
@@ -0,0 +1 @@
|
||||
-keep,allowobfuscation,allowshrinking class com.fabledsword.minstrel.playlists.ui.PlaylistsListViewModel
|
||||
+1
@@ -0,0 +1 @@
|
||||
-keep,allowobfuscation,allowshrinking class com.fabledsword.minstrel.playlists.ui.PlaylistsListViewModel
|
||||
+1
@@ -0,0 +1 @@
|
||||
-keep,allowobfuscation,allowshrinking class com.fabledsword.minstrel.quarantine.ui.HiddenTabViewModel
|
||||
+1
@@ -0,0 +1 @@
|
||||
-keep,allowobfuscation,allowshrinking class com.fabledsword.minstrel.quarantine.ui.HiddenTabViewModel
|
||||
+1
@@ -0,0 +1 @@
|
||||
-keep,allowobfuscation,allowshrinking class com.fabledsword.minstrel.requests.ui.RequestsViewModel
|
||||
+1
@@ -0,0 +1 @@
|
||||
-keep,allowobfuscation,allowshrinking class com.fabledsword.minstrel.requests.ui.RequestsViewModel
|
||||
+1
@@ -0,0 +1 @@
|
||||
-keep,allowobfuscation,allowshrinking class com.fabledsword.minstrel.search.ui.SearchViewModel
|
||||
+1
@@ -0,0 +1 @@
|
||||
-keep,allowobfuscation,allowshrinking class com.fabledsword.minstrel.search.ui.SearchViewModel
|
||||
+1
@@ -0,0 +1 @@
|
||||
-keep,allowobfuscation,allowshrinking class com.fabledsword.minstrel.settings.ui.SettingsViewModel
|
||||
+1
@@ -0,0 +1 @@
|
||||
-keep,allowobfuscation,allowshrinking class com.fabledsword.minstrel.settings.ui.SettingsViewModel
|
||||
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user