Skip to content

fix(console): stop inferring confirmation actions from chat text - #3185

Open
AbigailDeng wants to merge 3 commits into
devfrom
fix/2026-08-04_chat-confirmation-intent
Open

fix(console): stop inferring confirmation actions from chat text#3185
AbigailDeng wants to merge 3 commits into
devfrom
fix/2026-08-04_chat-confirmation-intent

Conversation

@AbigailDeng

Copy link
Copy Markdown
Contributor

Summary

The Chat page inferred business state from arbitrary assistant prose. Any text
containing words such as confirm, approval, 确认, or 同意 could create a
frontend-only needs_confirmation state, render Confirm and create, and send
the hard-coded prompt Confirm. Please create it now.. This is incorrect when
the assistant is asking the user to choose a Team or provide another value.

This PR:

  • removes prose-based confirmation inference and the frontend-only
    needs_confirmation / creating state path;
  • removes the generic confirmation card and hard-coded confirmation prompt;
  • treats successful text-only turns as completed_text and presents them as
    Ready for reply, while preserving structured Studio target handling;
  • lets users answer Team selection and clarification requests through the
    normal composer after authoritative Conversation reconciliation;
  • removes unused locale entries in both supported catalogs;
  • archives the superseded July MVP confirmation prototype so it cannot be
    mistaken for the current product contract.

This is frontend-only. It does not change backend APIs, chat history contracts,
or approval/intervention transport. Existing typed approval action wiring is a
separate concern tracked by #3119 and is not introduced or changed here.

Affected Paths

  • apps/aevatar-console-web/src/pages/chat/index.tsx
  • apps/aevatar-console-web/src/pages/chat/chatTypes.ts
  • apps/aevatar-console-web/src/pages/chat/index.test.tsx
  • apps/aevatar-console-web/src/locales/en-US.ts
  • apps/aevatar-console-web/src/locales/zh-CN.ts
  • apps/aevatar-console-web/docs/prd/2026-07-01-chat-top-entry-mvp-prd.md
  • apps/aevatar-console-web/docs/prototypes/2026-07-01-chat-top-entry-prototype.html

Test Coverage

All changed application paths are covered by the existing Chat route integration
suite. The regression case uses the reported Team-selection semantics and proves
that:

  • the assistant clarification remains visible as normal text;
  • Confirm and create and Needs confirmation are absent after the final turn
    and after authoritative reconciliation unlocks the composer;
  • state version 0 does not unlock continuation;
  • the user can submit a Team name/ID normally;
  • the continuation uses the authoritative Conversation
    minimumStateVersion.

Tests: 137 -> 137 test files (+0 new files; 1 existing route integration case
updated). Test coverage audit: 4/4 changed behavior paths covered (100%).

Pre-Landing Review

Four informational findings were fixed before push:

  • archived the stale confirmation PRD/prototype;
  • moved negative confirmation assertions to the reconciled terminal state;
  • replaced the misleading Completed clarification status with
    Ready for reply / 可继续回复;
  • removed the archived PRD's link to an unmarked obsolete PNG.

Testing, security, performance, maintainability, API-contract, design, and
adversarial reviews found no branch-introduced blocker. Adversarial review also
identified existing typed-approval wiring and Studio target validation risks on
dev; this PR does not modify those paths.

Design Review

Design Review (lite): 2 findings, both fixed. The erroneous warning card is
removed, clarification stays in the transcript, and the conversation status now
communicates that the user may reply.

Eval Results

No prompt-related files changed; evals were skipped.

Scope Drift

Scope Check: CLEAN. The change is limited to the frontend Chat behavior,
regression coverage, locale cleanup, and directly affected historical docs.

Plan Completion

No plan file was detected. The reported frontend behavior and recurrence
prevention work are complete.

Verification Results

No browser verification plan was present. Deterministic route integration and
static/build checks were used instead.

Test Plan

  • pnpm --dir apps/aevatar-console-web exec jest --runInBand --runTestsByPath src/pages/chat/index.test.tsx --testNamePattern 'keeps Team selection in the composer until reconciliation observes a positive Conversation watermark'
  • pnpm --dir apps/aevatar-console-web tsc
  • pnpm --dir apps/aevatar-console-web exec biome lint src/pages/chat/index.tsx src/pages/chat/chatTypes.ts src/pages/chat/index.test.tsx src/locales/en-US.ts src/locales/zh-CN.ts
  • pnpm --dir apps/aevatar-console-web build
  • bash tools/ci/test_stability_guards.sh
  • bash tools/docs/lint.sh
  • git diff --check origin/dev...HEAD

The complete frontend test suite was not run, in accordance with the repository's
incremental unit-test policy.

@AbigailDeng
AbigailDeng enabled auto-merge August 4, 2026 09:24
@codecov

codecov Bot commented Aug 4, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 84.56%. Comparing base (3f548ff) to head (0e44240).

@@           Coverage Diff           @@
##              dev    #3185   +/-   ##
=======================================
  Coverage   84.56%   84.56%           
=======================================
  Files        1503     1503           
  Lines      140015   140015           
  Branches    17180    17180           
=======================================
+ Hits       118397   118400    +3     
+ Misses      13753    13750    -3     
  Partials     7865     7865           
Flag Coverage Δ
ci 84.56% <ø> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.
see 3 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant