Skip to content

Cleanup#17

Merged
paulpv merged 9 commits into
mainfrom
cleanup
May 2, 2026
Merged

Cleanup#17
paulpv merged 9 commits into
mainfrom
cleanup

Conversation

@paulpv
Copy link
Copy Markdown
Contributor

@paulpv paulpv commented May 2, 2026

No description provided.

paulpv and others added 2 commits May 1, 2026 21:01
Dead code removed
- Drop orphaned AppPreferencesManager API left over from the profiles
  migration: targetFolderFlow, getTargetFolder(), setTargetFolder(),
  DEFAULT_TARGET_FOLDER, TARGET_FOLDER_KEY (legacy key kept as a local
  val inside ensureDefaultProfile() for the migration read path only)
- Remove unused navigation-compose dependency from libs.versions.toml

Correctness
- Inject AppPreferencesManager into MediaScanner.scan() instead of
  constructing a new instance on every scan call
- MAX_LOG_ENTRIES raised from 10 to 100
- Fix rememberSaveable → remember for multi-select bar height; the pixel
  measurement is orientation-dependent and must not survive rotation
- ProfileEditorDialog remember calls keyed on initial?.id so fields
  reset correctly when switching between profiles
- Simplify MediaMover relativeFolder normalization (the DCIM branch was
  a no-op since Environment.DIRECTORY_DCIM == "DCIM")
- Deduplicate notification channel creation: EXIFilerService now calls
  MediaScanner.ensureNotificationChannel() instead of duplicating it
- Cancel BootReceiver coroutine scope in the finally block after
  pendingResult.finish()
- Add .mov to MonitoringProfile.DEFAULT file patterns (Ray-Ban glasses
  can produce MOV files; mov was already in SUPPORTED_EXTENSIONS)

UX
- Profile card is now collapsible; tap to reveal details + Edit/Delete
- ProfileEditorDialog Column is scrollable on small/landscape screens
- EXIF filter field shows supporting text listing the valid keys
- Permission banner reworded from "required" to "Recommended" with an
  accurate description of what it enables vs. what happens without it
- Activity log section header shows "Recent Activity (N/100)" count
- strings.xml: recent_activity_count format string, filters_hint string,
  updated permission_media strings, mov added to default patterns

Build & CI
- Enable R8 minification (isMinifyEnabled = true) with proguard-rules.pro
- Remove pull_request trigger from build.yml (pr-check.yml already covers
  PR validation; having both caused every PR to run tests twice)
- Add lint step to build.yml so lint failures surface on post-merge runs
- Add android:roundIcon to manifest (uses same drawable as icon for now)
- Add res/xml/data_extraction_rules.xml excluding datastore/ from cloud
  backup and device-to-device transfer; reference it from manifest

Docs
- AGENTS.md: fix stale Kotlin (2.0.21→2.2.10) and AGP (8.5.2→9.2.0)
  versions; scanDownloads() → MediaScanner.scanForProfile(); processedUris
  owner corrected from EXIFilerService to MediaScanner; CI table updated
- README.md: versions updated; detection table rewritten to describe the
  general exifFilters system; service flow corrected; TODO list refreshed

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings May 2, 2026 04:02
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR is a general cleanup pass across the shared detection defaults, Android UI/service wiring, build configuration, and documentation.

Changes:

  • Add MOV support to the default monitoring profile and default UI values.
  • Improve UX copy and UI behavior (activity log header count, expandable profile cards, scrollable profile editor, updated permission messaging).
  • Operational/build updates: exclude DataStore from backup/transfer, enable release minification with Proguard rules, and adjust CI workflow steps.

Reviewed changes

Copilot reviewed 16 out of 16 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
shared/src/commonMain/kotlin/com/exifiler/MonitoringProfile.kt Adds mov to the default profile’s file patterns.
gradle/libs.versions.toml Removes navigation-compose from the version catalog.
androidApp/src/main/res/xml/data_extraction_rules.xml Adds backup/transfer exclusions for DataStore.
androidApp/src/main/res/values/strings.xml Adds “Recent Activity (count)” string and updates permission/profile editor copy/defaults.
androidApp/src/main/java/com/exifiler/android/ServiceManager.kt Passes an AppPreferencesManager into MediaScanner.scan(); cancels receiver scope after boot handling.
androidApp/src/main/java/com/exifiler/android/MediaScanner.kt Updates scan() signature and exposes ensureNotificationChannel() for reuse.
androidApp/src/main/java/com/exifiler/android/MediaMover.kt Simplifies/normalizes destination relative-path handling (removes Environment special-casing).
androidApp/src/main/java/com/exifiler/android/MainActivity.kt UI/UX updates: activity header count, expandable profile card, dialog state keying + scroll, removes rememberSaveable for action bar height.
androidApp/src/main/java/com/exifiler/android/EXIFilerService.kt Uses MediaScanner.ensureNotificationChannel() and updated scan() signature.
androidApp/src/main/java/com/exifiler/android/AppPreferencesManager.kt Removes legacy target-folder API, increases log capacity to 100, migrates legacy target_folder into default profile.
androidApp/src/main/AndroidManifest.xml Adds roundIcon and dataExtractionRules reference.
androidApp/proguard-rules.pro Adds baseline R8/Proguard rules to support minified release builds.
androidApp/build.gradle.kts Bumps app version and enables minification for release builds.
README.md Updates docs for new log capacity, profile-driven detection description, workflow descriptions, and TODO list.
AGENTS.md Updates guidance/docs to reflect current scanner/test structure and CI trigger behavior.
.github/workflows/build.yml Removes PR trigger from build.yml and adds a lint step on push builds.

Comment thread androidApp/src/main/java/com/exifiler/android/MainActivity.kt
Using plain remember resets the padding to 0 on rotation, allowing the
list to scroll behind the bottom action bar for a full layout pass.
rememberSaveable intentionally preserves the last-known height so the
list keeps non-zero padding immediately after a config change; the value
is corrected by onSizeChanged on the very next measure.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@paulpv
Copy link
Copy Markdown
Contributor Author

paulpv commented May 2, 2026

@copilot CodeQL action is failing with:

Run github/codeql-action/analyze@v4
While resolving threads, found a cgroup CPUs file with 4 CPUs in /sys/fs/cgroup/cpuset.cpus.effective.
Generating diff range extension pack
Extracting java
Finalizing java
  /opt/hostedtoolcache/CodeQL/2.25.3/x64/codeql/codeql database finalize --finalize-dataset --threads=4 --ram=14575 /home/runner/work/_temp/codeql_databases/java
  CodeQL could not process any code written in Java/Kotlin. For more information, review our troubleshooting guide at https://gh.io/troubleshooting-code-scanning/no-source-code-seen-during-build .
  Error: Encountered a fatal error while running "/opt/hostedtoolcache/CodeQL/2.25.3/x64/codeql/codeql database finalize --finalize-dataset --threads=4 --ram=14575 /home/runner/work/_temp/codeql_databases/java". Exit code was 32 and last log line was: CodeQL could not process any code written in Java/Kotlin. For more information, review our troubleshooting guide at https://gh.io/troubleshooting-code-scanning/no-source-code-seen-during-build . See the logs for more details.

Copy link
Copy Markdown
Contributor

Copilot AI commented May 2, 2026

@copilot CodeQL action is failing with:

Run github/codeql-action/analyze@v4

...

Fixed in 86e5ebf. The default GitHub CodeQL setup was using autobuild which only resolved Gradle dependencies without compiling any Kotlin source. Added .github/workflows/codeql.yml with build-mode: manual that sets up JDK 17 + Android SDK and runs ./gradlew :androidApp:assembleDebug before analysis, so CodeQL can observe and extract the Kotlin/Java code.

Copilot finished work on behalf of paulpv May 2, 2026 04:13
paulpv and others added 4 commits May 1, 2026 21:18
setup-java's `cache: gradle` restores compiled .class files so Gradle
marks compilation tasks UP-TO-DATE and skips them entirely. CodeQL's
Java extractor works by intercepting kotlinc/javac invocations, so a
fully-cached build produces an empty database and the fatal error:
"CodeQL could not process any code written in Java/Kotlin."

Adding --no-build-cache forces all compilation tasks to run from source,
giving the extractor the compiler invocations it needs.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
--no-build-cache alone is insufficient: setup-java's cache: gradle
restores the full Gradle build cache including compiled .class outputs,
and AGP 9 still marks compile tasks UP-TO-DATE, so kotlinc never runs
and CodeQL's Java extractor intercepts nothing.

build-mode: none extracts code directly from source files without
requiring a compiler invocation at all. It's supported for Java/Kotlin
since CodeQL 2.13 (runner is on 2.25.3) and is the recommended fix
when Gradle caching causes the extractor to see an empty build.

Removes the now-unnecessary Build step from the workflow.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Also incrementing other action dependencies
Delete .github/workflows/codeql.yml workflow.
README add the "adb hack for truly persistent scanning icon" note.
@paulpv paulpv merged commit acf7d39 into main May 2, 2026
2 checks passed
@paulpv paulpv deleted the cleanup branch May 2, 2026 05:38
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.

3 participants