Skip to content

Conversation

@richard-cox
Copy link
Member

@richard-cox richard-cox commented Oct 3, 2025

Summary

Fixes #15570

Occurred changes and/or fixed issues

  • if the total cluster count exceeds 100(?) show alt list that's populated with latest 50(?) clusters
  • alt list does local pagination
image image

Technical notes summary

Areas or cases that should be tested

vai off

  • home page normal cluster list is displayed
  • changing sort / search does not result in API request

vai on - cluster count is over threshold of 10

  • create at least 10 custom / imported clusters (do not need to connect to real clusters)
  • apply the following value to /v3/settings/ui-performance,
{"inactivity":{"enabled":false,"threshold":900},"incrementalLoading":{"enabled":false,"threshold":1500},"manualRefresh":{"enabled":false,"threshold":1500},"disableWebsocketNotification":true,"garbageCollection":{"enabled":false,"enabledInterval":true,"interval":300,"enabledOnNavigate":true,"ageThreshold":120,"countThreshold":500},"forceNsFilterV2":{"enabled":false},"advancedWorker":{"enabled":false},"kubeAPI":{"warningHeader":{"separator":"299 - ","notificationBlockList":["299 - unknown field"]}},"serverPagination":{"useDefaultStores":true,"resourceChangesDebounceMs":4000,"features":{ "homePageCluster": { "version":       1, "enabled":       true, "configuration": { "threshold": 10, "results": 8, "pagesPerRow": 5 }}}}}
  • home page alt table shown - Showing x of y message visible, age column visible
  • changing sort / search does not result in API request

vai on - cluster count is below threshold of 100

  • Update ui-performance setting with
{"inactivity":{"enabled":false,"threshold":900},"incrementalLoading":{"enabled":false,"threshold":1500},"manualRefresh":{"enabled":false,"threshold":1500},"disableWebsocketNotification":true,"garbageCollection":{"enabled":false,"enabledInterval":true,"interval":300,"enabledOnNavigate":true,"ageThreshold":120,"countThreshold":500},"forceNsFilterV2":{"enabled":false},"advancedWorker":{"enabled":false},"kubeAPI":{"warningHeader":{"separator":"299 - ","notificationBlockList":["299 - unknown field"]}},"serverPagination":{"useDefaultStores":true,"resourceChangesDebounceMs":4000,"features":{ "homePageCluster": { "version":       1, "enabled":       true, "configuration": { "threshold": 100, "results": 8, "pagesPerRow": 5 }}}}}
  • home page normal cluster list is displayed - Showing x message visible, age column not visible
  • changing sort / search does not result in API request

Areas which could experience regressions

no others outside of above tests

Previous Versions

1

image

2

image image

3

image image

Checklist

  • The PR is linked to an issue and the linked issue has a Milestone, or no issue is needed
  • The PR has a Milestone
  • The PR template has been filled out
  • The PR has been self reviewed
  • The PR has a reviewer assigned
  • The PR has automated tests or clear instructions for manual tests and the linked issue has appropriate QA labels, or tests are not needed
  • The PR has reviewed with UX and tested in light and dark mode, or there are no UX changes
  • The PR has been reviewed in terms of Accessibility

- move out watch event stuff into own file
- improve typing
- start resolving core unwatch & unwatchIncompatible of side nav cluster watches (not going to store) being seen as incompatible with find cluster action that does go into store
instead of upfront unwatch with lots of complicated logic... only do it if we hit the issue (i.e. no page entry into page )
- we don't always have the mgmt cluster, so take this into account
  - i've checked all usages of `['management/byId'](MANAGEMENT.CLUSTER`
- more comments
- rename of method to something more sensisble
@richard-cox richard-cox added this to the v2.13.0 milestone Oct 3, 2025
@richard-cox richard-cox self-assigned this Oct 3, 2025
- show alt list only if vai is on and there's more than X total clusters
- list contains Y rows fetched via vai requested (capped and sorted)
@richard-cox richard-cox changed the title Pagination home page alt list Show alternative small scale home page clusters list Oct 3, 2025
- show toggle (persist over reloads) to use full list
- adds sortabletable sub-header-row slot
- uses preset to persist component settings to local storage
@richard-cox richard-cox force-pushed the pagination-home-page-alt-list branch from 837100b to 4e45ae6 Compare October 10, 2025 12:28
@richard-cox richard-cox force-pushed the pagination-home-page-alt-list branch from 751c3ce to 5803c9f Compare October 14, 2025 10:49
@richard-cox richard-cox requested a review from aalves08 October 16, 2025 08:09
@richard-cox richard-cox marked this pull request as ready for review October 16, 2025 08:09
Copy link
Member

@aalves08 aalves08 left a comment

Choose a reason for hiding this comment

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

@richard-cox didn't look at the code yet but gave it a test using your test cases as base. Here are the findings (all of this was tested in a Rancher system provisioned today - image is probably 12h old or around that time - v2.13-2e0b008dace3cc7ba6de6b74cd91f95275ac52bb-head):

  • Created 12 custom clusters

  • "Normal" settings (didn't change any setting, vai is on by default when rancher is provisioned:

normal-view-before-settings-change-has-vai-on-by-default

Seems to be fine though, I would say. Sorting doesn't trigger any XHR requests

  • vai on, cluster threshold below 10:
cluster-count-over-10

met the conditions:

  • alt table shown - Showing x of y message visible, age column visible
  • changing sort / search does not result in API request

So I would say, looks fine

  • vai on, cluster threshold below 100:
vai-on-below-100 vai-on-below-100-setting

I don't see any "Showing x message visible". Sorting does not trigger any XHR requests

  • Vai off:
vai-off
  • no age col
  • no XHR requests with sorting

Overall
There's something weird with that message part... I haven't yet looked at with a standard user, but I was logged in as a base user when I ran your branch for the first time (vai on, no setting change) and the cluster list did not appear and it had an error on the console...

Could you define more clearly what is test 1, 2 and 3 on the test cases of your PR body so that I can compare better with the screenshots? not only that but the test cases are all text next to one another, so it's kinda confusing to check where one test case stops and another starts.

Also, how do I reset my settings to a "default"/"normal" value so that I could test this again?

…'t got access to any clusters

- visually there's no difference
@richard-cox
Copy link
Member Author

There's something weird with that message part... I haven't yet looked at with a standard user, but I was logged in as a base user when I ran your branch for the first time (vai on, no setting change) and the cluster list did not appear and it had an error on the console...

I've fixed this and it now matches the old behaviour (no list is shown). It's a bit of an edge case, as soon they gain access to a project / cluster then the cluster list will show as usual.

Could you define more clearly what is test 1, 2 and 3 on the test cases of your PR body so that I can compare better with the screenshots? not only that but the test cases are all text next to one another, so it's kinda confusing to check where one test case stops and another starts.

Done. It looks like your screenshots show this as working.

Also, how do I reset my settings to a "default"/"normal" value so that I could test this again?

The default is just an empty string

@richard-cox richard-cox requested a review from aalves08 October 16, 2025 12:36
Copy link
Member

@aalves08 aalves08 left a comment

Choose a reason for hiding this comment

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

As per our chat and the testing I've done, LGTM. Works as expected for standard and base users

@richard-cox richard-cox merged commit 60ca9e6 into rancher:master Oct 17, 2025
60 of 62 checks passed
@richard-cox
Copy link
Member Author

/backport v2.12.3 release-2.12

@richard-cox richard-cox deleted the pagination-home-page-alt-list branch October 17, 2025 08:00
@rancher-ui-project-bot
Copy link

Not creating port PR, there was an error running git am -3:

Applying: generic changes from https://github.com/rancher/dashboard/pull/14492/files
Applying: VERY WIP - move out watch event stuff into own file - improve typing - start resolving core unwatch & unwatchIncompatible of side nav cluster watches (not going to store) being seen as incompatible with find cluster action that does go into store
Applying: very wip, vaguely working
Using index info to reconstruct a base tree...
M	shell/components/ResourceDetail/index.vue
Falling back to patching base and 3-way merge...
Auto-merging shell/components/ResourceDetail/index.vue
CONFLICT (content): Merge conflict in shell/components/ResourceDetail/index.vue
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To restore the original branch and stop patching, run "git am --abort".
hint: Disable this message with "git config set advice.mergeConflict false"
Patch failed at 0003 very wip, vaguely working

richard-cox added a commit to richard-cox/dashboard that referenced this pull request Oct 17, 2025
…e-alt-list

Show alternative small scale home page clusters list
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.

SSP: Show alternative small scale home page clusters list

2 participants