docs(design): record create/edit/subtable surface + return-flow model (#2604)#2614
Closed
os-zhuang wants to merge 1 commit into
Closed
docs(design): record create/edit/subtable surface + return-flow model (#2604)#2614os-zhuang wants to merge 1 commit into
os-zhuang wants to merge 1 commit into
Conversation
…#2604) Decides the three open questions from #2604 (follow-up to #2578): - D1: create/edit are ALWAYS overlays, never routes — the derived 'page' surface maps to a full-screen modal (size 'full'); light objects keep a drawer. Deep-linkability belongs to state (detail route, shipped), not to transient tasks. - D2: detail → edit reuses the same edit overlay over the detail route — one edit surface everywhere; in-place field editing deferred, not rejected. - D3: subtable child create/edit = overlay over the parent detail, never a route; size derived from the CHILD object's own field count. Specifies the return-flow contract (cancel invariant, save invariant — edit never moves you, create lands on the record, child tasks never leave the parent — dirty guard, full-screen-modal history integration), the Step 1 spec helper deriveRecordFlowSurface as the one shared derivation (ADR-0085 §5), the objectui wiring plan, and the browser-verification matrix. Zero new authorable keys (ADR-0085 §2); docs-only, empty changeset. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019zKcAtbtxuF9SXYgSzjk9v
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
Author
|
按维护者要求,设计结论改为直接更新到 issue 评论(#2604 (comment)),不再以仓库文档形式落地 —— 关闭本 PR。 Generated by Claude Code |
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.
概述
落地 #2604(#2578 的后续)的设计文档:
docs/design/record-surface-return-flows.md。对 issue 中的三个待决问题给出决定,并把返回流(return flow)写成可实现、可浏览器验证的契约。纯文档,空 changeset,不发包。三个决定
'page')→ 全屏 modal(size: 'full'),轻对象 → drawer。这正是RecordSurface类型里'modal'存在的意义。深链接属于"状态"(详情路由,已上线),不属于"临时任务"——刷新即丢草稿的 URL 是虚假承诺。返回流契约(文档 §4)
实现计划(文档 §5)
record-surface.ts增加deriveRecordFlowSurface(def, flow, opts)—— 把上面的映射做成 ADR-0085 §5 的"one shared derivation",纯函数 + 单测 + minor changeset。ObjectView.tsx的 create/edit 换掉硬编码大 modal;详情 Edit 按钮、related-list 子记录接同一 helper;脏守卫 + history 集成;spec pin 未含 Step 1 前照 字段多的对象:自适应呈现表面 + 语义 field span(auto/full)+ 表单布局防呆 lint(AI-authored,ADR-0085 对齐) #2578 先例本地镜像 + TODO。field_zoo57 字段 /product6 字段 + 带 relatedList 的父子),覆盖 issue 验收清单的每一条返回路径。零元数据授权
不加任何新 key(
recordSurface/returnTo/afterSave均过不了 ADR-0085 §2 准入测试),不开新 ADR;显式覆盖仍是既有的navigation.mode/size、FormView.type/modalSize、assigned Page。Refs #2604 · #2578 · ADR-0085 · #2595 · #2599
🤖 Generated with Claude Code
https://claude.ai/code/session_019zKcAtbtxuF9SXYgSzjk9v
Generated by Claude Code