Skip to content

Remove axios dependencies from ALIA UI#1830

Merged
TamiTakamiya merged 2 commits intomainfrom
TamiTakamiya/AAP-60189/remove-axios-dependency
Jan 29, 2026
Merged

Remove axios dependencies from ALIA UI#1830
TamiTakamiya merged 2 commits intomainfrom
TamiTakamiya/AAP-60189/remove-axios-dependency

Conversation

@TamiTakamiya
Copy link
Contributor

@TamiTakamiya TamiTakamiya commented Jan 29, 2026

Jira Issue: https://issues.redhat.com/browse/AAP-60189

Assisted-by: Claude Code
Generated by: Claude Code

Description

Testing

Steps to test

  1. Pull down the PR
  2. ...
  3. ...

Type of Change

  • Bug fix (non-breaking change fixing an issue)
  • New feature (non-breaking change adding functionality)
  • Breaking change (fix or feature causing existing functionality to break)
  • Security fix
  • Performance improvement
  • Code refactoring
  • Documentation update
  • CI/CD update

Backport Policy

This change should be:

  • Not backported - main/master only
  • Backported to specific releases (add labels after merge)

Automated Backport Instructions

After this PR is merged, add one or more labels to automatically create backport PRs:

  • backport/stable-2.4 - Backport to stable-2.4 branch
  • backport/stable-2.5 - Backport to stable-2.5 branch
  • backport/stable-2.6 - Backport to stable-2.6 branch
  • backport/all - Backport to all active stable branches
  • no-backport - Explicitly mark as not needing backport

Backport Justification

Special backport considerations:

Scenarios tested

Production deployment

  • This code change is ready for production on its own
  • This code change requires the following considerations before going to production:

Note

Medium Risk
Moderate risk because it changes core network/request behavior (timeouts, error detection, request payload formatting) and could subtly affect production API interactions despite tests being updated.

Overview
Replaces axios with the native fetch API across both chatbot UIs, updating the chat request, feedback submission, and health-check calls (including adding an AbortController-based timeout for non-streaming chat and mapping timeout/429 error handling to fetch semantics).

Removes the axios dependency from both package.json/lockfiles, updates unit tests to mock global.fetch instead of axios (including a new stringified-body matcher), and adds a small guard in ReferencedDocuments to safely handle non-array referenced_documents.

Written by Cursor Bugbot for commit b762993. This will update automatically on new commits. Configure here.

@github-actions
Copy link

# npm audit report

lodash  4.0.0 - 4.17.21
Severity: moderate
Lodash has Prototype Pollution Vulnerability in `_.unset` and `_.omit` functions - https://github.com/advisories/GHSA-xxjr-mmjv-4gpg
fix available via `npm audit fix`
node_modules/lodash

1 moderate severity vulnerability

To address all issues, run:
  npm audit fix

@TamiTakamiya TamiTakamiya force-pushed the TamiTakamiya/AAP-60189/remove-axios-dependency branch from 23dc53b to d2e9157 Compare January 29, 2026 02:24
@TamiTakamiya TamiTakamiya force-pushed the TamiTakamiya/AAP-60189/remove-axios-dependency branch from d2e9157 to 90bdc9e Compare January 29, 2026 02:24
@TamiTakamiya TamiTakamiya changed the title Remove axios dependencies Remove axios dependencies from ALIA UI Jan 29, 2026
@TamiTakamiya TamiTakamiya marked this pull request as ready for review January 29, 2026 14:09
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 2 potential issues.

"streaming-chatbot-service": "disabled",
}),
} as Response);
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GET mock logic duplicated within mockFetchPost function

Low Severity

The mockFetchPost function duplicates the entire GET request handling logic from mockFetchGet (lines 13-25 in mockFetchGet are copied to lines 33-46 in mockFetchPost). This internal redundancy within the same file means changes to GET mock behavior require updates in two places, increasing risk of inconsistency.

Additional Locations (1)

Fix in Cursor Fix in Web

});
return { pass, message };
},
});
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Duplicated custom vitest matcher across test files

Low Severity

The objectStringContaining custom vitest matcher is identically duplicated in both aap_chatbot/src/App.test.tsx and ansible_ai_connect_chatbot/src/App.test.tsx. This matcher could be extracted to a shared test utilities file to reduce maintenance burden and ensure consistent behavior across both packages.

Additional Locations (1)

Fix in Cursor Fix in Web

@sonarqubecloud
Copy link

@TamiTakamiya TamiTakamiya merged commit c7e9389 into main Jan 29, 2026
13 checks passed
@TamiTakamiya TamiTakamiya deleted the TamiTakamiya/AAP-60189/remove-axios-dependency branch January 29, 2026 15:23
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.

2 participants

Comments