Repository navigation
feat(console): the ⌘K palette previews the selected record, creates a record from the query, and names what Enter does - #36387
Conversation
…wip) Claude-Session: https://claude.ai/code/session_01QsR2jV3scu6UYPb42n5okQ Co-authored-by: Claude <noreply@anthropic.com>
…hangeset, README Claude-Session: https://claude.ai/code/session_01QsR2jV3scu6UYPb42n5okQ Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QsR2jV3scu6UYPb42n5okQ Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QsR2jV3scu6UYPb42n5okQ Co-authored-by: Claude <noreply@anthropic.com>
…fect Claude-Session: https://claude.ai/code/session_01QsR2jV3scu6UYPb42n5okQ Co-authored-by: Claude <noreply@anthropic.com>
Resolve the de quote-pair pin: main's two restore-factory pairs (123) plus this branch's createAs pair make 124. Claude-Session: https://claude.ai/code/session_01QsR2jV3scu6UYPb42n5okQ Co-authored-by: Claude <noreply@anthropic.com>
The 768px cap the palette takes beside a record preview is wider than a 640px window holds with a margin; read DIALOG_VIEWPORT_GUTTER as every other wide dialog does, and list the palette in the gutter census. Claude-Session: https://claude.ai/code/session_01QsR2jV3scu6UYPb42n5okQ Co-authored-by: Claude <noreply@anthropic.com>
|
repo:objectstack#7 · zhuangjianguo · session_01QsR2jV3scu6UYPb42n5okQ Final head for L1 · area f7-shell · 2026-11-22T10:26Z
|
|
repo:objectstack#7 · zhuangjianguo · session_01QsR2jS7jCv5PH4ytECQWqf L1 REWORK · head 维护者速读
要改的(1 项)
席位核对(本轮已读,增量时不重读)
|
…ening The eight console.commandPalette keys are new published language-pack keys, so Clause-② is yes (widening), not no. Claude-Session: https://claude.ai/code/session_01QsR2jV3scu6UYPb42n5okQ Co-authored-by: Claude <noreply@anthropic.com>
|
repo:objectstack#7 · zhuangjianguo · session_01QsR2jV3scu6UYPb42n5okQ Final head for delta L1 + L2 · area f7-shell · 2026-11-22T10:59Z
|
|
repo:objectstack#7 · zhuangjianguo · session_01QsR2jS7jCv5PH4ytECQWqf L1 ACCEPT(增量)· head 维护者速读
席位核对(增量,只核
|
|
repo:objectstack#7 · zhuangjianguo · session_01QsR2jTeURPvEm465RcoYEC Contract reviewServed-tier: Inputs read: card #36286 body and all six comments (triage, claim with its Clause-② amendment, both os-dev-reports), PR #36387 body and its three comments (final-head notes for a17d2c7 and dcb510f, L1 REWORK 7077829267), the 20-file list, the net diff against main (merge base ed33f8a), and the check-runs on this head. Check-runs: 47 success, 15 skipped, 0 failure, none pending. The skipped runs are the usual path-filtered and opt-in jobs. ① Derived judgments
② Semver level
③ Boundary flags
No must-fix, no should-fix. Implemented-by: VERDICT: PASS |
|
repo:objectstack#7 · zhuangjianguo · session_01QsR2jTeURPvEm465RcoYEC Landing (seat 7, 2026-11-22T11:07Z): head |
…e it, and published at once (objectstack-ai#36409) (objectstack-ai#36398) <!-- claude-projects-attribution: {"github_login":"zhuangjianguo"} --> _Requested by **Steedos** · [project thread](https://claude.ai/code/project/chan_018ETKaNwMZCNRYD7D8Q9Ubb?thread=cmsg_018ETKaNwMZCNRYD7D8Q9UbbCxiFE11rsKwyNffJZKYqJs)_ Fixes objectstack-ai#36409 Clause-②: yes (widening) Metadata-protocol: none ## 维护者速读 - 列表视图下拉的「添加视图」里,「共享」这个选项现在只给真正能保存共享视图的管理员;组织管理员以前能看到这个选项,点了却被服务器拒绝,现在不再显示。管理员新建的共享视图保存后立刻对所有人可见,不用另外发布。打开的视图如果已经不存在,会提示一次,然后显示默认视图。 - 属于「列表专题」,按维护者定的规则「只有管理员可以在前端界面创建共享视图」和「保存即生效」;把已有视图设为共享或取消共享,维护者说暂时不考虑,本 PR 不做。 - 若出错,影响的是管理员新建共享视图这一步:保存被拒时会提示原因,不会发布任何东西;本改动可以整体撤回,已存的视图不受影响。 - 无 ## What changes objectstack-ai#36371 closed as not planned: the rule it asked for already holds (correction 7077377066), and sharing or unsharing an existing view is not wanted now. Building it measured three real faults at `origin/main` 3faabd2, which objectstack-ai#36409 files; this PR fixes those three and nothing else. The 「设为共享」 / 「取消共享」 row actions an earlier head carried are gone (code, keys, tests, docs). - **The server refusal already holds.** A shared view is `view` metadata written through `PUT /api/v1/meta/view/:name`; that door, the publish and the delete refuse any caller without `manage_metadata` (`metaSaveVerdict`, ADR-0066 D1), answering `403 FORBIDDEN`. No server code changes; the refusal is pinned with the shipped permission sets (below). 1. **Who is offered Shared** (`mayShareViews`, `objectViewViewSharing.ts`): an administrator whose session holds `manage_metadata` (`useCanAuthorMetadata`). Add view used to ask `isAdmin` alone, which is true for an organization administrator, who does not hold the capability: they were offered Shared and the save answered `403`. 2. **Shared at once.** A view created Shared used to be saved as a draft (ADR-0034), invisible to everyone until someone published it. It is now saved and published in one act through the door objectstack-ai#35955 uses (`saveAndPublishRuntimeMetadata`, ruling record 7058616478, the maintainer's 「保存即生效」). That helper now saves a new view into the app's package when the caller passes the app, as `createRuntimeMetadata` does (objectstack#35624); existing callers pass none and are unchanged. A refused save publishes nothing. 3. **A view that is gone.** A reader whose address names a view the server answers `not_found` for is told so once, and the list shows its default view, as it already did silently. `useMetaItemRefusal` gains `absent` for that verdict. Two new `@object-ui/i18n` keys under `view.switcher` (`shareNameTaken`, `viewGone`) in every pack (zh-Hant regenerated), so `Clause-②: yes (widening)`. `content/docs/ui/views.mdx` gains a Shared views paragraph. No published skill describes this surface (`git grep` of `skills/` for My views / shared view: zero hits), so no `Skills-docs:` line is owed. Not done here: 「设为共享」 / 「取消共享」 on existing views (not now, per the maintainer), saving into a shared view (objectstack-ai#35955 step 2), the Manage views page. ## Tests - `packages/rest/src/meta-write-door-capability-enumeration.test.ts`, new describe `objectstack-ai#36409`: with the systemPermissions the shipped sets grant (`securityDefaultPermissionSets`), a member (`member_default`) and an organization administrator (`member_default` + `organization_admin`) are refused the view's save, publish and delete `403 FORBIDDEN` with the protocol never reached; the control, `admin_full_access`, reaches all three. - `ui/packages/app-shell/src/views/objectViewViewSharing.test.tsx` (new): who is offered Shared (an administrator holding `manage_metadata`; neither half alone); Create shared saves with the first-write pin and publishes, then opens the view; a refused save is said, reported unsaved, and publishes nothing; a name an unpublished draft already holds is said (`shareNameTaken`) and nothing is published, refreshed or opened. - `ui/packages/app-shell/src/views/runtime-metadata-persistence.saveAndPublishIntoApp-36409.test.ts` (new, a real `MetadataClient` over the package doors' measured bodies): with an app, a writable app package is named on the save; an installed one gets the pair the ensure door returns; an unlisted one, `packageId: null` or no app gets none; the publish and a refused publish's discard name no package (ADR-0146 D8); a `dashboard` call ignores the app and asks no package door. ### Readings at head b09dc55 (main ff60149 merged); `65544511` adds the two pins - `objectViewViewSharing.test.tsx` 3/3; `@object-ui/i18n` with the switcher, sharing, in-place-create and census tests: 110 files, 2,032 passed; every `ObjectView*` test with `runtime-metadata-persistence`, the census, the switcher, the sharing and in-place-create tests: 114 files, 1,021 passed. `meta-write-door-capability-enumeration.test.ts`: 72 passed. - Ablation: `mayShareViews` reduced to `return isAdmin;` turns the organization-administrator test red (1 failed / 2 passed); restored, green. - Derived gates (`dispatch-gates.mjs --ran`): 96 derived, 94 run, 2 NOT MEASURED, 0 unrun. NOT MEASURED (prerequisite exit 3), left to CI: `check-plugin-teardown-shape --self-test` (shallow-clone fixture) and spec `check:skill-examples` (needs client-react declarations). `ui vitest run scripts/`, spec `check:docs` and `check:dts-closure` were red only until `@objectstack/spec` was rebuilt with declarations after the main merge, then green. `check:dual-build-cjs-loads` stays red on this container's tree alone: 75 findings, each a `.d.ts`/`.d.cts` of a package this PR does not touch (`core`, the drivers, …) never emitted here; CI's build is its reading. - `overlap-check.mjs`: clean against main and every open PR head. - At `65544511`: the new package pins 5/5 and the sharing test 4/4; `runtime-metadata-persistence*` 8 files, 63 passed. Ablations: `saveAndPublishRuntimeMetadata` reading `ctx.app` for every type turns the dashboard pin red; resolving no package turns the four view pins red; `publishNew` ignoring `'pending-draft'` turns the `shareNameTaken` pin red; each restored, green. The test-reading gate families (27) re-run at this tree: green but the one NOT MEASURED above. ## Acceptance notes - **Organization administrators elsewhere on the list page: objectstack-ai#36448.** Manage views, the view settings panel and the Create View dialog still gate on `isAdmin` alone, so an organization administrator without `manage_metadata` is still offered those and refused by the server. This PR narrows only the Shared choice objectstack-ai#36409 names; objectstack-ai#36448 carries the rest. - **Organization administrators** were not driven live: the showcase seeds no organization-administrator persona. Their gate is the unit pin above and the server's `403` pin. - **The de quote-pair count pin** (`de-quote-pairing-3876.test.ts`) is no longer touched: the dropped German strings were the ones with quotes, so objectstack-ai#36387 owns that pin alone. ## Screenshots Taken at `a0dfe1a4` in a live Console (`ui/apps/console` Vite against `examples/app-showcase` `objectstack dev --seed-admin`), 1400×900 at 2×, two accounts: the dev administrator `admin@objectos.ai` and the seeded member persona `auditor.demo@example.com`, on Projects. That head still carried the dropped row actions; the shots below show only what this PR keeps, which the slimming did not change. The files are kept with the project, named here as they are attached there. - `a2-admin-addview-shared.png`: administrator, Add view with **My views / Shared**, Shared chosen, the hint under it. Created, it opened at once as `showcase_project.key_projects`. - `m1-member-menu.png`, `m2-member-addview.png`: the member, opening that view by its address, finds it under Shared views straight away (no publish step), and Add view has no My views / Shared choice. - `m3-member-view-gone.png`: the member reloads the address of a view that was removed: 「The view you opened is no longer available, so the list shows its default view.」 over All Projects. ## Verification Two-minute check: as a platform administrator, open a list's view dropdown, Add view, choose Shared and create; sign in as a member and open the list: the view is under Shared views at once, and Add view offers no Shared choice. --- _Generated by [Claude Code](https://claude.ai/code/session_01QsR2jTPMb2q2wRssyREqhQ)_ 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- signed: repo:objectstack#7 · zhuangjianguo · session_01QsR2jTPMb2q2wRssyREqhQ --> --------- Co-authored-by: Claude <noreply@anthropic.com>
Requested by Steedos · project thread
Part of #36286 — this PR is step 1 (to-do items 1 to 4); item 5, the "current page" group on the empty palette, is left for a second PR on the same card.
repo:objectstack#7 · zhuangjianguo · session_01QsR2jV3scu6UYPb42n5okQ
Clause-②: yes (widening) — eight new published language-pack keys, in all eleven packs: console.commandPalette.create, createAs, previewEmpty, enterOpenRecord, enterCreate, enterSwitchApp, enterApplyTheme, enterOpen
Metadata-protocol: none
维护者速读
What changes
The ⌘K palette inside an app (
CommandPalette,ui/packages/app-shell/src/chrome/) gains the card's items 1 to 4. Which records search finds and their order, the full search page, mobile and the AI entry are untouched.PalettePreviewPane.tsx). While the query finds records, the palette widens (sm:max-w-3xl) and draws the selected hit read-only through the existingRecordPreviewCard(object label, title by the ADR-0079 ladder, the object's declaredhighlightFieldsthrough the record page's highlight strip, field-level security applied). The selection is cmdk's own, now controlled (value/onValueChange), so ArrowUp/ArrowDown move the preview. When a new set of hits lands, the selection moves to the first hit. The pane is a CSS container query on the palette frame: below a 45rem (720px) frame it isdisplay: none, so a narrow window shows the results alone and nothing scrolls sideways.paletteCreate.ts). Once something is typed, the last group, "Create", offers up to three of the app's navigation objects, the object of the page the palette was opened on first, then the navigation's order. Enter opens/apps/APP/OBJECT/new?TITLEFIELD=words, the create page that already reads its query string as the create prefill. An object is offered by the same verdict as the list's New:resolveAffordance('listNew', …)(bucket,userActions.create, effective API operations, create grant), then the create action's toolbarvisibleWhen(fails closed) anddisabledWhenbound with no record, asobjectViewToolbarAffordancesbinds them. A "create as" row additionally needs the object's title field (resolveNameField) to be atext/textareafield, notreadonly, that the member may write on create (createFormFields), so the words always land.console.objectView.newObjectkey), object label, machine name or the words "create new" match the query. An object whose New entry the query found gets no "create as" row (the query names the action, not a record).PaletteEnterHint.tsx). A footer names what Enter does to the selected entry, read off the first word of its cmdk value: Open record (record, recent), Create, Switch app, Apply theme, or Open (every navigation entry).Eight new published
@object-ui/i18nkeys in all eleven packs, a widening of the language packs (Clause-② yes):console.commandPalette.create,createAs,previewEmpty,enterOpenRecord,enterCreate,enterSwitchApp,enterApplyTheme,enterOpen(zh-Hant regenerated bygen:zh-hant). No props or package exports change. README section of the palette updated. Changeset:@object-ui/app-shell+@object-ui/i18npatch.Screenshots (showcase app, 1440 wide,
zh-CN; own--freshbackend + console dev server on this branch)Hit: "north" on the Accounts list, the first hit previewed, footer 「打开记录 ↵」
Miss: 「张三丰」, the page's object first, footer 「新建 ↵」
「新建」: the New entries (below the navigation pages the word also finds)
Enter on the miss row: the create page with the name filled
A 700px window: results alone, no preview, no sideways scroll (measured
scrollWidth - clientWidth= 0)English: hit · miss. The images live on the orphan ref
claude/issue-36286-screenshots(no code), so this PR's diff carries no binary.Read first (by risk)
ui/packages/app-shell/src/chrome/CommandPalette.tsx— the hunk that computescreateTargets/newRecordRows/createAsRows, and the render-time block that moves the selection to the first record hit whenhitSignaturechanges (state adjusted during render, not in an effect).ui/packages/app-shell/src/chrome/paletteCreate.ts—paletteMayCreate(the New verdict) andpalettePrefillField.ui/packages/app-shell/src/chrome/PalettePreviewPane.tsx— the 150 ms settle before the by-id read.Tests
New file
CommandPalette.previewCreate-36286.test.tsx(15 tests) against the realCommandPaletteProviderover thefindfanout andfindOne: the preview draws title + declared key fields and Enter opens the record; ArrowDown moves the preview and only the settled records are read (findOnecalled for C1 then C2, nothing else); the container-query classes; no pane and no wide palette without a hit; create-as order (route object first, else navigation order), the invoice the member may not create never offered, Enter lands on/apps/crm/customer_36286/new?name=Zhang+San; the empty palette and a cleared query offer no create row; "new" finds one New entry per creatable object and no create-as row; an object's name finds its New entry; the footer per entry kind;visibleWhen/disabledWhen/ title-field gates as units.Local runs at 862d69b
pnpm --filter @object-ui/app-shell type-check(bothtsc --noEmitandtsconfig.test.json), thenvitest run packages/app-shell/src/chrome/under the lock:VERDICT command-exit 0, Test Files 29 passed (29), Tests 173 passed (173).vitest run packages/i18n/: Test Files 106 passed (106), Tests 1978 passed, 13 skipped. (First run had 3 reds, fixed in this branch: zh-Hant not regenerated, and the de quote-pair count pin 121 to 122 for the newcreateAspair.)CommandPalette.*.test.tsx,paletteMatch.test.tsandviews/record-preview/*.test.tsxgreen (part of the 126-file run whose only reds were the two i18n files above).ui:check:i18n-keys,check:i18n-drift(0 en values changed, 8 keys added),check:i18n-dead-keys: exit 0.--no-inline-configon the changed files: 0 errors;CommandPalette.tsxcarries the same 10 warnings as onmain.check-adr-0087-registration,check-changeset-no-major,check-empty-changeset,check-closing-keyword-parity,check-sdui-manifest,check-comment-mask-corpus,check:nul-bytes,check:published-files,check:cross-package-test-inputs,check:test-source-alias,check:undeclared-dep-imports,check:adr-anchors,check:role-word,check:watch-hint-literal,check:type-check-coverage. NOT MEASURED:check:type-check-debt(killed at its 300 s local timeout; CI's).overlap-check: VERDICT clean, merges with origin/main and 6 open PRs sharing the locale packs.Acceptance notes
/apps/APP/OBJECT/new(the route the bare data surface's New and a related list's New open; it reads the query string as prefill). The list page's New opens a modal throughAppContent'shandleEdit, which is outside this claim's file surface; reaching it from the palette would mean a new prop wired there. Worth a decision if the modal is wanted.highlightFieldsonly. An object that declares none previews its title alone: that isRecordPreviewCard's rule, from the record page's 「没声明就不挑」 ruling, not a new choice. The card's acceptance line (industry, phone, email) holds for an object that declares them.CREATE_AS_MAX), a judgment to keep the list short in apps with many objects; every other creatable object is still one "New OBJECT" entry away by name.RecordPreviewCardreads by id with$expandon the reference fields it shows, so lookups render as names; holding an arrow key reads nothing until the selection rests 150 ms.Readings at head a17d2c7 (after the first-push verification above)
Test UI (10/16)ondialogViewportGutterCensus-12603: the palette's 768 px wide cap lacked the shared gutter. a17d2c7 readsDIALOG_VIEWPORT_GUTTERand lists the palette inWIDE_SITES.packages/app-shell/src/chrome/gaveTest Files 30 passed (30),Tests 180 passed (180);pnpm --filter @object-ui/app-shell type-checkVERDICT command-exit 0 (after rebuilding@object-ui/plugin-view's stale dist).packages/i18n/plus the palette test gaveTest Files 107 passed (107),Tests 1993 passed | 13 skipped;ui scripts/gaveTest Files 172 passed | 2 skipped,Tests 5127 passed.de-quote-pairing-3876.test.ts(the same count pin; the second lander bumps it by one).Verification
Two minutes:
cd examples/app-showcase && pnpm exec objectstack dev --seed-admin --fresh -p PORT, then inui/apps/consoleDEV_PROXY_TARGET=http://localhost:PORT pnpm exec vite --port VPORT --strictPort; sign in, open Accounts, press ⌘K, typenorth: Northwind is selected and the right pane shows Lifecycle / Industry / Annual Revenue; type张三丰and press Enter: the account create page opens with Account Name filled.Generated by Claude Code