Skip to content

Avoid redirect chains for legacy job links - #1292

Merged
jinhojang6 merged 2 commits into
developfrom
direct-job-redirects
Jul 30, 2026
Merged

Avoid redirect chains for legacy job links#1292
jinhojang6 merged 2 commits into
developfrom
direct-job-redirects

Conversation

@jinhojang6

Copy link
Copy Markdown
Collaborator

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_jid handling to the Jobs page so it can check the current Greenhouse job state:

  • open jobs redirect once to /jobs/:id
  • closed or invalid jobs redirect once to /jobs

Related to #1263

How to verify

Preview: https://status-website-git-direct-job-redirects-status-im-web.vercel.app

  • Open DevTools, go to Network, and turn on Preserve log so you can see the whole redirect chain.
  • Load /jobs?gh_jid=7384954 on production first. You'll see two 307s: it goes to /jobs/7384954?gh_jid=7384954, then bounces again to /jobs.
  • Load the same URL on the preview. Now it's one 307 straight to /jobs, and the query parameter is gone.
  • Try a few bad values too: /jobs?gh_jid=abc, /jobs?gh_jid=1234567, and /jobs?gh_jid=. All of them should land on /jobs in a single hop.
  • One caveat: the open-job case (gh_jid for 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.

Copilot AI review requested due to automatic review settings July 30, 2026 12:19
@jinhojang6 jinhojang6 self-assigned this Jul 30, 2026
@vercel

vercel Bot commented Jul 30, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
status-get-status-app Ready Ready Preview Jul 30, 2026 4:32pm
status-website Ready Ready Preview Jul 30, 2026 4:32pm
6 Skipped Deployments
Project Deployment Actions Updated (UTC)
community-dapp Ignored Ignored Jul 30, 2026 4:32pm
status-api Ignored Ignored Jul 30, 2026 4:32pm
status-components Ignored Ignored Jul 30, 2026 4:32pm
status-network-hub Ignored Ignored Jul 30, 2026 4:32pm
status-network-website Ignored Ignored Jul 30, 2026 4:32pm
status-portfolio Ignored Ignored Jul 30, 2026 4:32pm

Request Review

@changeset-bot

changeset-bot Bot commented Jul 30, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: c20bae6

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
status.app Patch

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

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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_jid parsing and server-side redirect logic to /jobs to route open roles to /jobs/:id and closed/invalid roles to /jobs.
  • Removed the Next.js next.config.mjs redirect 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.

@JulesFiliot JulesFiliot 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.

:shipit:

@github-project-automation github-project-automation Bot moved this from In Progress to Waiting in Web & User Interfaces Jul 30, 2026
@jinhojang6
jinhojang6 merged commit 4b0b4e6 into develop Jul 30, 2026
26 of 27 checks passed
@jinhojang6
jinhojang6 deleted the direct-job-redirects branch July 30, 2026 16:42
@github-project-automation github-project-automation Bot moved this from Waiting to Done in Web & User Interfaces Jul 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants