Conversation
…optimize pagination Co-authored-by: Aerilym <5667907+Aerilym@users.noreply.github.com>
Co-authored-by: Aerilym <5667907+Aerilym@users.noreply.github.com>
Co-authored-by: Aerilym <5667907+Aerilym@users.noreply.github.com>
…t page size constant Co-authored-by: Aerilym <5667907+Aerilym@users.noreply.github.com>
…ode clarity Co-authored-by: Aerilym <5667907+Aerilym@users.noreply.github.com>
… revalidation) Co-authored-by: Aerilym <5667907+Aerilym@users.noreply.github.com>
Co-authored-by: Aerilym <5667907+Aerilym@users.noreply.github.com>
…idation Co-authored-by: Aerilym <5667907+Aerilym@users.noreply.github.com>
Co-authored-by: Aerilym <5667907+Aerilym@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
This is a large-scale modernization PR that upgrades the Session website from Next.js 11 to 15, React 17 to 19, migrates from Yarn to pnpm, replaces ESLint/Prettier with Biome, adds internationalization (i18n) via next-intl, migrates the mailing list API from Mailerlite to Brevo, consolidates font-face declarations, introduces a blog cache service, and refactors barrel exports to direct imports.
Changes:
- Upgrades Next.js (11→15), React (17→19), and migrates tooling from Yarn/ESLint/Prettier to pnpm/Biome
- Adds internationalization support via
next-intlwith locale-aware routing, translations, and structured data for SEO - Migrates the email subscription API from Mailerlite to Brevo, adds a blog caching layer, and implements tiered ISR revalidation based on content age
Reviewed changes
Copilot reviewed 139 out of 156 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| package.json | Major dependency upgrades (Next.js 15, React 19), new deps (next-intl, radix-ui, biome), migrate to pnpm |
| pages/_app.tsx | Wraps app in NextIntlClientProvider, adds getInitialProps for locale loading |
| pages/_document.tsx | Adds RTL detection and dynamic lang/dir attributes |
| pages/api/email/[list].ts | Migrates mailing list from Mailerlite to Brevo API |
| pages/api/sitemap.ts | Adds localized URLs, hreflang, structured change frequencies and priorities |
| services/redirect.ts | Replaces getConfig() with direct import, uses top-level await |
| services/cache.ts | New in-memory blog cache with TTL and cleanup |
| constants/cms.ts | Tiered revalidation (1h for new, 24h for old content) |
| constants/navigation.ts | Converts nav items to use locale keys instead of hardcoded strings |
| styles/globals.css | Consolidates 18+ @font-face declarations into 6 using variable font ranges |
| components/ui/Layout.tsx | New Layout component with locale key support |
| components/navigation/Nav.tsx | New Nav with locale switcher dialog and i18n |
| components/sections/*.tsx | Refactored from index dirs to flat files with i18n |
| biome.json | New Biome configuration replacing ESLint/Prettier |
| tsconfig.json | Target changed to ESNext, incremental builds enabled |
| .nvmrc, .tool-versions | Node.js version updated to 24.4.1 |
| Various components | Migrated to next/legacy/image, direct imports, type-only imports |
Comments suppressed due to low confidence (2)
components/CustomQRCode.tsx:69
- The
onKeyDownhandler callshandleOnClick()on every key press without filtering for specific keys (like Enter or Space). This means typing, navigating, or pressing Escape will all trigger the QR code download. The handler should check forevent.key === 'Enter' || event.key === ' 'before calling the action.
components/ui/Button.tsx:77 - The
Buttoncomponent now renders as a self-closing<button />with nochildrenprop in its type definition (removed from oldPropsinterface). However,childrenis still passed via{...rest}sinceHTMLAttributes<HTMLButtonElement>includeschildren. This works, but callers that previously relied onchildren?: stringcan now pass anyReactNodeas children. This is fine functionally, but the button renders as<button ... />(self-closing JSX) which still renders children fromrest. This is correct behavior in React but could be confusing to maintainers — consider explicitly showing{children}or{rest.children}in the JSX for clarity.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| 'X-Version': '2025-02-11', | ||
| 'Content-Type': 'application/json', | ||
| Authorization: `Bearer ${ml_ApiKey}`, | ||
| 'api-key': brevo_ApiKey!, |
| return redirection; | ||
| } | ||
|
|
||
| const redirects: IRedirection[] = await config.redirects(); |
|
|
||
| const LOCALIZED_PAGES = ['', 'download', 'blog', 'community']; | ||
|
|
||
| const redirects: IRedirection[] = await config.redirects(); |
| }); | ||
|
|
||
| rimraf.sync(`./public/rss`); | ||
| rimraf?.sync(`./public/rss`); |
Comment on lines
+32
to
+56
| MyApp.getInitialProps = async (appContext: AppContext) => { | ||
| // Call page's getInitialProps if it exists | ||
| const appProps = await App.getInitialProps(appContext); | ||
|
|
||
| const locale = appContext.ctx.locale || 'en'; | ||
|
|
||
| if (!appProps.pageProps.messages) { | ||
| try { | ||
| const messages = (await import(`../locales/${locale}.json`)).default; | ||
| appProps.pageProps.messages = messages; | ||
| } catch (error) { | ||
| console.error(`Failed to load messages for locale: ${locale}`, error); | ||
|
|
||
| try { | ||
| const messages = (await import(`../locales/en.json`)).default; | ||
| appProps.pageProps.messages = messages; | ||
| } catch (fallbackError) { | ||
| console.error('Failed to load fallback messages', fallbackError); | ||
| appProps.pageProps.messages = {}; | ||
| } | ||
| } | ||
| } | ||
|
|
||
| return appProps; | ||
| }; |
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.
No description provided.