Skip to content

#233 Upload Reports Modal - #260

Open
tsudhakar87 wants to merge 4 commits into
mainfrom
233-wire-reports-file-upload
Open

#233 Upload Reports Modal#260
tsudhakar87 wants to merge 4 commits into
mainfrom
233-wire-reports-file-upload

Conversation

@tsudhakar87

@tsudhakar87 tsudhakar87 commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

ℹ️ Issue

Closes #233

📝 Description

Implemented end-to-end functionality for uploading reports

Changes:

  1. Added UploadReportModal frontend component with file picker, title, project, and report type fields
  2. Added reports.ts API library with functions for fetching the presigned S3 URL, uploading directly to S3, and saving the report record
  3. Added CORS preflight (OPTIONS) handler to the reports lambda so browser requests aren't blocked
  4. Fixed the auth lambda Dockerfile and docker-compose build context so it can resolve the shared types package

✔️ Verification

(I changed title to just be "test" after several iterations of testing)

I got my token by hitting the auth /login endpoint, then inserted myself as an admin into the users table with the cognito_sub decoded from the token, then saved this as branch_access_token (key) with the token (value) in local storage. Then I was able to see all the projects on the page (added the modal locally to test and view this below:)

(old photos)
Screenshot 2026-06-30 at 3 57 01 PM
Screenshot 2026-06-30 at 3 57 08 PM
Screenshot 2026-06-30 at 4 04 50 PM
Screenshot 2026-06-30 at 3 57 49 PM
Screenshot 2026-06-30 at 3 57 41 PM
Screenshot 2026-06-30 at 4 21 22 PM
Screenshot 2026-06-30 at 4 22 16 PM
Screenshot 2026-06-30 at 4 22 39 PM

(new photos on the reports page)
Screenshot 2026-07-27 at 4 40 03 PM
Screenshot 2026-07-27 at 4 40 16 PM

🏕️ (Optional) Future Work / Notes

Did you notice anything ugly during the course of this ticket? Any bugs, design challenges, or unexpected behavior? Write it down so we can clean it up in a future ticket!

Reports page isn't implemented yet, and I don't believe the modal for uploading reports is in the Figma yet (?) so I will be refining this based on Figma designs

@tsudhakar87
tsudhakar87 marked this pull request as ready for review July 27, 2026 20:41
@github-actions
github-actions Bot requested a review from Rayna-Yu July 27, 2026 20:41
github-actions Bot added a commit that referenced this pull request Jul 27, 2026

@nourshoreibah nourshoreibah left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Just some questions about the backend diffs, otherwise this is looking good!

@@ -1,22 +1,17 @@
FROM node:20-alpine

WORKDIR /app

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

was the docker file broken without these changes?

build:
context: ./lambdas/auth
dockerfile: Dockerfile
context: ../..

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I think wed want this ./lambdas/auth since wed run this from backend

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.

Wire file upload for reports

2 participants