Repository navigation
Conversation
|
Merged current dev and resolved conflicts in d3db361; adopted the shared clipboard helper. Local check and all clipboard regressions pass; before/after evidence is in the description. Three other review-suite failures reproduced at the same assertions on unmodified upstream f29e281, so they are documented rather than changed here. Could a maintainer approve the full CI workflow runs? Design approval requested in #58878 remains pending. |
There was a problem hiding this comment.
This works as described. On the base branch the review file header has no copy action. With this PR, the new button copied the whole current file (not just the hunk) and showed the success toast. The three new e2e tests pass, and session-ui and gui-plugins type-check. The image and audio previews that share readFile still get binary content, so the switch to returning text for text-like files doesn't affect them.
Public API: unchanged (UI-only, plus four new English i18n keys).
Points worth addressing, details inline:
- Please drop the
CHANGELOG.mdentry. Only the release automation writes that file. - The button always copies the file as it is on disk now, even in the "turn" and "branch" review modes, where that can differ from the version the panel shows.
- The first e2e test is harder to follow than it needs to be.
There was a problem hiding this comment.
The CHANGELOG.md entry is gone, so that point is addressed. Otherwise the push only merges dev: the feature code and tests are unchanged since the last review. On the new head, the three new e2e tests still pass and session-ui and gui-plugins type-check.
Public API: unchanged.
Two earlier points are still open in their threads:
- The button copies the file as it is on disk now in the "turn" and "branch" modes.
- The first e2e test still swaps
navigator.clipboardout and back in.
There was a problem hiding this comment.
This commit fixes both earlier points. The copy button now uses the version of the file being reviewed when the diff includes it, even when that file is empty, and only reads from disk otherwise. The first e2e test no longer swaps navigator.clipboard in and out. On this head, the new component tests (2) and the review copy e2e tests (3) pass, and session-ui type-checks.
Public API: unchanged.
One new point: the paragraph added to packages/app/README.md isn't needed (see inline).
There was a problem hiding this comment.
The README section is gone, so that point is resolved. After the dev merge, the copy code only changed where it imports the clipboard helper from (components/copy). It is independent of the new loading placeholder: for changed files the button still copies the reviewed version or reads the file from disk, and for deleted files with only a partial diff it stays disabled. On this commit, the two component copy tests and the three review e2e copy tests pass, and session-ui and gui-plugins type-check.
Public API: unchanged.
No further concerns.


Issue for this PR
Closes #58878
Design approval requested on the issue; still pending. Implementation prepared with OpenAI Codex assistance.
Type of change
What does this PR do?
Copy complete file text from the review header rather than diff hunks. Provide success/error feedback and leave the clipboard unchanged for unavailable or binary content. Available reviewed snapshots take precedence over current disk contents, including empty snapshots. When no snapshot is supplied, non-deleted files fall back to a fresh disk read. Deleted files use complete old text when available.
Updated against current upstream
dev; release-managed changelog remains unchanged. Uses the current shared clipboard helper, prefersdiff.aftersnapshots (including empty files), and keeps the simplified first E2E test without replacingnavigator.clipboard. Removed the feature-specific README section requested in the latest review.How did you verify your code works?
Latest update:
844be2752c, merging upstream dev06aa6da22e.components/copy, retaining the new review/comment controller and placeholder behavior.bun run typecheck:tscinpackages/session-uiandpackages/gui-plugins: passed.The installed Bun 1.4.3 cannot run the new
--no-scripttypecheck flag, so focused typechecks used the repository's pinned official compiler. The mandatory pre-pushbun run checkthen passed with Bun 1.4.4: lint completed (unrelated warnings remain) and 34/34 typecheck tasks succeeded. App builds still emit upstream CSS/chunk-size/deprecation warnings.Screenshots / recordings
Before: upstream preview component from
f29e2813mounted in the merged app through an isolated Vite override, not a complete historical app build. Both before and after use the in-memory E2E API harness.Checklist
Visual