Add retry, history, multi-location results, loading animations - #18
Merged
Conversation
Ships a backlog of five related improvements to the share pipeline: - Retry button: ShareScreen now shows a Retry action on any failure or "no location found" outcome, re-running the exact same video via ShareViewModel.retry() instead of requiring a fresh share. - Multi-location results: the Gemini prompt now asks for every place a video is actually about, ranked most-to-least likely, instead of a single best guess. GeminiLocationRepository/ResolveLocationUseCase return List<ResolvedLocation>; the results screen lists every match (scrollable) with its own name/address/"Open in Google Maps" CTA and no longer auto-opens Maps - the user picks. The result notification still deep-links straight to the top-ranked match for the tap-and-go case. - History screen: new core:history (domain/data/di) + feature:history (presentation/di) modules, mirroring the core:settings/feature:settings split. Every shared link - found, not-found, or failed - is recorded (capped at the last 50, newest first) via RecordHistoryEntryUseCase from ProcessSharedUrlWorker. A new History icon next to Settings opens a list of entries; tapping one reopens the original video, and a CTA opens Google Maps for the top location found, if any. - Eye-candy loading animations: the processing screen now cycles through a rotating pool of short status lines under the stage label (download, read the screen, ask Gemini, ...) with fade/slide transitions, plus supporting motion polish elsewhere in ShareScreen. - Docs: README "Usage"/"How it works" rewritten for the new retry, multi-location-picker, and history flows, plus a prepaid billing setup section for the Gemini API key. agents.md module map gains core:history/ feature:history rows and notes two bugs fixed along the way: a Koin DataStore-qualifier collision (core:settings/core:instagramauth DataStore singles were unqualified and silently shadowed each other) and an org.json stub-returns-null gap under plain-JVM unit tests (fixed for core:history via a real org.json:json test dependency; feature:share/ feature:geocoding have the same latent, currently-untested exposure). Validated with ktlintCheck, compileDebugKotlin, compileDebugUnitTestKotlin, test, and koverXmlReport/koverHtmlReport across every module. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Ships a backlog of five related improvements to the share pipeline:
ShareScreennow shows a Retry action on any failure or "no location found"outcome, re-running the exact same video via
ShareViewModel.retry()instead of requiring afresh share. Touches
feature:share.about, ranked most-to-least likely, instead of a single best guess.
GeminiLocationRepository/ResolveLocationUseCase(feature:geocoding) now returnList<ResolvedLocation>. The results screen lists every match (scrollable) with its ownname/address/"Open in Google Maps" CTA and no longer auto-opens Maps - the user picks. The
result notification still deep-links straight to the top-ranked match for the tap-and-go case.
core:history(domain/data/di) +feature:history(presentation/di)modules, mirroring the existing
core:settings/feature:settingssplit. Every shared link -found, not-found, or failed - is recorded (capped at the last 50, newest first) via
RecordHistoryEntryUseCasefromProcessSharedUrlWorker. A new History icon next to Settingsopens a list of entries; tapping one reopens the original video, and a CTA opens Google Maps
for the top location found, if any.
short status lines under the stage label (download, read the screen, ask Gemini, ...) with
fade/slide transitions, plus supporting motion polish elsewhere in
ShareScreen.README.md"Usage"/"How it works" rewritten for the new retry, multi-location-picker,and history flows, plus a prepaid billing setup section for the Gemini API key.
agents.mdmodule map gains
core:history/feature:historyrows.Bugs found and fixed along the way
DataStore<Preferences>qualifier collision:core:settingsandcore:instagramauthboth bound an unqualified
single<DataStore<Preferences>>, so the second-registered module'sreads/writes silently went to the wrong file instead of failing loudly. Both (plus the new
core:history) now usenamed(...)qualifiers.org.jsonstub-returns-null under plain-JVM unit tests: Android'sandroid.jarbundlesnon-functional stub
JSONObject/JSONArrayclasses, and under this project'sisReturnDefaultValues = truesetting, calling.toString()on them returnsnull, whichKotlin's null-check then throws on. Fixed for
core:historyvia a realorg.json:jsontestdependency (
gradle/libs.versions.toml+core/history/build.gradle.kts).feature:share/feature:geocodinguseorg.jsontoo but have no test currently exercisingthat path, so they have the same latent exposure - flagged in
agents.md's Testing Standardsfor whoever adds one next.
How to Test
./gradlew ktlintCheck./gradlew compileDebugKotlin compileDebugUnitTestKotlin./gradlew test(all green, including newcore:history/feature:historysuites)./gradlew koverXmlReport koverHtmlReportall of them (scrollable) instead of auto-opening Maps; trigger a failure (e.g. airplane mode)
and confirm Retry re-runs the same video; open History from the icon next to Settings and
confirm past shares appear, are tappable, and their Maps CTA works.
Checklist
./gradlew ktlintCheckpasses (orktlintFormatwas run to fix style)./gradlew testpasses for all affected modulesagents.md/README.mdupdated if this changes architecture, setup, or dev workflowCo-authored-by: Copilot App 223556219+Copilot@users.noreply.github.com