Skip to content

Conversation

@Raubzeug
Copy link
Contributor

@Raubzeug Raubzeug commented Nov 28, 2025

CI Results

Test Status: ⚠️ FLAKY

📊 Full Report

Total Passed Failed Flaky Skipped
378 375 0 1 2
Test Changes Summary ⏭️2

⏭️ Skipped Tests (2)

  1. Scroll to row, get shareable link, navigate to URL and verify row is scrolled into view (tenant/diagnostics/tabs/queries.test.ts)
  2. Copy result button copies to clipboard (tenant/queryEditor/queryEditor.test.ts)

Bundle Size: ✅

Current: 66.06 MB | Main: 66.06 MB
Diff: +0.59 KB (0.00%)

✅ Bundle size unchanged.

ℹ️ CI Information
  • Test recordings for failed tests are available in the full report.
  • Bundle size is measured for the entire 'dist' directory.
  • 📊 indicates links to detailed reports.
  • 🔺 indicates increase, 🔽 decrease, and ✅ no change in bundle size.

@Raubzeug Raubzeug marked this pull request as ready for review November 28, 2025 15:08
Copilot AI review requested due to automatic review settings November 28, 2025 15:08
Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

3 files reviewed, 3 comments

Edit Code Review Agent Settings | Greptile

return Boolean(data || error);
}

export function useAllCapablitiesStatus() {
Copy link
Contributor

Choose a reason for hiding this comment

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

syntax: typo: 'Capablities' should be 'Capabilities'

Suggested change
export function useAllCapablitiesStatus() {
export function useAllCapabilitiesStatus() {
Prompt To Fix With AI
This is a comment left during a code review.
Path: src/store/reducers/capabilities/hooks.ts
Line: 33:33

Comment:
**syntax:** typo: 'Capablities' should be 'Capabilities'

```suggestion
export function useAllCapabilitiesStatus() {
```

How can I resolve this? If you propose a fix, please make it concise.

import {authenticationApi} from '../../store/reducers/authentication/authentication';
import {
useCapabilitiesQuery,
useAllCapablitiesStatus,
Copy link
Contributor

Choose a reason for hiding this comment

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

syntax: typo: 'Capablities' should be 'Capabilities'

Suggested change
useAllCapablitiesStatus,
useAllCapabilitiesStatus,
Prompt To Fix With AI
This is a comment left during a code review.
Path: src/containers/App/Content.tsx
Line: 17:17

Comment:
**syntax:** typo: 'Capablities' should be 'Capabilities'

```suggestion
    useAllCapabilitiesStatus,
```

How can I resolve this? If you propose a fix, please make it concise.

import {environment} from '../../store';
import {
useAddClusterFeatureAvailable,
useAllCapablitiesStatus,
Copy link
Contributor

Choose a reason for hiding this comment

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

syntax: typo: 'Capablities' should be 'Capabilities'

Suggested change
useAllCapablitiesStatus,
useAllCapabilitiesStatus,
Prompt To Fix With AI
This is a comment left during a code review.
Path: src/containers/Header/Header.tsx
Line: 22:22

Comment:
**syntax:** typo: 'Capablities' should be 'Capabilities'

```suggestion
    useAllCapabilitiesStatus,
```

How can I resolve this? If you propose a fix, please make it concise.

Copilot finished reviewing on behalf of Raubzeug November 28, 2025 15:11
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR addresses a timing issue where the Header component could render before capabilities data is fully loaded. A new custom hook useAllCapablitiesStatus centralizes the logic for checking both cluster and meta capabilities loading status, which is then used to conditionally render Header content.

Key changes:

  • Created a reusable hook to check the combined loading state of both capabilities queries
  • Modified Header to wait for capabilities to load before rendering its content
  • Refactored Content.tsx to use the new hook, eliminating code duplication

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.

File Description
src/store/reducers/capabilities/hooks.ts Introduces new hook useAllCapablitiesStatus to centralize capabilities loading state checking
src/containers/Header/Header.tsx Updates Header to wait for capabilities before rendering content using the new hook
src/containers/App/Content.tsx Refactors to use the new centralized hook, removing duplicated logic

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

3 files reviewed, no comments

Edit Code Review Agent Settings | Greptile

// It is always true if there is no meta, since request finishes with an error
const metaCapabilitiesLoaded = useMetaCapabilitiesLoaded();

const capabilitiesLoaded = Boolean(data || error);
Copy link
Member

Choose a reason for hiding this comment

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

There is hook useCapabilitiesLoaded for capabilities. So you can use:

useCapabilitiesQuery()
useMetaCapabilitiesQuery()

const capabilitiesLoaded = useCapabilitiesLoaded()
const metaCapabilitiesLoaded = useMetaCapabilitiesLoaded()

It doesn't change much, but it hide loading logic within one hook

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks! i've totally forgot abt this hook. Reworked logic a bit.

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

3 files reviewed, no comments

Edit Code Review Agent Settings | Greptile

@Raubzeug Raubzeug added this pull request to the merge queue Dec 1, 2025
Merged via the queue into main with commit a350ad5 Dec 1, 2025
9 checks passed
@Raubzeug Raubzeug deleted the header branch December 1, 2025 11:37
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