Skip to content

Fix/sort by name case insensitive#2482

Open
BasavarajBankolli wants to merge 3 commits intokarakeep-app:mainfrom
BasavarajBankolli:fix/sort-by-name-case-insensitive
Open

Fix/sort by name case insensitive#2482
BasavarajBankolli wants to merge 3 commits intokarakeep-app:mainfrom
BasavarajBankolli:fix/sort-by-name-case-insensitive

Conversation

@BasavarajBankolli
Copy link

Fix: Make tag name sorting case-insensitive
Description

fixes: #2477

This PR fixes an issue where sorting tags by name was case-sensitive, causing tags with capital letters to appear before lowercase ones (e.g. Contribution appearing before ansible).

The sorting logic has been updated to perform a case-insensitive comparison at the query level, ensuring a more natural and user-friendly alphabetical order.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 13, 2026

Walkthrough

Modified the sorting logic in Tag.getAll to perform case-insensitive sorting of tag names by converting names to lowercase before applying ascending order, replacing the previous case-sensitive sort on the name field.

Changes

Cohort / File(s) Summary
Tag Sorting Logic
packages/trpc/models/tags.ts
Modified tag name sorting to use case-insensitive comparison by applying lowercase transformation during sort operation.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

🚥 Pre-merge checks | ✅ 6
✅ Passed checks (6 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change: making tag name sorting case-insensitive, which directly addresses the primary objective.
Description check ✅ Passed The description clearly explains the fix, references the linked issue #2477, provides context about the problem, and describes the solution approach.
Linked Issues check ✅ Passed The code change implements case-insensitive sorting by transforming names to lowercase before applying ascending order, directly addressing the requirement in issue #2477 to sort tags alphabetically regardless of case.
Out of Scope Changes check ✅ Passed The pull request only modifies the sorting logic for tag names in a single file, which is directly aligned with the objective of fixing case-insensitive sorting in issue #2477.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Merge Conflict Detection ✅ Passed ✅ No merge conflicts detected when merging into main

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


No actionable comments were generated in the recent review. 🎉


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@greptile-apps
Copy link

greptile-apps bot commented Feb 13, 2026

Greptile Overview

Greptile Summary

Updated tag name sorting to be case-insensitive by applying SQL lower() function at the database query level, ensuring tags sort alphabetically regardless of capitalization (e.g., "ansible" now correctly appears before "Contribution").

  • Changed sorting from asc(bookmarkTags.name) to asc(sqllower(${bookmarkTags.name})) on line 131
  • Implementation is consistent with existing case-insensitive patterns used in the relevance sorting logic
  • Uses standard SQLite lower() function which is fully supported in the project's database (better-sqlite3)

Confidence Score: 5/5

  • This PR is safe to merge with no concerns
  • The change is minimal, focused, and correctly implements case-insensitive sorting using a well-supported SQL function that's already used elsewhere in the codebase
  • No files require special attention

Important Files Changed

Filename Overview
packages/trpc/models/tags.ts Applied case-insensitive sorting to tag names using SQL lower() function - clean fix with no issues

Last reviewed commit: 0d3c0e2

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.

Sorting by name on the Tags page doesn't work (capital letters sort before lowercase)

1 participant