Skip to content

Fix case-sensitive profile sorting#8741

Closed
Houmgaor wants to merge 1 commit intoFreeTubeApp:developmentfrom
Houmgaor:fix/profile-sort-case-insensitive
Closed

Fix case-sensitive profile sorting#8741
Houmgaor wants to merge 1 commit intoFreeTubeApp:developmentfrom
Houmgaor:fix/profile-sort-case-insensitive

Conversation

@Houmgaor
Copy link

@Houmgaor Houmgaor commented Mar 5, 2026

Pull Request Type

  • Bugfix
  • Feature Implementation
  • Documentation
  • Other

Related issue

Description

Profile names were sorted using JavaScript's < and > operators, which compare strings by Unicode code point. This causes uppercase letters to sort before all lowercase letters (e.g. "AB" before "Aa").

This replaces the comparison with String.prototype.localeCompare() using sensitivity: 'base', which performs a case-insensitive, locale-aware alphabetical sort.

Screenshots

Before: Profiles sorted as AB, Aa, Ab, Ac (uppercase takes priority)
After: Profiles sorted as Aa, AB, Ab, Ac (proper alphabetical order)

image

Testing

  1. Create multiple profiles with mixed-case names (e.g. "Aa", "AB", "Ab", "Ac")
  2. Open the profile selection menu
  3. Verify profiles are sorted alphabetically regardless of capitalization

Desktop

  • OS: Linux (Fedora)
  • OS Version: 6.18.13-200.fc43.x86_64
  • FreeTube version: v0.23.14 Beta (development branch)

Additional context

The previous PR attempt (#8727) was closed. This is a minimal one-line fix using localeCompare which is the idiomatic JavaScript approach for locale-aware string sorting.

Replace case-sensitive string comparison with localeCompare() so that
profiles sort alphabetically regardless of capitalization (e.g. "Aa"
before "AB" instead of after).

Fixes FreeTubeApp#8711
@FreeTubeBot FreeTubeBot enabled auto-merge (squash) March 5, 2026 14:52
@github-actions github-actions bot added the PR: waiting for review For PRs that are complete, tested, and ready for review label Mar 5, 2026
auto-merge was automatically disabled March 6, 2026 09:48

Pull request was closed

@github-actions github-actions bot removed the PR: waiting for review For PRs that are complete, tested, and ready for review label Mar 6, 2026
@efb4f5ff-1298-471a-8973-3d47447115dc efb4f5ff-1298-471a-8973-3d47447115dc added the AI-PR PR that has been determined to be completely or majority untested and AI generated label Mar 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AI-PR PR that has been determined to be completely or majority untested and AI generated

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants