Skip to content

Fix semantic sorting for benchmark Speed/Quality columns on GitHub Pages#249

Merged
wallstop merged 2 commits into
mainfrom
copilot/add-sort-functionality-to-benchmarks
Apr 29, 2026
Merged

Fix semantic sorting for benchmark Speed/Quality columns on GitHub Pages#249
wallstop merged 2 commits into
mainfrom
copilot/add-sort-functionality-to-benchmarks

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 29, 2026

Description

GitHub Pages table sorting worked for numeric columns but produced incorrect ordering for categorical benchmark labels (e.g., Very Slow near Very Fast). This update adds semantic sort keys so benchmark tables sort by intended rank instead of lexicographic text.

  • Sortable-table behavior

    • Update table sorter in _includes/head-custom.html to prefer td[data-sort-value] over rendered cell text.
    • Keep text fallback for existing tables without semantic sort metadata.
  • Benchmark markdown generation

    • Update RandomBenchmarkMarkdownBuilder to emit data-sort-value for Speed and Quality summary cells.
    • Preserve existing visible labels (Fastest, Very Fast, etc.) while making sorting deterministic.
  • Docs + guardrails

    • Regenerate docs/performance/random-performance.md summary rows with semantic sort values.
    • Add scripts/tests/test-github-pages-sortable.js and wire it into validate:tests to prevent regressions.
    • Document the semantic sorting pattern in .llm/skills/github-pages-theming.md.
<td data-sort-value="6">Fastest</td>
<td data-sort-value="1">Very Slow</td>
const valueA = (cellA.getAttribute("data-sort-value") || cellA.textContent).trim();

Related Issue

Addresses the GitHub Pages benchmark interactivity issue for column sorting intelligence (notably Speed/Quality categorical ordering).

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update
  • Refactor (code change that neither fixes a bug nor adds a feature)

Checklist

  • I have added tests that prove my fix is effective or my feature works
  • I have updated the documentation accordingly
  • I have updated the CHANGELOG
  • My changes do not introduce breaking changes, or breaking changes are documented

Copilot AI linked an issue Apr 29, 2026 that may be closed by this pull request
Copilot AI changed the title [WIP] Add sorting functionality for performance benchmarks Fix semantic sorting for benchmark Speed/Quality columns on GitHub Pages Apr 29, 2026
Copilot AI requested a review from wallstop April 29, 2026 20:39
@wallstop wallstop marked this pull request as ready for review April 29, 2026 20:41
Copilot AI review requested due to automatic review settings April 29, 2026 20:41
Copy link
Copy Markdown
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

Fixes GitHub Pages sortable table behavior so categorical benchmark labels (Speed/Quality) sort by intended semantic rank rather than lexicographic text, by adding data-sort-value support end-to-end (theme JS, markdown generation, docs, and regression tests).

Changes:

  • Update the GitHub Pages table sorter to prefer td[data-sort-value] with a textContent fallback.
  • Emit semantic data-sort-value attributes for Speed/Quality cells in random benchmark summary table generation and regenerate the rendered markdown.
  • Add a Node-based regression test and wire it into validate:tests, plus document the pattern in the repo’s theming skill docs.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.

Show a summary per file
File Description
_includes/head-custom.html Sorter now reads semantic sort keys via data-sort-value before falling back to cell text.
Tests/Runtime/Performance/RandomBenchmarkMarkdownBuilder.cs Summary rows now include data-sort-value for Speed and Quality cells.
docs/performance/random-performance.md Regenerated benchmark summary rows to include semantic sort metadata.
scripts/tests/test-github-pages-sortable.js Adds regression coverage for sorter behavior and generated semantic attributes.
scripts/tests/test-github-pages-sortable.js.meta Unity companion meta file for the new test script.
package.json Registers the new test and includes it in validate:tests.
.llm/skills/github-pages-theming.md Documents the data-sort-value pattern for categorical sorting on GitHub Pages.

@wallstop wallstop merged commit c8d7133 into main Apr 29, 2026
40 checks passed
@wallstop wallstop deleted the copilot/add-sort-functionality-to-benchmarks branch April 29, 2026 20:58
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.

[Feature]: More interactable GitHub Pages

3 participants