Skip to content

feat(QOV-1794): Managed API token & AI Copilot role#2649

Open
killiancolla wants to merge 1 commit intonew-navigationfrom
feat/QOV-1794/role-token-auth
Open

feat(QOV-1794): Managed API token & AI Copilot role#2649
killiancolla wants to merge 1 commit intonew-navigationfrom
feat/QOV-1794/role-token-auth

Conversation

@killiancolla
Copy link
Copy Markdown
Member

Summary

Issue: QOV-1794

Added a new way to authenticate with the copilot using a role-linked token.

Screenshots / Recordings

Before After
Capture d’écran 2026-04-30 à 17 59 28 Capture d’écran 2026-04-30 à 17 59 41

Testing

  • Changes tested locally in the relevant Console's pages and Storybooks
  • yarn test or yarn test -u (if you need to regenerate snapshots)
  • yarn format
  • yarn lint

PR Checklist

  • I followed naming, styling, and TypeScript rules (see .cursor/rules)
  • I performed a self-review (diff inspected, dead code removed)
  • I titled the PR using Conventional Commits with a scope when possible (e.g. feat(service): add new Terraform service) - required for semantic-release
  • I only kept necessary comments, written in English (watch for useless AI comments)
  • I involved a designer to validate UI changes if I am not a designer
  • I covered new business logic with tests (unit)
  • I confirmed CI is green (Codecov red can be accepted)
  • I reviewed and executed locally any AI-assisted code

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 30, 2026

Codecov Report

❌ Patch coverage is 16.66667% with 20 lines in your changes missing coverage. Please review.
✅ Project coverage is 44.97%. Comparing base (598c863) to head (a6a80ae).
⚠️ Report is 3 commits behind head on new-navigation.

Files with missing lines Patch % Lines
...ai-copilot-config/use-update-ai-copilot-config.tsx 0.00% 9 Missing ⚠️
...ure/src/lib/devops-copilot-panel/submit-message.ts 0.00% 5 Missing and 1 partial ⚠️
...configuration/section-ai-copilot-configuration.tsx 25.00% 2 Missing and 1 partial ⚠️
...rc/lib/ai-copilot-settings/ai-copilot-settings.tsx 50.00% 1 Missing ⚠️
...s/use-message-submission/use-message-submission.ts 66.66% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@                Coverage Diff                 @@
##           new-navigation    #2649      +/-   ##
==================================================
+ Coverage           44.92%   44.97%   +0.05%     
==================================================
  Files                1135      787     -348     
  Lines               23773    19031    -4742     
  Branches             6898     5582    -1316     
==================================================
- Hits                10679     8560    -2119     
+ Misses              11221     8961    -2260     
+ Partials             1873     1510     -363     
Flag Coverage Δ
unittests 44.97% <16.66%> (+0.05%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Copy Markdown
Member

@RemiBonnet RemiBonnet left a comment

Choose a reason for hiding this comment

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

Thanks @killiancolla and I added small comments!

const errorBody = await response.json()
if (errorBody?.error) errorMessage = errorBody.error
// eslint-disable-next-line no-empty
} catch (_) {}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Could you avoid adding linter disabling here?

} catch (error) {
if (error && typeof error === 'object' && 'response' in error) {
const axiosError = error as { response?: { data?: { error?: string } } }
const backendMessage = axiosError.response?.data?.error
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I'm not sure to understand why do you need to add it ?
console.error('Error', error) should be enough no?

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