Skip to content

fix(ui): lint-clean LogsScreen — composition-safe resources and remembered state - #34

Merged
oustery merged 1 commit into
mainfrom
fix-compose-lint-logs-screen
Nov 12, 2026
Merged

oustery merged 1 commit into
mainfrom
fix-compose-lint-logs-screen

Conversation

@oustery

@oustery oustery commented Nov 12, 2026

Copy link
Copy Markdown
Owner

Problem

The CI and Release workflows fail on main (runs 43223332988 / 43223333184): ./gradlew test aborts at :app:lintDebug with 3 errors introduced with the diagnostics screen (#33):

  1. LogsScreen.kt:103 — context.getString(R.string.logs_share_subject) inside the composable trips LocalContextGetResourceValueCall (not configuration-aware).
  2. LogsScreen.kt:107 — same check for the chooser label.
  3. LogsScreen.kt:73 — derivedStateOf created without remember trips UnrememberedMutableState (a fresh state object on every recomposition; also breaks the tail auto-scroll once recomposed).

Fix

  • Resolve both share strings in composition with stringResource() and capture them in the onClick lambda.
  • Wrap the derivedStateOf in remember.

Verification

  • :app:lintDebug — 0 errors locally.
  • ./gradlew test -x assembleRelease -x nativeRegressions — green locally (the two excluded tasks are environment-dependent: release APK packaging and a proot/seccomp integration test that this sandbox kills with SIGSYS; both passed on CI for the previous PR).
  • CI on this branch expected green; the fix touches only LogsScreen.kt.

…bered state

lintDebug aborts the build with three errors introduced with the
diagnostics screen:

- context.getString() inside the composable (share subject and chooser
  label) trips LocalContextGetResourceValueCall — resolve both strings
  with stringResource() in composition instead;
- derivedStateOf without remember (UnrememberedMutableState) rebuilt
  its state object on every recomposition — wrap it in remember.

Verified locally: :app:lintDebug passes with 0 errors; unit tests green.
@oustery
oustery merged commit d8141e2 into main Nov 12, 2026
1 check passed
@oustery
oustery deleted the fix-compose-lint-logs-screen branch November 12, 2026 16:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants