Skip to content

Add clipboard copy UX and feedback APIs#179

Merged
Aaronontheweb merged 5 commits into
devfrom
feature/clipboard-ux
Mar 17, 2026
Merged

Add clipboard copy UX and feedback APIs#179
Aaronontheweb merged 5 commits into
devfrom
feature/clipboard-ux

Conversation

@Aaronontheweb

Copy link
Copy Markdown
Owner

Summary

  • add terminal-native clipboard support with OSC 52 plus tmux transport fallback, global toast infrastructure, and copy/paste feedback hooks
  • introduce CopyableTextNode with keyboard selection, customizable copy bindings, and configurable success feedback via toast or inline indicators
  • expand the gallery demo and docs to cover clipboard transports, feedback configuration, and manual validation workflows

Verification

  • \"/home/petabridge/.dotnet/dotnet\" test tests/Termina.Tests/Termina.Tests.csproj --filter \"FullyQualifiedName~AnsiCodesTests|FullyQualifiedName~DiffingTerminalTests|FullyQualifiedName~VirtualTerminalTests|FullyQualifiedName~CopyableTextNodeTests|FullyQualifiedName~ToastServiceTests|FullyQualifiedName~ToastOverlayNodeTests|FullyQualifiedName~PasteToastRoutingTests|FullyQualifiedName~TerminalClipboardServiceTests\"
  • \"/home/petabridge/.dotnet/dotnet\" build demos/Termina.Demo.Gallery/Termina.Demo.Gallery.csproj

@Aaronontheweb Aaronontheweb marked this pull request as ready for review March 17, 2026 00:20

@Aaronontheweb Aaronontheweb left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

LGTM

.WithForeground(Color.White)
.WithFeedbackMode(CopyFeedbackMode.InlineIndicator)
.WithInlineIndicator("✓ Copied", Color.BrightGreen)
.WithCopyBindings(new CopyKeyBinding(ConsoleKey.Enter), new CopyKeyBinding(ConsoleKey.C, ConsoleModifiers.Control))

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

LGTM

/// <summary>
/// A clipboard transport capable of sending copy requests through a specific channel.
/// </summary>
internal interface IClipboardTransport

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

LGTM, necessary due to platforms being weird

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