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
5.2 KiB
Plaintext
1 line
5.2 KiB
Plaintext
[{"key":"androidx/lifecycle/FlowExtKt$flowWithLifecycle$1$1$1.class","name":"androidx/lifecycle/FlowExtKt$flowWithLifecycle$1$1$1.class","size":1694,"crc":1051006205},{"key":"androidx/lifecycle/FlowExtKt$flowWithLifecycle$1$1.class","name":"androidx/lifecycle/FlowExtKt$flowWithLifecycle$1$1.class","size":3701,"crc":1101803797},{"key":"androidx/lifecycle/FlowExtKt$flowWithLifecycle$1.class","name":"androidx/lifecycle/FlowExtKt$flowWithLifecycle$1.class","size":4531,"crc":413265924},{"key":"androidx/lifecycle/FlowExtKt.class","name":"androidx/lifecycle/FlowExtKt.class","size":2110,"crc":-301265195},{"key":"androidx/lifecycle/LifecycleDestroyedException.class","name":"androidx/lifecycle/LifecycleDestroyedException.class","size":710,"crc":-851701305},{"key":"androidx/lifecycle/LifecycleRegistry$Companion.class","name":"androidx/lifecycle/LifecycleRegistry$Companion.class","size":2212,"crc":-2112437256},{"key":"androidx/lifecycle/LifecycleRegistry$ObserverWithState.class","name":"androidx/lifecycle/LifecycleRegistry$ObserverWithState.class","size":3230,"crc":2048658324},{"key":"androidx/lifecycle/LifecycleRegistry.class","name":"androidx/lifecycle/LifecycleRegistry.class","size":12663,"crc":-198935706},{"key":"androidx/lifecycle/LifecycleRegistryKt.class","name":"androidx/lifecycle/LifecycleRegistryKt.class","size":1835,"crc":-1364796354},{"key":"androidx/lifecycle/LifecycleRegistry_androidKt.class","name":"androidx/lifecycle/LifecycleRegistry_androidKt.class","size":693,"crc":-186372083},{"key":"androidx/lifecycle/RepeatOnLifecycleKt$repeatOnLifecycle$3$1$1$1$1$1$1.class","name":"androidx/lifecycle/RepeatOnLifecycleKt$repeatOnLifecycle$3$1$1$1$1$1$1.class","size":3705,"crc":-380802520},{"key":"androidx/lifecycle/RepeatOnLifecycleKt$repeatOnLifecycle$3$1$1$1$1.class","name":"androidx/lifecycle/RepeatOnLifecycleKt$repeatOnLifecycle$3$1$1$1$1.class","size":5902,"crc":-724306281},{"key":"androidx/lifecycle/RepeatOnLifecycleKt$repeatOnLifecycle$3$1$1$1.class","name":"androidx/lifecycle/RepeatOnLifecycleKt$repeatOnLifecycle$3$1$1$1.class","size":3989,"crc":263717517},{"key":"androidx/lifecycle/RepeatOnLifecycleKt$repeatOnLifecycle$3$1.class","name":"androidx/lifecycle/RepeatOnLifecycleKt$repeatOnLifecycle$3$1.class","size":8769,"crc":321732465},{"key":"androidx/lifecycle/RepeatOnLifecycleKt$repeatOnLifecycle$3.class","name":"androidx/lifecycle/RepeatOnLifecycleKt$repeatOnLifecycle$3.class","size":4665,"crc":1895143750},{"key":"androidx/lifecycle/RepeatOnLifecycleKt.class","name":"androidx/lifecycle/RepeatOnLifecycleKt.class","size":3602,"crc":1298125395},{"key":"androidx/lifecycle/ReportFragment$ActivityInitializationListener.class","name":"androidx/lifecycle/ReportFragment$ActivityInitializationListener.class","size":680,"crc":958583745},{"key":"androidx/lifecycle/ReportFragment$Companion.class","name":"androidx/lifecycle/ReportFragment$Companion.class","size":3897,"crc":-1111245885},{"key":"androidx/lifecycle/ReportFragment$LifecycleCallbacks$Companion.class","name":"androidx/lifecycle/ReportFragment$LifecycleCallbacks$Companion.class","size":1670,"crc":-578311081},{"key":"androidx/lifecycle/ReportFragment$LifecycleCallbacks.class","name":"androidx/lifecycle/ReportFragment$LifecycleCallbacks.class","size":4155,"crc":-552812983},{"key":"androidx/lifecycle/ReportFragment.class","name":"androidx/lifecycle/ReportFragment.class","size":4679,"crc":582771248},{"key":"androidx/lifecycle/ViewKt.class","name":"androidx/lifecycle/ViewKt.class","size":1224,"crc":-2046993730},{"key":"androidx/lifecycle/ViewTreeLifecycleOwner.class","name":"androidx/lifecycle/ViewTreeLifecycleOwner.class","size":2033,"crc":-957700399},{"key":"androidx/lifecycle/WithLifecycleStateKt$suspendWithStateAtLeastUnchecked$2$1.class","name":"androidx/lifecycle/WithLifecycleStateKt$suspendWithStateAtLeastUnchecked$2$1.class","size":1616,"crc":-562632600},{"key":"androidx/lifecycle/WithLifecycleStateKt$suspendWithStateAtLeastUnchecked$2$2$1.class","name":"androidx/lifecycle/WithLifecycleStateKt$suspendWithStateAtLeastUnchecked$2$2$1.class","size":1419,"crc":1427204946},{"key":"androidx/lifecycle/WithLifecycleStateKt$suspendWithStateAtLeastUnchecked$2$2.class","name":"androidx/lifecycle/WithLifecycleStateKt$suspendWithStateAtLeastUnchecked$2$2.class","size":2864,"crc":439338915},{"key":"androidx/lifecycle/WithLifecycleStateKt$suspendWithStateAtLeastUnchecked$2$observer$1.class","name":"androidx/lifecycle/WithLifecycleStateKt$suspendWithStateAtLeastUnchecked$2$observer$1.class","size":3640,"crc":1980918095},{"key":"androidx/lifecycle/WithLifecycleStateKt$withStateAtLeastUnchecked$2.class","name":"androidx/lifecycle/WithLifecycleStateKt$withStateAtLeastUnchecked$2.class","size":1316,"crc":2147478485},{"key":"androidx/lifecycle/WithLifecycleStateKt.class","name":"androidx/lifecycle/WithLifecycleStateKt.class","size":16498,"crc":1819698517},{"key":"androidx/lifecycle/LifecycleRegistryOwner.class","name":"androidx/lifecycle/LifecycleRegistryOwner.class","size":639,"crc":-1246914127},{"key":"META-INF/androidx.lifecycle_lifecycle-runtime.version","name":"META-INF/androidx.lifecycle_lifecycle-runtime.version","size":6,"crc":1653493832},{"key":"META-INF/lifecycle-runtime_release.kotlin_module","name":"META-INF/lifecycle-runtime_release.kotlin_module","size":183,"crc":1148865857}] |