updated WhatsNew notification to include BREAKING CHANGE alert#1572
updated WhatsNew notification to include BREAKING CHANGE alert#1572CodeWithCJ wants to merge 5 commits into
Conversation
PR Validation ResultsChange Detection
|
There was a problem hiding this comment.
Code Review
This pull request introduces a new release dialog in the frontend to display GitHub release notes using markdown, complete with scroll-to-read acknowledgement and breaking-change confirmation. In the backend, it updates the version service to fetch and cache the latest GitHub release with a direct HTTPS fallback. Key feedback includes addressing potential NaN comparisons in version parsing for pre-release tags, preventing socket leaks on non-2xx direct fetch responses, replacing a fragile setTimeout with a ResizeObserver for scroll detection, fixing a regex bug that double-wraps already-linked GitHub usernames, securing the public endpoint against cache-bypass DoS attacks, and internationalizing hardcoded 'What's New' strings.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
| if (res.statusCode && (res.statusCode < 200 || res.statusCode >= 300)) { | ||
| reject(new Error(`Direct fetch failed with status: ${res.statusCode}`)); | ||
| return; | ||
| } |
There was a problem hiding this comment.
When the HTTP response status code is not 2xx, the response stream is discarded without being consumed. In Node.js, this can cause the underlying socket to remain open, leading to resource/socket leaks. Calling res.resume() consumes the stream and safely releases the socket.
| if (res.statusCode && (res.statusCode < 200 || res.statusCode >= 300)) { | |
| reject(new Error(`Direct fetch failed with status: ${res.statusCode}`)); | |
| return; | |
| } | |
| if (res.statusCode && (res.statusCode < 200 || res.statusCode >= 300)) { | |
| res.resume(); | |
| reject(new Error("Direct fetch failed with status: " + res.statusCode)); | |
| return; | |
| } |
| formatted = formatted.replace( | ||
| /(^|[^a-zA-Z0-9_])@([a-zA-Z0-9-]+)/g, | ||
| '$1[@$2](https://github.com/$2)' | ||
| ); |
There was a problem hiding this comment.
The username mention regex matches @username even if it is already part of a markdown link (e.g., [@username](url)), which results in broken double-wrapped markdown links like [[@username](url)](url). Excluding [ from the preceding character class prevents matching usernames that are already linked.
| formatted = formatted.replace( | |
| /(^|[^a-zA-Z0-9_])@([a-zA-Z0-9-]+)/g, | |
| '$1[@$2](https://github.com/$2)' | |
| ); | |
| formatted = formatted.replace( | |
| /(^|[^a-zA-Z0-9_\[])@([a-zA-Z0-9-]+)/g, | |
| "$1[@$2](https://github.com/$2)" | |
| ); |
| const bypassCache = req.query.bypassCache === 'true'; | ||
| const latestRelease = | ||
| await versionService.getLatestGitHubRelease(bypassCache); |
There was a problem hiding this comment.
Allowing any unauthenticated public user to bypass the GitHub API cache via the bypassCache query parameter exposes the server to rate-limiting or Denial of Service (DoS) attacks on the GitHub API. It is safer to remove this option from the public endpoint or restrict it to authenticated administrators.
| const bypassCache = req.query.bypassCache === 'true'; | |
| const latestRelease = | |
| await versionService.getLatestGitHubRelease(bypassCache); | |
| const latestRelease = | |
| await versionService.getLatestGitHubRelease(false); |
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Tip
Help us review and merge your PR faster!
Please ensure you have completed the Checklist below.
For Frontend changes, please run
pnpm run validateto check for any errors.PRs that include tests and clear screenshots are highly preferred!
Note: AI-generated descriptions must be manually edited for conciseness. Do not paste raw AI summaries.
Description
What problem does this PR solve?
(Keep it concise. 1–2 sentences.)
How did you implement the solution?
(Brief technical approach.)
Linked Issue: Closes #
How to Test
...PR Type
Checklist
All PRs:
New features only:
Frontend changes (
SparkyFitnessFrontend/):pnpm run validateand it passes.en) translation file.Backend changes (
SparkyFitnessServer/):rls_policies.sqlfor any new user-specific tables.UI changes (components, screens, pages):
Mobile changes (
SparkyFitnessMobile/):Screenshots
Click to expand
Before
After
Notes for Reviewers