Skip to content

bug: view report uses generated _ instead of proper route #1

Description

@byarielm

Bug

Running a deployment of debuff - based off of dev branch, I ran into an error trying to review a report by clicking the eye icon in this image:

debuff moderation queue showing 1 item pending review, an eye icon appear on the right

I get this error at https://redacted.url/dashboard/queue/1:

red text in middle of screenshot: Invalid URL: Cannot parse `NaN` to a `i64`

The console log shows:
GET https://redacted.url/dashboard/queue/1 [HTTP/2 404 37ms]
XHR GET https://redacted.url/api/queue/NaN [HTTP/2 400 37ms]

Reproduction

  1. Deploy the production image (tested with v1.0.0-dev.10).
  2. Create or receive a report.
  3. Open the report from the queue via the view/eye action.
  4. Observe the detail page error and the /api/queue/NaN request.

Notes from LLM agent

  • This is a static-export bug, not a Docker/Tailscale setup issue.
  • generateStaticParams() creates a fake _ route at build time. The deployed detail page reads that _ instead of the real URL’s 1, producing /api/queue/NaN.
  • useParams() was not sufficient in this static fallback. The fix is to read the browser pathname, validate the ID, and serve the fallback page with HTTP 200 instead of 404. The label-definition detail route has the same pattern.
  • dev compose starts a live Next development server, which may hide this bug because it resolves route params dynamically

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions