This is a bounty to fix a bug in the `/jobs/[id]` route of a web application. The issue is that the job detail page displays placeholder text instead of resolving mock job data by ID and shows a success state for unknown IDs instead of a not-found fallback. The fix involves implementing the logic to correctly fetch and display job details from a mock data source and handling unknown IDs gracefully.
A starter prompt for Claude Code, what you'll need, and how to reach them.
You are an expert full-stack developer. Your task is to address issue #2760 in the `SecureBananaLabs/bug-bounty` repository, which describes a bug in the `/jobs/[id]` route. The current implementation renders placeholder text instead of looking up job details from `apps/web/lib/mock.ts` and fails to show a not-found state for unknown IDs. **Goal:** Implement the logic to correctly resolve job details by ID from the mock data and display them, and create a clear 'job not found' fallback for invalid IDs. The fix must be isolated to the web job detail route and potentially the mock data shape. **Stack:** The project uses Next.js, React, and TypeScript. Adhere to the existing project's coding style and structure. **Steps:** 1. Locate the `/jobs/[id]` route component and the `apps/web/lib/mock.ts` file. 2. Implement a function in `apps/web/lib/mock.ts` (or a new utility if more appropriate) that takes a job `id` string (e.g., "job-101") and returns the corresponding mock job object (title, budget, etc.) or `null`/`undefined` if not found. 3. In the job detail route component, use this function to fetch job data. If data is found, render the actual title and budget. 4. If no job data is found (i.e., the function returns `null`/`undefined`), render a clear 'Job Not Found' message or component. 5. Ensure the solution is concise and integrates seamlessly with the existing codebase. 6. Provide updated code for the relevant files, explaining the changes.
Bounty (amount on the issue). Parent bounty: #743 ## Bug The `/jobs/[id]` route renders the requested route id as placeholder text instead of looking up the selected job from `apps/web/lib/mock.ts`. The job list links to concrete ids such as `job-101`, `job-102`, and `job-103`, but the detail page does not render the matching title or budget. Unknown job ids also look successful instead of showing a clear fallback. ## Expected - Known job ids render the matching mock job title and budget. - The detail page exposes useful project context instead of generic placeholder copy. - Unknown job ids render a clear not-found fallback without pretending a real job exists. ## Scope Keep the fix limited to the web job detail route and mock data shape if needed. Related reissue: #2755
Standard for any dev work
Standard development tool
Required for Next.js development
Core technologies for the operator
Comment on GitHub issue #2760, then open a draft Pull Request to the `SecureBananaLabs/bug-bounty` repository.
“I've reviewed issue #2760 and have a working solution for the job detail route bug. I'll open a draft PR shortly to demonstrate the fix for resolving mock job data by ID and handling unknown IDs correctly. Please let me know if you have any specific testing requirements.”
Open the original ↗