Skip to content

fix(requests): consistent processing state and pick-up of due retries on the showcase #70

Description

@Fluory

Goal

A visitor always sees the same, understandable state in list and detail, and a due retry runs without waiting for the daily cron. Context: showcase review 2026-09-27 rated the live demo 4/10 because a request stayed "In Verarbeitung"; root cause measured in #67: the Gemini API free tier answers about one call in three with 503 UNAVAILABLE (high demand), and on Vercel Hobby a job retry waits for a user action or the daily cron. Epic #19.

Acceptance criteria

  • The detail page shows the same processing state as the list: human-readable last error, attempts, next retry – instead of only "Die Dokumente werden gerade ausgewertet"
  • With JOB_DRAIN_INLINE=true, opening the request list or a request detail runs one bounded drain after the response (after()), so due retries are picked up by normal use
  • The drain on page view is throttled (at most once per 30 s per instance) and never delays the page
  • Without JOB_DRAIN_INLINE nothing changes (local/production worker path)

Not part of this task

  • New queue settings, a manual "retry now" for jobs that are not yet due

Test plan

Criterion Check
state shown in detail integration test with a request in retry state
drain on view + throttle unit test of the throttle; integration test that a due job is processed after a page view

Security/Privacy affected?

No – error texts stay human-readable codes without document content.

Activity

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

Metadata

Metadata

Assignees

Labels

featureNew capabilityreadyDefinition of Ready met – may be claimed

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions