fix(app-shell): merge draft overlay over effective baseline (preserve inherited fields)#1720
Merged
Merged
Conversation
… inherited fields) A pending draft overlay can carry only edited fields; using it wholesale dropped inherited fields like `type` that section visibleOn predicates depend on (ADR-0047 list-page section hiding). Merge draft over the effective baseline at all three draft-init sites. NOTE: robustness improvement. NOT confirmed to fix the observed live symptom (list-page editor rendering a stale pre-#25 form) — that has a separate client-side stale-form cause still under investigation. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
✅ Console Performance Budget
📦 Bundle Size Report
Size Limits
|
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.
Why
When editing a metadata item, a pending draft overlay can carry only the edited fields.
ResourceEditPagewas using that draft wholesale (draftReal ?? lay.effective), so any field the user never touched — notablytype— was dropped from the editing baseline.That bites section-level
visibleOnpredicates: ADR-0047 hides the Data Context / Layout sections on a list page viadata.type == 'list'. Iftypeis missing from the draft value, the predicate misfires. (The companion ADR-0047 work — #1704 / framework #1817 — is verified working in a clean environment; this PR hardens the partial-draft path so it can't regress.)Change
Merge the draft over the effective baseline at all three draft-init sites (initial load + two post-save reloads):
Standard overlay semantics — the draft still wins for anything it carries; inherited fields survive. No-op when the draft is already a full snapshot.
Risk
Low. If a draft intentionally omitted a field to mean "removed", the baseline value would resurface — but metadata drafts are full/additive snapshots, not deletion diffs, so this is not a concern in practice.
🤖 Generated with Claude Code