feat(about): fall back to pinned bundle info; show runtime versions#56
Merged
Merged
Conversation
About page now shows useful information even when the device lacks a rag_bundle_deployed.json receipt (e.g. tablets provisioned before the receipt-writing code was added in the in-app downloader). Bundle card: - Try getDeployedRagBundleInfo first; on null, fall back to getPinnedRagBundleInfo (reads rag_assets.lock.json from APK assets). - Tag fallback source with an italic note so we don't lie about the bundle being verifiably deployed. New Runtime card: - App version (versionName + versionCode) - LiteRT-LM version (new BuildConfig.LITERTLM_VERSION, kept in sync with the gradle dependency via a single litertlmVersion constant) - Configured LLM backend (GPU/CPU per BuildConfig.USE_GPU_FOR_LLM) - Wired through a new getRuntimeInfo MethodChannel handler. Swahili strings for the new keys are placeholders (English text) — flag for translation in a follow-up. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
There was a problem hiding this comment.
Pull request overview
Adds a more useful About page by falling back to pinned RAG bundle metadata when deployment receipt metadata is missing, and adds runtime/build information for on-device debugging.
Changes:
- Falls back from deployed bundle metadata to pinned APK bundle metadata.
- Adds a Runtime card showing app, LiteRT-LM, and backend information.
- Wires Android MethodChannel/runtime BuildConfig fields and localization strings.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
app/lib/screens/about_page.dart |
Adds pinned bundle fallback and Runtime info card UI. |
app/lib/l10n/app_en.arb |
Adds English strings for pinned note and Runtime card labels. |
app/lib/l10n/app_sw.arb |
Adds Swahili-locale placeholder strings for new About labels. |
app/lib/l10n/app_localizations.dart |
Adds generated localization getters. |
app/lib/l10n/app_localizations_en.dart |
Adds English localization implementations. |
app/lib/l10n/app_localizations_sw.dart |
Adds Swahili localization implementations. |
app/android/app/src/main/kotlin/com/example/app/MainActivity.kt |
Adds getRuntimeInfo MethodChannel handler. |
app/android/app/build.gradle.kts |
Centralizes LiteRT-LM version and exposes it via BuildConfig. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| "appVersionName" to BuildConfig.VERSION_NAME, | ||
| "appVersionCode" to BuildConfig.VERSION_CODE, | ||
| "litertlmVersion" to BuildConfig.LITERTLM_VERSION, | ||
| "llmBackendConfigured" to if (BuildConfig.USE_GPU_FOR_LLM) "GPU" else "CPU", |
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.
Summary
About page used to silently show "Bundle metadata is not available on this device yet" whenever the deployment receipt (
rag_bundle_deployed.json) was missing — even when the bundle is healthy and retrieval works. This commonly affects tablets provisioned before the receipt-writing code was added to the in-app downloader.This PR makes the page useful even in that state, and surfaces the runtime versions someone debugging on-device behaviour usually needs.
Changes
Bundle card
getDeployedRagBundleInfofirst; on null, fall back togetPinnedRagBundleInfo(readsrag_assets.lock.jsonfrom the APK's assets).New Runtime card
versionName (versionCode))BuildConfig.LITERTLM_VERSION, kept in sync with the Gradle dependency via a singlelitertlmVersionconstant)GPU/CPUperBuildConfig.USE_GPU_FOR_LLM)getRuntimeInfoMethodChannel handler inMainActivity.kt.Backend wiring
MainActivity.kt— newgetRuntimeInfocase + private method.build.gradle.kts— singlelitertlmVersion = "0.11.0"constant used both in the dependency declaration and asBuildConfig.LITERTLM_VERSION.Localization
app_en.arbandapp_sw.arb:aboutKnowledgeBundlePinnedNoteaboutRuntimeTitleaboutRuntimeAppLabelaboutRuntimeLitertlmLabelaboutRuntimeBackendLabelTested on device
rag_bundle_deployed.jsonon disk.App: 0.1.0 (1),LiteRT-LM: 0.11.0,LLM backend: GPU.Test plan
rag_bundle_deployed.json— verify the bundle card showsDeployed: <timestamp>and no italic pinned-note appears (deployed path is preferred).🤖 Generated with Claude Code