Client/server Data Strategy
还没有人认领这个 Issue。
评估
- 难度
- 5/5
- 预计耗时
- 一周以上
- 新手友好度
- 25/100
- Issue 类型
- 功能
- 描述清晰度
- 描述清楚
- 活跃度
- 冷清
- 技术栈
- typescript
调研方向
Start by reading the kernel's current in-process pipeline and ADR-0002; this issue names no implementation files or tests. Check blockers #28 and #37 before beginning. Done means both strategies produce identical output, delegatable stages use the specified serializable transport requests and server handlers, and clipping and layout remain client-side.
由索引模型根据 Issue 内容生成。
描述
Parent
https://github.com/TanStack/time/issues/25
What to build
Add a pluggable `strategy` option to the kernel (inspired by AG Grid's row model). In `'client'` mode all pipeline stages run in-process. In `'server'` mode the delegatable stages — recurrence-expand, conflict-detect, slot-generation — run server-side via the same isomorphic Validation Core; the client receives materialized results and only runs clip-to-viewport and layout.
The consumer's calendar API is identical in both modes. The observable output (`Day[]`, event layout, conflict arrays) must match regardless of which strategy is active.
This is computation push-down, not just data-sourcing. The boundary is serializable for free because ADR-0002 restricts all public types to native `Date`, `YYYY-MM-DD` strings, and plain objects — no Temporal instances, no class instances.
The kernel emits a serializable operation request per delegatable stage (e.g. `{ op: 'expandRange', range, events, config }`). This request is also the TanStack Query key, so caching and invalidation require no extra plumbing. The consumer provides a `transport` function that forwards the request to their endpoint, which calls the matching server-side handler from `@tanstack/time-server`.
In `'client'` mode advisory and authoritative validation collapse — the client is the only validator. In `'server'` mode the client runs advisory checks; the server is authoritative.
Acceptance criteria
- `createCalendar({ strategy: 'client' })` behaves identically to the current in-process behaviour
- `createCalendar({ strategy: 'server', transport })` forwards delegatable stages to the consumer's `transport` function
- `transport` receives a serializable operation request and returns a plain-object result; it owns the fetch/RPC/auth
- The operation request object is stable and suitable as a TanStack Query `queryKey`
- `@tanstack/time-server` exports a handler per delegatable operation that the consumer's endpoint calls
- Given the same event data, `strategy: 'client'` and `strategy: 'server'` (with a mock transport) produce identical `Day[]` output
- Clip-to-viewport and layout always run client-side regardless of strategy
Blocked by
https://github.com/TanStack/time/issues/28
https://github.com/TanStack/time/issues/37
- 主要语言
- TypeScript
- 星标
- 620
- 派生
- 6
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
TanStack/time 的其他 Issue
-
难度 5/5 一周以上 新手友好度 5/100
-
enhancement
难度 5/5 一周以上 新手友好度 32/100
-
enhancement
难度 4/5 3-5 天 新手友好度 35/100
-
enhancement
难度 5/5 一周以上 新手友好度 35/100
-
Undo/redo module未关闭enhancement
难度 5/5 一周以上 新手友好度 35/100
相似的 Issue
-
apps/stage-web bug env/os-linux pending triage scope/audio-output
难度 2/5 1-3 小时 新手友好度 82/100
维护者通常 1 天内回复
-
reproduced
难度 2/5 1-3 小时 新手友好度 68/100
anomalyco/opencode#61640 · 1 条评论 ·
维护者通常 1 天内回复
-
scope: data grid status: waiting for maintainer
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 2 天内回复
-
ai-driven-fuzzing bug Minor
难度 2/5 1-3 小时 新手友好度 76/100
维护者通常 1 天内回复
-
ai-driven-fuzzing bug claude Minor
难度 2/5 1-3 小时 新手友好度 82/100
linagora/twake-calendar-frontend#1944 ·
维护者通常 1 天内回复