Skip to content

Conversation

Turbo87
Copy link
Member

@Turbo87 Turbo87 commented Sep 22, 2025

#11453 is merged and the backfill has finished, so now we can start showing the SLoC estimates next to the crate file size as another data point:

Bildschirmfoto 2025-09-22 um 15 48 38

Related

@Turbo87 Turbo87 added the C-enhancement ✨ Category: Adding new behavior or a change to the way an existing feature works label Sep 22, 2025
@Turbo87 Turbo87 requested a review from a team September 22, 2025 13:52
This extends the API serialization to include linecount statistics in version responses by adding a `linecounts` field to the `EncodableVersion` struct and updating the OpenAPI specification to document the new field.

All API response test snapshots across crates and versions endpoints are updated to include the new linecount data. The implementation maintains backward compatibility with `null` linecount values for existing data.
This updates the Mock Service Worker test infrastructure to include linecount data by extending the version model with a `linecounts` field and mock data generation. All MSW handler tests are updated to include linecount in API responses, providing realistic mock linecount data for frontend testing.
This implements linecount display in the crate sidebar by adding a `linecounts` attribute to the `Version` Ember Data model and displaying total code lines alongside existing crate size information. A code icon is included for visual consistency with other metrics.

The implementation handles `null` linecount data gracefully for backward compatibility.
@Turbo87 Turbo87 merged commit 116a17b into rust-lang:main Sep 26, 2025
11 checks passed
@Turbo87 Turbo87 deleted the sloc-display branch September 26, 2025 17:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-backend ⚙️ A-frontend 🐹 C-enhancement ✨ Category: Adding new behavior or a change to the way an existing feature works

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

4 participants