← Back to Pull requests

Upload resume, blind resume and video when adding an application by hand #292

Open
unknown opened this pull request with 650 lines diff across 8 files
View on GitHub
unknown unknown commented on Oct 03, 2026 22:15 UTC
Author

What changed

Applications → Add Application asked for links to the resume and video. An admin entering an application by hand usually has the files, not links. The form now takes:

| Field | Before | After |
|---|---|---|
| Resume | URL (required) | PDF upload (required, 10 MB) |
| Blind resume | not on the form | PDF upload (optional, 10 MB) |
| Short answer | textarea | textarea, labelled as a pasted response |
| Video | URL | file upload (.mp4 .mov .m4v .webm, 500 MB) with a progress bar |

Headshot and cover letter are still links.

How it works

  • Resume is stored as the application's first ResumeUpload, so "Replace resume" later keeps its history.

  • Blind resume and video are files in the private resumes bucket (services/applicationDocuments.js). No new table and no migration: like a Drive file, one is readable only while an application's blindResumeUrl or videoUrl names it. Staff may open any such document, an applicant only their own.

  • The video never passes through /api. The browser gets a signed upload URL from POST /api/application-documents/video-uploads (admin only) and sends the file straight to Supabase Storage. The manual route is then given the document id and checks the file is really there. Playback streams it in 4 MB ranges, the same as a Drive video.

  • POST /api/applications/manual accepts multipart, and still accepts JSON with links.

  • If creating the application fails, the stored PDFs are removed. An uploaded video is kept so a retry does not send it again.
  • Evidence

  • Server: 2,982 tests pass, including new ones for the manual route, the document routes and the document id rules.

  • Client: 1,163 tests pass, including new ones for the modal.

  • Round trip against the real storage bucket with a 300 KB throwaway object (deleted afterwards): signed-URL PUT answered 200, size read back as 300000, a 1,000-byte range and the whole file both matched byte for byte.
  • Not done: a screenshot of the form, and a full run in the browser. Creating an application for real writes to the production database, so that is left for a reviewer to try.

    Worth knowing

  • Video upload needs Supabase configured. There is no local-disk fallback for it.

  • The 500 MB limit is ours. If the Supabase project's upload limit is lower, that one applies first and the form shows the error.

  • scripts/transcode-videos.js only understands Drive URLs, so it will report an uploaded video as unparsed and leave it alone. A .mov uploaded this way is played as it was uploaded.
  • 🤖 Generated with Claude Code

    <!-- greptile_comment -->

    <!-- greptile_summary -->

    <h2><a href="https://app.greptile.com/api/retrigger?id=74169743"><picture><source media="(prefers-color-scheme: dark)" srcset="https://greptile-static-assets.s3.amazonaws.com/badges/RetriggerDark.svg?v=2"><source media="(prefers-color-scheme: light)" srcset="https://greptile-static-assets.s3.amazonaws.com/badges/Retrigger.svg?v=2"><img alt="Retrigger" src="https://greptile-static-assets.s3.amazonaws.com/badges/Retrigger.svg?v=2" align="right"></picture></a>Confidence Score: 4/5</h2>

    <!-- greptile-risk -->

    The PR is not ready to merge while cleanup can delete a video that a concurrently completing application save references.

    <h2><a href="https://app.greptile.com/ide/claude-code?prompt=%23%23%23%20Issue%201%0Aserver%2Fsrc%2Froutes%2FapplicationDocuments.js%3A100-102%0AIf%20a%20manual%20application%20save%20is%20still%20completing%20when%20the%20form%20sends%20this%20cleanup%20request-for%20example%2C%20after%20the%20browser%20reports%20a%20network%20error-the%20reference%20check%20can%20find%20no%20application%20yet.%20The%20save%20can%20then%20commit%20before%20%60removeDocument%60%20runs%2C%20leaving%20the%20saved%20application%20pointing%20to%20a%20deleted%20video.%0A%0A---%0A%0AFor%20each%20issue%20above%2C%20determine%20whether%20it%20is%20valid%20and%20should%20be%20fixed.%20If%20so%2C%20fix%20it%20directly.&repo=uconsulting-ats-dev-team%2Fuc-ats&pr=292&platform=github"><picture><source media="(prefers-color-scheme: dark)" srcset="https://greptile-static-assets.s3.amazonaws.com/badges/FixAllInClaudeDark.svg?v=7"><source media="(prefers-color-scheme: light)" srcset="https://greptile-static-assets.s3.amazonaws.com/badges/FixAllInClaude.svg?v=7"><img alt="Fix All in Claude Code" src="https://greptile-static-assets.s3.amazonaws.com/badges/FixAllInClaude.svg?v=7" align="right"></picture></a>Findings</h2>

    1. <img alt="P1" src="https://greptile-static-assets.s3.amazonaws.com/badges/p1.svg?v=9" align="top">&nbsp;Cleanup can delete saved videos <a href="https://github.com/UConsulting-ATS-Dev-Team/uc-ats/pull/292#discussion_r4175155682">▶</a>

    <h3>Summary</h3>

    The PR replaces manual-application resume and video links with uploads, adds private document delivery, and makes uploaded resumes available through partner assignments. Since the previous review, it also adds sealed-record checks, upload cancellation and cleanup, and partner PDF resolution.

    <details open><summary>Diagram</summary>

    sequenceDiagram
      participant B as Admin browser
      participant S as API
      participant O as Private storage
      participant D as Database
      B->>S: Request signed video upload URL
      B->>O: Upload video
      B->>S: Create manual application with video ID and PDFs
      S->>O: Verify video and store PDFs
      S->>D: Commit application and resume version
      B-->>S: Discard video if save appears to fail
      S->>D: Check whether video is referenced
      S->>O: Remove unreferenced video
    

    </details>

    <!-- greptile_confidence_score:4 -->

    <sub>Reviews (2) · Last reviewed commit: "Seal uploaded documents, cancel on close..."</sub>

    <!-- /greptile_comment -->

    Diff: 650 lines (+487 / -163) across 8 files Reviewer: greptile-apps[bot] Review duration: 11m
    All Vouch review confidence checks passed
    Residual risk 0.31 = Change Risk (0.52) × (1 − Review Confidence (0.40)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.52 · 650 lines diff across 8 files
    0.52
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.02 · 1 substantive comment(s)
    0.02
    Model 3 · Review Timing & Attention
    Session adequacy: 72% · Reviewer familiarity: 35%
    39%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.388
    Shallow Review Depth shallow_review_depth
    0.344
    Real PR Conversation Timeline
    1 comments
    "Review active on #292"
    general weight: 0.35
    Assignees
    Unassigned
    Labels
    risk: low confidence: 39.9% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 52% (MEDIUM) · Higher = larger blast radius
    52%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 39.9% · Lower = rushed or shallow review
    39.9%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 31.2% · Safe to merge
    31.2%