Skip to content

[MBL-19698][All] Add native document scanner for file uploads#3552

Open
hermannakos wants to merge 1 commit intomasterfrom
MBL-19698-document-scanner
Open

[MBL-19698][All] Add native document scanner for file uploads#3552
hermannakos wants to merge 1 commit intomasterfrom
MBL-19698-document-scanner

Conversation

@hermannakos
Copy link
Collaborator

@hermannakos hermannakos commented Feb 24, 2026

Test plan:

  1. Open Student app → Assignment → File Submission → verify 4 source buttons (Camera, Gallery, Device, Scanner)
  2. Tap Scanner → ML Kit scanning UI opens → scan 1+ pages → confirm → PDF attached to file list
  3. Open Student app → Inbox → Compose → Attach → verify Scanner button appears
  4. Open Teacher app → SpeedGrader → Comment attachment → verify Scanner button appears
  5. Cancel mid-scan → verify returns to previous screen gracefully
  6. On a low-RAM device/emulator (<1.7GB): verify Scanner button is hidden

refs: MBL-19698
affects: Student, Teacher, Parent
release note: Users can now scan physical documents directly from file upload screens using the device camera, with multi-page scanning, auto-crop, and PDF generation

  • Follow-up e2e test ticket created or not needed
  • Tested in dark mode
  • Tested in light mode
  • Test in landscape mode and/or tablet
  • A11y checked
  • Approve from product

🤖 Generated with Claude Code

Integrate Google ML Kit Document Scanner API to allow users to scan
physical documents directly from file upload entry points. The scanner
provides multi-page scanning, auto-crop, filters, and PDF generation.

- Add DocumentScannerManager in pandautils encapsulating all ML Kit
  interactions behind a clean API (no ML Kit types leak to app modules)
- Add Scanner button to FileUploadDialogFragment (shared across all apps)
- Add Scanner button to Student's PickerSubmissionUploadView (Mobius picker)
- Hide scanner on unsupported devices (< 1.7GB RAM)
- Add unit tests for DocumentScannerManager, ViewModel, and Update logic

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@github-actions
Copy link

📊 Code Coverage Report

⚠️ Student

  • PR Coverage: 42.98%
  • Master Coverage: 42.98%
  • Delta: -0.00%

✅ Teacher

  • PR Coverage: 25.35%
  • Master Coverage: 25.35%
  • Delta: +0.00%

✅ Pandautils

  • PR Coverage: 23.69%
  • Master Coverage: 23.68%
  • Delta: +0.01%

📈 Overall Average

  • PR Coverage: 30.67%
  • Master Coverage: 30.67%
  • Delta: +0.00%

@github-actions
Copy link

🧪 Unit Test Results

✅ 📱 Parent App

  • Tests: 309 total, 0 failed, 0 skipped
  • Duration: 37.229s
  • Success Rate: 100%

✅ 📱 Student App

  • Tests: 1252 total, 0 failed, 0 skipped
  • Duration: 0.000s
  • Success Rate: 100%

✅ 📱 Teacher App

  • Tests: 373 total, 0 failed, 0 skipped
  • Duration: 32.868s
  • Success Rate: 100%

✅ 🌅 Horizon

  • Tests: 623 total, 0 failed, 0 skipped
  • Duration: 35.649s
  • Success Rate: 100%

✅ 📦 Submodules

  • Tests: 3143 total, 0 failed, 0 skipped
  • Duration: 51.576s
  • Success Rate: 100%

📊 Summary

  • Total Tests: 5700
  • Failed: 0
  • Skipped: 0
  • Status: ✅ All tests passed!

Last updated: Tue, 24 Feb 2026 13:11:56 GMT

@github-actions
Copy link

Teacher Install Page

@github-actions
Copy link

Student Install Page

@github-actions
Copy link

Parent Install Page

@kdeakinstructure kdeakinstructure self-requested a review February 27, 2026 09:24
Copy link
Contributor

@kdeakinstructure kdeakinstructure left a comment

Choose a reason for hiding this comment

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

QA 👍

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