Clarify RSC deployment skew and compatibility-aware recovery scope
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 5/5
- 预计耗时
- 一周以上
- 新手友好度
- 28/100
- Issue 类型
- 功能
- 描述清晰度
- 需要澄清
- 活跃度
- 冷清
- 技术栈
- react, typescript
调研方向
首先阅读现有的 experimental manager 上下文和关联的 plugin-rsc PR #1223,然后查看相关的 React Router issue 和恢复 PR。比较特定于 deployment 的 base、由 manager 推导的兼容性,以及稳定的 manifest 或 version surface。如果支持是合理的,那么项目已经确定兼容性信号并记录了所有权边界,即表示完成。
由索引模型根据 Issue 内容生成。
描述
Problem
Frameworks built on @vitejs/plugin-rsc need to handle RSC deployment skew.
A common failure mode is:
- A user has an old browser tab open.
- A new deployment goes live.
- The old tab sends an RSC navigation, route-discovery request, or server action to the new server.
- The old client may no longer be able to decode or safely use the new server response.
Frameworks can own the recovery behavior themselves. For example, React Router can return a 204 reload response and reload the document on the client instead of trying to decode an incompatible RSC payload.
The open question is what compatibility signal frameworks should compare.
Coarse Skew Recovery vs Compatibility-Aware Recovery
There seem to be two different levels of recovery.
1. Coarse skew recovery
This answers:
Is this browser tab from a different deployment?
If a deployment makes Vite base deployment-specific, then base can already be used for this.
For example:
base: "/assets/deploy-abc123/"
That is useful for “reload old tabs after a new deploy” behavior.
2. Compatibility-aware recovery
This answers a more specific RSC question:
Is this old client actually incompatible with the new server?
This is different from deployment identity. A new deployment does not necessarily mean the old client must reload. With RSC, it seems possible to support “no reload required” deployments when the relevant client/server contract has not changed.
That compatibility signal seems like it may need to account for RSC/build state such as:
- client reference keys and rendered exports
- server reference keys and exported functions
- final assets manifest
- final client/RSC/SSR output relevant to the RSC payload contract
- server action encryption identity, when action closure encryption is emitted
- relevant RSC runtime package versions or singleton dependencies
This would let a framework distinguish:
- “new deploy, but the old client can continue safely”
- “new deploy, incompatible RSC contract, reload the document”
Question
Should @vitejs/plugin-rsc support compatibility-aware recovery as a first-class concept?
If yes, what surface should frameworks use?
Possible directions:
- Frameworks use deployment-specific
basefor coarse skew recovery only. - Frameworks derive a compatibility version from the existing experimental
manager. @vitejs/plugin-rscexposes or documents a stable compatibility primitive, such as a finalized compatibility version or manifest.
The intent is not for @vitejs/plugin-rsc to own framework-specific recovery behavior. React Router can own the request protocol and document reload behavior.
The question is whether plugin-rsc should own or document the lower-level RSC compatibility signal, since it has the most authoritative view of the RSC graph and build output.
Related Context
- React Router RSC skew issue: https://github.com/remix-run/react-router/issues/14849
- React Router recovery PR: https://github.com/remix-run/react-router/pull/15032
- Previous plugin-rsc PR: https://github.com/vitejs/vite-plugin-react/pull/1223
- 主要语言
- TypeScript
- 星标
- 1.2k
- 派生
- 287
- 平均合并
- 1 天 17 小时
- 30 天内合并 PR
- 19
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
vitejs/vite-plugin-react 的其他 Issue
-
plugin-rsc: a client reference's CSS is linked before the CSS of the chunks it imports (build)可能已有人在做 @wozhenbang2004 于 7 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 84/100
vitejs/vite-plugin-react#1570 ·
维护者通常 1 天内回复
-
pending triage
难度 4/5 3-5 天 新手友好度 35/100
vitejs/vite-plugin-react#1581 ·
维护者通常 1 天内回复
-
[plugin-rsc] Build exits 0, but the app fails at runtime: a server action imported only by browser code is missing from the RSC build可能已有人在做 @NeilPant 于 4 天前认领。 未关闭
难度 4/5 3-5 天 新手友好度 48/100
vitejs/vite-plugin-react#1578 ·
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 42/100
vitejs/vite-plugin-react#1577 ·
维护者通常 1 天内回复
-
[plugin-rsc] inline "use server" function declarations lose hoisting and throw TDZ ReferenceError可能已有人在做 @draarivpatel-ui 于 3 天前认领。 未关闭
难度 3/5 1-2 天 新手友好度 55/100
vitejs/vite-plugin-react#1566 · 1 条评论 ·
维护者通常 1 天内回复
查看 vitejs/vite-plugin-react 的全部 Issue
相似的 Issue
-
good first issue help wanted
难度 2/5 1 小时以内 新手友好度 86/100
Intelligenza-Umana/intelligenza-umana-web#16 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 82/100
open-webui/open-webui#35184 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 76/100
danielmiessler/LifeOS#3001 ·
维护者通常 5 天内回复
-
难度 2/5 1-3 小时 新手友好度 84/100
维护者通常 1 天内回复