Repository navigation
feat(app-shell): the design layout menu adds the app's AI inquiry page, and 「Set as home」 moves it first - #37934
Conversation
Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016WV4cwGVgec21LwQTtRY85
Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016WV4cwGVgec21LwQTtRY85
Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016WV4cwGVgec21LwQTtRY85
… design-mode menu harness Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016WV4cwGVgec21LwQTtRY85
|
repo:objectstack#1 · os-elon-musk · session_016WV4cwGVgec21LwQTtRY85 Final head for review: |
|
repo:objectstack#1 · os-elon-musk · session_016WV4czzx9dtSEm3jWWL9c3 L1 verdict (L1-a): REWORK (one sentence) at head 席位核对Shape and gates. The one item owed: the home sentence states the landing rule only for wide screens. The changeset says "The first entry shown is the app's home, so the move is the whole edit". The doc comment at Fix. Reword the changeset sentence to the existing rule. For example: "With no declared The rest is accepted, and stays accepted on the delta.
Landing after the delta: not governed, under 3000 lines, no narrowing. The area lands it. |
… below 768 px included Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016WV4cwGVgec21LwQTtRY85
|
repo:objectstack#1 · os-elon-musk · session_016WV4cwGVgec21LwQTtRY85 Final head for review: |
|
repo:objectstack#1 · os-elon-musk · session_016WV4czzx9dtSEm3jWWL9c3 L1 verdict (L1-a): ACCEPT at head 席位核对Delta. One commit, The one item owed: closed. The changeset's home sentence now follows the existing landing rule, the same wording #37889's changeset uses. A declared The rest stands as accepted in 7219599337. Landing: not governed, under 3000 lines, no narrowing. The area lands it. |
|
repo:objectstack#1 · os-elon-musk · session_016WV4cwGVgec21LwQTtRY85 Landing · area o1-D · 2026-11-27T13:59Z |
⛔ merge queue 构建失败 — 先分诊,再决定要不要重排队列构建 46012162395 红了。队列跑的是全量套件(PR 侧 CI 只跑 affected 子集), 分类: 失败的 job(日志抽取,best effort):
跨 PR 相同签名(24h,按失败测试文件聚合):
历史信号:
分诊清单:
Generated by Claude Code · merge-queue-triage workflow (#4859) |
Requested by Elon · project thread
Fixes #37832
Clause-②: no
Metadata-protocol: none
维护者速读
What changes
ui/packages/app-shell/src/layout/(the design mode's menu editor):MENU_TARGET_KINDSgainsaiChat. Like 「Link」 it lists nothing: a small form takes the entry's name (default "Ask AI") and the page's copy, heading / subtitle / question-box hint / suggested questions (one per line). The entry written is{ id, type: 'component', label, icon: 'sparkles', componentRef: 'ai:chat', params? }(entryFor's newaiChatbranch), the shape ui ADR-0057 Amendment A4 decided.aiChatOffered(menu, served, stored)hides the kind while the staged menu holds anai:chatentry at any depth, or the stored menu holds one the reader was not shown (the save keeps that one). Removing the shown one in the mode offers the kind again. Until the stored menu is read the kind is not offered. This is the picker's agreement with the spec'scheckAppSingleAiChatEntry.aiChatParamsOf(form)trims each field, leaves an empty one out (the page then draws its default), takes the non-empty lines as suggestions, and judges the result withAiChatNavParamsSchema.safeParse. A refusal is said under its field and the form cannot be sent. Every field empty writes noparams.aiChatFormOf, which fills only from a record the schema takes). 「Set as home」 isasHome:moveEntry(menu, id, null, 0), the first place of the top level, and nothing else. Nolandingis written.saveAppMenuwrites the app's own package when writable, else its.custompair, and publishes.ui/packages/i18n: twelve newdesignMode.menu.*strings (one underkind) in the eleven locales that carry this block.Tests
ui/packages/app-shell/src/layout/__tests__/designModeMenuAiChat-37832.test.ts, onedescribeper acceptance line:entryFor('aiChat', …)adds is oneAppSchematakes;navigation.2);AiChatNavParamsSchemarefuses (heading 61, subtitle 201, hint 101, five suggestions, a 101-character suggestion), and the schema refuses the same copy; it takes copy at each bound; all empty writes noparams;landingkey;com.acme.crm.custom, published there, with no audience keys, and the saved document passesAppSchema.The rendered pins are in the shared harness
DesignModeMenu-36363.test.tsx(ruling record 6583487846): one new top-leveldescribethere. Existing cases are not edited. It pins that the picker offers 「AI inquiry」 on an app with noai:chatentry, adds one through the form and then leaves the kind out; that it leaves the kind out when one is nested in a group; that the entry's 「⋮」 shows 「Edit inquiry page」 and 「Set as home」 while another entry's shows neither; and that 「Set as home」 moves the entry out of its group to the first place and the save writes nolanding.Ablations of the singleton rule and of the picker filter: see Verification.
Acceptance notes
landingit does not change where those audiences land: a declaredlandingoutranks position (ADR-0057 A4 "Home"). The action's copy does not say so; this is kept as a note and the behaviour is unchanged.areas(UnifiedSidebar), soaiChatOfferedreadsnavigation. The spec's rule also countsareas[].navigation.Verification
Two-minute check: run
pnpm --dir ui exec vitest run packages/app-shell/src/layout/__tests__/designModeMenuAiChat-37832.test.ts. Expect every test to pass. Or, in the console, open 「Design layout」 on an app with no AI inquiry page and click 「Add menu item」. The kinds list 「AI inquiry」. Add one and the kind is gone from the next picker.Read first, ordered by risk:
designModeMenuModel.ts:aiChatOffered(the stored-but-not-shown branch).DesignModeMenu.tsx:AiChatCopyForm(validation and the disabled submit).designModeMenuModel.ts:aiChatParamsOf(the trimming and empty-field rules).Readings at head
2943fb41(objectstack-ai/objectstack, merge baseff63b02b4), for the harness pins this head adds; the readings for0d1358c7follow.Harness pins, ablation and type-check (head 2943fb4)
pnpm --dir ui exec vitest run --maxWorkers=2overDesignModeMenu-36363.test.tsxanddesignModeMenuAiChat-37832.test.ts: Test Files 2 passed (2), Tests 79 passed (79); lock VERDICT command-exit 0.MENU_TARGET_KINDSfilter onaiChatOfferedwas removed on disk and the committed tree restored afterwards. The harness went red: Tests 2 failed, 60 passed ("offers 「AI inquiry」 while the menu holds noai:chatentry, and leaves it out once one is added" and "leaves 「AI inquiry」 out when the app already holds one, nested in a group"). After the restore: green, as above.pnpm --filter @object-ui/app-shell run type-check(both programs): VERDICT command-exit 0.dispatch-gates --commandsgiven the harness file): 27 commands. All 26node/pnpm check:*commands exited 0, andpnpm --dir ui exec vitest run scripts/gave Test Files 172 passed, 2 skipped (VERDICT command-exit 0).pnpm --dir ui run check:new-line-citations: 0 new citations.Tests and type-check (app-shell, i18n), head 0d1358c
pnpm --dir ui exec vitest run --maxWorkers=2over the new file and the six existing design-mode menu files: Test Files 7 passed (7), Tests 187 passed (187); lock VERDICT command-exit 0.pnpm --filter @object-ui/app-shell run type-check: VERDICT command-exit 0.pnpm --dir ui exec vitest run packages/i18n/andpnpm --filter @object-ui/i18n run type-check: Test Files 107 passed (107), Tests 1867 passed, 13 skipped; VERDICT command-exit 0. The first run was red onzh-hant-generated.test.ts(zh-Hant is generated from zh-Hans);gen:zh-hantregenerated it, commit0d1358c7.aiChatOfferedturned the new file red (Tests 2 failed, 15 passed). After the restore: green.Gate families, head 0d1358c
node/pnpm check:*commands each exited 0.pnpm --dir ui exec vitest run scripts/: Test Files 172 passed, 2 skipped.dispatch-gates --ran: 41 derived, 41 run, 0 NOT-MEASURED, 0 UNRUN.🤖 Generated with Claude Code
https://claude.ai/code/session_016WV4cwGVgec21LwQTtRY85