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:
2026-05-26 00:27:05 -04:00
parent 0415b5ccc3
commit 0b72827682
5553 changed files with 63548 additions and 10 deletions
@@ -0,0 +1,133 @@
<?xml version="1.0" encoding="utf-8"?>
<resources xmlns:ns1="urn:oasis:names:tc:xliff:document:1.2">
<string msgid="8719607706653693137" name="androidx_compose_foundation_autofill">"Automatisch invullen"</string>
<string msgid="1150566100598813236" name="androidx_compose_ui_autofill">"Automatisch invullen"</string>
<string msgid="881409763997275156" name="call_notification_answer_action">"Beantwoorden"</string>
<string msgid="8793775615905189152" name="call_notification_answer_video_action">"Video"</string>
<string msgid="3229508546291798546" name="call_notification_decline_action">"Weigeren"</string>
<string msgid="2659457946726154263" name="call_notification_hang_up_action">"Ophangen"</string>
<string msgid="6107532579223922871" name="call_notification_incoming_text">"Inkomend gesprek"</string>
<string msgid="8623827134497363134" name="call_notification_ongoing_text">"Actief gesprek"</string>
<string msgid="59049573811482460" name="call_notification_screening_text">"Een inkomend gesprek screenen"</string>
<string msgid="406453423630273620" name="close_drawer">"Navigatiemenu sluiten"</string>
<string msgid="7573152094250666567" name="close_sheet">"Blad sluiten"</string>
<string msgid="8038256446254964252" name="default_error_message">"Ongeldige invoer"</string>
<string name="default_notification_channel_name">Wordt nu afgespeeld</string>
<string msgid="6312721426453364202" name="default_popup_window_title">"Pop-upvenster"</string>
<string msgid="1890207353314751437" name="dropdown_menu">"Dropdownmenu"</string>
<string name="error_message_authentication_expired">Log in om deze app te gebruiken</string>
<string name="error_message_bad_value">Onjuiste invoergegevens</string>
<string name="error_message_concurrent_stream_limit">Er wordt op te veel apparaten geluisterd</string>
<string name="error_message_content_already_playing">Die content wordt al afgespeeld</string>
<string name="error_message_disconnected">Verbinding met media-app verbroken</string>
<string name="error_message_end_of_playlist">Er staat niets anders in de wachtrij</string>
<string name="error_message_fallback">Er is iets misgegaan. Probeer het later opnieuw.</string>
<string name="error_message_info_cancelled">Kan niet afronden. Probeer het opnieuw.</string>
<string name="error_message_invalid_state">Kan dat nu niet doen</string>
<string name="error_message_io">Invoer-/uitvoerfout</string>
<string name="error_message_not_available_in_region">Kan die content hier niet krijgen</string>
<string name="error_message_not_supported">Deze app kan dat niet doen</string>
<string name="error_message_parental_control_restricted">Die content is geblokkeerd</string>
<string name="error_message_permission_denied">Toegang geweigerd</string>
<string name="error_message_premium_account_required">Premium toegang vereist</string>
<string name="error_message_setup_required">Instellen vereist</string>
<string name="error_message_skip_limit_reached">Kan geen nummers meer overslaan</string>
<string name="exo_download_completed">Downloaden voltooid</string>
<string name="exo_download_description">Downloaden</string>
<string name="exo_download_downloading">Downloaden</string>
<string name="exo_download_failed">Downloaden mislukt</string>
<string name="exo_download_notification_channel_name">Downloads</string>
<string name="exo_download_paused">Downloads gepauzeerd</string>
<string name="exo_download_paused_for_network">Downloads wachten op netwerk</string>
<string name="exo_download_paused_for_wifi">Downloads wachten op wifi</string>
<string name="exo_download_removing">Downloads verwijderen</string>
<string msgid="6827826412747255547" name="in_progress">"Bezig"</string>
<string msgid="7933458017204019916" name="indeterminate">"Gedeeltelijk aangevinkt"</string>
<string msgid="2988463736136100848" name="m3c_bottom_sheet_collapse_description">"Blad onderaan samenvouwen"</string>
<string msgid="1555567894577437024" name="m3c_bottom_sheet_dismiss_description">"Blad onderaan sluiten"</string>
<string msgid="8403354765404029791" name="m3c_bottom_sheet_drag_handle_description">"Handgreep voor slepen"</string>
<string msgid="6670819569745899763" name="m3c_bottom_sheet_expand_description">"Blad onderaan uitvouwen"</string>
<string msgid="3010635850035863127" name="m3c_bottom_sheet_pane_title">"Blad onderaan"</string>
<string msgid="8166741421776570875" name="m3c_date_input_headline">"Ingevulde datum"</string>
<string msgid="229313757840775812" name="m3c_date_input_headline_description">"Ingevulde datum: %1$s"</string>
<string msgid="6116910750161463197" name="m3c_date_input_invalid_for_pattern">"De datum komt niet overeen met het verwachte patroon: %1$s"</string>
<string msgid="2521768508935305279" name="m3c_date_input_invalid_not_allowed">"Datum niet toegestaan: %1$s"</string>
<string msgid="7052898923934555305" name="m3c_date_input_invalid_year_range">"Datum buiten het verwachte jaarbereik %1$s - %2$s"</string>
<string msgid="2895559812010326913" name="m3c_date_input_label">"Datum"</string>
<string msgid="1237013946323089826" name="m3c_date_input_no_input_description">"Geen"</string>
<string msgid="7306227249789210568" name="m3c_date_input_title">"Datum selecteren"</string>
<string msgid="7605002211875882969" name="m3c_date_picker_headline">"Geselecteerde datum"</string>
<string msgid="3664277305226978227" name="m3c_date_picker_headline_description">"Huidige selectie: %1$s"</string>
<string msgid="8436650776581492840" name="m3c_date_picker_navigate_to_year_description">"Ga naar jaar %1$s"</string>
<string msgid="5811000998184572395" name="m3c_date_picker_no_selection_description">"Geen"</string>
<string msgid="7813882352367152251" name="m3c_date_picker_scroll_to_earlier_years">"Scroll om eerdere jaren te tonen"</string>
<string msgid="5727367015496556177" name="m3c_date_picker_scroll_to_later_years">"Scroll om latere jaren te tonen"</string>
<string msgid="1804346892470238807" name="m3c_date_picker_switch_to_calendar_mode">"Overschakelen naar agenda-invoermodus"</string>
<string msgid="395627960681594326" name="m3c_date_picker_switch_to_day_selection">"Swipe om een jaar te selecteren of tik om terug te gaan en een dag te selecteren"</string>
<string msgid="2219746470065162704" name="m3c_date_picker_switch_to_input_mode">"Overschakelen naar tekstinvoermodus"</string>
<string msgid="7142101321095356500" name="m3c_date_picker_switch_to_next_month">"Naar volgende maand gaan"</string>
<string msgid="228438865139394590" name="m3c_date_picker_switch_to_previous_month">"Naar vorige maand gaan"</string>
<string msgid="791651718641787594" name="m3c_date_picker_switch_to_year_selection">"Schakelaar om een jaar te selecteren"</string>
<string msgid="7430790972741451689" name="m3c_date_picker_title">"Datum selecteren"</string>
<string msgid="3199387177749801575" name="m3c_date_picker_today_description">"Vandaag"</string>
<string msgid="2068382232816991922" name="m3c_date_picker_year_picker_pane_title">"Jaarselectie zichtbaar"</string>
<string msgid="3190049423327661366" name="m3c_date_range_input_invalid_range_input">"Ongeldige invoer voor periode"</string>
<string msgid="3148384720560189467" name="m3c_date_range_input_title">"Datums opgeven"</string>
<string msgid="2138321128465719402" name="m3c_date_range_picker_day_in_range">"Binnen bereik"</string>
<string msgid="4947636797751277713" name="m3c_date_range_picker_end_headline">"Einddatum"</string>
<string msgid="602077859540990149" name="m3c_date_range_picker_scroll_to_next_month">"Scroll om de volgende maand te tonen"</string>
<string msgid="4592174524846109496" name="m3c_date_range_picker_scroll_to_previous_month">"Scroll om de vorige maand te tonen"</string>
<string msgid="4665981448952749820" name="m3c_date_range_picker_start_headline">"Startdatum"</string>
<string msgid="3134165431120340385" name="m3c_date_range_picker_title">"Datums selecteren"</string>
<string msgid="7617233117134790350" name="m3c_dialog">"Dialoogvenster"</string>
<string msgid="3177828188723359358" name="m3c_dropdown_menu_collapsed">"Samengevouwen"</string>
<string msgid="2360841780724299882" name="m3c_dropdown_menu_expanded">"Uitgevouwen"</string>
<string msgid="8687821690726149911" name="m3c_dropdown_menu_toggle">"Dropdownmenu aan-/uitzetten"</string>
<string msgid="6072492480528318635" name="m3c_floating_toolbar_collapse">"Werkbalk samenvouwen"</string>
<string msgid="6880757017246780255" name="m3c_floating_toolbar_expand">"Werkbalk uitvouwen"</string>
<string msgid="6152806324422087846" name="m3c_search_bar_search">"Zoeken"</string>
<string msgid="6152755701819882931" name="m3c_snackbar_dismiss">"Sluiten"</string>
<string msgid="3868801555855510515" name="m3c_snackbar_pane_title">"Melding"</string>
<string msgid="7655536806087401899" name="m3c_suggestions_available">"Suggesties hieronder"</string>
<string msgid="409352516511718051" name="m3c_time_input_dialog_title">"Tijd invoeren"</string>
<string msgid="2786685010796619560" name="m3c_time_picker_am">"AM"</string>
<string msgid="7412665527536641863" name="m3c_time_picker_dialog_title">"Tijd selecteren"</string>
<string msgid="2349193472625211372" name="m3c_time_picker_hour">"Uur"</string>
<string msgid="9179527532316922345" name="m3c_time_picker_hour_24h_suffix">"%1$d uur"</string>
<string msgid="8876759303332837035" name="m3c_time_picker_hour_selection">"Uur selecteren"</string>
<string msgid="3458167507790628988" name="m3c_time_picker_hour_suffix">"%1$d uur"</string>
<string msgid="6973808109666874069" name="m3c_time_picker_hour_text_field">"voor uur"</string>
<string msgid="4313071914266462005" name="m3c_time_picker_minute">"Minuut"</string>
<string msgid="4699133535056739733" name="m3c_time_picker_minute_selection">"Minuten selecteren"</string>
<string msgid="5064177921781937179" name="m3c_time_picker_minute_suffix">"%1$d minuten"</string>
<string msgid="7661234488295443182" name="m3c_time_picker_minute_text_field">"voor minuten"</string>
<string msgid="5865171949528594571" name="m3c_time_picker_period_toggle_description">"AM of PM selecteren"</string>
<string msgid="6616362054113087709" name="m3c_time_picker_pm">"PM"</string>
<string msgid="4145073906612931838" name="m3c_time_picker_toggle_keyboard">"Wisselen naar tekstinvoerstand om de tijd in te voeren"</string>
<string msgid="8841786098195101324" name="m3c_time_picker_toggle_touch">"Wisselen naar klokmodus om de tijd in te voeren"</string>
<string msgid="1805687647081129904" name="m3c_tooltip_long_press_label">"Tooltip tonen"</string>
<string msgid="5460405025248574620" name="m3c_tooltip_pane_description">"Tooltip"</string>
<string msgid="6564222473543418073" name="m3c_wide_navigation_rail_close_rail">"Rail sluiten"</string>
<string msgid="8350283435461615411" name="m3c_wide_navigation_rail_pane_title">"Navigatierail"</string>
<string name="media3_controls_pause_description">Pauzeren</string>
<string name="media3_controls_play_description">Afspelen</string>
<string name="media3_controls_seek_back_description">Achteruit springen</string>
<string name="media3_controls_seek_forward_description">Vooruit springen</string>
<string name="media3_controls_seek_to_next_description">Naar volgende item springen</string>
<string name="media3_controls_seek_to_previous_description">Naar vorige item springen</string>
<string msgid="542007171693138492" name="navigation_menu">"Navigatiemenu"</string>
<string msgid="6610465462668679431" name="not_selected">"Niet geselecteerd"</string>
<string msgid="5941395253238309765" name="range_end">"Einde bereik"</string>
<string msgid="7097486360902471446" name="range_start">"Start bereik"</string>
<string msgid="6043586758067023" name="selected">"Geselecteerd"</string>
<string msgid="2792228137354697160" name="snackbar_pane_title">"Melding"</string>
<string msgid="4139871816613051306" name="state_empty">"Leeg"</string>
<string msgid="5834637030682409883" name="state_off">"Uit"</string>
<string msgid="1490883874751719580" name="state_on">"Aan"</string>
<string msgid="6277540029070332960" name="status_bar_notification_info_overflow">"999+"</string>
<string msgid="2561197295334830845" name="switch_role">"Overschakelen"</string>
<string msgid="1672349317127674378" name="tab">"Tabblad"</string>
<string msgid="5946805113151406391" name="template_percent">"<ns1:g id="PERCENTAGE">%1$d</ns1:g> procent."</string>
<string msgid="3765533235322692011" name="tooltip_description">"tooltip"</string>
<string msgid="3124740595719787496" name="tooltip_label">"tooltip tonen"</string>
</resources>