Add build/commit identity to standalone page and diagnostics - #1916
Merged
Conversation
Stephen Griffin (stephenegriffin)
commented
Aug 12, 2026
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 started reviewing on behalf of
Stephen Griffin (stephenegriffin)
August 12, 2026 13:39
View session
Contributor
There was a problem hiding this comment.
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
mhaBuildInfoglobal at build time (from pipeline env or local Git HEAD) and emitPages/build-info.json. - Add a standalone “About” dialog that surfaces build/commit/built-at (with commit linking to GitHub).
- Replace prior
mhaVersion/Last Updatediagnostics 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.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Signed-off-by: Stephen Griffin <stephenegriffin@users.noreply.github.com>
bwittgen
approved these changes
Aug 12, 2026
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.