Repository navigation
feat(app): expose TuiApp.copyToClipboard - #115
Merged
Merged
Conversation
Apps had no public way to put text on the system clipboard: the OSC 52 path existed only on the internal BuildOwner and the low-level Renderer extension. TuiApp.copyToClipboard forwards to the renderer the app owns and reports whether the sequence was written. It writes nothing and returns false for empty text or a headless app. Co-Authored-By: Claude <[email protected]>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
leoafarias
added a commit
that referenced
this pull request
Oct 22, 2026
Prepare Noir 0.0.5. It adds TuiApp.copyToClipboard (#115); fixes paragraph alignment, character keys, cleared text edits, highlight ranges, Select and DiffView cell painting, and the hot-reload runner's second Ctrl+C (#105, #106, #110, #112); and removes unused prerelease API (#107, #111). The changelog names every removed public member, and the architecture test pins those release contracts. noir_driver 0.0.1-alpha.2 is already on pub.dev with noir: ^0.0.4, so its section stays as published and the driver moves to 0.0.1-alpha.3 to require noir: ^0.0.5. The unpublished noir_signals 0.0.1-alpha.2 now requires noir: ^0.0.5, with its checkout guidance. The native ABI and bundled native artifacts are unchanged from 0.0.4. Published availability stays at what publication.json records until protected publication confirms the new versions.
leoafarias
added a commit
that referenced
this pull request
Oct 23, 2026
Prepare Noir 0.0.5. It adds TuiApp.copyToClipboard (#115); fixes paragraph alignment, character keys, cleared text edits, highlight ranges, Select and DiffView cell painting, and the hot-reload runner's second Ctrl+C (#105, #106, #110, #112); and removes unused prerelease API (#107, #111). The changelog names every removed public member, and the architecture test pins those release contracts. Both companions leave alpha as 0.0.1 and require noir: ^0.0.5: noir_driver after the published 0.0.1-alpha.2, and noir_signals after the published 0.0.1-alpha.1. Neither library changed since those archives, and their changelog sections stay byte-for-byte as published. Noir's noir_driver dev dependency, the tag examples, the checkout guidance, and the testing page follow. publication.json now records noir_driver 0.0.1-alpha.2, which was published on 2026-10-19 when only its record step failed, and availability.ts is regenerated from it. Hosted install guidance keeps naming what pub.dev serves until protected publication confirms the new versions. The native ABI and bundled native artifacts are unchanged from 0.0.4.
leoafarias
added a commit
that referenced
this pull request
Oct 23, 2026
Prepare Noir 0.0.5. It adds TuiApp.copyToClipboard (#115); fixes paragraph alignment, character keys, cleared text edits, highlight ranges, Select and DiffView cell painting, and the hot-reload runner's second Ctrl+C (#105, #106, #110, #112); and removes unused prerelease API (#107, #111). The changelog names every removed public member, and the architecture test pins those release contracts. Both companions leave alpha as 0.0.1 and require noir: ^0.0.5: noir_driver after the published 0.0.1-alpha.2, and noir_signals after the published 0.0.1-alpha.1. Neither library changed since those archives, and their changelog sections stay byte-for-byte as published. Noir's noir_driver dev dependency, the tag examples, the checkout guidance, and the testing page follow. publication.json now records noir_driver 0.0.1-alpha.2, which was published on 2026-10-19 when only its record step failed, and availability.ts is regenerated from it. Hosted install guidance keeps naming what pub.dev serves until protected publication confirms the new versions. The native ABI and bundled native artifacts are unchanged from 0.0.4.
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.
Summary
Apps had no public way to copy text to the system clipboard. The OSC 52 path existed only on the
@internalBuildOwner.copyToClipboardand on the low-levelRendererextension, and an app can't reach either throughTuiApp.TuiApp.copyToClipboard(text)forwards to the renderer the app owns. It returns whether the escape sequence was written, not whether the terminal honored it. It writes nothing and returnsfalsefor empty text or a headless app.Stargate's CLI run view uses it for its "Copy Markdown" button (btwld/stargate-dart, stacked PRs).
Changes
lib/src/app/app.dart: the new method, with a doc comment.README.md: a paragraph next to the otherTuiAppcontrols.test/app/tui_app_facade_test.dart: covers forwarding to the renderer (UTF-8 text and a declined write), empty text, the headless app, and rejection after dispose.test/architecture/public_member_seams_test.dart: adds the member to the auditedTuiAppsurface.Release note
tool/release.dart checkrequiresCHANGELOG.mdto lead with the manifest version, so this PR doesn't touch the changelog. The next release prep should add an "Added" line forTuiApp.copyToClipboard.Validation
From
packages/noir/:dart analyze --fatal-infos: no issues.dart test test/app/tui_app_facade_test.dart test/architecture/ --concurrency=1: 270 passed.dart run tool/release.dart check: ready.dart format --set-exit-if-changed: the changed files are clean. Nine untouched test files onmainreport drift under the local SDK (3.13.4).