Skip to content

Add stable sort tiebreaker to prevent feed pagination duplicates #64

Description

@mojoro

Audit finding #54

When sorting by AI score during active analysis, cursor-based pagination can show duplicate jobs because scores change mid-scroll, shifting sort order.

Fix: Add a stable tiebreaker (e.g., createdAt or id) to the buildOrderBy function in src/lib/jobs.ts so the sort is deterministic even when scores update between page fetches.

Files: src/lib/jobs.ts, potentially src/app/(dashboard)/dashboard/actions.ts

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions