Skip to content

Fix resume preview failing to load in the browser - #379

Merged
aamoghS merged 11 commits into
devfrom
hotfix-fix-main-review-issues-9d3d
Sep 7, 2026
Merged

Fix resume preview failing to load in the browser#379
aamoghS merged 11 commits into
devfrom
hotfix-fix-main-review-issues-9d3d

Conversation

@github-actions

@github-actions github-actions Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Automated PR tracking changes from hotfix-fix-main-review-issues-9d3d into dev.


Note

Medium Risk
Touches production deploy config, new PII storage (resumes), schema pushes, and staff permission semantics (isAdmin excludes volunteers); audit log API removal may break any remaining /admin/audit consumers.

Overview
This PR adds member resume book infrastructure (metadata in Postgres, PDFs in Cloud Storage via RESUME_BUCKET in apphosting.yaml), a resume tRPC router and shared resume-list queries for staff filtering/ZIP downloads, plus docs in docs/resume-book.md. Club projects move to a club_project table with a Fall 2026 db:seed:club-projects script so / and /projects are DB-driven instead of stale static data.

Club project applications now require a pitch and can attach an optional PDF resume on requestToJoin (uploadProcedure); leaders fetch resumes via applicantResume without loading PDFs in the applicant list. Copy and glossary shift from “initiative” to “club project” where member-facing.

Operational and performance fixes dominate the API layer: CacheService.getOrSet collapses cache stampedes; cheaper deletePattern and rate-limit/cache eviction; negative caching for non–project-leaders; admin.isAdmin treats volunteers as non-staff; new admin.growth insights; hot paths (events, hackathons, analytics, portal hackathon resolution) use getOrSet. The audit tRPC router is removed (and its router test). Monitoring adds p99 tRPC latency (histogram buckets, Grafana, Prometheus recording rules + PortalApiTailSlow alert).

CI upgrades pnpm/action-setup to v5 and stops pinning pnpm in workflows so packageManager / pnpm-workspace.yaml settings apply. Docs add docs/club-project.md and bump documented pnpm to 12.3.4.

Reviewed by Cursor Bugbot for commit d140df2. Bugbot is set up for automated code reviews on this repo. Configure here.

aamoghS and others added 10 commits August 28, 2026 18:17
Stop decodeURIComponent from crashing Settings on a truncated filename, wait for the matching ZIP entry instead of the previous one, and keep volunteer accounts from counting as staff. Analytics now uses unexpired memberships and chronological bootcamp terms.
The edge proxy sent X-Frame-Options: DENY on /api/resume, so Chrome's PDF viewer reported a failed load for a file that was already on disk. Preview now fetches the PDF as a blob, and uploads keep the original bytes instead of a pdf-lib rewrite that can corrupt real resumes.

Co-authored-by: Aamogh <aamoghS@users.noreply.github.com>
Force the blob to application/pdf, reject non-PDF bodies, and add an
Open-in-new-tab path so Chrome's viewer is not the only way to see a
stored resume.

Co-authored-by: Aamogh <aamoghS@users.noreply.github.com>
@cursor cursor Bot changed the title Feature: hotfix-fix-main-review-issues-9d3d to dev Fix resume preview failing to load in the browser Sep 7, 2026
@github-actions

github-actions Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor Author

Dependency Review

The following issues were found:

  • ✅ 0 vulnerable package(s)
  • ✅ 0 package(s) with incompatible licenses
  • ✅ 0 package(s) with invalid SPDX license definitions
  • ⚠️ 1 package(s) with unknown licenses.
  • ⚠️ 25 packages with OpenSSF Scorecard issues.

View full job summary

@github-actions

github-actions Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor Author

Visit the preview URL for this PR (updated for commit d140df2):

https://hacklytics2027--pr-379-10oww4s6.web.app

(expires Mon, 14 Sep 2026 17:51:54 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: c48ba34db61581e25fe2978355160b5eefe0e83f

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit d140df2. Configure here.


const result = row[0] ?? null;
ctx.cache.set(cacheKey, result, 60);
return result;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Empty resume cache never hits

Low Severity

resume.me stores null when the caller has no row, but cache.get also returns null on a miss. The cached !== null guard therefore treats a cached empty result as a miss and queries member_resume on every settings load.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit d140df2. Configure here.

@aamoghS
aamoghS merged commit 34dc55c into dev Sep 7, 2026
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant