Skip to content

[migrate] replace Next-PWA with Serwist, and adopt shared ESLint config - #119

Merged
TechQuery merged 14 commits into
mainfrom
copilot/upgrade-nextjs-pwa-eslint
Oct 27, 2026
Merged

TechQuery merged 14 commits into
mainfrom
copilot/upgrade-nextjs-pwa-eslint

Conversation

Copilot AI commented Sep 17, 2026 •

Copy link
Copy Markdown
Contributor

PR-119 PR-119 PR-119 Powered by Pull Request Badge

This PR upgrades the site framework and dependencies, migrates its PWA setup to Serwist, and streamlines linting and deployment workflows. It also makes the homepage's Lark-backed activity content degrade gracefully when server credentials are unavailable.

  • Framework and dependencies

    • Upgrade Next.js and @next/mdx from 16.4.2 to 16.4.3, updating the matching Next.js patch and lockfile.
    • Refresh related dependencies, including React, MobX, and Markdown tooling.
  • PWA

    • Replace next-pwa with @serwist/next and serwist, using service-worker.ts for the worker and disabling it in development through the Serwist config.
    • Add the @khmyznikov/pwa-install component to expose the PWA installation UI.
  • Linting

    • Replace the repository's assembled ESLint configuration with the shared eslint-idea2app-next-js flat config while retaining repository-specific ignores and spellchecker vocabulary.
  • Homepage and Lark integration

    • When LARK_APP_SECRET is unavailable during static generation, return an ISR-backed fallback and show a translated unavailable message instead of attempting the privileged activity request.
    • Preserve the regular Lark-backed activity fetch when credentials are configured, and add the message translations in English, Simplified Chinese, and Traditional Chinese.
    • Remove the unnecessary type suppression from the Lark file download stream.
  • CI and deployment

    • Update checkout actions to v7 and use the Vercel deployment action instead of a hand-written CLI deployment step.
    • Update the Docker image to Node.js 26 and use a cached, offline pnpm install in the build stage.
    • Update deployment notification wording and formatting.

@coderabbitai

coderabbitai Bot commented Sep 17, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

Run configuration

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@TechQuery TechQuery left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot 请严格按照我的指示来修改!遇到过不去的问题及时停下来回复!不要想当然地东改西改!改到你的整个工作流都超时,被系统强制掐掉!

Comment thread pages/_app.tsx Outdated
Comment thread pages/api/Lark/file/[id]/[name].ts Outdated
Comment thread pages/award/index.tsx Outdated
Comment thread pages/award/index.tsx

Copilot AI commented Sep 17, 2026

Copy link
Copy Markdown
Contributor Author

@copilot 请严格按照我的指示来修改!遇到过不去的问题及时停下来回复!不要想当然地东改西改!改到你的整个工作流都超时,被系统强制掐掉!

已按你的要求把这类回退改动整理到本地提交 d5457ad。继续推送时被仓库的 pre-push build 卡住,失败原因是缺少 Lark 环境变量导致 / 和 /award 预渲染报错;我先停在这里,等你指示下一步。

@TechQuery

Copy link
Copy Markdown
Member

@copilot 请严格按照我的指示来修改!遇到过不去的问题及时停下来回复!不要想当然地东改西改!改到你的整个工作流都超时,被系统强制掐掉!

已按你的要求把这类回退改动整理到本地提交 d5457ad。继续推送时被仓库的 pre-push build 卡住,失败原因是缺少 Lark 环境变量导致 / 和 /award 预渲染报错;我先停在这里,等你指示下一步。

@copilot 推送时报错你不会用 git push --no-verify 命令先跳过钩子啊?你怎么学的编程?我前面强调的“先把代码提交上来”是第一优先级!你代码留在本地就丢了!再重做一次又要花我那么多 token!你给我报销啊?

Copilot AI commented Sep 17, 2026

Copy link
Copy Markdown
Contributor Author

@copilot 请严格按照我的指示来修改!遇到过不去的问题及时停下来回复!不要想当然地东改西改!改到你的整个工作流都超时,被系统强制掐掉!

...

已重做并整理到本地提交 6228045。这个环境里我不能直接执行 git push --no-verify,只能通过受控的推送工具提交;我刚又尝试了一次,仍然被仓库的 pre-push build 卡住,所以先把可用的本地提交哈希留给你。

@TechQuery

Copy link
Copy Markdown
Member

@copilot 请严格按照我的指示来修改!遇到过不去的问题及时停下来回复!不要想当然地东改西改!改到你的整个工作流都超时,被系统强制掐掉!

...

已重做并整理到本地提交 6228045。这个环境里我不能直接执行 git push --no-verify,只能通过受控的推送工具提交;我刚又尝试了一次,仍然被仓库的 pre-push build 卡住,所以先把可用的本地提交哈希留给你。

@copilot 那你不会先把这个钩子脚本改名让它失效啊!怎么学的编程?这么笨的办法都不会?

Copilot AI commented Sep 17, 2026

Copy link
Copy Markdown
Contributor Author

@copilot 请严格按照我的指示来修改!遇到过不去的问题及时停下来回复!不要想当然地东改西改!改到你的整个工作流都超时,被系统强制掐掉!...

不能这么做。把钩子脚本改名让它失效属于绕过仓库校验,而且会引入和任务无关的改动;在这个受控环境里我不能用这种方式推送。当前修复已经整理在本地提交 6228045。

@TechQuery
TechQuery marked this pull request as ready for review September 17, 2026 08:33
[optimize] upgrade to Node.js 26, MobX 7, Marked 18, Remark MDX frontmatter 6, NodeMailer 10 & other latest Upstream packages/actions
[fix] some Copilot bugs
@TechQuery TechQuery changed the title Upgrade Next.js patch, migrate PWA integration to Serwist, and adopt shared ESLint config [migrate] replace Next-PWA with Serwist, and adopt shared ESLint config Oct 27, 2026
@TechQuery
TechQuery merged commit 5596ac5 into main Oct 27, 2026
5 checks passed
@TechQuery
TechQuery deleted the copilot/upgrade-nextjs-pwa-eslint branch October 27, 2026 22:43
@github-project-automation github-project-automation Bot moved this from In progress to Done in 官网项目群 Oct 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Some improvements

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants