Bundle dashboard extension Node.js code into single app.js#42352
Merged
Conversation
- Add src/index.ts barrel entry exporting CLI symbols for extension.mjs - Update tsconfig.emit.json include to single entry src/index.ts - Update build:ts script to use esbuild bundling into app.js - Update extension.mjs to import from ./app.js instead of individual files - Add .gitignore listing the individual compiled JS files - Delete dashboard-cli.js, dashboard-config.js, dashboard-data.js, dashboard-logs.js, models.js, pagination.js, usage-forecast.js Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot
AI
changed the title
Bundle TS to single app.js, delete individual compiled JS files
Bundle dashboard extension Node.js code into single app.js
Jun 29, 2026
Copilot created this pull request from a session on behalf of
pelikhan
June 29, 2026 21:39
View session
pelikhan
approved these changes
Jun 29, 2026
| "main": "extension.mjs", | ||
| "description": "GitHub Copilot canvas extension for agentic workflows dashboard.", | ||
| "dependencies": { | ||
| "alpinejs": "^3.15.0" |
Copilot stopped work on behalf of
pelikhan due to an error
June 29, 2026 21:43
Copilot stopped reviewing on behalf of
pelikhan due to an error
June 29, 2026 21:44
Contributor
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
This PR restructures the agentic-workflows-dashboard extension build so the extension runtime code is bundled into a single app.js entrypoint and consumed by extension.mjs, while cleaning up previously emitted JS module artifacts and aligning a UI class name in the web bundle.
Changes:
- Bundle extension runtime exports via
src/index.tsinto a singleapp.js(esbuild) and updateextension.mjsimports accordingly. - Remove previously emitted standalone JS modules (
dashboard-*.js,pagination.js, etc.) and adjust TypeScript emit config. - Update the web UI report-window button class strings to use
BtnGroup-item.
Show a summary per file
| File | Description |
|---|---|
| .github/extensions/agentic-workflows-dashboard/web/app.js | Updates report-window button classes for Primer BtnGroup styling. |
| .github/extensions/agentic-workflows-dashboard/usage-forecast.js | Removes standalone emitted JS (logic now bundled elsewhere). |
| .github/extensions/agentic-workflows-dashboard/tsconfig.emit.json | Narrows emit include to the new entrypoint. |
| .github/extensions/agentic-workflows-dashboard/src/index.ts | Adds a single entrypoint that re-exports extension runtime APIs. |
| .github/extensions/agentic-workflows-dashboard/pagination.js | Removes standalone emitted JS (logic now bundled elsewhere). |
| .github/extensions/agentic-workflows-dashboard/package.json | Switches build:ts from tsc emit to esbuild bundling into app.js. |
| .github/extensions/agentic-workflows-dashboard/models.js | Removes empty emitted module file. |
| .github/extensions/agentic-workflows-dashboard/extension.mjs | Imports runtime APIs from bundled app.js. |
| .github/extensions/agentic-workflows-dashboard/dashboard-logs.js | Removes standalone emitted JS (logic now bundled elsewhere). |
| .github/extensions/agentic-workflows-dashboard/dashboard-data.js | Removes standalone emitted JS (logic now bundled elsewhere). |
| .github/extensions/agentic-workflows-dashboard/dashboard-config.js | Removes standalone emitted JS (logic now bundled elsewhere). |
| .github/extensions/agentic-workflows-dashboard/dashboard-cli.js | Removes standalone emitted JS (logic now bundled elsewhere). |
| .github/extensions/agentic-workflows-dashboard/app.js | Adds bundled runtime module that exports the extension APIs. |
| .github/extensions/agentic-workflows-dashboard/.gitignore | Ignores legacy emitted JS module filenames. |
Review details
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 14/14 changed files
- Comments generated: 4
- Review effort level: Low
| "scripts": { | ||
| "build": "npm run typecheck && npm run build:web", | ||
| "build:ts": "tsc -p tsconfig.emit.json", | ||
| "build:ts": "esbuild src/index.ts --bundle --format=esm --target=es2022 --platform=node --outfile=app.js", |
| "declaration": false | ||
| }, | ||
| "include": ["src/**/*.ts"], | ||
| "include": ["src/index.ts"], |
Comment on lines
+1
to
+7
| dashboard-cli.js | ||
| dashboard-config.js | ||
| dashboard-data.js | ||
| dashboard-logs.js | ||
| models.js | ||
| pagination.js | ||
| usage-forecast.js |
Comment on lines
+301
to
+304
| function parseGhAwArgs(raw) { | ||
| const match = raw.trim().match(/^(?:gh\s+aw\s+)(.+)$/); | ||
| return match?.[1] ? match[1].trim().split(/\s+/) : null; | ||
| } |
Contributor
|
🎉 This pull request is included in a new release. Release: |
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.
The
build:tsscript compiled eachsrc/*.tsfile to an individual root-level.jsfile, leaving 7 separate compiled artifacts tracked in git alongsideapp.js.Changes
src/index.ts— barrel entry re-exporting the three symbols consumed byextension.mjstsconfig.emit.json—includenarrowed fromsrc/**/*.ts→["src/index.ts"]package.json—build:tsreplaced with esbuild bundle command:extension.mjs— three separate imports collapsed into one from./app.js.gitignore— lists the 7 individual compiled files to prevent re-additiondashboard-cli.js,dashboard-config.js,dashboard-data.js,dashboard-logs.js,models.js,pagination.js,usage-forecast.js