Fix: Available rewards feed includes closed GitHub issues - issue 55 - #61
Open
BootstrapAI-mgmt wants to merge 2 commits into
Open
Fix: Available rewards feed includes closed GitHub issues - issue 55#61BootstrapAI-mgmt wants to merge 2 commits into
BootstrapAI-mgmt wants to merge 2 commits into
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🏷️ Type of PR
📋 Required Checks
📝 Description of the Changes
Removes 'closed' or 'deleted' issue rewards from feed appearances. Raw
rewards state retained for pagination only.
Concretely:
IssueListDTOgains optionalisClosed/isDeletedflags, populatedfrom the issue domain object in the existing mapper, plus an exported
isRewardAvailablepredicate that owns the availability rule.visibleRewards(rewards.filter(isRewardAvailable))and renders that list; the raw
rewardsstate is kept intact sopagination / infinite scroll are unaffected.
no longer land on a hidden reward.
IssueListDTO.test.tsunit-tests the predicate, including thebackward-compat case: rewards that predate the flags stay visible.
Verification
Ran in a clean isolated container against this branch:
pnpm install --frozen-lockfilepnpm run typecheck(tsc --noEmit) — passes, so theisClosed/isDeletedfields are typed on the issue domain object end to endpnpm run test:component(vitest run) — 3 test files, 11 tests passing,including the 4 new
isRewardAvailablecaseseslinton the three changed/added files — cleanpnpm run build(next build) — production build completes📋 Other Checks
📌 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.