Repository navigation
feat(studio): Add view in the Interfaces list-view panel creates a kanban, calendar or other list view - #27870
Merged
Merged
Conversation
… chosen type and opens it Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Utp6CZUTcJCLE3VSWMv73Y
…ckage draft Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Utp6CZUTcJCLE3VSWMv73Y
This was referenced Oct 30, 2026
Contributor
Author
|
domain:ui#3 · os-bill · session_01Utp6CaJoinvGQSbHeDaWBe 席位核对ACCEPT · head
Generated by Claude Code |
This was referenced Oct 30, 2026
Closed
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.
domain:ui#3 · os-bill · session_01Utp6CaJoinvGQSbHeDaWBe
Requested by Bill · project thread
维护者速读
buildNewViewSpec+viewEnvelope),所以草稿里不会出现半成品视图;键已被占用时什么都不写、对话框不关、提示原因。回滚即 revert 本 PR。ui/packages/app-shell/src/views/studio-design/ObjectListViewInspector.tsx(createView、面板里的「添加视图」与「返回」)、ObjectListViewInspector.addView-27836.test.tsx、StudioDesignSurface.tsx(打开对话框前先发出面板里未保存的修改)。pnpm --dir ui exec vitest run packages/app-shell/src/views/studio-design/ObjectListViewInspector.addView-27836.test.tsx,预期 1 个文件 4 条全部通过(看板、日历、返回入口视图、键重名被拒)。Fixes #27836
Clause-②: no
Metadata-protocol: none
What changes
Measured first, on
mainat9ae6384e. The Interfaces pillar's list-view panel (ObjectListViewInspector) edits exactly one view: the one the open nav entry lands on (listViewTargetOf), usually the object's default grid. Nothing in Studio creates a view of another type. Once a view exists, the panel already edits any list view's columns, filter and sort, and a kanban's card section (KanbanCardSection); a calendar, gallery, timeline, gantt, map, chart or tree has no section of its own (see Acceptance notes). The canvas already renders whatever view the panel holds (StudioCanvasListViewContextfeedsobject-view'slistViews), so a kanban or calendar view in the panel shows as a board or calendar on the canvas."Add view" is a button at the top of the panel. It opens the console's existing
CreateViewDialog, unchanged:ListViewVisualization, which@object-ui/corederives from the spec's view type enum, so no list is kept here;On Create, the new hook method
useObjectListViewDraft().createView(payload):buildNewViewSpec(with the panel's seed columns as the fallback, which mirrors them intokanban.columnsas the spec requires) wrapped byviewEnvelope(OBJECT.KEY,viewKind: 'list', the label,config.databound to the object);client.list('view')) or drafted in any package (client.listDrafts({ type: 'view' })), writing nothing, as the pillar's New dashboard / report / page create does;If-None-Match: *, so the door also refuses one drafted between that read and the save;The view is born complete, so the draft never holds a half-made view and the held-input rule has nothing to hold. It is never the object's default (
isDefaultis not written), and the nav entry is not changed: the running app lists every view of the object in its view switcher. A refusal (taken key, or the door's own refusal) keeps the dialog open with the author's input, asCreateViewDialog's contract asks, and a toast says why in the designer locale.Opening the dialog first sends the panel's pending edit (the pillar's list-view autosave
flush), because the view the panel shows changes once the new one is created and the autosave drops an edit begun on another target.Tests
ObjectListViewInspector.addView-27836.test.tsx: the REAL hook, panel and Create View dialog over a REALMetadataClient, whose transport judges every view PUT with the installed spec'sviewschema (422 on refusal):acme_task.pipeline_boardin the package withIf-None-Match: *, accepted by the spec,kanban.groupByField: 'status', noisDefault, no write to the default view; the panel then shows the board with its card section;calendar: { startDateField: 'due_date', titleField: 'title' }, picked by label, accepted; the panel shows it;acme_task.default;Acceptance notes
console.objectView.*, throughuseObjectTranslation), so it follows the app's language rather than the Studio's designer locale; the panel's new strings are in the studio bundle (en, zh).client.save('view', …, { mode: 'draft', packageId })), published with the package like every other Studio draft; not exercised in a browser here.content/docs/describes this panel; none was changed.Verification
Readings for this head are in the report comment on #27836 (tests, ablation, type-check, the derived gate list reconciled with
--ran).