Skip to content

j0di3: Gate Matches tab on JOB_MATCH_ENABLED flag (follow-up from #1080) #1095

Description

@jeromehardaway

Follow-up from #1080. /jobs/match is 503-gated by JOB_MATCH_ENABLED and the default is OFF in production today. With the current code, every visit to the Matches tab returns 503 and surfaces a generic "Failed to load matches" instead of the backend's intentional product copy.

Two acceptable fixes (per spec)

Option A — hide the tab until the flag is on (recommended).

  • On first jobs-page mount, POST /jobs/match once and inspect the response.
  • If 503 with code: "SERVICE_UNAVAILABLE", cache the verdict in component state and don't render the Matches tab button at all.
  • Surface resume scoring + tailoring on the Jobs page in its place.

Option B — render the 503 message verbatim.

  • Fix JobMatch.tsx:33 — the 503 body is {error: {code, message, request_id}}. The current code does errData.error || "Failed to load matches" which renders [object Object] or falls back to the generic string.
  • Read errData.error?.message and render it directly. The text is intentional product copy: "Job matching is not yet available. We're sourcing real postings; in the meantime use /jobs/resume/score for resume coaching."

Acceptance

  • A user with the flag off either does not see a Matches tab, or sees the operator-friendly message — never a generic error.
  • The fix doesn't break behavior once the flag flips on.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions