0b72827682
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>
1 line
4.7 KiB
Plaintext
1 line
4.7 KiB
Plaintext
[{"key":"META-INF/MANIFEST.MF","name":"META-INF/MANIFEST.MF","size":627,"crc":-527225597},{"key":"javax/annotation/CheckForNull.class","name":"javax/annotation/CheckForNull.class","size":518,"crc":494455401},{"key":"javax/annotation/CheckForSigned.class","name":"javax/annotation/CheckForSigned.class","size":526,"crc":-922402916},{"key":"javax/annotation/CheckReturnValue.class","name":"javax/annotation/CheckReturnValue.class","size":607,"crc":-1898020793},{"key":"javax/annotation/concurrent/GuardedBy.class","name":"javax/annotation/concurrent/GuardedBy.class","size":441,"crc":-228787957},{"key":"javax/annotation/concurrent/Immutable.class","name":"javax/annotation/concurrent/Immutable.class","size":435,"crc":2007743002},{"key":"javax/annotation/concurrent/NotThreadSafe.class","name":"javax/annotation/concurrent/NotThreadSafe.class","size":443,"crc":1921721169},{"key":"javax/annotation/concurrent/ThreadSafe.class","name":"javax/annotation/concurrent/ThreadSafe.class","size":437,"crc":2078530901},{"key":"javax/annotation/Detainted.class","name":"javax/annotation/Detainted.class","size":515,"crc":1268316728},{"key":"javax/annotation/MatchesPattern$Checker.class","name":"javax/annotation/MatchesPattern$Checker.class","size":1484,"crc":-277905724},{"key":"javax/annotation/MatchesPattern.class","name":"javax/annotation/MatchesPattern.class","size":643,"crc":-2142883496},{"key":"javax/annotation/meta/Exclusive.class","name":"javax/annotation/meta/Exclusive.class","size":341,"crc":1615223597},{"key":"javax/annotation/meta/Exhaustive.class","name":"javax/annotation/meta/Exhaustive.class","size":343,"crc":-1378103656},{"key":"javax/annotation/meta/TypeQualifier.class","name":"javax/annotation/meta/TypeQualifier.class","size":590,"crc":697759296},{"key":"javax/annotation/meta/TypeQualifierDefault.class","name":"javax/annotation/meta/TypeQualifierDefault.class","size":541,"crc":1011810305},{"key":"javax/annotation/meta/TypeQualifierNickname.class","name":"javax/annotation/meta/TypeQualifierNickname.class","size":369,"crc":641828811},{"key":"javax/annotation/meta/TypeQualifierValidator.class","name":"javax/annotation/meta/TypeQualifierValidator.class","size":520,"crc":1767865458},{"key":"javax/annotation/meta/When.class","name":"javax/annotation/meta/When.class","size":1075,"crc":-719279898},{"key":"javax/annotation/Nonnegative$Checker.class","name":"javax/annotation/Nonnegative$Checker.class","size":1528,"crc":-1220606476},{"key":"javax/annotation/Nonnegative.class","name":"javax/annotation/Nonnegative.class","size":627,"crc":2101765137},{"key":"javax/annotation/Nonnull$Checker.class","name":"javax/annotation/Nonnull$Checker.class","size":1064,"crc":1828715204},{"key":"javax/annotation/Nonnull.class","name":"javax/annotation/Nonnull.class","size":574,"crc":1454166174},{"key":"javax/annotation/Nullable.class","name":"javax/annotation/Nullable.class","size":512,"crc":746386018},{"key":"javax/annotation/OverridingMethodsMustInvokeSuper.class","name":"javax/annotation/OverridingMethodsMustInvokeSuper.class","size":474,"crc":552659504},{"key":"javax/annotation/ParametersAreNonnullByDefault.class","name":"javax/annotation/ParametersAreNonnullByDefault.class","size":519,"crc":667248111},{"key":"javax/annotation/ParametersAreNullableByDefault.class","name":"javax/annotation/ParametersAreNullableByDefault.class","size":522,"crc":1661361365},{"key":"javax/annotation/PropertyKey.class","name":"javax/annotation/PropertyKey.class","size":503,"crc":-293976347},{"key":"javax/annotation/RegEx$Checker.class","name":"javax/annotation/RegEx$Checker.class","size":1306,"crc":679028821},{"key":"javax/annotation/RegEx.class","name":"javax/annotation/RegEx.class","size":659,"crc":-1597889481},{"key":"javax/annotation/Signed.class","name":"javax/annotation/Signed.class","size":512,"crc":517636379},{"key":"javax/annotation/Syntax.class","name":"javax/annotation/Syntax.class","size":571,"crc":-889704266},{"key":"javax/annotation/Tainted.class","name":"javax/annotation/Tainted.class","size":510,"crc":1823738814},{"key":"javax/annotation/Untainted.class","name":"javax/annotation/Untainted.class","size":499,"crc":-1914956567},{"key":"javax/annotation/WillClose.class","name":"javax/annotation/WillClose.class","size":336,"crc":-113680345},{"key":"javax/annotation/WillCloseWhenClosed.class","name":"javax/annotation/WillCloseWhenClosed.class","size":356,"crc":-436285497},{"key":"javax/annotation/WillNotClose.class","name":"javax/annotation/WillNotClose.class","size":342,"crc":1441664687},{"key":"META-INF/maven/com.google.code.findbugs/jsr305/pom.xml","name":"META-INF/maven/com.google.code.findbugs/jsr305/pom.xml","size":4286,"crc":845278730},{"key":"META-INF/maven/com.google.code.findbugs/jsr305/pom.properties","name":"META-INF/maven/com.google.code.findbugs/jsr305/pom.properties","size":121,"crc":-1067907647}] |