Skip to content

Migrate Query OSS Insight to dashboard, deprecate unused Toolpad pages#1534

Draft
Janpot wants to merge 8 commits into
masterfrom
migrate-query-oss-insight
Draft

Migrate Query OSS Insight to dashboard, deprecate unused Toolpad pages#1534
Janpot wants to merge 8 commits into
masterfrom
migrate-query-oss-insight

Conversation

@Janpot

@Janpot Janpot commented Jun 10, 2026

Copy link
Copy Markdown
Member

Finishes a batch of the Toolpad → code-infra-dashboard migration. Part of the effort tracked in #1305 (comment).

Closes #502.

example

Migrated

  • Query OSS Insight moves to the dashboard at /query-oss-insight (view + page + Landing nav entry). It keeps the original UX: enter a repo slug → resolve its OSS Insight repo id → write SQL → run → results in a DataGridPremium.
  • Backed by a new server-side route app/api/oss-insight/route.ts (GET ?slug= for repo lookup, POST { repositoryId, sql } to run the query). A proxy is required because api.ossinsight.io does not return access-control-allow-origin for our origin, so a direct browser fetch is blocked by CORS. This also matches how the original Toolpad page ran the query as a server function.

Deprecated

auditClosedIssues, auditLabelChanges, communityCore, communityPerMonth are no longer used. Following the existing convention (e.g. medianTimeToCompletion), each page is stripped to a markdown notice while keeping its alias so old bookmarked URLs don't 404. The queryOssInsight Toolpad page is likewise replaced with a notice linking to its new dashboard location.

The now-orphaned backend code is removed: resource files queryOssInsight.ts, queryAuditClosedIssues.ts, queryAuditLabelChanges.ts, and the functions getRepositoryDetails, PRsOpenandReviewedQuery, PRsPerMonth, ContributorsPerMonth from functions.ts (verified unreferenced by any remaining page).

Migrates the queryOssInsight tool from the Toolpad app to code-infra-dashboard
as a new /query-oss-insight page backed by a server-side /api/oss-insight proxy
(OSS Insight does not send CORS headers for our origin).

Deprecates auditClosedIssues, auditLabelChanges, communityCore and
communityPerMonth: their Toolpad pages are stripped to a notice (keeping their
aliases so old URLs don't 404) and the now-orphaned backend functions and
resource files are removed.
@code-infra-dashboard

code-infra-dashboard Bot commented Jun 10, 2026

Copy link
Copy Markdown

Deploy preview

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

Bundle size

Total Size Change: 0B(0.00%) - Total Gzip Change: 0B(0.00%)
Files: 64 total (0 added, 0 removed, 0 changed)

Show details for 64 more bundles

@mui/internal-docs-infra/abstractCreateDemoparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/internal-docs-infra/abstractCreateDemoClientparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/internal-docs-infra/abstractCreateStreamparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/internal-docs-infra/abstractCreateTypesparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/internal-docs-infra/ChunkProviderparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/internal-docs-infra/cliparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/internal-docs-infra/CodeControllerContextparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/internal-docs-infra/CodeExternalsContextparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/internal-docs-infra/CodeHighlighterparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/internal-docs-infra/CodeHighlighter/errorsparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/internal-docs-infra/CodeHighlighter/typesparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/internal-docs-infra/CodeProviderparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/internal-docs-infra/CoordinatedLazyparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/internal-docs-infra/CoordinatedLazy/typesparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/internal-docs-infra/createDemoDataparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/internal-docs-infra/createDemoData/typesparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/internal-docs-infra/createSitemapparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/internal-docs-infra/createSitemap/typesparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/internal-docs-infra/useCodeparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/internal-docs-infra/useCodeWindowparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/internal-docs-infra/useCoordinatedparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/internal-docs-infra/useCopierparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/internal-docs-infra/useDemoparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/internal-docs-infra/useErrorsparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/internal-docs-infra/useLocalStorageStateparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/internal-docs-infra/usePreferenceparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/internal-docs-infra/useScrollAnchorparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/internal-docs-infra/useSearchparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/internal-docs-infra/useSearch/typesparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/internal-docs-infra/useStreamparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/internal-docs-infra/useStream/typesparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/internal-docs-infra/useTypeparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/internal-docs-infra/useTypesparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/internal-docs-infra/useUrlHashStateparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/internal-docs-infra/withDocsInfraparsed: 0B(0.00%) gzip: 0B(0.00%)
addLineGuttersparsed: 0B(0.00%) gzip: 0B(0.00%)
chunkparsed: 0B(0.00%) gzip: 0B(0.00%)
CodeHighlighterChunkparsed: 0B(0.00%) gzip: 0B(0.00%)
CodeHighlighterClientparsed: 0B(0.00%) gzip: 0B(0.00%)
CodeInitialSourceLoaderparsed: 0B(0.00%) gzip: 0B(0.00%)
CodeSourceLoaderparsed: 0B(0.00%) gzip: 0B(0.00%)
createFrameparsed: 0B(0.00%) gzip: 0B(0.00%)
createParseSourceWorkerClientparsed: 0B(0.00%) gzip: 0B(0.00%)
EditingEngineparsed: 0B(0.00%) gzip: 0B(0.00%)
embedTransformsparsed: 0B(0.00%) gzip: 0B(0.00%)
enhanceCodeEmphasisparsed: 0B(0.00%) gzip: 0B(0.00%)
findExpandingRangesparsed: 0B(0.00%) gzip: 0B(0.00%)
getHastTextContentparsed: 0B(0.00%) gzip: 0B(0.00%)
grammarLoadersparsed: 0B(0.00%) gzip: 0B(0.00%)
grammarsparsed: 0B(0.00%) gzip: 0B(0.00%)
isFrameSpanparsed: 0B(0.00%) gzip: 0B(0.00%)
loadIsomorphicCodeVariantparsed: 0B(0.00%) gzip: 0B(0.00%)
parseSourceparsed: 0B(0.00%) gzip: 0B(0.00%)
source.cssparsed: 0B(0.00%) gzip: 0B(0.00%)
source.jsparsed: 0B(0.00%) gzip: 0B(0.00%)
source.jsonparsed: 0B(0.00%) gzip: 0B(0.00%)
source.mdxparsed: 0B(0.00%) gzip: 0B(0.00%)
source.shellparsed: 0B(0.00%) gzip: 0B(0.00%)
source.tsparsed: 0B(0.00%) gzip: 0B(0.00%)
source.tsxparsed: 0B(0.00%) gzip: 0B(0.00%)
source.yamlparsed: 0B(0.00%) gzip: 0B(0.00%)
text.html.basicparsed: 0B(0.00%) gzip: 0B(0.00%)
text.mdparsed: 0B(0.00%) gzip: 0B(0.00%)
TransformEngineparsed: 0B(0.00%) gzip: 0B(0.00%)

Details of bundle changes

Performance

Total duration: 23.40 ms 🔺+5.44 ms(+30.3%) | Renders: 4 (+0) | Paint: 102.85 ms 🔺+23.35 ms(+29.4%)

Test Duration Renders
HeavyList mount 15.02 ms 🔺+4.63 ms(+44.6%) 1 (+0)
DataGrid mount with paint timing 4.16 ms 🔺+0.79 ms(+23.4%) 1 (+0)

1 test within noise — details


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

The SQL textarea grew unbounded with the query, pushing the results grid
off-screen. Put the editor and grid in two height-bounded panes: side-by-side
on md+, stacked (editor above grid) on small screens, each scrolling
internally.
Columns were derived from the first row's keys, so a query returning zero
rows rendered 'No columns'. The playground response includes a `fields`
schema (in SELECT order) even for an empty result set; use it to build the
grid columns so they always show and a zero-row result correctly reads as
'No rows'.
@Janpot Janpot added the scope: code-infra Involves the code-infra product (https://www.notion.so/mui-org/5562c14178aa42af97bc1fa5114000cd). label Jun 10, 2026
Both the repository slug and SQL are now backed by the URL search params, so a
link pre-fills the editor and the input survives reloads. Local drafts keep
typing responsive and are committed to the URL on Run. A CopyButton next to Run
copies an absolute link encoding the current input.
Janpot added 2 commits June 11, 2026 09:41
Running a query no longer mutates the address bar. The URL is only read to
seed the inputs; the share-link button is the explicit way to capture the
current input into a URL.
The share affordance is now a real link to the current input, so cmd/middle-click
opens it in a new tab and right-click can copy the address. Uses a relative href,
so the window.origin/clipboard handling is no longer needed.
The textarea height override was a no-op: the field fills the editor pane via
the InputBase root (height/alignItems/overflow), and the inner textarea keeps
its autosized height regardless. Drop the dead rule and document the rest.
MUI's multiline TextField autosizes to its content, which we had to fight with
height/overflow overrides that distorted its padding. A styled native textarea
takes a fixed height, fills the editor pane, and scrolls natively with a clean,
predictable box model.
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.

[frontend-public] Migrate out of Toolpad Studio

2 participants