Skip to content

Fix ui-quality regression blocking PR validation #975

@Cataldir

Description

@Cataldir

Problem statement

The ui-quality job in the test workflow is failing on PR #974 even though the PR does not modify apps/ui. Recent main runs for the same workflow have also failed, so this appears to be existing UI/test drift rather than a regression introduced by the continuous agent evaluation engine.

Current failing assertions from ui-quality include:

  • tests/unit/pagesRender.test.tsx: TypeError: (0 , _useCart.useAddToCart) is not a function from ProductPageClient.tsx.
  • tests/unit/pagesRender.test.tsx: expected Addresses tab is not found.
  • tests/unit/pagesRender.test.tsx: expected campaign text is not found.
  • tests/unit/apiClientMockAuth.test.ts: expected empty API base URL but received http://localhost:8000.
  • tests/unit/productService.test.ts: expected /ecommerce-product-detail-enrichment/invoke call with { sku: "sku-1" }, but no call was made.

Acceptance criteria checklist

  • apps/ui unit tests pass locally with the same command used by ui-quality.
  • The ui-quality GitHub Actions job passes on a PR branch.
  • Cart hook mocks expose useAddToCart consistently with the production hook contract.
  • Page render tests are updated to match current UI copy and tab semantics, or the UI restores the expected accessible labels.
  • API client tests explicitly control environment variables so default API URL behavior is deterministic.
  • Product service tests verify the current enrichment invoke behavior or restore the missing call.

Risks and dependencies

  • This blocks otherwise unrelated PRs from merging when branch protection requires ui-quality.
  • The failure spans mocks, page render expectations, environment defaults, and product service behavior, so the fix should stay isolated to apps/ui test fixtures and affected UI service code.
  • Coordinate with frontend/UI owners before changing user-facing copy or navigation semantics.

Evidence links

ADR impact

No ADR impact expected. This is a UI test/runtime regression fix and does not change deployment strategy, agent architecture, evaluation contracts, or service communication policy.

BPMN process

%%{init: {'theme':'base', 'themeVariables': {
  'primaryColor':'#FFB3BA',
  'primaryTextColor':'#000',
  'primaryBorderColor':'#FF8B94',
  'lineColor':'#BAE1FF',
  'secondaryColor':'#BAE1FF',
  'tertiaryColor':'#FFFFFF'
}}}%%
flowchart LR
  A[Analyze Current Code] --> B[Design Change]
  B --> C[Implement on Issue Branch]
  C --> D[Open PR]
  D --> E[Validation and Fixes]
  E --> F[Merge to Main]
  F --> G[Monitor Workflows]
  G --> H[Close Issue and Cleanup]
Loading

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingci-cdCI/CD pipeline and workflow issuescomponent:ui-platformUI platform componentpriority:p1High prioritytype:frontendFrontend implementationtype:testTesting work

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions