You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Rebuilds the record-list "Add View" / "Save as view" create path so a
runtime-created view has one canonical identity and is verifiable before
publish. Supersedes #2754; fixes#2767.
P1 — unified identity. New `viewEnvelope(objectName, spec, { name, label })`
seam emits the canonical ViewItem `{ name: '<object>.<key>', object,
viewKind: 'list', label, config }` (config.data stamped), mirroring the Studio
`anchors.ts:createBuildBody`. The qualified name is used as BOTH the
`PUT /meta/view/:name` URL segment and `body.name`, so the sys_metadata row
key, the ViewTabBar tab id, and the body identity agree and the draft → read →
publish loop resolves. `ObjectView` and `ObjectDataPage` share the one helper.
Empty-name 405. `MetadataClient.save()` and `createRuntimeMetadata()` throw a
clear error instead of emitting `PUT /meta/view/` (empty :name).
P2/P3/P4 — draft visibility. `listViews(objectName, { previewDrafts })`: in
preview mode the adapter makes a single `MetadataClient.withPreviewDrafts(true)
.list('view')` request and uses the server's already-overlaid list (draft wins
by name, `_draft` tagged) — replacing, not appending, so a draft that edits a
published view can't double-tab. No hand-rolled metadata fetch at the adapter.
After a create in normal mode the console navigates to the new view with
`?preview=draft` so the DraftPreviewBar is visible and Publish is one click.
P5 — CJK naming. `CreateViewDialog` gains an editable machine-name field,
prefilled via slugify(label) and required (submit disabled) when slugify is
empty for non-Latin labels — no silent random names. New i18n keys (en/zh).
Tests: viewEnvelope/deriveViewKey, empty-name guards, and the listViews
preview branch (single request, no dupe, _draft passthrough). Docs updated.
Claude-Session: https://claude.ai/code/session_01Y2ZKbzgbsYndkWYojr1NTc
Co-authored-by: Claude <noreply@anthropic.com>
0 commit comments