Skip to content

feat(web): introduce stability overview#644

Draft
AugustinMauroy wants to merge 1 commit intomainfrom
augu-stability-overview-web
Draft

feat(web): introduce stability overview#644
AugustinMauroy wants to merge 1 commit intomainfrom
augu-stability-overview-web

Conversation

@AugustinMauroy
Copy link
Member

Description

introduce stability overview on new web generator

Validation

It's should be cool 😎

Related Issues

Close #357

Check List

  • I have read the Contributing Guidelines and made commit messages that follow the guideline.
  • I have run node --run test and all tests passed.
  • I have check code formatting with node --run format & node --run lint.
  • I've covered new added functionality with unit tests if necessary.

Copilot AI review requested due to automatic review settings March 5, 2026 09:15
@AugustinMauroy AugustinMauroy requested a review from a team as a code owner March 5, 2026 09:15
@vercel
Copy link

vercel bot commented Mar 5, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
api-docs-tooling Ready Ready Preview Mar 5, 2026 9:15am

Request Review

@codecov
Copy link

codecov bot commented Mar 5, 2026

Codecov Report

❌ Patch coverage is 10.34483% with 52 lines in your changes missing coverage. Please review.
✅ Project coverage is 73.62%. Comparing base (439cfad) to head (113fbbe).

Files with missing lines Patch % Lines
src/generators/jsx-ast/utils/buildContent.mjs 7.40% 25 Missing ⚠️
src/generators/jsx-ast/generate.mjs 0.00% 24 Missing ⚠️
src/generators/web/generate.mjs 0.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #644      +/-   ##
==========================================
- Coverage   73.87%   73.62%   -0.25%     
==========================================
  Files         145      145              
  Lines       12867    12916      +49     
  Branches      923      923              
==========================================
+ Hits         9505     9509       +4     
- Misses       3357     3402      +45     
  Partials        5        5              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions
Copy link

github-actions bot commented Mar 5, 2026

web Generator

File Base Head Diff
documentation.html 37.15 KB 46.64 KB +9.48 KB (+25.52%)
documentation.js 9.73 KB 13.93 KB +4.20 KB (+43.13%)
styles.css 128.22 KB 128.33 KB +106.00 B (+0.08%)
addons.html 263.11 KB 263.13 KB +20.00 B (+0.01%)
assert.html 321.73 KB 321.75 KB +20.00 B (+0.01%)
async_context.html 158.18 KB 158.20 KB +20.00 B (+0.01%)
async_hooks.html 155.25 KB 155.26 KB +20.00 B (+0.01%)
buffer.html 851.96 KB 851.98 KB +20.00 B (+0.00%)
child_process.html 362.32 KB 362.34 KB +20.00 B (+0.01%)
cli.html 488.10 KB 488.12 KB +20.00 B (+0.00%)
cluster.html 189.82 KB 189.84 KB +20.00 B (+0.01%)
console.html 139.68 KB 139.70 KB +20.00 B (+0.01%)
crypto.html 982.99 KB 983.01 KB +20.00 B (+0.00%)
debugger.html 53.61 KB 53.63 KB +20.00 B (+0.04%)
deprecations.html 495.03 KB 495.05 KB +20.00 B (+0.00%)
dgram.html 184.07 KB 184.09 KB +20.00 B (+0.01%)
diagnostics_channel.html 219.49 KB 219.50 KB +20.00 B (+0.01%)
dns.html 282.66 KB 282.68 KB +20.00 B (+0.01%)
domain.html 102.23 KB 102.25 KB +20.00 B (+0.02%)
embedding.html 58.52 KB 58.54 KB +20.00 B (+0.03%)
environment_variables.html 43.02 KB 43.04 KB +20.00 B (+0.05%)
errors.html 456.16 KB 456.18 KB +20.00 B (+0.00%)
esm.html 152.24 KB 152.26 KB +20.00 B (+0.01%)
events.html 435.48 KB 435.50 KB +20.00 B (+0.00%)
fs.html 1.28 MB 1.28 MB +20.00 B (+0.00%)
globals.html 225.84 KB 225.86 KB +20.00 B (+0.01%)
http.html 703.16 KB 703.18 KB +20.00 B (+0.00%)
http2.html 732.85 KB 732.87 KB +20.00 B (+0.00%)
https.html 144.55 KB 144.57 KB +20.00 B (+0.01%)
index.html 35.24 KB 35.26 KB +20.00 B (+0.06%)
inspector.html 165.18 KB 165.20 KB +20.00 B (+0.01%)
intl.html 57.19 KB 57.21 KB +20.00 B (+0.03%)
module.html 311.51 KB 311.53 KB +20.00 B (+0.01%)
modules.html 175.77 KB 175.79 KB +20.00 B (+0.01%)
n-api.html 803.76 KB 803.78 KB +20.00 B (+0.00%)
net.html 351.02 KB 351.04 KB +20.00 B (+0.01%)
os.html 135.54 KB 135.56 KB +20.00 B (+0.01%)
packages.html 153.49 KB 153.51 KB +20.00 B (+0.01%)
path.html 132.36 KB 132.38 KB +20.00 B (+0.01%)
perf_hooks.html 367.04 KB 367.06 KB +20.00 B (+0.01%)
permissions.html 54.08 KB 54.10 KB +20.00 B (+0.04%)
process.html 649.45 KB 649.47 KB +20.00 B (+0.00%)
punycode.html 61.39 KB 61.41 KB +20.00 B (+0.03%)
querystring.html 61.01 KB 61.03 KB +20.00 B (+0.03%)
quic.html 354.05 KB 354.07 KB +20.00 B (+0.01%)
readline.html 238.79 KB 238.81 KB +20.00 B (+0.01%)
repl.html 176.00 KB 176.02 KB +20.00 B (+0.01%)
report.html 174.89 KB 174.91 KB +20.00 B (+0.01%)
single-executable-applications.html 103.87 KB 103.89 KB +20.00 B (+0.02%)
sqlite.html 248.01 KB 248.03 KB +20.00 B (+0.01%)
stream.html 818.67 KB 818.68 KB +20.00 B (+0.00%)
string_decoder.html 53.34 KB 53.36 KB +20.00 B (+0.04%)
synopsis.html 41.74 KB 41.76 KB +20.00 B (+0.05%)
test.html 698.88 KB 698.90 KB +20.00 B (+0.00%)
timers.html 124.84 KB 124.86 KB +20.00 B (+0.02%)
tls.html 348.70 KB 348.72 KB +20.00 B (+0.01%)
tracing.html 82.48 KB 82.50 KB +20.00 B (+0.02%)
tty.html 88.55 KB 88.57 KB +20.00 B (+0.02%)
typescript.html 52.51 KB 52.53 KB +20.00 B (+0.04%)
url.html 333.41 KB 333.43 KB +20.00 B (+0.01%)
util.html 652.37 KB 652.39 KB +20.00 B (+0.00%)
v8.html 304.12 KB 304.14 KB +20.00 B (+0.01%)
vm.html 349.03 KB 349.05 KB +20.00 B (+0.01%)
wasi.html 66.59 KB 66.61 KB +20.00 B (+0.03%)
webcrypto.html 520.66 KB 520.68 KB +20.00 B (+0.00%)
webstreams.html 336.88 KB 336.90 KB +20.00 B (+0.01%)
worker_threads.html 351.89 KB 351.91 KB +20.00 B (+0.01%)
zlib.html 276.71 KB 276.73 KB +20.00 B (+0.01%)
addons.js 299.72 KB 299.74 KB +15.00 B (+0.00%)
cli.js 325.74 KB 325.75 KB +15.00 B (+0.00%)
debugger.js 31.09 KB 31.11 KB +15.00 B (+0.05%)
deprecations.js 313.75 KB 313.77 KB +15.00 B (+0.00%)
environment_variables.js 15.13 KB 15.15 KB +15.00 B (+0.10%)
errors.js 413.90 KB 413.91 KB +15.00 B (+0.00%)
esm.js 139.78 KB 139.79 KB +15.00 B (+0.01%)
globals.js 141.34 KB 141.36 KB +15.00 B (+0.01%)
module.js 356.06 KB 356.07 KB +15.00 B (+0.00%)
modules.js 158.25 KB 158.26 KB +15.00 B (+0.01%)
n-api.js 721.30 KB 721.32 KB +15.00 B (+0.00%)
packages.js 126.24 KB 126.25 KB +15.00 B (+0.01%)
permissions.js 28.46 KB 28.47 KB +15.00 B (+0.05%)
report.js 188.54 KB 188.55 KB +15.00 B (+0.01%)
typescript.js 25.36 KB 25.38 KB +15.00 B (+0.06%)
webcrypto.js 464.93 KB 464.95 KB +15.00 B (+0.00%)
webstreams.js 320.77 KB 320.79 KB +15.00 B (+0.00%)
assert.js 467.59 KB 467.60 KB +10.00 B (+0.00%)
async_context.js 194.18 KB 194.19 KB +10.00 B (+0.01%)
async_hooks.js 201.30 KB 201.31 KB +10.00 B (+0.00%)
buffer.js 1.13 MB 1.13 MB +10.00 B (+0.00%)
child_process.js 489.12 KB 489.13 KB +10.00 B (+0.00%)
cluster.js 206.89 KB 206.90 KB +10.00 B (+0.00%)
console.js 114.73 KB 114.74 KB +10.00 B (+0.01%)
crypto.js 1.24 MB 1.24 MB +10.00 B (+0.00%)
dgram.js 185.13 KB 185.14 KB +10.00 B (+0.01%)
diagnostics_channel.js 255.87 KB 255.88 KB +10.00 B (+0.00%)
dns.js 292.44 KB 292.45 KB +10.00 B (+0.00%)
domain.js 93.08 KB 93.09 KB +10.00 B (+0.01%)
embedding.js 37.28 KB 37.29 KB +10.00 B (+0.03%)
events.js 575.77 KB 575.78 KB +10.00 B (+0.00%)
fs.js 1.33 MB 1.33 MB +10.00 B (+0.00%)
http.js 742.94 KB 742.95 KB +10.00 B (+0.00%)
http2.js 863.38 KB 863.39 KB +10.00 B (+0.00%)
https.js 166.45 KB 166.46 KB +10.00 B (+0.01%)
inspector.js 132.83 KB 132.84 KB +10.00 B (+0.01%)
intl.js 37.07 KB 37.08 KB +10.00 B (+0.03%)
net.js 321.67 KB 321.68 KB +10.00 B (+0.00%)
os.js 116.35 KB 116.36 KB +10.00 B (+0.01%)
path.js 105.32 KB 105.33 KB +10.00 B (+0.01%)
perf_hooks.js 406.03 KB 406.04 KB +10.00 B (+0.00%)
process.js 747.62 KB 747.63 KB +10.00 B (+0.00%)
punycode.js 30.24 KB 30.25 KB +10.00 B (+0.03%)
querystring.js 33.03 KB 33.04 KB +10.00 B (+0.03%)
quic.js 220.25 KB 220.26 KB +10.00 B (+0.00%)
readline.js 238.88 KB 238.89 KB +10.00 B (+0.00%)
repl.js 215.37 KB 215.38 KB +10.00 B (+0.00%)
single-executable-applications.js 88.42 KB 88.43 KB +10.00 B (+0.01%)
sqlite.js 253.13 KB 253.14 KB +10.00 B (+0.00%)
stream.js 909.94 KB 909.95 KB +10.00 B (+0.00%)
string_decoder.js 32.33 KB 32.34 KB +10.00 B (+0.03%)
synopsis.js 15.71 KB 15.72 KB +10.00 B (+0.06%)
test.js 902.85 KB 902.86 KB +10.00 B (+0.00%)
timers.js 107.83 KB 107.83 KB +10.00 B (+0.01%)
tls.js 349.36 KB 349.37 KB +10.00 B (+0.00%)
tracing.js 78.85 KB 78.86 KB +10.00 B (+0.01%)
tty.js 54.22 KB 54.23 KB +10.00 B (+0.02%)
url.js 354.93 KB 354.94 KB +10.00 B (+0.00%)
util.js 797.04 KB 797.05 KB +10.00 B (+0.00%)
v8.js 355.28 KB 355.29 KB +10.00 B (+0.00%)
vm.js 465.46 KB 465.47 KB +10.00 B (+0.00%)
wasi.js 44.80 KB 44.81 KB +10.00 B (+0.02%)
worker_threads.js 420.88 KB 420.89 KB +10.00 B (+0.00%)
zlib.js 334.44 KB 334.45 KB +10.00 B (+0.00%)
index.js 9.69 KB 9.69 KB -5.00 B (-0.05%)

@AugustinMauroy AugustinMauroy marked this pull request as draft March 5, 2026 09:22
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Introduces a “Stability Overview” table to the new web generator output, mirroring the legacy generator’s ability to render a stability summary on the “About”/documentation page when slot tags are present.

Changes:

  • Add StabilityOverview UI component (CSS + JSX) and register it in web JSX import mapping.
  • Precompute and pass stability overview entries through the jsx-ast generator pipeline, injecting the table when the slot tag is present.
  • Ensure the web generator creates the output directory before writing HTML/JS/CSS artifacts.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/generators/web/ui/components/StabilityOverview/index.module.css Adds minimal layout styling for the stability overview table and badge cell.
src/generators/web/ui/components/StabilityOverview/index.jsx Implements the stability overview table UI using Badge tooltips.
src/generators/web/generate.mjs Creates config.output directory before emitting generated files.
src/generators/web/constants.mjs Registers StabilityOverview in JSX_IMPORTS for bundling/import generation.
src/generators/jsx-ast/utils/buildContent.mjs Threads stability overview entries through processEntry and injects the component when slot tags are present.
src/generators/jsx-ast/generate.mjs Precomputes stability overview data once and passes it to workers via the extra stream context.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +280 to +284
content.children.push(
createJSXElement(JSX_IMPORTS.StabilityOverview.name, {
entries: stabilityOverviewEntries,
})
);
Copy link

Copilot AI Mar 5, 2026

Choose a reason for hiding this comment

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

processEntry() appends the <StabilityOverview /> element to content.children, which places the table at the end of the section. In the legacy HTML generator the stability overview is injected near the top of the target section (via buildExtraContent, before the rest of the nodes), so this likely changes the intended placement of the slot. Consider inserting the overview at a deterministic position (e.g., right after the section heading / before the main body), or otherwise aligning placement with the slot semantics used in legacy-html.

Suggested change
content.children.push(
createJSXElement(JSX_IMPORTS.StabilityOverview.name, {
entries: stabilityOverviewEntries,
})
);
const stabilityOverviewElement = createJSXElement(
JSX_IMPORTS.StabilityOverview.name,
{ entries: stabilityOverviewEntries }
);
// Insert stability overview near the top of the section, preferably right
// after the first heading node to align with legacy HTML placement.
if (Array.isArray(content.children) && content.children.length > 0) {
const headingIndex = content.children.findIndex(
node => node && node.type === 'heading'
);
const insertIndex = headingIndex >= 0 ? headingIndex + 1 : 0;
content.children.splice(insertIndex, 0, stabilityOverviewElement);
} else {
content.children = [stabilityOverviewElement];
}

Copilot uses AI. Check for mistakes.
Comment on lines +275 to +285
// Inject the stability overview table where the slot tag is present
if (
stabilityOverviewEntries.length &&
entry.tags.includes('STABILITY_OVERVIEW_SLOT_BEGIN')
) {
content.children.push(
createJSXElement(JSX_IMPORTS.StabilityOverview.name, {
entries: stabilityOverviewEntries,
})
);
}
Copy link

Copilot AI Mar 5, 2026

Choose a reason for hiding this comment

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

New stability-overview injection logic isn’t covered by unit tests. This file already has a test suite (utils/__tests__/buildContent.test.mjs), so adding a focused test that verifies the StabilityOverview element is included/excluded based on entry.tags would help prevent regressions.

Copilot uses AI. Check for mistakes.
<Badge
kind={STABILITY_KINDS[stabilityIndex]}
data-tooltip={STABILITY_TOOLTIPS[stabilityIndex]}
aria-label={`Stability: ${STABILITY_TOOLTIPS[stabilityIndex]}`}
Copy link

Copilot AI Mar 5, 2026

Choose a reason for hiding this comment

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

The stability badge is given a tooltip via data-tooltip, but it isn’t keyboard-focusable here. Other UI (e.g. MetaBar’s stability badge) sets tabIndex={0} so keyboard users can focus the badge and discover the tooltip. Consider adding tabIndex={0} (and, if applicable, matching the conditional aria-label pattern used elsewhere) to keep tooltip behavior accessible.

Suggested change
aria-label={`Stability: ${STABILITY_TOOLTIPS[stabilityIndex]}`}
aria-label={`Stability: ${STABILITY_TOOLTIPS[stabilityIndex]}`}
tabIndex={0}

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Generating the Stability Overview

2 participants