Update baseline profile with DeckPicker onResume journey#8
Closed
Galal-20 wants to merge 87 commits into
Closed
Conversation
c915ac5 to
2e2ce73
Compare
2e2ce73 to
303b044
Compare
303b044 to
b9c87cf
Compare
Since the configuration cache was enabled in 6a87b7d, the CodeQL job has regularly OOMed. CodeQL appears to run its own JVM, stopping the Gradle daemon should free ~3 GB for CodeQL with no downside. Fixes 20768 Assisted-by: Claude Opus 4.7 (investigation)
Both the 'Right Click Context Menu' and the 'Long press context menu' shared the same output shape and type, so combine them A data class is used to consolidate the result bundle processing Assisted-by: Claude Opus 4.6
Extract the logic from the DeckPicker - the menus should be responsible
for querying their required data
suspend factory methods are a better abstraction
`bundleOf()` will be deprecated, so remove a few instances
`withCol { decks.select(deckId) }` remains as this is a Deck Picker
concern - this shows the visual change of the deck when long-pressed
Assisted-by: Claude Opus 4.6
* remove unnecessary state * define 'show' which handles DeckPicker specific logic more verbose, but easier to understand Assisted-by: Claude Opus 4.6
Assisted-by: Claude Opus 4.6
On API 32 and earlier, AppCompatDelegate.setApplicationLocales only works with AppCompatActivity. Work around this by manually setting the app locale Fixes 19048 Assisted-by: Claude Opus 4.6 - withAppLocale + investigation
On API 32 and earlier, AppCompatDelegate.setApplicationLocales only works with AppCompatActivity. Work around this by manually setting the app locale Issue 19048 Assisted-by: Claude Opus 4.6 - most of the refactoring
`setup-gradle@v6` now hard-errors when it can't find files to build a hash key. Previously it had nothing to hash, now it hashes the selected PR Fixes 20779 Assisted-by: Claude Opus 4.7 - diagnostics
Changes the method to accept a file instead of a collection object. Obtaining the collection object requires opening the database, which will propagate an exception if the collection file is indeed corrupt, preventing the repair from executing.
Co-authored-by: ShaanNarendran <shaannaren06@gmail.com>
* Move 'SortType' to 'LegacySortType' * Define and test the new 'SortType' Prep for issue 17732
Prep for issue 17732
- onOptionsItemSelected(R.id.action_sync) : collapse toolbarSearchItem before starting the sync. That fires onMenuItemActionCollapse -> showFloatingActionButton(), so the FAB is back by the time the sync result snackbar appears. - onMenuItemActionExpand: after hideFloatingActionButton(), null out activeSnackBar?.anchorView so a live snackbar drops to sit above the keyboard instead of hovering where the FAB used to be. - onMenuItemActionCollapse: after showFloatingActionButton(), re-anchor activeSnackBar?.anchorView to fabMain so it sits above the FAB instead of being overlapped by it.
- unit test for profile guard Assisted-by: Gemini 3.1 Pro - Unit test: ProfileSwitchGuardTest
Refine card field docs and tests test: fix nullable cursor handling in provider tests docs: refine card field KDoc in FlashCardsContract docs: clarify FlashCardsContract.Card.TYPE KDoc
- test: unit test for renaming method
This one has caused me multiple issues in the past Assisted-by: Claude Opus 4.6
Remove could be the number of tags, or the number of notes https://github.com/ankitects/anki/blob/2d44d4d6bc486803f9236033ad840df203c87036/rslib/src/tags/rename.rs https://github.com/ankitects/anki/blob/2d44d4d6bc486803f9236033ad840df203c87036/rslib/src/tags/remove.rs
* Based on tags.tree() * Delete/clear unused/rename are supported * Collapsed/expanded state is synced with the collection * A 'TagName' abstraction acts as a guardrail against logging tag names * Introduces a Compose-style 'Channel' for UI state notifications Part of issue 10397 Assisted-by: Claude Opus 4.6 Almost entirely written by Claude, with hours of back-and-forth over design I drove the ideas, Claude wrote the code
`:common` will be moved to a `java-library`. SLF4J is bridged to Timber via slf4j-timber in the app, so logs will continue to work. Due to this, fewer classes will need to move to `:common:android` Using 1.7.30 as this is the current transitive dependency Assisted-by: Claude Opus 4.6
It's better to remove the opt-in flag, rather than add the library
We want to move Android dependencies to ':common:android', these files can remain in a `jvm-library` if we fixup a few annotations Related to https://redirect.github.com/ankidroid/Anki-Android-Backend/issues/674
In preparation for moving libanki to be pure JVM, we need :common to be a java-library. JSON is supported by both android and JVM (with slightly differing apis so it can remain in `:common` Assisted-by: Claude Opus 4.6 Related to https://redirect.github.com/ankidroid/Anki-Android-Backend/issues/674
`com.ichi2.anki.utils.android` should be `com.ichi2.anki.common.utils.android`
Otherwise it's easy to forget to add it to androidModulesToUnitTest Assisted-by: Claude Opus 4.6 - tests
For now, this only shows the status, not the checks * Adds a menu item on reminders to open troubleshooting * Display the overall status of checks Influenced by Google 'Battery Health' Assisted-by: Claude Opus 4.6
Assisted-by: Claude Opus 4.6
Allow a user to tap a troubleshooting issue and open an appropriate screen to fix the issue Assisted-by: Claude Opus 4.6
Extract CrashReportService.initialize() and isProperServiceProcess() into top-level functions.
As we move towards a multi-module architecture, feature modules need crash reporting without depending on the app module. Without this, each feature module would need its own bridge interface (e.g. WidgetCrashReporter, BrowserCrashReporter) duplicating the same pattern everywhere. This does use android dependencies though and those don't seem removable, so it gets the android-capable sub-module of common
Move CrashReportService from com.ichi2.anki to com.ichi2.anki.common.crashreporting and update imports. Assisted-by: Claude Opus 4 (1M context)
Assisted-by: GPT-5.4
Users must now explicitly opt in to analytics rather than having consent pre-checked. Aligns the dialog default with an opt-in (rather than opt-out) consent model.
Co-authored-by: David Allison <62114487+david-allison@users.noreply.github.com>
Code from 1a3effd Related to issue 1862 Fixes 20529
If an old intent for a review reminder notification somehow sticks around after a schema migration update, the ReviewReminder stored in the intent will become out of date. While we could implement custom logic to migrate that reminder, that would duplicate the logic for schema migrations currently present in ReviewRemindersDatabase. It's simpler to just fallback on that already-existing logic by triggering a total review reminder schedule and returning early. Hence, this code change.
A bit of an embarrassing bug.
Fixes bug in DeckPicker: open toolbar SearchView -> FAB is hidden -> long click deck -> delete deck -> Info SnackBar appears, SearchView is closed, FAB is still missing Deleting the deck would refresh the menu so the SearchView gets rebuilt and its listeners(which handle the FAB) would not get triggered. The fix sets the the FAB as visible when the delete deck handler is hit, just before the SnackBar is requested.
Author
|
@criticalAY hello, can you merge my work in your branch to make someone review it? |
Owner
|
This can go as a separate PR in AnkiDroid. Please wait until the original PR is merged |
40353f9 to
857c493
Compare
857c493 to
21d58d0
Compare
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.
Purpose / Description
Add a baseline profile test to ensure that
DeckPicker.onResume()is executed and captured during profile generation.Fixes
DeckPicker:onResumeis called ankidroid/Anki-Android#20734Approach
Added a new test
confirmOnResumeIsCalledThe test performs:
DeckPickertoPreferencesActivityvia the navigation drawerDeckPickerusing back navigationThis guarantees that
DeckPicker.onResume()is triggered during the baseline profile collectionVerified that the method is included in the generated baseline profile: SPLcom/ichi2/anki/DeckPicker;->onResume()V
How Has This Been Tested?
Steps:
Result:
DeckPicker.onResume()is present in the baseline profile:SPLcom/ichi2/anki/DeckPicker;->onResume()VTest Environment:
Checklist
Please, go through these checks before submitting the PR.