Skip to content

fix(cloudbuild): list flag names and values in natural order - #163

Merged
pfeerick merged 1 commit into
mainfrom
fix/sort-cloud-flag-options
Nov 18, 2026
Merged

pfeerick merged 1 commit into
mainfrom
fix/sort-cloud-flag-options

Conversation

@pfeerick

Copy link
Copy Markdown
Member

Why

The cloud build flag picker lists flags and their values in the order they were merged. Global values come first, then the ones a target's tags add, so on a colour radio the language list ends with the colour-only languages (… SE, UA, AR, CN, HE, …) instead of being alphabetical. The cloudbuild web UI sorts these lists; Buddy didn't.

What

CloudVersionTargetForm now sorts both the flag names and the values of the selected flag in natural order (localeCompare with numeric: true, so X9 comes before X10). Sorting happens where the options are displayed, so it applies however the list was built, and it doesn't overlap with #158's changes to CloudFirmwareReleasesPicker.

Testing

  • Two new tests in CloudVersionTargetForm.spec.tsx open the flag and value dropdowns and check the option order. Both fail without the fix. They read antd's rendered options directly (with an eslint-disable for no-node-access, as other specs do), since Testing Library queries don't expose the order.
  • In a clean Node 22 container with yarn --immutable: lint:all, fmt:check, test:types and yarn test (288 tests) all pass.

🤖 Generated with Claude Code

The cloud build flag picker showed flags and values in the order they
were merged: global values first, then the ones a target's tags add (e.g.
the colour-only languages after the rest). Sort both lists naturally, so
"X9" comes before "X10".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@codecov

codecov Bot commented Nov 18, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 36.42%. Comparing base (ae3d432) to head (a92ae66).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #163      +/-   ##
==========================================
+ Coverage   36.34%   36.42%   +0.08%     
==========================================
  Files         116      116              
  Lines        4287     4291       +4     
  Branches     1037     1037              
==========================================
+ Hits         1558     1563       +5     
+ Misses       2522     2521       -1     
  Partials      207      207              

☔ View full report in Codecov by Harness.
📢 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.

@github-actions

Copy link
Copy Markdown

EdgeTX Buddy has been automatically deployed to Cloudflare.
✅ Preview: https://e2f1a35a.buddy-7a6.pages.dev
✅ Storybook: https://e2f1a35a.buddy-7a6.pages.dev/storybook

@pfeerick
pfeerick merged commit bf24b4e into main Nov 18, 2026
18 checks passed
@pfeerick
pfeerick deleted the fix/sort-cloud-flag-options branch November 18, 2026 07:19

This branch was successfully deployed

1 active deployment
preview — a92ae66d Deployed Nov 18, 2026 by github-actions[bot]
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.

1 participant