Skip to content

AI 问询首页 T5: the 「设计布局」 menu designer offers an "AI 问询" singleton entry (ai:chat) with a small copy form; "设为首页" moves it to the first position #37832

In progress

Description

@objectstack-fleet

repo:objectstack#1 · os-elon-musk · session_016WV4cwGVgec21LwQTtRY85

Filing gate: ③ maintainer-directed task. Source: maintainer — the AI 问询首页 plan ordered 「立卡派发」 (2026-11-27 02:37Z, quoted in #37788's body), handed to seat repo:objectstack#1 by epic:#5027#1 (mailbox comment 7209013967: "file them when you take the line") and taken on Elon's tap 「全接,开新专区」 (accepted 7210179549). Scope rows: #37788 comment 7210202110 (Fable review §4, copied verbatim by hotlong).
Grading: area:ai · Feature · priority:p2 (follow-on of #37788, p1; T3 #37790 is p2) · size M · reach: every app whose maker uses 「设计布局」 to add the AI inquiry page.
Dedupe: open-issue search "DesignModeMenu" ai:chat: 1 hit (#37788); "设计布局" "AI 问询": 1 hit (#37788). Neither files a designer entry.
Blocked-by: #37788

维护者速读

Scope (from #37788 comment 7210202110; AS = ui/packages/app-shell/src)

  • Files: AS/layout/DesignModeMenu.tsx, AS/layout/designModeMenuModel.ts, i18n designMode.menu.kind.
  • The picker gains 「AI 问询」 as a singleton (like "链接", it lists no existing items; once the app has one ai:chat entry it is no longer offered).
  • A small form edits title, subtitle, placeholder and suggestions, validated by AiChatNavParamsSchema (exported from @objectstack/spec/ui since AI 问询首页 T1:菜单项 ai:chat 的参数 schema 与校验,链接不再带参数 #37787 merged; component ref AI_CHAT_COMPONENT_REF; at most one such entry per app).
  • "设为首页" = move the item to the first navigation position; do not write landing (landing entries require visible, and "same home for everyone" is the first nav item: packages/spec/src/ui/app.zod.ts:1603-1611, :1645-1650 at objectstack da31daff; re-read on main at claim).

Evidence (read at objectstack da31daff; re-measure at claim)

  • Picker kinds today: object / view / dashboard / report / page / url (DesignModeMenu.tsx:990-995); entries can only be renamed and re-iconed, "who can see it" stays in Studio (DesignModeMenu.tsx:13-16, :66-68).
  • entryFor has no component branch (designModeMenuModel.ts:330-349).
  • The save writes the whole app document: the own package when writable, else .custom (AS/layout/designModeMenuSave.ts:5-15).

Acceptance

  • On an installed app the entry saves into .custom and is visible to everyone after publish.
  • The kind is not offered once the app has an ai:chat entry; the form rejects what AiChatNavParamsSchema rejects.
  • "设为首页" reorders only; no landing key is written.

Activity

  1. added
    priority:p2
    area:ai
    on Nov 27, 2026
  2. objectstack-fleet commented on Nov 27, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH

    Triage: lands in area:ai · domain:ui · Feature · p2 · pm:blocked · size M; rationale: a follow-on of the AI 问询首页 page (#37788, p1), filed under the maintainer's 「立卡派发」. The filer's p2 stands. It waits on #37788 per the card's own Blocked-by: line. Recorded 2026-11-27T06:18Z.

    Blocked-by: #37788

  3. added
    domain:ui
    pm:blocked
    on Nov 27, 2026
  4. objectstack-fleet commented on Nov 27, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#1 · os-elon-musk · session_016WV4cwGVgec21LwQTtRY85

    Claim: PM loop round 2 · area o1-D (unblocked by #37788, PR #37889 merged 10:55Z) · 2026-11-27T10:59Z
    Session: session_016WV4cwGVgec21LwQTtRY85
    Account: os-elon-musk
    Branch: claude/issue-37832-designer-ai-entry
    Worktree: objectstack-issue-37832
    Domain: domain:ui
    Area: o1-D
    Seat: repo:objectstack#1
    File surface: ui/packages/app-shell/src/layout/DesignModeMenu.tsx, ui/packages/app-shell/src/layout/designModeMenuModel.ts, their tests (new test file named for this card), ui/packages/i18n/src/locales/*.ts (the new kind and form strings only), one changeset (stop on breach; explain in the report)
    Container & model: M, mode:subagent, model: default tier (dispatch-gates --tier on DesignModeMenu.tsx: "no path-derived mandate"), effort: high
    Clause-②: no
    Metadata-protocol: none
    Responsibility: n/a — not a defect card (Feature)
    Thread-read: 7211414913
    Premise: holds — on origin/main e50ab8f the picker kinds are object / view / dashboard / report / page / url (DesignModeMenu.tsx header and KIND_METADATA), entryFor (designModeMenuModel.ts:330) has no component branch, and AiChatNavParamsSchema / AI_CHAT_COMPONENT_REF are exported from @objectstack/spec/ui (#37798 merged).
    Serial constraints cleared: none: overlap-check on a probe branch touching DesignModeMenu.tsx and designModeMenuModel.ts exit 0 against origin/main e50ab8fc91
    Pre-claim lane: ui/packages/app-shell/** ⇒ domain:ui (file ownership only); not governed.
    Pre-claim deps: Blocked-by: #37788 closed (PR #37889 merged).
    Prior rulings read: check-prior-rulings.mjs --card 37832 --terms designModeMenu,singleton,landing: 3 ruling-face lines in the two files — #36504 relaxing ruling (4) of #36363 (names land in the reader's language) and #36692 (reports keep their own editor); the header also says who sees an entry stays in Studio. None bounds adding a kind; ADR-0057 Amendment A4 (merged) settles that the page is home by the existing landing rule, so 「设为首页」 reorders and never writes landing.
    Fold-or-serial: not folded — #37833 (nav gating) and #37790 (the page) touch other files; parallel.

  5. added
    pm:dispatched
    and removed
    pm:blocked
    on Nov 27, 2026
  6. objectstack-fleet commented on Nov 27, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#1 · os-elon-musk · session_016WV4cwGVgec21LwQTtRY85
    os-dev-report

    {
      "issue": 37832,
      "status": "done",
      "branch": "claude/issue-37832-designer-ai-entry",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/37934",
      "head_sha": "0d1358c7ef1b5e04df847100184bb53daf4f57dc",
      "session": "session_016WV4cwGVgec21LwQTtRY85",
      "model_effort": "ran as claude-opus-5-5 (default tier per the claim), effort high as dispatched",
      "premise_still_valid": true,
      "summary": "The design-mode menu picker gains the kind 'aiChat' (label AI inquiry). Like Link it lists nothing: a form takes the entry name and the page copy (heading, subtitle, hint, suggestions one per line), judged by AiChatNavParamsSchema.safeParse (aiChatParamsOf), and writes {type:'component', componentRef:'ai:chat', label, icon:'sparkles', params?} through entryFor's new branch. aiChatOffered hides the kind while the staged menu holds an ai:chat entry at any depth, or the stored menu holds one the reader was not shown. It is offered again when the shown one is removed, and not offered until the stored read lands. That entry's menu gains 'Edit inquiry page' and 'Set as home'. Set as home is asHome = moveEntry(menu, id, null, 0): a reorder only, no landing written. The save path (saveAppMenu, own package or .custom) is unchanged. Premise held: entryFor had no component branch, and checkAppSingleAiChatEntry counts navigation plus areas at any depth. The editor mounts only for apps without areas, so the predicate reads navigation plus the stored navigation.",
      "tests": "New file ui/packages/app-shell/src/layout/__tests__/designModeMenuAiChat-37832.test.ts (17 tests) covers entry shape and AppSchema acceptance, the singleton (top level, nested, stored-but-unshown, removed-then-offered, unread), form vs schema (5 refusals mirrored by direct schema refusal, bounds accepted, empty gives no params, prefill), Set as home (reorder only, saved doc keys exactly name/label/navigation, no 'landing' anywhere in the calls), and the installed-app save (ensure, then save to com.acme.crm.custom, publish there, no audience keys, AppSchema passes). Local run: vitest over the new file plus the 6 existing design-mode menu files gave Test Files 7 passed (7), Tests 187 passed (187), lock VERDICT command-exit 0. @object-ui/app-shell type-check (tsc --noEmit plus tsconfig.test.json) gave VERDICT command-exit 0. packages/i18n vitest plus type-check gave Test Files 107 passed, Tests 1867 passed / 13 skipped, VERDICT 0, after gen:zh-hant (the first run was red on zh-hant-generated.test.ts; repaired by regeneration in 0d1358c7). Ablation, on disk after commit: deleting the staged-menu line in aiChatOffered turned the new file red (2 failed / 15 passed: 'is not offered once the menu holds one…', 'is offered again once the shown entry is removed…'). Restored with git restore --source=HEAD --staged --worktree, then green. Dependency closure built under the lock first (turbo build --filter '@object-ui/app-shell^...': 72/72 successful, VERDICT 0).",
      "gates": "Local, at head 0d1358c7: dispatch-gates --commands derived 41 commands. Each of the 40 node/pnpm check commands exited 0, with the exit captured before any pipe. pnpm --dir ui exec vitest run scripts/ gave Test Files 172 passed / 2 skipped, VERDICT command-exit 0. dispatch-gates --ran: 41 derived, 41 run, 0 NOT-MEASURED, 0 UNRUN. Extra: pnpm --dir ui run check:new-line-citations gave 0 new citations; the i18n parity tests are in the packages/i18n vitest run above. CI on the PR head when reported: every Lint, Type Check, Check Changeset, Check PR Size, Governed Surface Queue Guard and PR-body guards run was in_progress. Skipped, as designed: 18.x upgrade harness, Packed-tarball smoke, Queue verdict, Borrowed queue verdict, Schedule gate. NOT MEASURED: the UI test/build lanes had not posted yet. CI convergence is the PM's.",
      "dogfood_battery": "n/a — no `!` in the PR title and no (narrowing) arm",
      "line_budget": "15 files, +747 / -12 (759 changed lines, under the 3000 human-merge line). Of that, 132 lines are i18n (12 keys x 11 locales). Not governed.",
      "files_changed": [
        ".changeset/37832-design-mode-menu-ai-inquiry-entry.md",
        "ui/packages/app-shell/src/layout/DesignModeMenu.tsx",
        "ui/packages/app-shell/src/layout/designModeMenuModel.ts",
        "ui/packages/app-shell/src/layout/__tests__/designModeMenuAiChat-37832.test.ts",
        "ui/packages/i18n/src/locales/{ar,de,en,es,fr,ja,ko,pt-BR,ru,zh-Hans,zh-Hant}.ts"
      ],
      "deviations": [
        "No component-level pin. AGENTS.md (ruling record 6583487846) puts a new pin for a component with a shared harness file into that file as a top-level describe. DesignModeMenu-36363.test.tsx is that file and is outside the claimed surface, so the new test file holds only the model and save layers, and the UI wiring (kind hidden in the picker, the two menu items) has no rendered pin.",
        "zh-Hant.ts is generated from zh-Hans by gen:zh-hant. The file was in the surface; its one-line change came from the generator, not a hand edit.",
        "No browser check (optional per dispatch)."
      ],
      "ci": "in_progress at report time on head 0d1358c7 (PR #37934, draft)",
      "mcp_calls": "0",
      "api_writes": "2 relay writes: (1) fleet-write pr_create (POST /repos/objectstack-ai/objectstack/pulls plus the assignees leg POST /issues/37934/assignees), run 45995626518, read-back said the body was stored byte-identical and listed assignee os-elon-musk; (2) post-stamped os-dev-report comment on #37832. git push x4 (not REST).",
      "open_questions": [
        {
          "question": "Should a component-level pin for the AI inquiry kind (picker hides it; the two entry menu items) be added to the shared harness DesignModeMenu-36363.test.tsx?",
          "options": [
            "A widen this card's surface to that file and add one top-level describe in a patch round",
            "B leave the wiring covered by the model pins only"
          ],
          "recommendation": "A, because the ruling names the shared harness as the home and the wiring (filter on MENU_TARGET_KINDS, the aiChat dropdown items) is otherwise unpinned"
        }
      ],
      "security_findings": "none",
      "out_of_scope_findings": [
        "carrier: none · noted, not filed — 'Set as home' reorders even when the app declares landing. Then landing outranks position (ADR-0057 A4 Home), so the move changes the menu order and not the home for the audiences landing names. The action does not say so (boundary of the card's 'do not write landing' ruling; in PR Acceptance notes)."
      ]
    }
  7. objectstack-fleet commented on Nov 27, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#1 · os-elon-musk · session_016WV4cwGVgec21LwQTtRY85

    Claim amendment · area o1-D · 2026-11-27T12:07Z
    File surface: + ui/packages/app-shell/src/layout/__tests__/DesignModeMenu-36363.test.tsx (one new top-level describe only; no existing case edited). Reason: the dev's report 7217844732 asks where the rendered pin for the new kind goes; AGENTS.md's shared-harness rule (ruling record 6583487846) names that file as the home for a new pin of a component that has one, and the picker filter and the two entry menu items are otherwise unpinned (option A, PM discretion).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:aidomain:uipm:dispatchedpriority:p2

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions