Skip to content

Add build/commit identity to standalone page and diagnostics - #1916

Merged
Stephen Griffin (stephenegriffin) merged 3 commits into
mainfrom
u/sgriffin/version
Aug 12, 2026
Merged

Add build/commit identity to standalone page and diagnostics#1916
Stephen Griffin (stephenegriffin) merged 3 commits into
mainfrom
u/sgriffin/version

Conversation

@stephenegriffin

Copy link
Copy Markdown
Member
  • Introduce BuildInfo module with buildNumber, commit, and builtAt, populated from MHA_BUILD_NUMBER and SCM_COMMIT_ID or from local git HEAD when unset. Fail fast on missing/malformed pipeline input.
  • Emit Pages/build-info.json from the same metadata so support can verify a deployed build without loading the app.
  • Add a small About dialog to the standalone page showing build, commit (linked to GitHub), and built-at; move the feedback link into it.
  • Diagnostics now report Build, Commit/Base commit, and Built, replacing the old mhaVersion hash and Last Update.
  • Remove the custom commit-hash asset directory; slot swap and existing Web.config no-cache handle deployment identity.
  • Drop buildTime.ts, mhaVersion.ts, and their DefinePlugin globals.

- Introduce BuildInfo module with buildNumber, commit, and builtAt,
  populated from MHA_BUILD_NUMBER and SCM_COMMIT_ID or from local
  git HEAD when unset. Fail fast on missing/malformed pipeline input.
- Emit Pages/build-info.json from the same metadata so support can
  verify a deployed build without loading the app.
- Add a small About dialog to the standalone page showing build,
  commit (linked to GitHub), and built-at; move the feedback link
  into it.
- Diagnostics now report Build, Commit/Base commit, and Built,
  replacing the old mhaVersion hash and Last Update.
- Remove the custom commit-hash asset directory; slot swap and
  existing Web.config no-cache handle deployment identity.
- Drop buildTime.ts, mhaVersion.ts, and their DefinePlugin globals.

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

This PR adds first-class build identity metadata (build number, commit SHA, built-at timestamp) to the standalone experience and diagnostics, and exposes the same metadata as a deploy-time JSON artifact for supportability.

Changes:

  • Inject a mhaBuildInfo global at build time (from pipeline env or local Git HEAD) and emit Pages/build-info.json.
  • Add a standalone “About” dialog that surfaces build/commit/built-at (with commit linking to GitHub).
  • Replace prior mhaVersion / Last Update diagnostics fields with build/commit/built-at fields and remove old version/build-time modules.

Reviewed changes

Copilot reviewed 14 out of 15 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
webpack.config.js Computes build metadata, injects mhaBuildInfo, emits build-info.json, and removes hashed asset paths.
src/Scripts/ui/StandaloneAbout.ts New About dialog wiring for standalone page using injected build metadata.
src/Scripts/ui/StandaloneAbout.test.ts Adds unit test coverage for About dialog behavior.
src/Scripts/ui/mha.ts Loads fluent dialog component and initializes the About dialog on DOM ready.
src/Scripts/mhaVersion.ts Removes old DefinePlugin-driven version hash module.
src/Scripts/Diag.ts Switches diagnostics to report build/commit/built-at via BuildInfo.
src/Scripts/buildTime.ts Removes old DefinePlugin-driven build time module.
src/Scripts/BuildInfo.ts New module providing typed accessors for build metadata and commit URL.
src/Scripts/BuildInfo.test.ts Adds unit test coverage for the BuildInfo helpers.
src/Pages/mha.html Adds About dialog markup and replaces the old feedback link placement.
src/Content/classicDesktopFrame.css Styles the About link/button and dialog layout.
README.md Documents new build identity behavior and the /Pages/build-info.json endpoint.
jest.config.ts Adds Jest globals for mhaBuildInfo to run tests outside webpack.
index.d.ts Declares the mhaBuildInfo global for TypeScript.
eslint.config.js Updates ESLint globals to reflect the new webpack-defined constant.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread webpack.config.js Outdated
Comment thread webpack.config.js
Comment thread src/Scripts/ui/StandaloneAbout.ts
Comment thread src/Scripts/ui/StandaloneAbout.ts
Comment thread src/Scripts/Diag.ts
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Stephen Griffin <stephenegriffin@users.noreply.github.com>
@stephenegriffin
Stephen Griffin (stephenegriffin) merged commit 49232e1 into main Aug 12, 2026
7 checks passed
@stephenegriffin
Stephen Griffin (stephenegriffin) deleted the u/sgriffin/version branch August 12, 2026 15:08
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