Skip to content

Add Test a link, Portuguese localization, and update APK cleanup - #23

Merged
neteinstein merged 1 commit into
mainfrom
feature/settings-test-link-field
Jul 21, 2026
Merged

Add Test a link, Portuguese localization, and update APK cleanup#23
neteinstein merged 1 commit into
mainfrom
feature/settings-test-link-field

Conversation

@neteinstein

Copy link
Copy Markdown
Owner

Description

Three related Settings/UX improvements:

  • Test a link (feature:settings, feature:share, app): a new field in Settings, shown
    right after the Gemini API key is saved, lets you paste an Instagram/TikTok link and run it
    through the exact same pipeline as a real OS share - no need to switch back to Instagram/TikTok
    first. Since feature modules never depend on each other directly, this is wired through
    MainActivity (the composition root) into ShareRoute's existing sharedText mechanism. That
    surfaced a latent bug: LaunchedEffect doesn't restart when the same URL is submitted twice in a
    row (Compose skips recomposition on structurally-equal state), fixed with a sharedTextRequestId
    nonce bumped alongside sharedText on every submission.
  • Portuguese localization (app + all feature modules, core locale config): full
    values-pt/strings.xml translations across every module with user-facing strings, verified
    key-for-key/array-count/format-specifier parity against the English source. Added
    android:localeConfig + locales_config.xml (en, pt) so Android 13+ automatically exposes an
    "App language" entry in system Settings - no extra runtime code needed given targetSdk=36. A
    new Language section sits at the top of Settings (ahead of the API key field, per explicit
    request) with a button deep-linking to Settings.ACTION_APP_LOCALE_SETTINGS, hidden below API 33.
  • Update APK cleanup (core:update): after feature:settings's "Update to latest" installs a
    newer build, the downloaded APK was left behind in context.cacheDir/updates/. Added
    ClearDownloadedUpdateUseCase + a manifest-registered UpdateApkCleanupReceiver listening for
    ACTION_MY_PACKAGE_REPLACED (a documented exception to Android 8+ implicit-broadcast
    restrictions, delivered only to the just-updated app and survives process death during install)
    to delete it once install finishes.

agents.md and README.md are updated to document all three.

How to Test

  • ./gradlew ktlintCheck
  • ./gradlew test (covers the 3 new ClearDownloadedUpdateUseCaseTest cases)
  • ./gradlew compileDebugKotlin compileDebugUnitTestKotlin
  • Manual: save a Gemini API key in Settings, confirm the "Test a link" field appears, paste an
    Instagram/TikTok link, tap Test, and confirm it runs through the share pipeline. Confirm the new
    Language section is at the top of Settings and deep-links correctly on API 33+. Install an update
    via "Update to latest" and confirm the downloaded APK is gone from the cache afterward.

Checklist

  • ./gradlew ktlintCheck passes (or ktlintFormat was run to fix style)
  • ./gradlew test passes for all affected modules
  • New/changed logic has unit test coverage (domain and data layers especially)
  • agents.md / README.md updated if this changes architecture, setup, or dev workflow
  • No secrets, API keys, or credentials committed

- Settings: new "Test a link" field (shown once the Gemini API key is
  saved) runs a pasted Instagram/TikTok link through the share pipeline
  without needing a real OS share. Bridged via MainActivity into
  ShareRoute's existing sharedText mechanism, since feature modules
  never depend on each other directly. Fixed a latent gap where
  submitting the same URL twice wouldn't retrigger ShareRoute's
  LaunchedEffect, via a new sharedTextRequestId nonce.
- Settings: new "Language" section, placed first on the screen (ahead
  of the API key field), deep-linking into the system per-app language
  screen (Settings.ACTION_APP_LOCALE_SETTINGS, API 33+ only).
- Added Portuguese translations (values-pt/strings.xml) across every
  module with user-facing strings, plus android:localeConfig +
  locales_config.xml (en, pt) so Android 13+ shows "App language" in
  system Settings with no extra runtime code.
- core:update: added ClearDownloadedUpdateUseCase +
  UpdateApkCleanupReceiver, listening for ACTION_MY_PACKAGE_REPLACED,
  to delete the downloaded update APK from the cache dir once install
  finishes, so it doesn't sit there wasting space.
- Updated agents.md and README.md to document all of the above.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@neteinstein
neteinstein merged commit a96d4df into main Jul 21, 2026
4 checks passed
@neteinstein
neteinstein deleted the feature/settings-test-link-field branch July 21, 2026 14:19
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.

1 participant