Skip to content

Fix: Available rewards feed includes closed GitHub issues - issue 55 - #61

Open
BootstrapAI-mgmt wants to merge 2 commits into
Opire:mainfrom
BootstrapAI-mgmt:fix/issue-gh-Opire-frontend-issues-55
Open

Fix: Available rewards feed includes closed GitHub issues - issue 55#61
BootstrapAI-mgmt wants to merge 2 commits into
Opire:mainfrom
BootstrapAI-mgmt:fix/issue-gh-Opire-frontend-issues-55

Conversation

@BootstrapAI-mgmt

Copy link
Copy Markdown

🏷️ Type of PR

  • 🐞 Bug Fix

📋 Required Checks

  • 👀 I Read the Contributing Guide
  • ✅ The Test are Passing
  • 💅 The Code is Linted
  • 🗂️ The Code is Well Structured

📝 Description of the Changes

Removes 'closed' or 'deleted' issue rewards from feed appearances. Raw
rewards state retained for pagination only.

Concretely:

  • IssueListDTO gains optional isClosed / isDeleted flags, populated
    from the issue domain object in the existing mapper, plus an exported
    isRewardAvailable predicate that owns the availability rule.
  • The home view derives visibleRewards (rewards.filter(isRewardAvailable))
    and renders that list; the raw rewards state is kept intact so
    pagination / infinite scroll are unaffected.
  • Previous/next reward navigation indexes the visible list, so selection can
    no longer land on a hidden reward.
  • IssueListDTO.test.ts unit-tests the predicate, including the
    backward-compat case: rewards that predate the flags stay visible.

Verification

Ran in a clean isolated container against this branch:

  • pnpm install --frozen-lockfile
  • pnpm run typecheck (tsc --noEmit) — passes, so the isClosed /
    isDeleted fields are typed on the issue domain object end to end
  • pnpm run test:component (vitest run) — 3 test files, 11 tests passing,
    including the 4 new isRewardAvailable cases
  • eslint on the three changed/added files — clean
  • pnpm run build (next build) — production build completes

📋 Other Checks

  • Affects the UI
  • New Tests Added

📌 Reference Issues

Fixes #55

🔍 Anything else?

The change is subtractive -- ineligible rewards simply no longer appear in
the feed -- so there is no new visual state to screenshot; Can add
before/after captures if useful.

This fix comes from an agent-assisted workflow; it was human-reviewed and is
human-submitted. Happy to adjust anything.

Rewards whose upstream issue is closed or deleted can no longer be
worked on, so they must not appear as available even if a reward record
is still pending internally. IssueListDTO carries isClosed/isDeleted,
the home view renders only available rewards, and previous/next
navigation indexes the visible list. Raw rewards state is kept intact
for pagination.
Extracts the availability predicate into the DTO module and unit-tests it,
including the backward-compat case: rewards that predate the isClosed /
isDeleted flags stay visible.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Available rewards feed includes closed GitHub issues

2 participants