Skip to content

Bundle dashboard extension Node.js code into single app.js#42352

Merged
pelikhan merged 1 commit into
mainfrom
copilot/update-typescript-compilation-settings
Jun 29, 2026
Merged

Bundle dashboard extension Node.js code into single app.js#42352
pelikhan merged 1 commit into
mainfrom
copilot/update-typescript-compilation-settings

Conversation

Copilot AI commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

The build:ts script compiled each src/*.ts file to an individual root-level .js file, leaving 7 separate compiled artifacts tracked in git alongside app.js.

Changes

  • src/index.ts — barrel entry re-exporting the three symbols consumed by extension.mjs
  • tsconfig.emit.jsoninclude narrowed from src/**/*.ts["src/index.ts"]
  • package.jsonbuild:ts replaced with esbuild bundle command:
    esbuild src/index.ts --bundle --format=esm --target=es2022 --platform=node --outfile=app.js
    
  • extension.mjs — three separate imports collapsed into one from ./app.js
  • .gitignore — lists the 7 individual compiled files to prevent re-addition
  • Deleted dashboard-cli.js, dashboard-config.js, dashboard-data.js, dashboard-logs.js, models.js, pagination.js, usage-forecast.js

- 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 AI requested a review from pelikhan June 29, 2026 21:39
"main": "extension.mjs",
"description": "GitHub Copilot canvas extension for agentic workflows dashboard.",
"dependencies": {
"alpinejs": "^3.15.0"

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@copilot move as dev dependency

Copilot stopped work on behalf of pelikhan due to an error June 29, 2026 21:43
@pelikhan pelikhan marked this pull request as ready for review June 29, 2026 21:44
Copilot AI review requested due to automatic review settings June 29, 2026 21:44
@pelikhan pelikhan merged commit 370c362 into main Jun 29, 2026
@pelikhan pelikhan deleted the copilot/update-typescript-compilation-settings branch June 29, 2026 21:44
Copilot stopped reviewing on behalf of pelikhan due to an error June 29, 2026 21:44

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.ts into a single app.js (esbuild) and update extension.mjs imports 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;
}
@github-actions

Copy link
Copy Markdown
Contributor

🎉 This pull request is included in a new release.

Release: v0.82.1

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.

3 participants