Skip to content

问题卡专题 Q2a:QuestionCard 纯组件(单题点选即发、两题停在发送、自己输入、跳过、键盘读屏、全部语种) #37873

In review

Description

@objectstack-fleet

epic:#5027#1 · hotlong · session_01Q4EjjMUfmNYTem26rXLFUf

Filing gate: ④ topic child. Source: topic #37871 (Jack 2026-11-27: 「用户体验相关的非常关键,要启动」 06:56Z; card 「按 v2 立卡,顶替输入框」 08:05Z; 「交给 objectstack #3」 08:06Z). Business reason: carried by the parent.
Parent: #37871 (decisions D1–D6, relations, topic acceptance). Evidence: an independent Fable review of objectstack main adb65d1 and cloud main 9729319 (2026-11-27) checked every file:line below.
Owner: repo:objectstack#3 (Jack 08:06Z 「交给 objectstack #3」; 07:51Z 「你只处理 cloud 的任务,其他任务都交给 objectstack 座位哦」). Reserved under topic #37871 (pm:epic), not pm:queue: other seats leave it.

Grading: area:ux · Task · p1 · size M.
Depends on: nothing; can start now (pure component; wiring is Q2b).
Dedupe: searched QuestionCard: none in objectstack.

维护者速读

  • 是什么:问题卡本身的纯组件:单题点一下就发,两题翻页最后停在「发送」,「自己输入…」,跳过,键盘和读屏,所有语种文案。还不接到对话里。

What to do (in plugin-chatbot, props in, events out)

  1. Input: the parsed envelope (Q1 (问题卡专题 Q1:spec 问题信封(AskQuestionEnvelope、兼容旧 asked_which、parseAskQuestionEnvelope) #37872) types). Output events: onAnswer(text), onSkip().
  2. Single question: clicking an option sends immediately.
  3. Two questions: an option on question 1 moves to question 2; on question 2 the card does NOT auto-send, it stops on 「发送」 with a one-line summary; 「上一题」 keeps the choices.
  4. 「自己输入…」: always the last item, a one-line input; typing selects it (clears others); Enter = next / send.
  5. Answer text: one question → the chosen label or typed text; two → one line each header:answer (question text when no header).
  6. Options show description as a second grey line (no hover on mobile); recommended shows a 「推荐」 tag.
  7. Keyboard: no forced focus move; when focus is inside the card, digits 1–4 pick options, ↑↓ move, ⌘/Ctrl+↵ next / send. Screen reader: radiogroup with 「第 1/2 题」; an aria-live 「有一个问题待回答」 announcement (Q2b triggers it).
  8. Size: max height about 60% of the input area, scrolls inside, bottom buttons fixed; works in full screen, narrow drawer and mobile drawer.
  9. Strings in all current locales: 「第 {n}/{total} 题」「自己输入…」「跳过」「上一题」「下一题」「发送」「推荐」「AI 问:」「有一个问题待回答」. Arabic right-to-left.
  10. The card keeps its selected state when the parent re-renders it after a failed send (Q2b relies on this).

Acceptance

  • Component tests: single-click send, two-question flow with back, typed answer, skip, keyboard, RTL, answer-text composition.

Activity

  1. added
    enhancement
    priority:p1
    pm:epic
    domain:ui
    on Nov 27, 2026
  2. objectstack-fleet commented on Nov 27, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#3 · os-tesla · session_01L9qibyUSf2nKJWW6qBemSU

    Claim: PM loop round 1
    Session: session_01L9qibyUSf2nKJWW6qBemSU
    Thread session: session_01L9qibwzqCncZ2kfbohG53j
    Account: os-tesla
    Branch: claude/project-thread-vhuyc7
    Worktree: objectstack-issue-37873
    Domain: ui
    Seat: repo:objectstack#3
    File surface: ui/packages/plugin-chatbot/** (QuestionCard and its exports) and the locale bundles that carry chatbot strings (the thread confirms and reports them); NOT packages/spec/** (Q1 #37872), NOT the chat wiring (Q2b #37874) (stop on breach; explain in the report)
    Container & model: M, mode:thread, model: default tier — dispatch-gates.mjs --tier: "no path-derived mandate", effort: high
    Clause-②: yes (new public export and new published locale keys)
    Metadata-protocol: none
    Responsibility: the pure QuestionCard component of topic #37871: single-pick sends, two questions stop at send, free text, skip, keyboard and screen reader, all locales
    Thread-read: none
    Premise: topic #37871 (Jack 08:06Z 「交给 objectstack #3」; Tesla 08:25Z 「接下,放进问 AI 专区」); no Blocked-by on the card; tier: dispatch-gates --tier on the plugin-chatbot paths at 73d5e34 prints no path-derived mandate
    Serial constraints cleared: overlap-check.mjs runs on the thread's first push (branch not yet pushed); no in-flight claim on these files named by any seat

    Ask-AI own cap (Tesla 「给问ai单独5个并发」 2026-11-27T11:21Z). Clause-② yes ⇒ the seat's Clause-② review before the queue.

  3. added
    pm:dispatched
    on Nov 27, 2026
  4. objectstack-fleet commented on Nov 27, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#3 · os-tesla · session_01L9qibwzqCncZ2kfbohG53j
    os-dev-report

    {
      "issue": 37873,
      "status": "done",
      "branch": "claude/project-thread-vhuyc7",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/37932",
      "session": "session_01L9qibwzqCncZ2kfbohG53j",
      "premise_still_valid": true,
      "summary": "QuestionCard pure component in @object-ui/plugin-chatbot (questions in, onAnswer/onSkip out): single question answers on click, two questions stop on Send with a one-line summary and Back keeps choices, a last free-text row, skip, digits/arrows/Ctrl+Enter only while focus is inside, radiogroup + host-triggered polite live region, max-h 60vh with fixed buttons, choices kept across re-render. Ten chatbot.questionCard.* strings in all 11 packs, dir from the session language. Props are the envelope's question shape, typed locally because Q1 #37872 has not landed.",
      "tests": "head 417e56ea: ui vitest packages/plugin-chatbot/ + app-shell product-neutral ratchet + defaults-maps-mirror: Test Files 73 passed, Tests 734 passed; packages/i18n/src/__tests__/ green after zh-Hant regen and one allowlist row (untranslated-identity-4376, zh-hant-generated were red before). Ablation: question 2 sending on pick reds 2 of 21 QuestionCard tests; restored.",
      "gates": "local, exit captured before any pipe, 0 each: plugin-chatbot type-check, i18n type-check, check:nul-bytes, check:gitlink-declared, check:cross-package-test-inputs, check:test-source-alias, check:undeclared-dep-imports, check:published-files, check:role-word, check-changeset-no-major, check-empty-changeset, check-adr-0087-registration, check:closed-ceremony-text, check-sdui-manifest, check:type-check-coverage, check:type-check-debt, ui check:i18n-keys, ui check:i18n-drift; eslint on changed files 0 errors. CI check-runs on the PR: in_progress at report time.",
      "dogfood_battery": "n/a — no ! in the PR title and no (narrowing) arm",
      "mcp_calls": "0 — no MCP GitHub calls",
      "api_writes": "2 — relay pr_create (POST pulls + assignees), this report comment",
      "open_questions": [],
      "security_findings": "none",
      "out_of_scope_findings": ["carrier: #37874 · Q2b passes envelope.questions to the questions prop once Q1 lands; aiAsks string available for the collapsed summary · noted, not filed"]
    }
  5. objectstack-fleet commented on Nov 27, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#3 · os-tesla · session_01L9qibyUSf2nKJWW6qBemSU

    Claim: PM loop round 1 (amendment: file surface as built, PR #37932)
    Session: session_01L9qibyUSf2nKJWW6qBemSU
    Thread session: session_01L9qibwzqCncZ2kfbohG53j
    Account: os-tesla
    Branch: claude/project-thread-vhuyc7
    Worktree: objectstack-issue-37873
    Domain: ui
    Seat: repo:objectstack#3
    File surface: ui/packages/plugin-chatbot/** (QuestionCard and its exports), ui/packages/i18n/src/locales/{ar,de,en,es,fr,ja,ko,pt-BR,ru,zh-Hans,zh-Hant}.ts, ui/packages/i18n/src/__tests__/untranslated-identity-4376.test.ts (one LEGITIMATE_IDENTITIES row), content/docs/frontend/plugins/plugin-chatbot.mdx, .changeset/37873-question-card.md; NOT packages/spec/** (Q1 #37872), NOT the chat wiring (Q2b #37874) (stop on breach; explain in the report)
    Container & model: M, mode:thread, model: default tier — dispatch-gates.mjs --tier: "no path-derived mandate", effort: high
    Clause-②: yes (new public export and new published locale keys)
    Metadata-protocol: none
    Responsibility: the pure QuestionCard component of topic #37871: single-pick sends, two questions stop at send, free text, skip, keyboard and screen reader, all locales
    Thread-read: 7217560022
    Premise: topic #37871 (Jack 08:06Z 「交给 objectstack #3」; Tesla 08:25Z 「接下,放进问 AI 专区」); no Blocked-by on the card; tier: dispatch-gates --tier on the plugin-chatbot paths at 73d5e34 prints no path-derived mandate
    Serial constraints cleared: overlap-check.mjs runs on the thread's first push (branch not yet pushed); no in-flight claim on these files named by any seat

    Ask-AI own cap (Tesla 「给问ai单独5个并发」 2026-11-27T11:21Z). Clause-② yes ⇒ the seat's Clause-② review before the queue.

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

Metadata

Metadata

Assignees

Labels

area:uxdomain:uienhancementpm:dispatchedpm:epicpriority:p1size/m

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions