Repository navigation
feat(data-objectstack,app-shell): mark the copilot's drafted settings in Studio's properties, from draftChanges (objectui#12725) - #13100
Merged
Conversation
… in Studio's properties, from draftChanges (objectui#12725) The strict draft read serves draftChanges beside item (objectstack#24298, written by objectstack#24395). data-objectstack gains its one reader (readDraftChanges, governingDraftChange: the longest prefix, draftChangesUnder, the DraftChange type) and a surface save option sent once as ?surface=. Studio's own draft saves declare surface: 'studio'. The Data pillar's field properties and an object leaf's list-view properties draw the Draft chip and the Source line where a copilot write answers for the key, and mark the elements the copilot added to an array setting against the published array. Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XVp19E1MYUTFM3dnkwz8gB
…(objectui#12725) Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XVp19E1MYUTFM3dnkwz8gB
Contributor
✅ Console Performance Budget
The eager closure is every chunk the entry reaches through static imports — what the browser fetches and parses before the app renders. The entry chunk on its own is a small fraction of it. 📦 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.
Part of #12725
Clause-②: yes —
@object-ui/data-objectstackgains exports (readDraftChanges,governingDraftChange,draftChangesUnder, typeDraftChange) andMetadataClientSaveOptionsgainssurface, per the claim's condition.Item 3's per-field draft marks: the Draft chip (草稿) and the Source line (「由 AI 副驾在 N 分钟前作为草稿加入」) on a field or a list-view setting the AI copilot changed, read from the platform's per-key draft provenance (
draftChanges, objectstack#24298, written by objectstack#243952ec6827962, in objectui's pinf4755a68a7).What changed
data-objectstack (published face, Clause-②).
draft-envelope.ts, besideextractDraftBody:readDraftChanges(resp)reads the strict draft read'sdraftChanges(nullwhen absent, never[]);governingDraftChange(changes, path)is the one reader: the entry whose path is the key or its ancestor, LONGEST wins,[]is the whole body, segments compare whole (never a dotted string);draftChangesUnder(changes, path);DraftChangeis derived from the spec'sGetMetaItemResponse['draftChanges'].MetadataClientSaveOptions.surface?: 'studio' | 'api', typed as the spec's surface set minuscopilot(the doors refuse?surface=copilot400), sent once as?surface=and only when stated.MetadataDeleteOptionsnow extendsOmitof it, soreset()does not inherit an option its door never reads.The write. Every Studio draft save under
views/studio-design/**passessurface: 'studio': the app / permission / flow / object / leaf creates, the object, leaf, nav, flow, hook, list-view and OWD saves (15 call sites). The copilot's saves are cloud's and untouched; nothing sendscopilot.The marks (
studio-design/StudioDraftMark.tsx):["fields", NAME].ObjectListViewInspector: a chip beside each setting the copilot changed (card fields, title, click to open, group by, columns, filter, sort), the copilot-added elements ofkanban.columnsandcolumnslisted with a chip each (draft array compared with the published array), and one Source line naming them (「「读者」「应还日期」 2 项由 AI 副驾在 2 分钟前作为草稿加入」).[]) entry (that one means the draft was created over no published body). A failure of that read costs the element marks only, never the buffer.Deviation to note (ruling 3)
The dispatch says to draw only when the governing entry is
copilot. The marks also count a copilot entry UNDER the key: the copilot changing one property of a published field records["fields", NAME, "label"], and no ancestor of["fields", NAME]answers for it, so the governing-only reading leaves the commonest case unmarked. Thedomain:specpointer (6254786917) reads "its answering entry, or an entry under it". The reader itself (governingDraftChange) is exactly the ruled longest-prefix function; the "under" half is a separate export. Pinned bya copilot change to one property of the field marks the field too.Not on this PR (why
Part of)PermissionMatrixEditPageinviews/metadata-admin/**, outside this claim's file surface, so it still sends nosurface(recorded asapi). It is a one-line follow-up there.WIDGETS['field-multi']/FieldsListEditorinmetadata-admin/**, outside the surface.Tests (at
3667f86c72)data-objectstack/src/draftChanges-12725.test.ts(pin a, pin d at the client, and a@ts-expect-errorthatcopilotcannot be sent);studio-design/StudioDraftMark.test.ts;DataPillar.copilotDraftMarks-12725.test.tsx(pin b);ObjectListViewInspector.copilotMarks-12725.test.tsx(pins c, d through the real panel and a realMetadataClient, e).surface: 'studio':interfacesCreate-11823,interfacesCreatePage-11823,listViewInspector-11823,createAppOpensInterfaces-11794,sharedSelect-11865(StudioDesignSurface),ObjectHooksPanel.designerRegistryMissing,PackageOwdOverviewPanel.sharedSelect-11865.--maxWorkers=1: data-objectstack tests namingmetadata-client/draft-envelope/ the index (89 files, 1056 passed); every app-shell test namingStudioDesignSurface,ObjectListViewInspector,ObjectHooksPanel,PackageOwdOverviewPanelorStudioDraftMark(183 files, all passed after thesharedSelect-11865update). Full package directories are declared to CI.@object-ui/data-objectstackand@object-ui/app-shellexit 0 after the closure build. app-shell's tsconfig excludes*.test.ts(x), so that command does not type its test files; data-objectstack's tests are in its program.Ablation (each wrapped by
ablation-replace.mjs, restore proven by blob hash = HEAD and emptygit diff HEAD)governingDraftChange: pin (a) red, 1 failed / 8 passed; restoredd307f08c4428.by === 'copilot'check: thestudioandapilegs of pin (b) red, plus the unit legs (5 failed / 11 passed); restored835222fb87c9.?surface=push: pin (d) red at the client and through the panel's save (2 failed / 14 passed); restored6e46bf2630d2.Gates (at
3667f86c72)All 0: phantom-deps, self-import, unreferenced-sources, doc-example-readers, handler-key-reads, side-effects-array, element-data-source-declaration, spec-symbols, action-forward-parity, designer-field-key-parity, icon-record-names, i18n-keys, i18n-drift, i18n-designer-parity, control-bytes, hand-rolled-comment-mask, changeset-fixed, changeset-presence. ESLint over the 20 changed
.ts/.tsxfiles: 0 errors.check:spec-floorsexits 1 on[no-artifact]findings only (packages not built locally). The first draft importedMetadataAuthoringSurface, which the18.0.0-next.1floor lacks; the type now derives fromGetMetaItemResponseinstead, and that finding is gone.Screenshots
Branch
claude/issue-12725-draft-marks-evidence(10f2277ba9), stubbeddraftChanges, zh, at 1010 and 1280 px:draft-marks-field-*,draft-marks-field-source-*,draft-marks-listview-*,draft-marks-listview-source-*.Acceptance notes
git merge-base --is-ancestor 2ec6827962 f4755a68a7exits 0 (an exit 0 holds in a shallow checkout too), and the installed pinned spec declaresdraftChanges. NOT MEASURED live: no pinned backend was booted in this run.The implementing session is
https://claude.ai/code/session_01XVp19E1MYUTFM3dnkwz8gB.Generated by Claude Code