Avoid redirect chains for legacy job links - #1292
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
6 Skipped Deployments
|
🦋 Changeset detectedLatest commit: c20bae6 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
There was a problem hiding this comment.
Pull request overview
This PR consolidates legacy Greenhouse job-link redirects (/jobs?gh_jid=...) into a single hop by handling gh_jid directly in the Jobs page, allowing the app to detect closed/invalid roles and redirect straight to /jobs instead of bouncing through the job detail route.
Changes:
- Added
gh_jidparsing and server-side redirect logic to/jobsto route open roles to/jobs/:idand closed/invalid roles to/jobs. - Removed the Next.js
next.config.mjsredirect rule that previously redirected/jobs?gh_jid=...to/jobs/:id(which could then redirect again). - Added a changeset entry documenting the patch change.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| apps/status.app/src/app/(website)/jobs/page.tsx | Implements gh_jid handling and single-hop redirects based on current Greenhouse job availability. |
| apps/status.app/next.config.mjs | Removes the legacy /jobs?gh_jid=... redirect rule to avoid redirect chains. |
| .changeset/warm-hounds-spark.md | Records the patch change in release notes. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Problem
Legacy Greenhouse links use
/jobs?gh_jid=.... The Next.js redirect preserved the query parameter, and closed jobs then redirected a second time from the job detail page to/jobs.Fix
Moved
gh_jidhandling to the Jobs page so it can check the current Greenhouse job state:/jobs/:id/jobsRelated to #1263
How to verify
Preview: https://status-website-git-direct-job-redirects-status-im-web.vercel.app
/jobs?gh_jid=7384954on production first. You'll see two 307s: it goes to/jobs/7384954?gh_jid=7384954, then bounces again to/jobs./jobs, and the query parameter is gone./jobs?gh_jid=abc,/jobs?gh_jid=1234567, and/jobs?gh_jid=. All of them should land on/jobsin a single hop.gh_jidfor a live role redirecting to/jobs/:id) can't be checked right now because the Status board has no open roles. The ids on the jobs page are Logos roles and link straight out to Greenhouse, so they won't work for this.