Skip to content

Daily Challenge widget is entirely hardcoded fake data #402

Description

@jakharmonika364

What problem does this solve?

The Daily Challenge card on the contributor dashboard (src/components/contributor-dashboard/daily-challenge.tsx) renders from a hardcoded CHALLENGE constant. current is always 0, and the title, description, goal, and XP reward never change for any user. The file has a literal comment, TODO: wire to real progress when table exists. There is no challenges table anywhere in the schema or migrations. The countdown timer is the only real part of the widget.

Type

New Feature

Who benefits?

Contributors

Proposed Solution

Add a schema for challenge templates (what the challenge is, its goal, its XP reward, rotation logic) and per user progress, then an Inngest job that increments progress off real events (PR opened, issue comment, review submitted, whichever the challenge type calls for) and a server action the dashboard widget can call instead of rendering the constant directly.

Alternatives Considered

Could remove the widget until it is real, but it is a visible piece of the dashboard presumably meant to drive daily engagement, building it properly seems better than hiding it.

Additional Context

This is the largest of the issues filed in this pass. It needs new schema, a background job, and a server action, not just a UI tweak.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    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