← Back to Pull requests

feat(android): OneBusAway theme, dark-mode system bars and a launch screen #155

Closed
unknown closed this pull request without merging on Oct 15, 2026 18:23 UTC
View on GitHub
unknown unknown commented on Oct 13, 2026 14:10 UTC
Author

Part of #36

In dark mode the status bar and gesture bar were white, with white icons on them. The root Surface was padded by the system bar insets, so the bars showed the window behind it, and the window theme was always the light one. Now the Surface fills the window with the padding inside it, the window background follows the theme, and there is a night window theme. The first two screenshots are before and after.

The rest puts today's screens in the approved design's theme, with no layout or string changes:

  • Colours are OneBusAway Android's own green M3 scheme, which the design uses, with every ColorScheme role set so nothing falls back to Material's purple. The roles neither defines come from material-color-utilities with OBA's seed #4CAF50. For onPrimaryContainer I kept OBA's #235024 over the design's #002204; both pass contrast.

  • Status text uses OneBusAway Android's own colours in both themes (based on iOS's), so late and early now read in dark mode and look the same as in the other OneBusAway apps. The status fills are darker than OneBusAway's, so white text on them is 7:1 for reading at a glance in sun. A problem shows as a dark line instead of red, since red means early, and End Trip, End Shift and Log in are ink instead of red. iOS keeps its red ones for now.

  • Type is Google Sans Flex, bundled rather than downloaded because drivers start shifts with no signal. It is a 117 KB weight-only Latin subset of the google/fonts v5.000 file (OFL, licence in assets, the two fontTools commands in Type.kt). Every style keeps Material's sizes and uses tabular digits, so the trip timer and sent count no longer wobble.

  • The start spinner is now a launch screen (core-splashscreen 1.2.0, the only new dependency), held until the app knows the first screen.
  • Not in this PR: components, spacing and motion tokens, which come with their first users in the next PRs; the Tracking redesign (U2); and a new launcher icon, which I'd like to ask you about separately.

    Tested: three new test classes. ThemeContrastTest checks WCAG contrast for every pair above, ColorSchemeTest fails if any role still equals Material's baseline, and WindowColorsTest checks the window colour against the theme by day and night. Each fails on the mutation it guards (the old dark late blue, a deleted tertiary, a black night window). ScreenFlowTest is untouched, so its CI run shows no string moved. Each commit builds and passes the unit tests on its own, and lint shows only the existing MissingPermission error.

    By hand on an API 32 emulator, light and dark: launch, sign in with the keyboard up, route, run list, Tracking, the resume prompt after killing the app mid-trip, and 3-button navigation. Not checked by hand: the pre-Android 12 splash and Android 15/16 (no image for them on this machine; CI's instrumented tests run on API 36).

    Screenshots, all on the API 32 emulator.

    Dark Tracking, before and after (the white status and gesture bars):

    <img width="270" alt="Dark Tracking before: white status bar and gesture bar" src="https://github.com/user-attachments/assets/d7e36c49-b263-4181-a725-f1b3cd54f5d5" /> <img width="270" alt="Dark Tracking after: dark bars with visible icons" src="https://github.com/user-attachments/assets/53af67b4-89e2-4bb9-b2c2-d390b834a76a" />

    Sign in, light and dark:

    <img width="270" alt="Sign in, light" src="https://github.com/user-attachments/assets/f6747d28-7ecc-4b2e-baf4-fd8bb6bed2fa" /> <img width="270" alt="Sign in, dark" src="https://github.com/user-attachments/assets/b7d5ccff-b28e-4974-a53f-3c31b60154a7" />

    Run list, light and dark:

    <img width="270" alt="Run list, light" src="https://github.com/user-attachments/assets/b9c39d25-e1d8-45fc-bb3d-a338cb3dc999" /> <img width="270" alt="Run list, dark" src="https://github.com/user-attachments/assets/fc9a2490-ff6f-4dba-a3e7-b7be7a1807f3" />

    Tracking, light:

    <img width="270" alt="Tracking, light" src="https://github.com/user-attachments/assets/6fa11ba9-d8f8-47e2-a2dd-b12f49e3e3c5" />

    <!-- This is an auto-generated comment: release notes by coderabbit.ai -->

    Summary by CodeRabbit

    New Features
    Added a startup splash screen that stays visible while the app loads.
    Updated the app’s visual theme with Google Sans Flex typography, light and dark color palettes, and clearer status and problem colors.
    Improved screen styling for status banners, buttons, and route badges.
    Bug Fixes
    Adjusted window resizing when the keyboard appears.
    * Matched the initial window background to the app’s light or dark theme.

    <!-- end of auto-generated comment: release notes by coderabbit.ai -->

    Diff: 579 lines (+434 / -145) across 7 files Reviewer: aaronbrethorst Review duration: 3133m
    All Vouch review confidence checks passed
    Residual risk 0.20 = Change Risk (0.50) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.50 · 579 lines diff across 7 files
    0.50
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.381
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #155"
    general weight: 0.35
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 49.9% (MEDIUM) · Higher = larger blast radius
    49.9%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 19.7% · Safe to merge
    19.7%