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

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).

  8. 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": "2943fb41bdaad27c92ec5c2509ac5b9ebe768cd7",
      "session": "session_016WV4cwGVgec21LwQTtRY85",
      "delta_of": "os-dev-report 7217844732 (head 0d1358c7); claim amendment 7217873443",
      "model_effort": "ran as claude-opus-5-5 (default tier per the claim), effort high as dispatched",
      "premise_still_valid": true,
      "summary": "Option A delivered. DesignModeMenu-36363.test.tsx gains exactly one new top-level describe, 'the AI inquiry page entry in the picker and its ⋮ (objectstack#37832)'. No existing case was edited. It holds 4 rendered pins: (1) the picker offers 'AI inquiry' on an app with no ai:chat entry, an entry is added through the form, and the next picker leaves the kind out; (2) the kind is left out when an ai:chat entry is nested in a group; (3) that entry's ⋮ shows 'Edit inquiry page' and 'Set as home' and another entry's shows neither; (4) 'Set as home' moves the entry out of its group to the first place, and the save writes no landing. No behaviour change. The PR body's Acceptance notes now say in one sentence that a declared landing outranks position, kept as a note.",
      "tests": "Under the lock at 2943fb41: vitest over DesignModeMenu-36363.test.tsx and designModeMenuAiChat-37832.test.ts gave Test Files 2 passed (2), Tests 79 passed (79), VERDICT command-exit 0. Ablation of the picker filter, on disk after commit: the filter MENU_TARGET_KINDS.filter((k) => k !== 'aiChat' || aiChatOpen) was replaced by MENU_TARGET_KINDS.map, which turned the harness red with Tests 2 failed / 60 passed (pins 1 and 2 above), VERDICT command-exit 1. Restored with git restore --source=HEAD --staged --worktree, porcelain clean. @object-ui/app-shell type-check (both programs) gave VERDICT command-exit 0. The worktree was recreated from origin/claude/issue-37832-designer-ai-entry and the app-shell^... closure rebuilt under the lock (72/72, VERDICT 0).",
      "gates": "Derived for the new diff path only (dispatch-gates --commands with the harness file): 27 commands. All 26 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. pnpm --dir ui run check:new-line-citations gave 0 new. The derivation warned STALE TREE: the branch is 11 commits behind origin/main and 2 derivation-input files changed. main was not merged; there is no conflict or main-caused red. CI on 2943fb41 at report time: 45 success, 15 skipped by design, and Check Changeset plus PR-body guards in_progress (re-run after the body patch). No failure.",
      "dogfood_battery": "n/a — no `!` in the PR title and no (narrowing) arm",
      "line_budget": "This delta: 1 file, +80 lines (test only). Branch total: 16 files, about 839 changed lines, under 3000. Not governed.",
      "files_changed": [
        "ui/packages/app-shell/src/layout/__tests__/DesignModeMenu-36363.test.tsx (this delta: one new top-level describe)"
      ],
      "deviations": [
        "The worktree had been removed after the first report, so it was recreated from the remote branch at 0d1358c7 with no rebase. The new commit is a fast-forward."
      ],
      "ci": "2943fb41: 45 success / 15 skipped / 2 in_progress (Check Changeset, PR-body guards), 0 failures at report time",
      "mcp_calls": "0",
      "api_writes": "This delta: 2 relay writes. (1) fleet-write issue_patch on #37934 body (PATCH /repos/objectstack-ai/objectstack/issues/37934), run 46006774004, read-back 8250 bytes stored, identical; the attribution lines stay first and the signed trailer is the last line. (2) post-stamped os-dev-report delta comment on #37832. Plus 1 git push. Cumulative: 4 relay writes.",
      "open_questions": [],
      "security_findings": "none",
      "out_of_scope_findings": [
        "carrier: none · noted, not filed — 'Set as home' on an app that declares landing changes the order, not the home for those audiences. Recorded as one sentence in the PR body's Acceptance notes; behaviour unchanged."
      ]
    }
  9. 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": "c7ae34a44d0be89c813a14df12fb6d05704d4d79",
      "session": "session_016WV4cwGVgec21LwQTtRY85",
      "delta_of": "L1-a REWORK 7219599337 at 2943fb41",
      "model_effort": "ran as claude-opus-5-5 (default tier per the claim), effort high as dispatched",
      "premise_still_valid": true,
      "summary": "Wording only, no behaviour. The changeset sentence now states the home by the app's landing rule, worded as in #37889's changeset: a declared landing comes first; with none, from 768 px up the first entry shown lands; below 768 px the app root is the app's menu, where the entry becomes its first row. So the move is the whole edit: no landing is written, and an app that declares landing keeps landing where it declares. The DesignModeMenu.tsx header comment and the asHome doc in designModeMenuModel.ts now say the same.",
      "tests": "Comment and changeset text only; no test or type surface moved. Test files were not re-run, and the 2943fb41 readings stand.",
      "gates": "Derived for this diff's 3 paths (dispatch-gates --commands with those paths): 32 commands. All 31 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. That is the second run: the first, in the freshly recreated worktree before the closure build, failed 22 files on 'the built @objectstack/spec artifact could not be imported'. It was stale build state, not a reading, so it counts as NOT MEASURED; the app-shell^... closure was rebuilt under the lock (72/72 cached, VERDICT 0) and the suite re-run. pnpm --dir ui run check:new-line-citations gave 0 new. CI on c7ae34a4 not read at report time (just pushed); CI convergence is the PM's.",
      "dogfood_battery": "n/a — no `!` in the PR title and no (narrowing) arm",
      "line_budget": "This delta: 3 files, +9 / -5. Branch total stays under 3000. Not governed.",
      "files_changed": [
        ".changeset/37832-design-mode-menu-ai-inquiry-entry.md",
        "ui/packages/app-shell/src/layout/DesignModeMenu.tsx (header comment)",
        "ui/packages/app-shell/src/layout/designModeMenuModel.ts (asHome doc)"
      ],
      "deviations": [
        "PR body not patched: it does not repeat the home sentence. Its Acceptance note already says a declared landing outranks position, and its 速读 line only describes the move."
      ],
      "ci": "c7ae34a4: just pushed, not read",
      "mcp_calls": "0",
      "api_writes": "This delta: 1 relay write, the post-stamped os-dev-report delta comment on #37832. Plus 1 git push. Cumulative: 5 relay writes.",
      "open_questions": [],
      "security_findings": "none",
      "out_of_scope_findings": []
    }
  10. removed
    pm:dispatched
    on Nov 27, 2026
  11. objectstack-fleet commented on Nov 27, 2026

    @objectstack-fleet
    ContributorAuthor

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

    Closed by PR #37934 (merged through the queue). pm:dispatched removed with this note. Area o1-D.

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

Metadata

Metadata

Assignees

Labels

area:aidomain:uipriority:p2

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions