Skip to content

Fix build break in chatInputNotificationService announce#315360

Merged
dmitrivMS merged 1 commit into
mainfrom
dev/dmitriv/build-break-fix
May 8, 2026
Merged

Fix build break in chatInputNotificationService announce#315360
dmitrivMS merged 1 commit into
mainfrom
dev/dmitriv/build-break-fix

Conversation

@dmitrivMS
Copy link
Copy Markdown
Contributor

What

IChatInputNotification.message is typed string | IMarkdownString, but the new ARIA-announce code in #313787 fed it directly into aria.status(...) and a template literal, which require string. The internal Azure DevOps build broke immediately after the merge with:

src/vs/workbench/contrib/chat/browser/widget/input/chatInputNotificationService.ts(177,10):
  error TS2345: Argument of type 'string | IMarkdownString' is not assignable to parameter of type 'string'.

Fix: coerce message to a string by reading .value when it's an IMarkdownString before building the signature and the announced text.

Why CI didn't catch it (semantic merge conflict)

.github/workflows/pr.yml (and the other pr-*.yml workflows) only trigger on pull_request:. There is no merge_group: trigger and no required-up-to-date branch protection, so GitHub never recompiles the merge commit before/after merging. Suggest enabling either:

  • GitHub merge queue for main + add merge_group: to the gating workflows, or
  • branch-protection setting "Require branches to be up to date before merging".

Both require repo-admin settings, so I haven't changed YAML here — happy to follow up with a workflow PR once a direction is picked.

Verification

Core - Typecheck watch task: Finished compilation with 0 errors.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes a TypeScript build break in the chat input notification ARIA announcement path by ensuring IChatInputNotification.message (string | IMarkdownString) is coerced to a string before being used to build the “last announced” signature and passed to aria.status(...).

Changes:

  • Convert active.message to a string (using .value for IMarkdownString) before constructing the signature.
  • Use the coerced message string when building the announced text for aria.status(...).
Show a summary per file
File Description
src/vs/workbench/contrib/chat/browser/widget/input/chatInputNotificationService.ts Coerces notification message to a string for ARIA announcement/signature to fix type-checking failure.

Copilot's findings

  • Files reviewed: 1/1 changed files
  • Comments generated: 1

Comment on lines +171 to 178
const message = typeof active.message === 'string' ? active.message : active.message.value;
const signature = `${active.id}\u0000${message}\u0000${active.description ?? ''}`;
if (signature === this._lastAnnouncedSignature) {
return;
}
this._lastAnnouncedSignature = signature;
const text = active.description ? `${active.message}. ${active.description}` : active.message;
const text = active.description ? `${message}. ${active.description}` : message;
status(text);
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will open a separate PR with the follow up.

@dmitrivMS dmitrivMS enabled auto-merge (squash) May 8, 2026 20:45
@dmitrivMS dmitrivMS merged commit cbd0c28 into main May 8, 2026
29 checks passed
@dmitrivMS dmitrivMS deleted the dev/dmitriv/build-break-fix branch May 8, 2026 20:50
@vs-code-engineering vs-code-engineering Bot added this to the 1.120.0 milestone May 8, 2026
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.

3 participants