reconcileMeSubs() 的周期性 me.getMeta(withLaterSub()) 拉取,对已知会话原有的 回归保护(seq<=prev.seq && unread>prev.unread) 只防得住"seq没变但unread变大" 这一种情形。自己在已打开的会话里发消息时:本地 confirmedReadSeq 会同步立即 更新(早于服务端),但发给服务端的 note read 是异步的;如果这次拉取的请求 恰好在发送前就已经在途,返回时 seq 已经真实前进(不满足 seq<=prev.seq)、 read 却还没追上,旧保护不生效,虚假的 unread 就被原样套用——哪怕这条消息 就是自己刚发的。 补一个独立的、无条件的兜底:用已有的 confirmedReadSeq 记录做下限,read 永远 不会被这次拉取拉回到低于"本客户端已确认看过的位置",与原有保护并存、不冲突。 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
React + TypeScript + Vite
This template provides a minimal setup to get React working in Vite with HMR and some Oxlint rules.
Currently, two official plugins are available:
- @vitejs/plugin-react uses Oxc
- @vitejs/plugin-react-swc uses SWC
React Compiler
The React Compiler is not enabled on this template because of its impact on dev & build performances. To add it, see this documentation.
Expanding the Oxlint configuration
If you are developing a production application, we recommend enabling type-aware lint rules by installing oxlint-tsgolint and editing .oxlintrc.json:
{
"$schema": "./node_modules/oxlint/configuration_schema.json",
"plugins": ["react", "typescript", "oxc"],
"options": {
"typeAware": true
},
"rules": {
"react/rules-of-hooks": "error",
"react/only-export-components": ["warn", { "allowConstantExport": true }]
}
}
See the Oxlint rules documentation for the full list of rules and categories.