Repository navigation
fix: Copy code over plain HTTP machine URLs - #3832
Merged
Merged
Conversation
Use the selection copy command for top-level insecure pages where the Clipboard API is absent. Keep sandboxed samples on their refused clipboard path, and preserve the copy control's feedback. Closes #3827
This was referenced Oct 24, 2026
max-sixty
added a commit
that referenced
this pull request
Oct 25, 2026
…ling test_code_copy_on_plain_http_machine_name serves its page at the machine's name and routes each request back to 127.0.0.1. Chromium lower-cases a URL's host, so `request.url.replace(gethostname(), ...)` found nothing to replace on a mixed-case name and fetched the machine name itself. That passes where the name resolves to 127.0.0.1, as on a developer Mac, and fails on CI's macOS runner, whose name resolves to ::1 and the LAN address only: the fetch is refused and page.goto waits out its deadline. The test (added in #3832) now lower-cases the name once and uses it for the URL, the route and the rewrite. No product behavior changed. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
max-sixty
added a commit
that referenced
this pull request
Nov 4, 2026
…weep (#5291) A sweep on 2026-11-03 found 39 capabilities implemented more than once in Leaf. Tend's review had approved all 10 of the introducing pull requests checked, and 15 nightly surveys that carried the instruction to look for "several implementations of one capability" reported none. This changes the instructions behind both, and adds a weekly sweep for what review still misses. - **Review loads `/developing-leaf`.** running-tend's Review threshold named that skill's "Weigh what a change adds" without saying to load it, and none of 11 production reviews on 2026-11-03 did. The section now opens "Load `/developing-leaf`"; 16 of 16 replayed reviews then loaded it. - **"What it repeats"** joins "Weigh what a change adds": search for the question each new helper, constant, selector, style rule or inline check answers rather than its name, count a copy whose comment names its source as a copy, and export, move or generate the owner rather than copy it. "Regular maintenance" points its "Several implementations of one capability" bullet at it, since the nightly survey reads one file at a time. - **Weekly: duplicate implementations** sweeps one area a week, chosen by ISO week number modulo 4, searching the whole tree by question. Each copy's introducing pull request goes in the sweep's description, so the copies added since the area's last sweep show what review let through. Replaying four pull requests that each introduced a copy (#3832, #5196, #2345, #3137), reviewers caught the copy 2 of 9 times with the old text, 3 of 8 when told to load the skill, and 5 of 8 with "What it repeats", whose wording was revised after the replay. That difference is within noise at this size, and no arm caught a one-line copy inside a new helper; the weekly sweep is there for those. This changes agent instructions, so it lands with the control-plane owner's approval (running-tend, "Landing"). > _This was written by Claude Code on behalf of max-sixty_
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.
On plain HTTP machine-name pages, Chromium omits
navigator.clipboard, so Web Awesome's copy button reports an error even for an ordinary code block. Leaf's shared copy control now uses a selected textarea andexecCommand("copy")during the press in that context, while retaining its normal success and error feedback. Embedded samples keep their clipboard restriction.The new browser regression fails against the old code and passes for both the block's button and Enter route. A second browser check confirms a sandboxed sample cannot change the parent clipboard. The focused browser checks and
pnpm run checkpass; the committed kernel was rebuilt.Closes #3827 — automated triage