Repository navigation
[Component Audit] ChatComposer: keep disabled controls and custom drafts reliable - #6398
Merged
cixzhang merged 3 commits intoSep 21, 2026
Conversation
cixzhang
requested review from
imdreamrunner and
josephfarina
as code owners
September 20, 2026 17:02
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
|
AI review status for this pull request.
|
github-actions
Bot
requested review from
cvkxx,
ernestt,
kentonquatman and
rubyycheung
September 20, 2026 17:02
Contributor
PR Analysis Report📚 Storybook PreviewView Storybook for this PR 🧪 Sandbox PreviewView Sandbox for this PR No new or modified components detected. Bundle Size Summary
Accessibility AuditStatus: 36 accessibility violation(s) found — 2 critical, 34 serious. Button pattern - 1 issue(s)
ChatComposer - 1 issue(s)
ChatComposerInput - 1 issue(s)
ChatReasoning - 1 issue(s)
ChatToolCalls - 1 issue(s)
Checkbox pattern - 1 issue(s)
CheckboxList - 1 issue(s)
ClickableCard - 1 issue(s)
CodeEditor - 1 issue(s)
CodeEditorPerf - 1 issue(s)
CodeEditorTheme - 1 issue(s)
CodeTheme - 1 issue(s)
DateRangeInput - 1 issue(s)
FileInput - 1 issue(s)
GridMasonry - 1 issue(s)
Heading - 1 issue(s)
Icon - 1 issue(s)
LogStream - 1 issue(s)
MediaTheme Auto - 1 issue(s)
PowerSearch - 1 issue(s)
ProgressBar - 1 issue(s)
Radio group pattern - 1 issue(s)
RadioList - 1 issue(s)
RichTextEditor - 2 issue(s)
SelectableCard - 1 issue(s)
Stepper - 1 issue(s)
TableGroupedRows - 1 issue(s)
TableTree - 1 issue(s)
Text - 1 issue(s)
Theme - 1 issue(s)
PopArt - 1 issue(s)
Thumbnail - 1 issue(s)
Timestamp - 1 issue(s)
Token - 1 issue(s)
Tokenizer - 1 issue(s)
Visual RegressionStatus: No visual change across 2 compared shot(s). Generated by PR Enrichment workflow | Storybook | Sandbox | View full report |
3 tasks done
AKnassa
added a commit
to AKnassa/astryx
that referenced
this pull request
Sep 26, 2026
Resolved conflicts: - packages/core/src/Chat/ChatComposerInput.tsx: kept the PR's handleRef.setValue alongside upstream's `focus: focusEditable` (meta#6419/meta#6398 keep an existing in-editor selection on focus); dropped the PR's local placeCaretAtEnd helper in favour of upstream's import from ./chatComposerSelection; handleKeyDown deps keep upstream's onKeyDownProp (meta#4280) and drop onChange, since submit-clear now reports through emitChange. The pending-emissions ledger auto-merged over upstream's one-shot pendingEchoValueRef, next to meta#6419's emitChangeVersionRef. - packages/core/src/Chat/ChatComposerInput.test.tsx: took upstream's imports (waitFor, act, userEvent); the PR's controlled-value and trigger-menu tests auto-merged. - packages/core/src/Chat/ChatComposerInput.doc.mjs: kept the PR's handleRef/value prose in upstream's prettier-wrapped layout, and recast the English/dense em dashes as punctuation per meta#4394. Known fallout, fixed in the follow-up review commit (astracat F2): the required `setValue` member breaks upstream's five-member handle literal in useChatPasteAsToken.test.ts (TS2741 under the core typecheck).
github-actions
Bot
deleted the
night-watch-component-audit/ChatComposer/2026-09-20
branch
November 8, 2026 12:51
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
User impact
This audit fixes three released ChatComposer failures:
aria-disabledto assistive technology.onSubmit(value)operation now submits that supplied value instead of stale composer state.No public API shape or default changes. Theme-target and BaseProps ownership remain intentionally unresolved for owner review.
Audit identity
cb7a565c327b77dead30910912ebddcc1d8abf09031dcabb1a680c4397a6e026ba4bb5c06df425841.16.6false— exact-head gates and independent review are pending, and two owner-decision BLOCKs remainScorecard
Baseline: 62.9/100 (D), 6 BLOCKs, §5b not measured
After local remediation: 78.1/100 (C), 2 BLOCKs, §5b not measured
After exact-head CI projection: 79.0/100 (C), 2 BLOCKs, §5b not measured
Sensitivity if both remaining BLOCKs are resolved with no other score change: 90.6/100 (A)
The measured denominator is 96 because §5b's 4-point rendered-design weight is excluded and redistributed proportionally.
not_measured; local browsers could not launch. Only the official visual gate may clear this.Closed FR5 public-surface inventory
17/17 rows accounted; 0 unaccounted public surfaces. Equivalent values are grouped only where source, tests, docs, rendered evidence, authority, and result are the same.
./Chatentry point; ChatComposer and exported typesNW-CHATCOMPOSER-API-001.compact/balanced/spaciousspaciousmeaning is owner gapNW-CHATCOMPOSER-GAP-001.low/noneelevation and target reachabilityNW-CHATCOMPOSER-THEME-001.Objective authority and changes
architecture:interaction-modalityINV4/INV7/INV9: restored pointer/touch access only to the footer action area when Stop is explicitly shown.architecture:public-component-apiINV9/INV12:ChatComposerContextValue.onSubmit(value)now trims and submits that value; the default button suppliescontext.value.spec:AST-020FR1 / WCAG 2.2 4.1.2: the disabled default textbox now exposesaria-disabled="true".spec:AST-029DEC-4: all three behavior changes have preserved red-before-green evidence.The audit also adds a schema-3/template-5 observational
ChatComposer.spec.md, factual consumer usage/anatomy, one narrow disabled-streaming story with a real click assertion, hash-bound RTL verified-N/A metadata, and a patch changeset.Red → green evidence
custom input draft; receivedcaptured composer draft.hello.aria-disabled="true"; attribute was absent.user-eventrefused the click because inheritedpointer-eventswasnone.onStoponce.Local verification
pnpm exec vitest runfor ChatComposer, ChatComposerInput, and ChatSendButton — 104 passed.pnpm lint:strict— passed, 0 errors and 83 pre-existing warnings.core-chatcomposer--disabled-streaming-narrowtaggedplay-fn.Needs Review — unresolved BLOCKs
NW-CHATCOMPOSER-THEME-001(§2):chat-composertargets the outer frame while elevation and the flat border paint on the inner body. Issue #5556 confirms the user-facing gap but deliberately leaves target shape/name undecided.NW-CHATCOMPOSER-API-001(§3):xstylereaches the body whileref, neutral DOM props/events,className, andstylereach the frame. Choosing a single public owner changes released behavior and needs compatibility judgment.Unscored owner decisions are whether
spaciousintentionally aliasesbalanced, and what invalid-state behavior should apply whenisStopShownis true withoutonStop.Exact-head gates
At PR creation: exact-head CI, Storybook play, accessibility, and visual checks are pending. The FR10 report therefore fails closed: eligibility
false; manual-review-only; no ledger update.FR10 machine report (schema v1)
{ "schema_version": 1, "report_kind": "astryx-night-watch-fr10", "component": "core/ChatComposer", "audit_mode": "night_watch", "rubric_version": "1.16.6", "base_head": "cb7a565c327b77dead30910912ebddcc1d8abf09", "head": "031dcabb1a680c4397a6e026ba4bb5c06df42584", "branch": "night-watch-component-audit/ChatComposer/2026-09-20", "inventory": { "schema_version": 1, "status": "closed", "rows_accounted": 17, "rows_total": 17, "unaccounted_public_surfaces": 0 }, "score": { "baseline": { "measured_points": 60.4, "measured_weight": 96, "normalized": 62.9, "grade": "D", "blocks": 6 }, "after_local_validation": { "measured_points": 75, "measured_weight": 96, "normalized": 78.1, "grade": "C", "blocks": 2 }, "after_exact_head_ci_projection": { "measured_points": 75.8, "measured_weight": 96, "normalized": 79, "grade": "C", "blocks": 2, "condition": "required exact-head browser and repository checks pass" }, "all_blocks_fixed_sensitivity": { "normalized": 90.6, "grade": "A", "condition": "both remaining owner-decision BLOCKs fixed; rendered-design weight still unmeasured" } }, "sections": [ {"id": "1", "name": "accessibility", "weight": 16, "baseline_score": 2.5, "after_score": 4.5, "state": "measured", "open_blocks": []}, {"id": "2", "name": "theming", "weight": 14, "baseline_score": 3, "after_score": 3, "state": "measured", "open_blocks": ["NW-CHATCOMPOSER-THEME-001"]}, {"id": "3", "name": "public_api", "weight": 14, "baseline_score": 2.5, "after_score": 3, "state": "measured", "open_blocks": ["NW-CHATCOMPOSER-API-001"]}, {"id": "4", "name": "behavior", "weight": 12, "baseline_score": 4, "after_score": 4, "state": "measured", "open_blocks": []}, {"id": "5a", "name": "objective_design", "weight": 6, "baseline_score": 5, "after_score": 5, "state": "measured", "open_blocks": []}, {"id": "5b", "name": "rendered_design", "weight": 4, "baseline_score": null, "after_score": null, "state": "not_measured", "open_blocks": []}, {"id": "6", "name": "testing", "weight": 8, "baseline_score": 3, "after_score": 4, "state": "exact_head_ci_pending", "open_blocks": []}, {"id": "7", "name": "code_health", "weight": 8, "baseline_score": 5, "after_score": 5, "state": "measured", "open_blocks": []}, {"id": "8", "name": "documentation", "weight": 8, "baseline_score": 1, "after_score": 3, "state": "measured", "open_blocks": []}, {"id": "9", "name": "i18n_rtl", "weight": 5, "baseline_score": 4, "after_score": 5, "state": "verified_not_applicable_pending_ci_hash_check", "open_blocks": []}, {"id": "10", "name": "responsive_touch", "weight": 5, "baseline_score": 3, "after_score": 4, "state": "source_and_fixture_measured_browser_pending", "open_blocks": []}, {"id": "11", "name": "lifecycle", "weight": 0, "baseline_score": null, "after_score": null, "state": "not_applicable_existing_core_component", "open_blocks": []} ], "remediated_blocks": [ "NW-CHATCOMPOSER-A11Y-001", "NW-CHATCOMPOSER-A11Y-002", "NW-CHATCOMPOSER-API-002", "NW-CHATCOMPOSER-DOC-001" ], "open_blocks": [ { "id": "NW-CHATCOMPOSER-THEME-001", "section": "2", "owner_decision": true, "summary": "The public chat-composer target is on the outer frame while elevation and the flat border paint on the inner body; the compatible target shape and name remain undecided.", "public_context": "https://github.com/facebook/astryx/issues/5556" }, { "id": "NW-CHATCOMPOSER-API-001", "section": "3", "owner_decision": true, "summary": "BaseProps ownership is split: xstyle reaches the body while ref, neutral DOM props/events, className, and style reach the outer frame. Choosing one owner changes released behavior." } ], "unscored_owner_decisions": [ { "id": "NW-CHATCOMPOSER-GAP-001", "summary": "Decide whether spacious density intentionally aliases balanced or needs distinct design values." }, { "id": "NW-CHATCOMPOSER-GAP-002", "summary": "Decide the invalid-state contract when isStopShown is true without onStop." } ], "local_verification": [ {"name": "focused_vitest", "state": "passed", "detail": "104 tests passed across ChatComposer, ChatComposerInput, and ChatSendButton"}, {"name": "core_typecheck", "state": "passed"}, {"name": "core_docs_typecheck", "state": "passed"}, {"name": "strict_lint", "state": "passed", "detail": "0 errors; 83 pre-existing warnings"}, {"name": "knowledge_validation", "state": "passed"}, {"name": "changeset_validation", "state": "passed"}, {"name": "storybook_production_build", "state": "passed", "detail": "19 runnable ChatComposer stories; readiness story tagged play-fn"}, {"name": "storybook_workspace_typecheck", "state": "baseline_environment_blocked", "detail": "workspace package build artifacts are absent; failures are unresolved package modules and predate this change"}, {"name": "local_a11y_browser", "state": "not_measured", "detail": "Chromium could not launch in the local environment"}, {"name": "local_rtl_browser", "state": "not_measured", "detail": "Chromium could not launch in the local environment"} ], "red_before_green": [ {"id": "NW-CHATCOMPOSER-API-002", "red": "expected custom input draft; received captured composer draft", "green": "focused suite passed"}, {"id": "NW-CHATCOMPOSER-A11Y-001", "red": "default textbox lacked aria-disabled", "green": "focused suite passed"}, {"id": "NW-CHATCOMPOSER-A11Y-002", "red": "user-event rejected Stop because pointer-events was none", "green": "focused suite passed"} ], "required_gates": { "exact_head_ci": "pending", "exact_head_story_play": "pending", "official_accessibility": "pending", "official_visual": "pending", "independent_manual_review": "pending" }, "eligibility": false, "eligibility_mode": "manual_review_only", "ledger_update_allowed": false, "reason_codes": [ "OPEN_OWNER_DECISION_BLOCKS", "EXACT_HEAD_CI_PENDING", "EXACT_HEAD_BROWSER_EVIDENCE_PENDING", "INDEPENDENT_REVIEW_PENDING" ] }