Skip to content

Add documentation and in-code awareness for shared WinForms/WPF clipboard/OLE infrastructure#14306

Open
Copilot wants to merge 3 commits intomainfrom
copilot/add-clipboard-ole-documentation
Open

Add documentation and in-code awareness for shared WinForms/WPF clipboard/OLE infrastructure#14306
Copilot wants to merge 3 commits intomainfrom
copilot/add-clipboard-ole-documentation

Conversation

Copy link
Contributor

Copilot AI commented Feb 17, 2026

Completed: Shared WinForms/WPF Clipboard/OLE Documentation

Summary

This PR adds critical documentation and in-code awareness about the shared clipboard/OLE implementation used by both WinForms and WPF. The documentation provides detailed case studies of recent issues (WPF #14308/#11402 fixed via WinForms #14257), explains the packaging and ingestion mechanism, and gives clear contributor guidance for working with shared code.

References:

Original prompt

Create documentation in dotnet/winforms to explain the shared Clipboard/OLE implementation used by both WinForms and WPF, and add explicit in-code comments to raise awareness of the shared usage.

Repository: dotnet/winforms
Base branch: main

Context / motivation:

Work items:

  1. Add a new documentation file under docs/ that explicitly explains:

  2. Add explicit comment(s) in the shared clipboard/OLE code to make the shared usage obvious to maintainers and contributors.

    • At minimum, add a clear, visible comment near the relevant shared area, such as at the top of:
      src/System.Private.Windows.Core/src/System/Private/Windows/Ole/Composition.NativeToManagedAdapter.cs
      noting that this code path is used by both WinForms and WPF, and pointing to the new docs file.
    • Keep comments factual, concise, and non-noisy.
  3. Update any docs index/TOC if the repo has one in docs/ (only if appropriate and existing).

  4. PR should:

Notes:

  • Use four-backtick fenced blocks for Markdown files if needed.
  • The goal is awareness and guidance; do not attempt to change behavior beyond adding comments and docs.

Relevant file references:

  • pkg/Microsoft.Private.Winforms/README.md
  • pkg/Microsoft.Private.Winforms/sdk/dotnet-wpf/* (ingested by WPF)
  • src/System.Private.Windows.Core/src/System/Private/Windows/Ole/Composition.NativeToManagedAdapter.cs

No images provided.

This pull request was created from Copilot chat.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Microsoft Reviewers: Open in CodeFlow

…d in-code comments

Co-authored-by: KlausLoeffelmann <9663150+KlausLoeffelmann@users.noreply.github.com>
Copilot AI changed the title [WIP] Create documentation for shared Clipboard/OLE implementation Add documentation and in-code awareness for shared WinForms/WPF clipboard/OLE infrastructure Feb 17, 2026
@KlausLoeffelmann
Copy link
Member

@JeremyKuhne, Copilot created this PR for the documentation.
This is NOT time critical.
If you get to it, please take a quick look if this can go in, or if Copilot pointed anything out incorrectly.

@Shyam-Gupta, @merriemcgaw FYI.

@Shyam-Gupta
Copy link
Member

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@codecov
Copy link

codecov bot commented Feb 19, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 77.24067%. Comparing base (dc6c73b) to head (0459a02).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@                 Coverage Diff                 @@
##                main      #14306         +/-   ##
===================================================
+ Coverage   77.18299%   77.24067%   +0.05767%     
===================================================
  Files           3279        3279                 
  Lines         645137      645107         -30     
  Branches       47730       47731          +1     
===================================================
+ Hits          497936      498285        +349     
+ Misses        143518      143126        -392     
- Partials        3683        3696         +13     
Flag Coverage Δ
Debug 77.24067% <ø> (+0.05767%) ⬆️
integration 19.10189% <ø> (+0.10594%) ⬆️
production 52.17876% <ø> (+0.11781%) ⬆️
test 97.41577% <ø> (+0.01097%) ⬆️
unit 49.55146% <ø> (+0.05630%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@KlausLoeffelmann KlausLoeffelmann marked this pull request as ready for review February 19, 2026 00:17
@KlausLoeffelmann KlausLoeffelmann requested a review from a team as a code owner February 19, 2026 00:17
Copy link
Member

@KlausLoeffelmann KlausLoeffelmann left a comment

Choose a reason for hiding this comment

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

Looks plausible to me as it is.

@dotnet-policy-service dotnet-policy-service bot removed the draft draft PR label Feb 19, 2026
Copy link
Member

@JeremyKuhne JeremyKuhne left a comment

Choose a reason for hiding this comment

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

Left some feedback. I'm the original implementer of this logic.

@dotnet-policy-service dotnet-policy-service bot added the waiting-author-feedback The team requires more information from the author label Feb 23, 2026
Co-authored-by: JeremyKuhne <8184940+JeremyKuhne@users.noreply.github.com>
auto-merge was automatically disabled February 23, 2026 18:34

Head branch was pushed to by a user without write access

@dotnet-policy-service dotnet-policy-service bot removed the waiting-author-feedback The team requires more information from the author label Feb 23, 2026
Copilot AI requested a review from JeremyKuhne February 23, 2026 18:35
Copy link
Member

@JeremyKuhne JeremyKuhne left a comment

Choose a reason for hiding this comment

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

@KlausLoeffelmann it might be useful to task @copilot to create another PR and document to detail step-by-step how to manually consume the shared changes in the WPF repo.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants