Alice Technical Journal — Customers Homework & Admin Review Enhancements

1) Customers > Homework Detail — Media Upload & Processing Flow

  • Fixed video upload flow so uploads go directly to Cloudflare R2 only.
  • Removed synchronous processing and infinite “processing” spinner.
  • After upload:
    • UI shows a stable placeholder “Upload thành công”.
    • Status is persisted in DB (uploaded / scheduled / processing / ready / failed).
  • Video processing is now dispatched as a delayed queue job (1 minute) instead of 1 hour.
  • Customers no longer need to wait on the page for processing to finish.

2) Customers > Homework Detail — Skill Progress Logic

  • Removed the manual “Đánh dấu hoàn thành” button.
  • Skill completion is now fully derived:
    • A skill is marked as done automatically when all links inside the skill are completed.
  • Link-level checkboxes remain the single source of truth.
  • Backend recalculates skill status on each link toggle.
  • Status stays consistent across Customer / Teacher / Admin views.

3) Customers > Homework Detail — Admin Comments Visibility

  • Admin comments added at student + homework + skill level.
  • Customers now see the Admin’s comment directly inside the related skill section.
  • Comment is displayed only when it exists (no empty placeholders).
  • Data is loaded in the main homework detail payload (no per-skill requests).

4) Admin > Academic > Homework Detail — Proof & Review Improvements

  • Skill status cells now show a proof indicator icon even if the parent did not mark the skill as done.
  • Clicking the icon always opens the proof modal.
  • Added Admin comment input inside the proof modal:
    • Comment is scoped to student + homework + skill.
    • Persisted in DB (single comment per skill).
    • Re-opening the modal shows the saved comment.

5) Admin Proof Video Playback — Processing Fallback

  • When Admin views a proof video:
    • If optimized video exists → play optimized.
    • If video is still processing → fallback to original video for immediate playback.
  • Removed blocking “processing” state for Admin review.
  • Video aspect ratio issues were fixed so previews no longer stretch.

6) Admin > Insights > Media — UX Refinements

  • Clarified Media scope to include all photos and videos:
    • student photos
    • homework completion proof
    • homework-related media
  • Removed date range filter.
  • “Related Entity” column is now clickable:
    • Navigates directly to Admin > Academic > Homework > Detail when applicable.
  • Fixed stretched video preview by enforcing correct aspect ratio in modal.

7) Android Upload Bug Fix (Customers)

  • Fixed file picker issue on Android devices (e.g. Samsung S25) where only images were selectable.
  • Updated file input configuration so the picker shows both images and videos.
  • Backend validation aligned to accept both media types.
  • No regressions on iOS or desktop.

8) Media Cleanup Tooling

  • Designed a new Artisan command to clean up storage:
    • Safely removes original images/videos after processing succeeds.
    • Keeps optimized variants only.
    • Supports dry-run, chunking, and safety guards.
  • Intended to reduce Cloudflare R2 storage usage.