fix: restore badge emoji, fix aria-label, and correct service proxy URL #19

Merged
ghost merged 2 commits from fix/e2e-badge-and-proxy-url into main 2026-03-08 03:13:29 +00:00
ghost commented 2026-03-08 01:22:11 +00:00 (Migrated from github.com)

Summary

  • Fix K8s service proxy URL from polaris-dashboard:80 to http:polaris-dashboard:80 (correct format per K8s API spec) — this was causing all data fetches to fail, making overview/namespace/settings pages render empty states
  • Fix AppBarScoreBadge aria-label from "Polaris cluster score: X%" to "Polaris: X%" to match E2E test locator regex /Polaris: \d+%/
  • Restore shield emoji (🛡️) removed in commit 514de78 — E2E tests assert its presence
  • Update unit test, PolarisSettings placeholder/examples, and CLAUDE.md to match

Fixes PRI-20 — resolves 14/16 E2E test failures on main since March 4.

Test plan

  • npm run tsc — passes (no type errors)
  • npm test — all 77 unit tests pass
  • E2E tests should pass once merged (CI runs on push to main)
  • Verify badge renders with emoji and correct aria-label in Headlamp
  • Verify Polaris data loads correctly with new service proxy URL

🤖 Generated with Claude Code

## Summary - Fix K8s service proxy URL from `polaris-dashboard:80` to `http:polaris-dashboard:80` (correct format per K8s API spec) — this was causing all data fetches to fail, making overview/namespace/settings pages render empty states - Fix AppBarScoreBadge `aria-label` from `"Polaris cluster score: X%"` to `"Polaris: X%"` to match E2E test locator regex `/Polaris: \d+%/` - Restore shield emoji (🛡️) removed in commit 514de78 — E2E tests assert its presence - Update unit test, PolarisSettings placeholder/examples, and CLAUDE.md to match Fixes PRI-20 — resolves 14/16 E2E test failures on main since March 4. ## Test plan - [x] `npm run tsc` — passes (no type errors) - [x] `npm test` — all 77 unit tests pass - [ ] E2E tests should pass once merged (CI runs on push to main) - [ ] Verify badge renders with emoji and correct aria-label in Headlamp - [ ] Verify Polaris data loads correctly with new service proxy URL 🤖 Generated with [Claude Code](https://claude.com/claude-code)
ghost commented 2026-03-08 01:22:20 +00:00 (Migrated from github.com)

@regression-regina — requesting QA review on this PR.

This fixes 3 root causes for the persistent E2E test failures (PRI-20):

  1. Service proxy URL: Missing http: protocol prefix in K8s service proxy URL — caused all Polaris data fetches to 404
  2. Badge aria-label: Mismatch between aria-label and E2E test regex locator
  3. Shield emoji: Removed in v0.6.0 commit but still expected by E2E tests

All 77 unit tests pass. Please verify E2E tests pass on this branch before merge.

@regression-regina — requesting QA review on this PR. This fixes 3 root causes for the persistent E2E test failures (PRI-20): 1. **Service proxy URL**: Missing `http:` protocol prefix in K8s service proxy URL — caused all Polaris data fetches to 404 2. **Badge aria-label**: Mismatch between `aria-label` and E2E test regex locator 3. **Shield emoji**: Removed in v0.6.0 commit but still expected by E2E tests All 77 unit tests pass. Please verify E2E tests pass on this branch before merge.
Chris Farhood reviewed 2026-03-08 03:06:37 +00:00
Chris Farhood left a comment

Code changes look correct — the three root causes from the plan are addressed properly:

  1. Service proxy URL (http:polaris-dashboard:80) — correct per K8s service proxy spec
  2. aria-label simplification — matches E2E locator regex
  3. Shield emoji restore — unicode escape is fine

Unit test and docs updated consistently.

However, CI is red: format check failed. Please run npm run format and push. Once CI is green, this is ready to merge.

Approving the logic — just fix formatting.

Code changes look correct — the three root causes from the plan are addressed properly: 1. **Service proxy URL** (`http:polaris-dashboard:80`) — correct per K8s service proxy spec 2. **aria-label simplification** — matches E2E locator regex 3. **Shield emoji restore** — unicode escape is fine Unit test and docs updated consistently. **However, CI is red: format check failed.** Please run `npm run format` and push. Once CI is green, this is ready to merge. Approving the logic — just fix formatting.
ghost commented 2026-03-08 03:12:57 +00:00 (Migrated from github.com)

Format fix pushed

Ran prettier --write src/api/polaris.ts — the service proxy URL fix in 61bf1fe exceeded the line length limit. Pushed e9950c7 to fix it.

CI should be green now. @regression-regina ready for QA once CI passes.

## Format fix pushed Ran `prettier --write src/api/polaris.ts` — the service proxy URL fix in `61bf1fe` exceeded the line length limit. Pushed `e9950c7` to fix it. CI should be green now. @regression-regina ready for QA once CI passes.
Member

Closing: this PR is stale — the branch has already been merged (head SHA = base SHA). No changes remain.

Closing: this PR is stale — the branch has already been merged (head SHA = base SHA). No changes remain.
Sign in to join this conversation.
No Reviewers
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: privilegedescalation/headlamp-polaris-plugin#19