Skip to content

Add configurable environment badge beside the header brand - #1743

Merged
David Pine (IEvangelist) merged 4 commits into
mainfrom
ievangelist-environment-badge
Sep 24, 2026
Merged

David Pine (IEvangelist) merged 4 commits into
mainfrom
ievangelist-environment-badge

Conversation

@IEvangelist

Copy link
Copy Markdown
Member

Summary

  • Add a small text badge beside the header logo and wordmark, configured by PUBLIC_ENVIRONMENT_BADGE at frontend build time.
  • Default to localhost during local development; omit the badge for production builds when unset or explicitly empty.
  • Preserve the mobile wordmark, support light/dark themes, and truncate long labels without displacing navigation.
  • Document configuration and cover environment defaults, overrides, blank values, and HTML escaping.

Merge into public main, then bring the change into release/13.6. A separate Azure DevOps PR against deploy-vnext-release will configure the vnext build label; live builds remain unchanged.

Third-party links and affiliations

None.

Validation

  • Targeted Vitest render suite: 10 tests passed.
  • ESLint passed for the added test; Astro component formatted with Prettier.
  • Browser verification of localhost and release labels on the homepage and docs, desktop/mobile widths, and light/dark themes.
  • git diff --check passed.
  • No local production build.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI lite review requested due to automatic review settings September 24, 2026 17:22

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.

Copilot review overview

🟢 Approval recommended

No unresolved blocking issues were identified.

Review effort: Lite
Findings: None

What changed in this PR

Adds a configurable environment badge beside the header brand, with responsive styling, safe escaping, tests, and documentation.

Changes:

  • Supports PUBLIC_ENVIRONMENT_BADGE with local-development defaults.
  • Adds theme-aware styling and label truncation.
  • Adds unit coverage and configuration guidance.
File Description
src/​frontend/​tests/​unit/​header-environment-badge.vitest.test.ts Tests defaults, overrides, blank values, trimming, and escaping.
src/​frontend/​src/​components/​starlight/​Header.astro Renders and styles the environment badge.
CONTRIBUTING.md Documents environment badge configuration and deployment usage.

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

@aspire-repo-bot

Copy link
Copy Markdown
Contributor

Frontend HTML artifact ready

The latest frontend build uploaded the frontend-dist artifact for PR #1743. Use the VS Code button below to open this PR with GitHub Artifacts Explorer and browse the built HTML locally.

VS Code: Open PR #1743 artifacts

This comment updates automatically when a new frontend build artifact is uploaded.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@IEvangelist
David Pine (IEvangelist) merged commit 87a1262 into main Sep 24, 2026
14 checks passed
@IEvangelist
David Pine (IEvangelist) deleted the ievangelist-environment-badge branch September 24, 2026 19:28
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