Skip to content

AI 问询首页 T2:平台通用的应用内 AI 问询页面(首页态、提问、恢复对话,本页隐藏机器人) #37788

Description

@objectstack-fleet

epic:#5027#1 · hotlong · session_01Q4EjjMUfmNYTem26rXLFUf

Filing gate: ① maintainer-asked. Jack in the seat thread, 2026-11-27: 「立卡派发」 (02:37Z); route ruling 「先内置页面,再做页面积木」 (02:41Z card); 「我们是一个开发平台,你搭的入口页面必须是通用的」 (02:51Z); 「用fable评审一下完整的首页方案,我现在只要考虑这一个页面」 (03:07Z); ADR-0057 conflict ruling 「做首页,本页隐藏机器人」 (03:16Z card).
Plan: /mnt/project-files/ai-home/plan-v1.md, Fable review with file:line evidence /mnt/project-files/ai-home/fable-review-v1.md (objectstack da31daff, cloud 917f57c). Mockup: https://claude.ai/artifact/SS7UdUYXethLuvV8f5D7JY.
Parent: objectstack-ai/cloud#5027 (ask experience). Trigger app: brightrule (a policy-inquiry app whose only AI entry today is the top-right robot).
Grading: area:ai · Task · p1 · size M · reach: every app with an ai:chat entry; brightrule first.
Dedupe: searched AppAskPage, ai:chat, registerAppComponent ai: none.
Blocked-by: #37787
Blocked-by: #37819

维护者速读

  • 是什么:新做平台通用的「AI 问询」页面。应用把它挂在菜单上(第一位即首页),进来先看到应用配置的欢迎语、大输入框和推荐问题;提问后同一页变成对话。用通用 ask,在这一页隐藏右上角机器人。
  • 已定:做首页、本页隐藏机器人(03:16Z);要补 ADR-0057 修订 A4。
  • 要你做什么:无。

Background (verified, see the review)

What to do

  1. New ui/packages/app-shell/src/console/ai/AppAskPage.tsx, registered as ai:chat in ui/packages/app-shell/src/services/builtinComponents.tsx (lazy, like the other pages).
  2. The page reads its own nav item from the loaded app's navigation (by componentRef: 'ai:chat') and parses params with AI 问询首页 T1:菜单项 ai:chat 的参数 schema 与校验,链接不再带参数 #37787's schema; missing keys fall back to neutral platform copy (no business wording). It never reads params from the URL.
  3. Home state, drawn by the host: welcome title and subtitle, a large composer with the configured placeholder, an "本应用优先" scope badge (static text in v1), up to 4 suggestion buttons (click = send). Layout works at phone width.
  4. On first submit, mount the existing ChatPane via the existing pendingFirstMessageRef path: hideHeader, agent pinned to ask, activeAppPackageId = this app's package, conversation key app:<pkg>:ask. A maker also gets ask here; a build hand-off from ask keeps today's behaviour (opens the drawer).
  5. Conversation create from this page sends metadata: { activePackageId: <pkg> } (extend useChatConversation's create body; drawer and other callers unchanged).
  6. URL: ?c=<conversationId> once the conversation exists; reload restores it. A ?c= that is not the caller's, or belongs to another app, opens the home state (no error page, no leak of its title). "新对话" returns to the home state.
  7. Hide the top-right robot / drawer trigger while this page is the active route, so one screen never holds two ask conversations; it comes back on any other page.
  8. AI unavailable for this user (deployment has no AI, or no seat, useAiSurface): render the existing AiUnavailable state.
  9. ADR-0057: add Amendment A4 … Moved to ADR-0057 Amendment A4: an app may place one AI inquiry page (ai:chat) in its menu; the top-bar robot hides on that page #37819 (seat repo:objectstack#1 split, 2026-11-27T04:57Z): the ADR text lands first; this card's PR lands only after ADR-0057 Amendment A4: an app may place one AI inquiry page (ai:chat) in its menu; the top-bar robot hides on that page #37819's PR merges and does not touch ui/docs/adr/**.
  10. If a cheap hook exists, tag turns from this page (context.surface or equivalent) so evals can split them; otherwise note it in the PR.

Acceptance

  • AiChatPage.tsx and ChatbotEnhanced.tsx untouched.
  • Tests: registration and route; home state renders configured copy and falls back cleanly; suggestion click sends; first submit mounts ChatPane with ask + package; create body carries activePackageId; ?c= restore, foreign ?c= falls back; robot hidden on this route only; unavailable state.
  • Browser check in the showcase or brightrule app with a hand-written nav item (screenshot in the PR).

Activity

  1. added
    enhancement
    priority:p1
    pm:blocked
    domain:ui
    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 · priority:p1 · pm:blocked · size L; rationale: AI ask home page T2, the platform-generic in-app ask page. Maintainer-asked focus page: p1 as filed. Blocked by #37787.

  3. objectstack-fleet commented on Nov 27, 2026

    @objectstack-fleet
    ContributorAuthor

    epic:#5027#1 · hotlong · session_01Q4EjjMUfmNYTem26rXLFUf

    For repo:objectstack#1 area o1-D (2026-11-27T04:55Z), as asked in mailbox comment 7210179549: the Fable review §4 rows for T5 and T6, copied verbatim with their evidence, so you can file them. Source: the review of the AI 问询首页 plan (objectstack da31daff, cloud 917f57c). AS = ui/packages/app-shell/src.

    T5 — 「设计布局」 adds an "AI 问询" entry (size M, depends on T1 #37787, can start now)

    • Files: AS/layout/DesignModeMenu.tsx, AS/layout/designModeMenuModel.ts, i18n designMode.menu.kind.
    • Scope: 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 (the T1 AiChatNavParamsSchema). "设为首页" = 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).
    • Evidence: the picker kinds today are 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.

    T6 — hide the entry for people with no AI / no seat; home falls through (size S, depends on T2 #37788)

    • Scope: someone who cannot get the agent does not see the ai:chat item, and the app's home falls to the next nav item instead of an unavailable page.
    • Evidence: AI entry points judge per person ("can this person get an agent"), not per deployment (AS/hooks/useAiSurface.ts:79-97). requiresService (packages/spec/src/ui/app.zod.ts:451) covers deployment-level only; no existing per-seat hide mechanism was found — confirm at implementation.
    • Acceptance: one case on the community edition (no AI) and one for an account without a seat.

    Not mine to notify: #37728 (unblocks #37729) is owned by the epic #37690 seat (repo:cloud#5, claim comment 7206486369; its PR #37799 is ready and over the 3000-line human-merge line). I will send Notify: landed for #37787 when PR #37798 merges.

  4. objectstack-fleet commented on Nov 27, 2026

    @objectstack-fleet
    ContributorAuthor

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

    Item 9 (ADR-0057 Amendment A4) moved to #37819, on seat repo:objectstack#1's routing call (2026-11-27T04:57Z, area o1-D): the governed ADR text lands first, so this card's page PR stays off ui/docs/adr/** and lands only after #37819's PR merges. Body updated: item 9 struck through with the pointer; Blocked-by: #37819 added beside Blocked-by: #37787. Size stays L as triage#1 graded it (7209693843); this card runs as its own card thread once #37787 lands. Owner: area o1-D under seat repo:objectstack#1 (hand-off 7209013967, accepted 7210179549); the assignee moves at claim.

  5. objectstack-fleet commented on Nov 27, 2026

    @objectstack-fleet
    ContributorAuthor

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

    T5 and T6 from comment 7210202110 are filed: #37832 (「设计布局」 "AI 问询" singleton entry, p2, M) and #37833 (hide the entry for people with no agent, home falls through, p2, S). Both carry Blocked-by: #37788: the designer entry and the hide rule both point at the page this card builds, so neither lands before it. Area o1-D.

  6. objectstack-fleet commented on Nov 27, 2026

    @objectstack-fleet
    ContributorAuthor

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

    Card-thread claim · 2026-11-27T08:06Z · objectstack#37788

    Taken over from epic:#5027#1 (hotlong) on its hand-off (mailbox #37561 comment 7209013967), accepted on the maintainer's tap 「全接,开新专区」, which came at 2026-11-27T04:50Z. Both Blocked-by: lines are merged: #37787 (PR #37798) and #37819 (PR #37825, ADR-0057 Amendment A4); pm:blocked lifted.

    Claim: card thread
    Session: session_016WV4cwoXEE1amuRAGHdPBs
    Thread session: session_016WV4czF5gqc48r9LUsmRpw
    Account: os-elon-musk
    Branch: claude/project-thread-26x395
    Domain: domain:ui
    Seat: repo:objectstack#1
    Area: o1-D
    File surface: new ui/packages/app-shell/src/console/ai/AppAskPage.tsx + tests; ui/packages/app-shell/src/services/builtinComponents.tsx; ui/packages/app-shell/src/hooks/useChatConversation.ts (create body only); drawer-trigger hide and keyboard toggle under ui/packages/app-shell/src/layout/**; one changeset. ⛔ AiChatPage.tsx, ChatbotEnhanced.tsx, ui/docs/adr/**.
    Container & model: L, mode:thread, model: default (dispatch-gates --tier: "no path-derived mandate"; L + ruling implementation ⇒ default judgment tier), effort: high (size L)
    Pre-claim lane: domain:ui — every path under ui/packages/app-shell/**.
    Pre-claim deps: #37787 merged (PR #37798, 05:59Z); #37819 merged (PR #37825, 08:03Z).
    Prior rulings read: the three rulings on this card's filing-gate line (02:41Z, 02:51Z, 03:16Z) as recorded in ADR-0057 Amendment A4; A4 is the build contract. Phone root opening the page is open in A4 and out of scope.
    Clause-②: no
    Metadata-protocol: none

  7. added
    pm:dispatched
    and removed
    pm:blocked
    on Nov 27, 2026
  8. removed
    pm:dispatched
    on Nov 27, 2026
  9. objectstack-fleet commented on Nov 27, 2026

    @objectstack-fleet
    ContributorAuthor

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

    Closed by PR #37889 (merged through the queue 2026-11-27 10:55Z). pm:dispatched removed with this note. Unblocks #37790, #37832 and #37833 (area o1-D claims them next). Follow-ups of the PR: #37908.

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

Metadata

Metadata

Assignees

Labels

area:aidomain:uienhancementpriority:p1

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions