Skip to content

Always enable diff highlighting in playground output viewer#10468

Merged
JoshLove-msft merged 2 commits intomainfrom
copilot/remove-diff-highlighting-config
Apr 23, 2026
Merged

Always enable diff highlighting in playground output viewer#10468
JoshLove-msft merged 2 commits intomainfrom
copilot/remove-diff-highlighting-config

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 23, 2026

The newChangeDiff emitter option was meant to be opt-in for the C#/Python emitters, but a default of true made it always-on. Per the issue, the feature is generally useful — remove the config and make it unconditional.

Changes

  • packages/playground: dropped the newChangeDiff field from PlaygroundEmitterOptions and the highlightChanges prop plumbing through OutputViewcreateFileViewerFileViewerComponentuseFileChanges. Changed-file/line tracking now always runs.
  • website/src/components/playground-component/playground.tsx: removed the newChangeDiff: true overrides on the python/csharp emitter entries.
  • Changelog: added a breaking entry for @typespec/playground (option removed from the public API).

Before / after

 export interface PlaygroundEmitterOptions {
   debounce?: number;
-  /** When true, highlights changed files and lines after recompilation. */
-  newChangeDiff?: boolean;
 }
 emitterOptions={{
-  "@typespec/http-client-python": { debounce: 500, newChangeDiff: true },
-  "@typespec/http-client-csharp": { debounce: 500, newChangeDiff: true },
+  "@typespec/http-client-python": { debounce: 500 },
+  "@typespec/http-client-csharp": { debounce: 500 },
 }}

Copilot AI linked an issue Apr 23, 2026 that may be closed by this pull request
Agent-Logs-Url: https://github.com/microsoft/typespec/sessions/286bd494-4a2a-416d-83c2-5a46a8c00c23

Co-authored-by: JoshLove-msft <54595583+JoshLove-msft@users.noreply.github.com>
Copilot AI changed the title [WIP] Remove diff highlighting config for all emitters Always enable diff highlighting in playground output viewer Apr 23, 2026
Copilot AI requested a review from JoshLove-msft April 23, 2026 03:41
@JoshLove-msft JoshLove-msft marked this pull request as ready for review April 23, 2026 17:00
@JoshLove-msft JoshLove-msft enabled auto-merge April 23, 2026 17:00
@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented Apr 23, 2026

Open in StackBlitz

npm i https://pkg.pr.new/@typespec/playground@10468

commit: 82b8f5a

@JoshLove-msft JoshLove-msft added this pull request to the merge queue Apr 23, 2026
@azure-sdk
Copy link
Copy Markdown
Collaborator

You can try these changes here

🛝 Playground 🌐 Website 🛝 VSCode Extension

Merged via the queue into main with commit 4b4a632 Apr 23, 2026
31 checks passed
@JoshLove-msft JoshLove-msft deleted the copilot/remove-diff-highlighting-config branch April 23, 2026 17:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove diff hightlighting config

4 participants