Skip to content

fix(config-ui): sort connection tiles alphabetically within each section - #9479

Open
leninworld wants to merge 1 commit into
apache:mainfrom
leninworld:fix/9478-connections-alphabetical
Open

leninworld wants to merge 1 commit into
apache:mainfrom
leninworld:fix/9478-connections-alphabetical

Conversation

@leninworld

Copy link
Copy Markdown

This PR fixes issue #9478.

Summary

The Connections page splits the data sources into A-N and O-Z (by the displayed name since #9130), but inside each section the tiles keep the order of each plugin config's numeric sort value, which is not alphabetical. On main today, A-N reads ArgoCD, Azure DevOps, Bamboo, Bitbucket Cloud, Bitbucket Server, CircleCI, ClickUp, Datadog, Claude Code, Cursor, GitHub Copilot, GitHub, GitLab, Jenkins, Jira, Asana, Kiro, Linear, GLPI, incident.io, Grafana IRM, and O-Z reads Opsgenie, PagerDuty, Slack, SonarQube, TAPD, Rootly, Testmo, Zephyr, ZenTao, Redmine, Tempo, YouTrack, Teambition.

splitPluginsByInitial now sorts a copy of the plugin list by the displayed name before splitting it:

  • case-insensitive (localeCompare(..., 'en', { sensitivity: 'base' })), so incident.io sits among the I names;
  • the plugin id breaks ties, so the order is deterministic;
  • the input array from the store is not mutated, and the A-N / O-Z rule is unchanged.

The useMemo around the split depended on a filtered array that was rebuilt on every render, so it never reused its result. The webhook filter now runs inside the memo, which depends on plugins.

With the current plugin configs the page now shows:

  • A-N: ArgoCD, Asana, Azure DevOps, Azure DevOps Go, Bamboo, Bitbucket Cloud, Bitbucket Server, CircleCI, Claude Code, ClickUp, Cursor, Datadog, GitHub, GitHub Copilot, GitLab, GLPI, Grafana IRM, incident.io, Jenkins, Jira, Kiro, Linear
  • O-Z: Opsgenie, PagerDuty, Redmine, Rootly, Slack, SonarQube, TAPD, Teambition, Tempo, Testmo, YouTrack, ZenTao, Zephyr

The Codecov tile in the issue's screenshot comes from a downstream build (there is no Codecov plugin in this repo); a plugin added there is sorted the same way.

Does this close any open issues?

Closes #9478

Screenshots

None: the change only reorders existing tiles; the resulting order is listed above.

Other Information

Tests (config-ui/src/__tests__/connections-grouping.test.ts): the first existing case now expects alphabetical order inside A-N, and new cases cover exact A-N and O-Z order for the real plugin names in their current sort order, no mutation of the input, case-insensitive ordering, and the id tie-break (including names that differ only by case).

Run in config-ui (Node 26.7, Yarn 4.18.1):

  • yarn vitest run src/__tests__/connections-grouping.test.ts: 9 passed; with the connections.tsx change reverted, 5 of the 9 fail.
  • yarn vitest run: 13 files, 97 tests passed.
  • yarn tsc --noEmit -p ., yarn eslint and yarn exec prettier --check on the two files: clean.

Not changed: the plugin configs' sort values, and other places that list plugins (for example the data-source pickers), which keep their current order.

Order each A-N / O-Z group on the Connections page by the displayed name, case-insensitively, with the plugin id as a tie-break, instead of the plugin configs' numeric sort values. The memoized split now depends on the plugin list itself.

Closes apache#9478
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.

[Bug][Config-UI] The connections list in DevLake is no longer alphabetized

1 participant