Repository navigation
refactor: decode untyped store and wire maps instead of erasing Option to nil - #33
Merged
Merged
Conversation
… nil Add app.decode field readers (required-field, optional-field, field-or, field-is?, option-is?, present?) and use them in client components, twigs and updaters in place of `.unwrap-or (get m k) nil`. Client: comp-container now takes the store Option and matches on it; the store map is decoded once into a StoreView struct (navigation, router, route name, route data, editing paragraph id, color, messages). comp-editor-panel takes the editing id as an Option; comp-previewer compares the focused paragraph via option-is?. Genuine nil boundaries are kept and named: payload-to-wire, action-data-from-wire, paragraph-id-to-wire, user-name-to-wire, plus the recollect patch/diff bases (first sync is nil). Behavior changes: paragraph/move with a missing target is a no-op instead of inserting a nil paragraph; malformed :article/title and :paragraph/content ops raise instead of writing nil-keyed data. option-nil-roundtrip findings: 89 -> 6. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0117eRu6N8pRpJgbkTYk3LZr
Member
Author
|
本轮跟进已完成:对用户的 wire/存储格式不变,原 Option 清理对缺失目标段落和非法操作的保护不回退。配对升级到 CLI/procs 0.30.1-alpha.5;正式 0.30.1 的 CLI assets/npm runtime 目前不完整,未强行改成不可安装的正式版本。 精确提交 5890481 的 CI 已成功:https://github.com/TopixIM/tabletwo/actions/runs/39367835627 。独立 Caps/immutable/toolchain、28 个命名空间按双入口完整检查、原有 strict/测试/构建和 COS action 内置上传校验均通过;前后端生产 rsync 均跳过。没有新增额外验证器或放宽基线。 本地 131 个应用定义通过,原生共同测试 63/63、effect 2/2;浏览器/共享部分 62 项 native/JS 原断言及日志一致。服务端 1 项 wire 测试仅计 native 通过,不模拟 native FFI。JS 回放的临时 Node DOM lookup/路径适配不算真实浏览器验收,未提交。Snapshot 和断言与 e31e02f 原提交完全一致。 README 与 PR 说明已纠正旧 nil 清理描述并按用户影响优先使用中文。开放类型边界、alpha.5 双客户端实际协作/持久化、Text 弹窗和后端准备仍需后续验收;未合并、发版或生产部署。 |
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.
对用户的影响
正常协作和线上 wire/存储格式保持不变。缺失目标段落的移动不再写入 nil 或移动光标;缺少必需标题/正文的操作明确报错。登录后路由暂时缺少 data 时用空 Map 渲染,存在的颜色、路由名和段落 ID 会校验类型。
CLI 与
@calcit/procs现在精确配对 0.30.1-alpha.5。正式 0.30.1 tag 已发布,但目前 CLI assets 为空、npm runtime 仍为 404,不混用不完整的正式版本。服务器也需要匹配工具与依赖;准备状态未确认,本 PR 不应直接合并部署生产。改动
验证与范围
9b28691f32f7163b6241f92a04059820798542b28ea78691ecdc11f6587f65dc未变。风险与未完成项
开放状态、宿主边界与类型审阅债务仍存在,不宣称全应用静态化;不放宽预算以获得通过。Text 导出弹窗、alpha.5 双客户端实际协作与生产服务器升级尚未完成验收。保留原 Highlight.js legacy 提示与 Vite 大 chunk 警告。
关联 calcit-lang/calcit#2124。