Skip to content

PM-6594: Add challenge forum watch controls - #2499

Merged
jmgasper merged 1 commit into
devfrom
PM-6594
Oct 16, 2026
Merged

jmgasper merged 1 commit into
devfrom
PM-6594

Conversation

@jmgasper

Copy link
Copy Markdown
Collaborator

What was broken

Members had no Watch/Unwatch control for the entire challenge forum, so they could not manage notifications for future topics from the overview.

Root cause

The overview supported only individual topic watches and did not load or save a challenge-wide preference.

What was changed

  • Add an accessible Watch forum / Unwatch forum control to the Challenge Forum overview, including empty forums.
  • Read the current member's effective default or saved preference and persist changes through the new Forums API endpoints.
  • Disable the control while loading/saving or after a failed read; preserve the previous state after failed saves and offer a retry for failed reads.
  • Document the API integration and deployment order.

Requires forums-api-v6 PR #19. Deploy its ChallengeForumWatch migration and API before this UI change. The API defaults registrants and copilots to watching; explicit topic watches remain independent.

Any added/updated tests

Added four regressions across ChallengeForum.spec.tsx and forum.service.spec.ts: endpoint routing, empty-forum opt-out/re-watch, failed saves, and loading/read errors.

Validation (after nvm use):

  • yarn lint: passed.
  • yarn test:no-watch --runInBand --runTestsByPath src/apps/opportunities/src/components/ChallengeForum.spec.tsx src/apps/opportunities/src/services/forum.service.spec.ts: 49 passed.
  • yarn test:no-watch --runInBand: 387 suites / 2,730 tests passed; 22 suites failed. Re-running the failures on unchanged origin/dev reproduces 21 failing suites and all 19 failed assertions. The remaining salesforce-sync suite passes in isolation on both branches. Existing failures include stale expectations, missing test mocks, and unresolved test aliases in unrelated apps.
  • NODE_OPTIONS=--max-old-space-size=12288 yarn run build: passed. The initial build exhausted Node's default heap; no build configuration or dependency changes were needed.

No dependencies were upgraded. Existing unrelated worktrees were left untouched.

What was broken
Members could watch individual topics but could not change notification
preferences for the entire challenge forum, including future topics.

Root cause
The forum overview exposed only topic-specific watch actions and had no
challenge-wide preference API integration.

What was changed
Add Watch forum / Unwatch forum to the challenge overview, including empty
forums. Load the current member's effective preference and persist choices
through the companion Forums API endpoints. Disable unavailable/pending
controls, preserve state after failed saves, and show a retry for failed reads.
Document the API and migration deployment dependency.

Any added/updated tests
Add service routing and component regressions for opt-out/re-watch, empty
forums, failed saves, and loading/read errors. The 49 forum tests and lint pass.
The full UI suite reports 387 passing and 22 failing suites; 21 failures
reproduce on unchanged origin/dev, and the remaining suite passes in isolation
on both branches. The production build passes with a 12 GB Node heap.
@jmgasper
jmgasper requested a review from kkartunov as a code owner October 15, 2026 19:20
@jmgasper
jmgasper merged commit 9439a0f into dev Oct 16, 2026
7 of 8 checks passed
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.

1 participant