GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Convert ReactFreshMultipleRenderer to createRoot by eps1lon · Pull Request #28000 · react/react

Conversation

@eps1lon

@eps1lon eps1lon commented Jan 19, 2024

Copy link
Copy Markdown
Collaborator

No description provided.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

tadanobutubutu, awakdeni, and haytamnajim reacted with heart emoji
All reactions
  • ❤️ 3 reactions
Sebastian Silbermann
Convert ReactFreshMultipleRenderer to createRoot
51b56db
@facebook-github-bot facebook-github-bot added CLA Signed React Core Team Opened by a member of the React Core Team labels Jan 19, 2024
@react-sizebot

react-sizebot commented Jan 19, 2024

Copy link
Copy Markdown

Comparing: feed8f3...51b56db

Critical size changes

Includes critical production bundles, as well as any change greater than 2%:

Name +/- Base Current +/- gzip Base gzip Current gzip
oss-stable/react-dom/cjs/react-dom.production.min.js = 176.24 kB 176.24 kB = 54.88 kB 54.88 kB
oss-experimental/react-dom/cjs/react-dom.production.min.js = 178.34 kB 178.34 kB = 55.52 kB 55.53 kB
facebook-www/ReactDOM-prod.classic.js = 571.94 kB 571.94 kB = 100.56 kB 100.56 kB
facebook-www/ReactDOM-prod.modern.js = 555.70 kB 555.70 kB = 97.62 kB 97.62 kB
test_utils/ReactAllWarnings.js Deleted 67.55 kB 0.00 kB Deleted 16.54 kB 0.00 kB

Significant size changes

Includes any change greater than 0.2%:

Expand to show
Name +/- Base Current +/- gzip Base gzip Current gzip
test_utils/ReactAllWarnings.js Deleted 67.55 kB 0.00 kB Deleted 16.54 kB 0.00 kB

Generated by 🚫 dangerJS against 51b56db

awakdeni and haytamnajim reacted with heart emoji
All reactions
  • ❤️ 2 reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@eps1lon
eps1lon marked this pull request as ready for review January 19, 2024 11:36
rickhanlonii
rickhanlonii approved these changes Jan 19, 2024
View reviewed changes

@rickhanlonii rickhanlonii left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Nice and easy

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
rickhanlonii
rickhanlonii approved these changes Jan 19, 2024
View reviewed changes
@eps1lon
eps1lon merged commit 4c58fc2 into react:main Jan 19, 2024
@eps1lon
eps1lon deleted the test/create-root/ReactFreshMultipleRenderer branch January 19, 2024 17:25
@gnoff gnoff mentioned this pull request Feb 1, 2024
Update React from 60a927d04 to 2bc7d336a vercel/next.js#61522
Merged
gnoff added a commit to gnoff/next.js that referenced this pull request Feb 6, 2024
@gnoff
updated React from 60a927d04 to 2bc7d336a.
6290768
- react/react#28250
- react/react#28225
- react/react#28123
- react/react#28240
- react/react#28239
- react/react#28245
- react/react#28244
- react/react#28238
- react/react#28235
- react/react#28221
- react/react#28215
- react/react#28214
- react/react#28213
- react/react#28212
- react/react#28211
- react/react#28247
- react/react#28210
- react/react#28186
- react/react#28232
- react/react#28169
- react/react#28177
- react/react#28170
- react/react#28168
- react/react#28122
- react/react#27982
- react/react#28217
- react/react#28223
- react/react#28208
- react/react#28209
- react/react#28200
- react/react#28199
- react/react#28198
- react/react#28197
- react/react#28196
- react/react#28194
- react/react#28192
- react/react#28191
- react/react#28182
- react/react#28181
- react/react#28180
- react/react#28178
- react/react#28201
- react/react#28176
- react/react#28162
- react/react#28131
- react/react#28190
- react/react#28172
- react/react#28171
- react/react#28173
- react/react#28174
- react/react#28175
- react/react#28136
- react/react#28135
- react/react#28134
- react/react#28133
- react/react#28132
- react/react#28130
- react/react#28202
- react/react#28102
- react/react#28161
- react/react#28193
- react/react#28195
- react/react#28189
- react/react#28160
- react/react#28096
- react/react#28183
- react/react#28125
- react/react#28157
- react/react#28115
- react/react#28124
- react/react#28163
- react/react#28164
- react/react#28150
- react/react#28159
- react/react#28069
- react/react#28110
- react/react#28148
- react/react#28116
- react/react#28099
- react/react#28100
- react/react#28147
- react/react#28128
- react/react#28126
- react/react#28139
- react/react#28140
- react/react#28141
- react/react#28142
- react/react#28113
- react/react#28129
- react/react#28114
- react/react#28053
- react/react#28091
- react/react#28087
- react/react#28112
- react/react#28086
- react/react#28101
- react/react#28106
- react/react#28117
- react/react#28118
- react/react#28105
- react/react#27883
- react/react#28111
- react/react#28095
- react/react#28108
- react/react#28090
- react/react#28089
- react/react#28076
- react/react#28074
- react/react#28103
- react/react#28098
- react/react#28097
- react/react#28068
- react/react#28093
- react/react#28094
- react/react#28073
- react/react#28084
- react/react#28063
- react/react#28085
- react/react#28083
- react/react#28065
- react/react#28061
- react/react#28077
- react/react#28075
- react/react#28078
- react/react#28050
- react/react#28011
- react/react#28055
- react/react#28066
- react/react#28067
- react/react#28010
- react/react#27993
- react/react#28052
- react/react#28060
- react/react#28059
- react/react#28034
- react/react#28033
- react/react#28004
- react/react#28051
- react/react#28012
- react/react#28001
- react/react#28002
- react/react#27995
- react/react#28006
- react/react#28005
- react/react#28007
- react/react#28008
- react/react#28009
- react/react#28000
- react/react#28003
- react/react#27997
- react/react#27240
- react/react#27977
- react/react#27940
- react/react#27939
- react/react#28090
- react/react#28089
- react/react#28076
- react/react#28074
- react/react#28103
- react/react#28098
- react/react#28097
- react/react#28068
- react/react#28093
- react/react#28094
- react/react#28073
- react/react#28084
- react/react#28063
- react/react#28085
- react/react#28083
- react/react#28065
- react/react#28061
- react/react#28077
- react/react#28075
- react/react#28078
- react/react#28050
- react/react#28011
- react/react#28055
- react/react#28066
- react/react#28067
- react/react#28010
- react/react#27993
- react/react#28052
- react/react#28060
- react/react#28059
- react/react#28034
- react/react#28033
- react/react#28004
- react/react#28051
- react/react#28012
- react/react#28001
- react/react#28002
- react/react#27995
- react/react#28006
- react/react#28005
- react/react#28007
- react/react#28008
- react/react#28009
- react/react#28000
- react/react#28003
- react/react#27997
- react/react#27240
- react/react#27977
- react/react#27940
- react/react#27939
gnoff added a commit to vercel/next.js that referenced this pull request Feb 6, 2024
@gnoff
Update React from 60a927d04 to 2bc7d336a (#61522)
2395557
Updates React from 60a927d04 to 2bc7d336a

Also updates aliases for `react.shared-subset` to `react.react-server`

### React upstream changes

- react/react#28250
- react/react#28225
- react/react#28123
- react/react#28240
- react/react#28239
- react/react#28245
- react/react#28244
- react/react#28238
- react/react#28235
- react/react#28221
- react/react#28215
- react/react#28214
- react/react#28213
- react/react#28212
- react/react#28211
- react/react#28247
- react/react#28210
- react/react#28186
- react/react#28232
- react/react#28169
- react/react#28177
- react/react#28170
- react/react#28168
- react/react#28122
- react/react#27982
- react/react#28217
- react/react#28223
- react/react#28208
- react/react#28209
- react/react#28200
- react/react#28199
- react/react#28198
- react/react#28197
- react/react#28196
- react/react#28194
- react/react#28192
- react/react#28191
- react/react#28182
- react/react#28181
- react/react#28180
- react/react#28178
- react/react#28201
- react/react#28176
- react/react#28162
- react/react#28131
- react/react#28190
- react/react#28172
- react/react#28171
- react/react#28173
- react/react#28174
- react/react#28175
- react/react#28136
- react/react#28135
- react/react#28134
- react/react#28133
- react/react#28132
- react/react#28130
- react/react#28202
- react/react#28102
- react/react#28161
- react/react#28193
- react/react#28195
- react/react#28189
- react/react#28160
- react/react#28096
- react/react#28183
- react/react#28125
- react/react#28157
- react/react#28115
- react/react#28124
- react/react#28163
- react/react#28164
- react/react#28150
- react/react#28159
- react/react#28069
- react/react#28110
- react/react#28148
- react/react#28116
- react/react#28099
- react/react#28100
- react/react#28147
- react/react#28128
- react/react#28126
- react/react#28139
- react/react#28140
- react/react#28141
- react/react#28142
- react/react#28113
- react/react#28129
- react/react#28114
- react/react#28053
- react/react#28091
- react/react#28087
- react/react#28112
- react/react#28086
- react/react#28101
- react/react#28106
- react/react#28117
- react/react#28118
- react/react#28105
- react/react#27883
- react/react#28111
- react/react#28095
- react/react#28108
- react/react#28090
- react/react#28089
- react/react#28076
- react/react#28074
- react/react#28103
- react/react#28098
- react/react#28097
- react/react#28068
- react/react#28093
- react/react#28094
- react/react#28073
- react/react#28084
- react/react#28063
- react/react#28085
- react/react#28083
- react/react#28065
- react/react#28061
- react/react#28077
- react/react#28075
- react/react#28078
- react/react#28050
- react/react#28011
- react/react#28055
- react/react#28066
- react/react#28067
- react/react#28010
- react/react#27993
- react/react#28052
- react/react#28060
- react/react#28059
- react/react#28034
- react/react#28033
- react/react#28004
- react/react#28051
- react/react#28012
- react/react#28001
- react/react#28002
- react/react#27995
- react/react#28006
- react/react#28005
- react/react#28007
- react/react#28008
- react/react#28009
- react/react#28000
- react/react#28003
- react/react#27997
- react/react#27240
- react/react#27977
- react/react#27940
- react/react#27939
- react/react#28090
- react/react#28089
- react/react#28076
- react/react#28074
- react/react#28103
- react/react#28098
- react/react#28097
- react/react#28068
- react/react#28093
- react/react#28094
- react/react#28073
- react/react#28084
- react/react#28063
- react/react#28085
- react/react#28083
- react/react#28065
- react/react#28061
- react/react#28077
- react/react#28075
- react/react#28078
- react/react#28050
- react/react#28011
- react/react#28055
- react/react#28066
- react/react#28067
- react/react#28010
- react/react#27993
- react/react#28052
- react/react#28060
- react/react#28059
- react/react#28034
- react/react#28033
- react/react#28004
- react/react#28051
- react/react#28012
- react/react#28001
- react/react#28002
- react/react#27995
- react/react#28006
- react/react#28005
- react/react#28007
- react/react#28008
- react/react#28009
- react/react#28000
- react/react#28003
- react/react#27997
- react/react#27240
- react/react#27977
- react/react#27940
- react/react#27939

Closes NEXT-2331
@ztanner ztanner mentioned this pull request Mar 19, 2024
(backport) Update React from 60a927d04 to 14898b6a9 vercel/next.js#63442
Closed
EdisonVan pushed a commit to EdisonVan/react that referenced this pull request Apr 15, 2024
@eps1lon @AndyPengc12
Convert ReactFreshMultipleRenderer to createRoot (react#28000)
42d116e
bigfootjon pushed a commit that referenced this pull request Apr 18, 2024
@eps1lon
Convert ReactFreshMultipleRenderer to createRoot (#28000)
a985119
DiffTrain build for commit 4c58fc2.
@sgnobst

sgnobst commented Aug 12, 2025

Copy link
Copy Markdown

✨ AI Code Review Complete

Great job! No significant issues found in the 1 files reviewed.

📊 Summary:

  • Files reviewed: 1
  • Files skipped: 0
  • Review status: ✅ All checks passed
awakdeni reacted with heart emoji
All reactions
  • ❤️ 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

1 similar comment
@sgnobst

sgnobst commented Aug 12, 2025

Copy link
Copy Markdown

✨ AI Code Review Complete

Great job! No significant issues found in the 1 files reviewed.

📊 Summary:

  • Files reviewed: 1
  • Files skipped: 0
  • Review status: ✅ All checks passed
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@sgnobst

sgnobst commented Aug 12, 2025

Copy link
Copy Markdown

🤖 AI 코드 리뷰 완료

✅ 리뷰 결과

모든 검토가 완료되었으며, 심각한 이슈는 발견되지 않았습니다.

📊 리뷰 통계

항목 수치
📝 검토된 파일 1개
⏭️ 건너뛴 파일 0개
✅ 검토 상태 정상 완료

Reviewed by Azure OpenAI (2025-08-12 18:22)

yongsk0066 reacted with eyes emoji
All reactions
  • 👀 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@Mindweavecli

Mindweavecli commented Nov 20, 2025

Copy link
Copy Markdown

🤖 ReviewBot AI Code Review

👑 Code Quality Grade: GOD 👑 (100/100)

🔴 Critical Issues: 0
🟡 Major Issues: 0
🔵 Minor Issues: 0
✅ Good Practices: 5

⚡ Analysis Confidence: HIGH


Summary

Successfully migrates ReactFresh test from legacy ReactDOM.render to modern createRoot API with proper async handling.

✅ Positives

  • Proper migration from legacy ReactDOM.render to modern createRoot API
  • Correct addition of async/await pattern for the test function
  • Proper use of act() wrapper for React state updates in tests
  • Clean import organization with ReactDOMClient and act utilities
  • Maintains existing test logic while updating to modern React patterns

Powered by Claude AI + Static Analysis • ReviewBot • Deterministic scoring for consistency

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

konard added a commit to link-foundation/gh-load-pull-request that referenced this pull request Dec 27, 2025
@konard @claude
test: add comprehensive unit and e2e tests
131d8d9
Add rigorous test coverage:
- Unit tests for parsePrUrl, extractMarkdownImageUrls, validateImageBuffer,
  getExtensionFromFormat, convertToJson, setLoggingMode
- E2E tests for URL parsing, PR downloads, JSON/markdown output,
  directory saving, and library exports
- Use real PRs for testing (#2,
  react/react#28000)
- Test content verification for metadata, commits, files, reviews

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
@nikhil-bora

nikhil-bora commented Jan 27, 2026

Copy link
Copy Markdown

🔍 Runtime Intelligence Analysis

Risk Level: 🟢 LOW (deterministic)
Blast Radius: 0 components affected
Confidence: PARTIAL (1 files unmapped)


Policy Evaluation

Verdict: ⚠️ REVIEW (recommendation only)

Violations:

  • ❌ [low] No Unmapped Files: All files should have CODEOWNERS entries
    Remediation: Add CODEOWNERS entries for the unmapped files.
    This ensures proper component mapping.

Downstream Impact

No downstream components affected


Explanation

Analysis Results

Impact Summary:
This pull request has low risk with no components affected. The change converts a test file (ReactFreshMultipleRenderer) to use createRoot, which appears to be isolated to the testing infrastructure. Since no production components are directly or downstream affected (blast radius of 0), this change should be safe from a runtime perspective.

Policy Findings:
There is one minor policy violation: the changed file doesn't have a CODEOWNERS entry. This is a housekeeping issue rather than a technical risk - it means there's no designated team or person automatically assigned to review changes to this file. This won't impact functionality but may slow down the review process.

Recommended Next Steps:
The automated system recommends human review (not a block), primarily due to the missing CODEOWNERS entry. Since this is a test file conversion with no production impact, you should: (1) proceed with normal code review focusing on test correctness, and (2) consider adding a CODEOWNERS entry for this file to improve future review routing. The final merge decision is yours to make based on code quality and test coverage.


⚠️ Unmapped Files

The following files could not be mapped to components (no CODEOWNERS entry):

  • packages/react-refresh/src/__tests__/ReactFreshMultipleRenderer-test.internal.js

Analysis ID: 9e3b28d22e91b1cf
Policy: 0bf3546e5b9c5592

⚠️ Note: This is an automated analysis. Human approval required for all changes.
🤖 Powered by Runtime Intelligence Platform

awakdeni reacted with heart emoji
All reactions
  • ❤️ 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

sudo-vaibhav added a commit to sudo-vaibhav/pr-diff-plus that referenced this pull request Apr 26, 2026
@sudo-vaibhav @claude
Add real-GitHub fixture suite, modern diffstat parser, Firefox lint
86182cc
Tests
- Capture real GitHub PR HTML (react/react#28000) as a fixture and
  add a parallel e2e suite (realgithub.spec.js) that exercises the
  extension against actual current GitHub markup. Catches GitHub layout
  changes that synthetic fixtures would miss.
- Refactor e2e harness into tests/e2e/harness.js for reuse across spec
  files; gives each spec a unique PR number to avoid storage key
  collisions.
- web-ext lint integration (npm run lint:firefox) — Firefox compatibility
  validation in CI without requiring extension install (Playwright's
  Firefox build can't load unsigned extensions reliably).

Extension
- Modern GitHub no longer puts +N/-N text in .diffstat — it renders a
  total churn count plus colored block spans for the ratio. New
  parseDiffstat() handles three formats:
    1. Legacy aria-label "N additions, M deletions"
    2. Plain "+N -M" text (synthetic fixtures, old GitHub)
    3. Total + addedBlocks/deletedBlocks ratio (modern GitHub)
- collectFiles() now reads file path from copilot-diff-entry's
  data-file-path attribute (modern GitHub stores it there) before
  falling back to title attribute.

Result: 68 unit tests, 29 e2e tests (synthetic + real-GitHub) on
Chromium. Firefox covered via web-ext lint plus manual smoke testing
documented in README.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
sudo-vaibhav added a commit to sudo-vaibhav/pr-diff-plus that referenced this pull request Apr 26, 2026
@sudo-vaibhav @claude
Fix path/stats extraction for modern PR layout, add modern test fixture
ba2cc08
Live testing on vaatun/vantage#1621 surfaced two bugs in the modern
PullRequestDiffsList layout that the captured fixture didn't catch:

1. Files past the rendered viewport showed as `file-N` placeholders
   because [data-file-path] only exists on file headers that React has
   actually rendered (it virtualizes off-screen entries). All 70 entries
   do have <a href="#diff-..."><code>...</code></a> links with the path
   in textContent (wrapped in invisible U+200E LTR marks). New extraction
   path uses that as a fallback after data-file-path / title attr.

2. All files showed +0 -0 because the modern diffstat is empty colored
   <div data-testid="addition diffstat"> squares with no number text.
   Per-file totals are in:
     - .sr-only span: "Lines changed: N additions & M deletions"
     - visible spans .fgColor-success.text-bold "+N", .fgColor-danger... "-M"
   collectFiles() now reads these in priority order. parseDiffstat
   already handled the "N additions, M deletions" pattern; just needed
   to feed it the right text.

Test fixtures:
- Captured tests/fixtures/real-github-pr-modern.html from a real
  modern-layout PR (3.1MB). React virtualizes off-screen entries so the
  static snapshot contains 1 fully-rendered diff card — enough to verify
  the new parser paths.
- Restored the legacy real-github-pr.html to react/react#28000.
- Added realgithub-modern.spec.js with 5 tests asserting modern path
  extraction (no placeholders), modern stats parsing (not all zeros),
  and inline approve injection on the new DiffFileHeader.
- _capture.mjs now auto-detects layout and writes to the matching file,
  and supports --profile to use the logged-in /tmp/prdp-debug-profile
  for capturing PRs only visible behind auth or new-UI rollout.

Also fixed a falsy-coalescing bug where `${plus} ${minus}` evaluated to
" " (truthy single space) when both empty, hijacking the legacy
diffstat fallback chain.

Result: 70 unit + 34 e2e tests all green across synthetic + legacy
real-GitHub + modern real-GitHub fixtures. Live test on vaatun/vantage
shows real file names (query.js, policy-view.spec.ts, etc.) and
non-zero diff counts in the sidebar.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
This was referenced Apr 30, 2026
fix: sort solver candidates by parsed merged_at, not raw ISO string entrius/gittensor#882
Closed
[Bug] find_solver_from_cross_references sorts merged PRs by ISO string instead of parsed datetime entrius/gittensor#881
Closed
chuyenvn92 added a commit to chuyenvn92/oeditions-openclaw that referenced this pull request Aug 20, 2026
@chuyenvn92
feat: add github-review tool for Xu, drop unused slack-read
c4d87fc
Xu can now fetch PR title, description, changed files, and a truncated
diff via a read-only GitHub API call (github-review.py + fixed wrapper),
wrapped in the same untrusted-content delimiter convention as the other
fetch tools. Verified live against react/react#28000.

slack-read was built but never wanted (the user is always online in
Discord, so a channel-catchup tool added no value) - removed from repo,
VPS, exec allowlist, and SOUL.md rather than left dormant.
hanzo-dev pushed a commit to hanzoai/react that referenced this pull request Sep 9, 2026
@eps1lon
Convert ReactFreshMultipleRenderer to createRoot (react#28000)
52cacab
This was referenced Oct 13, 2026
feat: extract PR title and diffstat from the page guillermot/pr-clip#5
Merged
feat: copy PR message on icon click or keyboard shortcut guillermot/pr-clip#6
Merged
guillermot added a commit to guillermot/pr-clip that referenced this pull request Oct 13, 2026
@guillermot @claude
feat: extract PR title and diffstat from the page (#5)
4e67ea1
## What
`extractPr()` reads the PR title and the PR-wide `+additions −deletions`
from the live GitHub page. It returns `null` for anything it can't find,
so the caller can fall back to the API (#8).

## How the selectors were chosen
I inspected real PRs in Chrome (react/react#28000 and #36743), both
logged in and logged out:
- **Title:** `h1 .markdown-title`. It's scoped to the `h1` because
commit links on the same page also use `.markdown-title`. Fallbacks:
`.js-issue-title` (classic UI), then `document.title`.
- **Counts:** `.fgColor-success` / `.fgColor-danger` inside the PR
header (`[class*="PageHeader-Navigation"]`). The "Files changed" tab
also renders per-file counts further down, so the header is checked
first. Counts use thousands separators (`+2,724`). The classic
`#diffstat` is kept as a fallback for older GitHub Enterprise Server
versions.
- The counts are rendered client-side; they aren't in the server HTML.

## Notes
- The function is injected with `chrome.scripting.executeScript`, so it
must be self-contained. A test runs it through `new Function(source)` to
enforce this.
- `tests/fixtures/` holds minimal, sanitized reproductions of the real
markup, plus a README explaining how to update them when GitHub changes
its markup.

## How to test
`pnpm test` runs 6 tests: conversation tab, changes tab (header totals
rather than per-file counts), classic UI, the loading state, an
unrelated page, and the self-containment check.

---
### 📚 Stack
Merge from the bottom up (squash). After each merge the next PR is
rebased onto `main`.

1. #3 ci: add CI workflow and dependabot
2. #4 feat: parse PR URLs and render message templates
3. #5 feat: extract PR title and diffstat from the page
4. #6 feat: copy PR message on icon click or keyboard shortcut
5. #7 feat: add options page with editable template
6. #8 feat: fall back to GitHub API with optional token
7. #9 feat: localize UI in English and Spanish
8. #10 docs: add community health files
9. #11 ci: automate releases with release-please
10. #12 docs: add Chrome Web Store listing, privacy policy and
publishing guide

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
guillermot added a commit to guillermot/pr-clip that referenced this pull request Oct 13, 2026
@guillermot @claude
feat: copy PR message on icon click or keyboard shortcut (#6)
11353ec
## What
**The first usable version.** On a PR, clicking the toolbar icon or
pressing <kbd>Alt</kbd>+<kbd>Shift</kbd>+<kbd>C</kbd> copies the message
using the default template.

- `copy-pr.ts` contains the flow with injectable dependencies (extract,
template, clipboard). It returns a typed result and never throws.
- `background.ts` connects the flow to `chrome.action.onClicked`. The
shortcut uses `_execute_action`, so it fires the same handler.
- `badge.ts` shows a green ✓ for 2.5 s, or a red `!` whose tooltip
explains the error.
- `clipboard.ts` and the `offscreen/` entrypoint do the clipboard write.

## Why an offscreen document + `clipboardWrite`
- Service workers have no clipboard access.
- Writing from inside the page fails when the page isn't focused, which
is the case right after clicking the toolbar icon.
- An offscreen document with the `CLIPBOARD` reason is Chrome's
recommended approach.
- I verified it end to end by loading the built extension in Chromium
with Playwright. **Without `clipboardWrite`, `execCommand('copy')`
returns `false`; with it, the text reaches the system clipboard.**

## Permissions
`activeTab`, `scripting`, `clipboardWrite`, `offscreen`. **There are no
host permissions:** the extension can't see any site until you click it.

## How to test
1. `pnpm dev` opens Chrome with the extension loaded.
2. Open any PR, for example react/react#28000,
and click the icon. You should see ✓ and be able to paste ``:github: `+7
-3` [Convert ReactFreshMultipleRenderer to
createRoot](https://github.com/react/react/pull/28000)``.
3. Try the `/changes` tab and the shortcut.
4. On a non-PR page you should see a red `!` with the tooltip "Open a
GitHub pull request to copy it."

`pnpm test` adds 10 tests for the flow.

---
### 📚 Stack
Merge from the bottom up (squash). After each merge the next PR is
rebased onto `main`.

1. #3 ci: add CI workflow and dependabot
2. #4 feat: parse PR URLs and render message templates
3. #5 feat: extract PR title and diffstat from the page
4. #6 feat: copy PR message on icon click or keyboard shortcut
5. #7 feat: add options page with editable template
6. #8 feat: fall back to GitHub API with optional token
7. #9 feat: localize UI in English and Spanish
8. #10 docs: add community health files
9. #11 ci: automate releases with release-please
10. #12 docs: add Chrome Web Store listing, privacy policy and
publishing guide

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

1 more reviewer
@rickhanlonii rickhanlonii rickhanlonii approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

CLA Signed React Core Team Opened by a member of the React Core Team

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

7 participants

@eps1lon @react-sizebot @sgnobst @Mindweavecli @nikhil-bora @rickhanlonii @facebook-github-bot
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.