Merged
Conversation
Free-Android port of [nativeapptemplate/NativeAppTemplate-Android#38](nativeapptemplate/NativeAppTemplate-Android#38). Updates the ItemTag schema to match the Rails API v2: - rename queue_number -> name - add description, position - remove scan_state, customer_read_at, already_completed, display_shop_server_path Data layer only — Scan/NFC code is kept and adapted to compile against the new schema. Full Scan/NFC deletion is Phase 2A-2, UI rewrite is 2A-3, further test work is 2A-4. Key changes - item_tag_data.proto: queue_number -> name; reserve 5/7/11; add description and position. - Model (Attributes/Data/ItemTag/Shop/ItemTagData/ItemTagBodyDetail): field renames; added getName/getDescription/getPosition; dropped getScanState/getCustomerReadAt/getAlreadyCompleted/getDisplayShopServerPath. - Meta.maximumQueueNumberLength default 0 -> 256 so the meta field is optional (matches iOS). - ItemTagCreateViewModel / ItemTagEditViewModel: queueNumber -> name; hasInvalidDataQueueNumber -> hasInvalidDataName; updateQueueNumber -> updateName. - Removed production call sites of deleted fields in ShowTagInfoScanResultView, ScanViewModel, ShopDetailCardView, ShopDetailView — each flagged with a // TODO: removed in Phase 2A-2 marker. - Deleted NumberTagsWebpageListView(Model) entirely and removed the navigation wiring / ShopSettings entry. - Updated test fixtures (item_tag.json, item_tags.json) and affected unit tests. ScanViewModelTest deleted ahead of 2A-2. NumberTagsWebpageListViewModelTest removed. Verified locally: ./gradlew assembleDebug, test, spotlessCheck all BUILD SUCCESSFUL. Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Mirrors NativeAppTemplate-Android PR #39 (which itself mirrors iOS PR #50). After this, the app is a generic CRUD shell with Shops and Settings tabs; ItemTagDetailView is a placeholder (name, description, state, completedAt). ### Deletions - NfcError; ItemTagWriteView/VM + test - ui/scan/* (ScanView, ScanViewModel, DoScanView, DoScanViewModel, CompleteScanResultView, ShowTagInfoScanResultView, ScanNavigation) + DoScanViewModelTest - Models: CompleteScanResult, CompleteScanResultType, ShowTagInfoScanResult, ShowTagInfoScanResultType, ItemTagInfoFromNdefMessage, ItemTagType, ScanState, ItemTagData - Proto schemas: scan_result.proto, item_tag_data.proto, item_tag_info_from_ndef_message.proto - res/raw/nfc_reader.json ### Strip / rewrite - MainActivity: dropped NFC imports, onNewIntent, ACTION_NDEF_DISCOVERED handling, singleTask launch mode - MainActivityViewModel: rewritten minimal (logout + permissions refresh + didShowTapShopBelowTip) - NatAppState / NatNavHost / TopLevelDestination: dropped SCAN_TAB, shouldNavigateToScanView flow, navigateToScan helper, scan nav graph - ShopDetailView / VM: dropped queue instructions block, ReadInstructionsTip, didShowReadInstructionsTip; renamed resetItemTag -> idleItemTag and swipe action "Reset" -> "Idle" (width 64dp -> 96dp) - ShopSettingsView / VM: removed the "Reset Number Tags" section, resetShop flow - ItemTagDetailView / VM: placeholder (name, description, state, completedAt) - LoginRepository (+ Impl) / NatPreferencesDataSource: dropped scan-related setters/getters, didShowReadInstructionsTip - ShopRepository / ShopApi / Impl: dropped resetShop - ItemTagApi / Repository / Impl: renamed resetItemTag (/reset) -> idleItemTag (/idle) - Utility: dropped scanUri(), extractItemTagInfoFrom(), NFC imports - NatConstants: dropped SCAN_PATH, SCAN_PATH_CUSTOMER - UserData: dropped didShowReadInstructionsTip, scanViewSelectedTabIndex, shouldFetchItemTagForShowTagInfoScan, shouldCompleteItemTagForCompleteScan - shopSettingsNavigation: dropped ItemTagWriteRoute / itemTagWriteView - Demo / test repos updated to match trimmed interfaces; obsolete tests removed (UtilityTest scanUri, CodedErrorTest NfcError, ItemTagDetailVMTest isLock, ShopDetailVMTest reset/didShowReadInstructionsTip) ### Config - AndroidManifest.xml: removed NFC permission, android.hardware.nfc feature, NDEF_DISCOVERED intent-filter, singleTask launch mode - build.gradle.kts / libs.versions.toml: removed compose-qr-code, capturable, lottie-compose - user_preferences.proto: removed scan fields - strings.xml: removed ~25 scan/NFC/QR strings; onboarding descriptions 1-13 rewritten to generic "Welcome to the app." placeholder so OnboardingView still compiles (worth redesigning or deleting in a follow-up) ### Test plan - [x] ./gradlew assembleDebug passes - [x] ./gradlew test passes - [x] ./gradlew spotlessCheck passes - [x] ./gradlew lint passes - [x] ./gradlew buildHealth passes - [ ] Manual smoke test on device/emulator: 2 tabs visible (Shops / Settings), no Scan tab; sign-in works; ItemTag create / view detail placeholder / edit / delete flows work Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.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.
Summary
ItemTagDetailViewis a placeholder (name, description, state, completedAt). Full generic CRUD UI lands later.Deletions
NfcError;ItemTagWriteView/VM+ testui/scan/*(ScanView,ScanViewModel,DoScanView,DoScanViewModel,CompleteScanResultView,ShowTagInfoScanResultView,navigation/ScanNavigation) +DoScanViewModelTestCompleteScanResult,CompleteScanResultType,ShowTagInfoScanResult,ShowTagInfoScanResultType,ItemTagInfoFromNdefMessage,ItemTagType,ScanState,ItemTagDatascan_result.proto,item_tag_data.proto,item_tag_info_from_ndef_message.protores/raw/nfc_reader.jsonStrip / rewrite
MainActivity: dropped NFC imports,onNewIntent,ACTION_NDEF_DISCOVEREDhandling,singleTasklaunch modeMainActivityViewModel: rewritten minimal (logout + permissions refresh +didShowTapShopBelowTip)NatAppState/NatNavHost/TopLevelDestination: droppedSCAN_TAB,shouldNavigateToScanViewflow,navigateToScan()helper, scan nav graphShopDetailView/VM: dropped queue instructions block,ReadInstructionsTip,didShowReadInstructionsTip; renamedresetItemTag→idleItemTagand swipe action "Reset" → "Idle" (width 64dp → 96dp)ShopSettingsView/VM: removed the "Reset Number Tags" section andresetShopflowItemTagDetailView/VM: placeholder (name, description, state, completedAt)LoginRepository(+ Impl) /NatPreferencesDataSource: dropped scan-related setters/getters anddidShowReadInstructionsTipShopRepository/ShopApi/ Impl: droppedresetShopItemTagApi/Repository/ Impl: renamedresetItemTag(/reset) →idleItemTag(/idle) to match Rails API v2Utility: droppedscanUri(),extractItemTagInfoFrom(), NFC importsNatConstants: droppedSCAN_PATH,SCAN_PATH_CUSTOMERUserData: droppeddidShowReadInstructionsTip,scanViewSelectedTabIndex,shouldFetchItemTagForShowTagInfoScan,shouldCompleteItemTagForCompleteScanshopSettingsNavigation: droppedItemTagWriteRoute/itemTagWriteViewUtilityTestscanUri,CodedErrorTestNfcError,ItemTagDetailViewModelTestisLock,ShopDetailViewModelTestreset/didShowReadInstructionsTip)Config
AndroidManifest.xml: removedNFCpermission,android.hardware.nfcfeature,NDEF_DISCOVEREDintent-filter,singleTasklaunch modebuild.gradle.kts/libs.versions.toml: removedcompose-qr-code,capturable,lottie-composedependenciesuser_preferences.proto: removed scan fieldsstrings.xml: removed ~25 scan/NFC/QR strings; onboarding descriptions 1–13 rewritten to generic "Welcome to the app." placeholder so existingOnboardingViewstill compiles (worth redesigning or deleting in a follow-up)Test plan
./gradlew assembleDebugpasses./gradlew testpasses./gradlew spotlessCheckpasses./gradlew lintpasses./gradlew buildHealthpassesFollow-up
Onboarding flow was kept with placeholder text. Consider deleting or redesigning it in a separate PR.
🤖 Generated with Claude Code