Skip to content

[dashboard] Add GitHub reactions tool#1305

Open
Janpot wants to merge 6 commits intomasterfrom
dashboard-reactions-tool
Open

[dashboard] Add GitHub reactions tool#1305
Janpot wants to merge 6 commits intomasterfrom
dashboard-reactions-tool

Conversation

@Janpot
Copy link
Copy Markdown
Member

@Janpot Janpot commented Apr 13, 2026

Summary

Replaces the old tools-public Toolpad page design_kits_issue_111 with a client-side viewer in code-infra-dashboard at /reactions.

The old tool was buggy in two independent ways:

  • Hardcoded to mui-design-kits#10, despite the page name suggesting #111.
  • No pagination — capped at GitHub's default of the first 30 reactions, so the displayed thumbs-up count was wrong on any issue with more than 30 reactions.

The new tool accepts any public GitHub issue, PR, or comment URL (issue comments via #issuecomment-… and PR review comments via #discussion_r…), paginates properly via octokit.paginate.iterator, and groups reactions by emoji in a DataGridPremium.

To prevent a viral issue from blowing the unauthenticated 60 req/hr budget, results are capped at 3 pages × 100 reactions by default. When truncated, an alert links to the same URL with ?all=1 to fetch every page.

The old Toolpad page is deleted.

@code-infra-dashboard
Copy link
Copy Markdown

code-infra-dashboard Bot commented Apr 13, 2026

Deploy preview

https://deploy-preview-1305--mui-internal.netlify.app/

Bundle size

Bundle Parsed size Gzip size
@base-ui/react 0B(0.00%) 0B(0.00%)
@mui/x-charts-pro 0B(0.00%) 0B(0.00%)

Details of bundle changes

Performance

Total duration: 19.29 ms 🔺+3.15 ms(+19.5%) | Renders: 4 (+0) | Paint: 79.84 ms 🔺+10.86 ms(+15.7%)

Test Duration Renders
HeavyList mount 13.08 ms 🔺+3.14 ms(+31.5%) 1 (+0)
DataGrid mount with paint timing 1.98 ms 🔺+0.06 ms(+3.3%) 1 (+0)
Counter click 4.23 ms ▼-0.05 ms(-1.1%) 2 (+0)

Details of benchmark changes


Check out the code infra dashboard for more information about this PR.

Janpot added 6 commits April 13, 2026 16:14
Replaces the old tools-public Toolpad page (which was hardcoded to the
wrong issue and capped at the first 30 reactions) with a client-side
viewer in the code-infra dashboard. Accepts any public GitHub issue, PR,
or comment URL and groups reactions by emoji. Caps results at 300 by
default; the truncation alert links to the same URL with `?all=1` to
fetch every page.
Follows the pattern from #1220: keep the Toolpad page as a markdown link
to the new tool in code-infra-dashboard instead of deleting it outright.
Add a submit button next to the URL input, drop comment-URL support
(issue comments and PR review comments) to keep the parser and fetcher
focused on the issue/PR case.
Under `dynamic = 'force-static'`, Next.js silently renders
`useSearchParams()` with empty params during prerender but returns the
real query on the client, causing SSR/client divergence for any view
that surfaces search params in its JSX. React 19 often can't recover
inside complex trees (e.g. MUI TextField), so the DOM gets stuck in the
server-rendered state.

Wrap `useSearchParams()` in a `useSyncExternalStore` gate so the hook
returns an empty `URLSearchParams` during SSR + the hydration render,
then switches to the real value after hydration commits. Consumers
transition through a normal state change, which flows through their
event handlers correctly.
@Janpot Janpot force-pushed the dashboard-reactions-tool branch from b5dd79f to ea5bc21 Compare April 14, 2026 08:32
@oliviertassinari oliviertassinari temporarily deployed to dashboard-reactions-tool - code-infra-dashboard PR #1305 April 14, 2026 08:32 — with Render Destroyed
@oliviertassinari oliviertassinari temporarily deployed to dashboard-reactions-tool - mui-tools-public PR #1305 April 14, 2026 08:32 — with Render Destroyed
@brijeshb42
Copy link
Copy Markdown
Contributor

What exactly is this tool used for ?

@Janpot Janpot requested a review from oliviertassinari April 14, 2026 09:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope: code-infra Involves the code-infra product (https://www.notion.so/mui-org/5562c14178aa42af97bc1fa5114000cd).

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants