Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 21, 2025

Tables were displayed in a grouped order (all prefix tables, then all catch-all tables) instead of respecting the user-specified order in CoverageFromAzureStorageOptions.tableDefinitions.

Changes

  • Modified splitManifestByTables() to process tables in their original definition order
  • Pre-compute prefix matches to identify scenarios that match any prefix table before iteration
  • Updated catch-all logic to exclude scenarios matching any prefix (regardless of table order) while still only consuming unassigned scenarios

This preserves the user's intended table ordering while maintaining correct catch-all behavior: catch-all tables only receive scenarios that don't match any prefix table in the definition array.

Example

const tables: TableDefinition[] = [
  { name: "Data Plane", packageName: "azure", prefixes: ["dataplane_"] },
  { name: "Other", packageName: "azure" },  // catch-all
  { name: "Management", packageName: "azure", prefixes: ["mgmt_"] },
];

Before: Tables displayed as Data Plane → Management → Other
After: Tables displayed as Data Plane → Other → Management

Original prompt

This section details on the original issue you should resolve

<issue_title>Tables do not seem to be sorted based on the tableDefinitions</issue_title>
<issue_description>The table display should respect the CoverageFromAzureStorageOptions tableDefinitions ordering.</issue_description>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

- Modified splitManifestByTables to process tables in their original order
- Pre-compute scenarios matching any prefix to prevent catch-all tables from capturing them
- Added tests to verify order preservation with both prefix and catch-all tables
- All existing tests still pass

Co-authored-by: JoshLove-msft <[email protected]>
Copilot AI changed the title [WIP] Fix table sorting based on tableDefinitions Fix table ordering to respect tableDefinitions array order Nov 21, 2025
Copilot AI requested a review from JoshLove-msft November 21, 2025 21:26
Copilot finished work on behalf of JoshLove-msft November 21, 2025 21:26
@JoshLove-msft JoshLove-msft marked this pull request as ready for review November 21, 2025 21:35
@github-actions
Copy link
Contributor

No changes needing a change description found.

@JoshLove-msft JoshLove-msft added this pull request to the merge queue Nov 21, 2025
Merged via the queue into main with commit f1af87b Nov 21, 2025
22 checks passed
@JoshLove-msft JoshLove-msft deleted the copilot/fix-table-sorting-issue branch November 21, 2025 23:03
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.

Tables do not seem to be sorted based on the tableDefinitions

3 participants