Skip to content

Issue 11 - PR 3 - Challenge.js tweaks - #264

Open
DeMentidDev wants to merge 4 commits into
mainfrom
challenge.js-updates
Open

DeMentidDev wants to merge 4 commits into
mainfrom
challenge.js-updates

Conversation

@DeMentidDev

@DeMentidDev DeMentidDev commented Oct 7, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Extracted the in-memory challenge Map, 2-minute TTL sweep, and lifecycle operations into src/utils/challengeStore.js. Route-level permission checks remain in place, and challengeRouter.reset() now delegates to the store.

  • Added lifecycle coverage for creation, incoming challenges, shared gameId after acceptance, decline, duplicate acceptance (409), self-challenge (400), and TTL expiry.

Before: npm test -- --runInBand — 22 suites passed, 269 tests passed.
After: npm test -- --runInBand — 22 suites passed, 269 tests passed.

Type of Change

  • New feature
  • Bug fix
  • Refactor
  • Documentation update
  • Style/UI update
  • Performance improvement
  • Other (please specify):

Key Changes

[Describe the main areas of code affected and what was done, e.g., "Auth: Split signup into Parent/Mentor flows" or "Dashboard: Added parent dashboard and child progress view"]

Testing

  • Unit tests added/updated
  • Integration tests added/updated
  • Manual testing performed
  • All tests pass

Bugs Fixed (if applicable)

  • [List any bugs fixed, with brief description]

TODO (Follow-up Work)

  • [List future tasks or known issues to address later]

Additional Notes

[Any extra context, dependencies, or deployment considerations]

DeMentidDev and others added 3 commits October 7, 2026 13:56
…cycle operations into src/utils/challengeStore.js. Route-level permission checks remain in place, and challengeRouter.reset() now delegates to the store.

- Added lifecycle coverage for creation, incoming challenges, shared gameId after acceptance, decline, duplicate acceptance (409), self-challenge (400), and TTL expiry.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@DeMentidDev DeMentidDev changed the title Issue 11 - PR 1 - Challenge.js tweaks Issue 11 - PR 3 - Challenge.js tweaks Oct 7, 2026
@DeMentidDev DeMentidDev added the enhancement New feature or request label Oct 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant