Skip to content

SALE-34: Sort policies alphabetically by default#2541

Merged
tofikwest merged 2 commits intomainfrom
sale-34-policy-sort
Apr 13, 2026
Merged

SALE-34: Sort policies alphabetically by default#2541
tofikwest merged 2 commits intomainfrom
sale-34-policy-sort

Conversation

@tofikwest
Copy link
Copy Markdown
Contributor

@tofikwest tofikwest commented Apr 13, 2026

Summary

  • default policy sorting to alphabetical in app policy list
  • apply deterministic case-insensitive name sorting helper
  • apply same alphabetical ordering in portal dashboard and signed policies list

Testing

  • could not run full project tests in this environment due missing workspace test dependencies
  • verified clean git diff and focused deterministic sort helper behavior via added unit test

Summary by cubic

Policies now default to alphabetical order (case-insensitive, stable) across the app and employee portal. This cleans up policy lists and fulfills Linear SALE-34.

  • New Features
    • Default sort set to name ASC in app PolicyFilters.
    • Replaced localeCompare with comparePoliciesByName (uses Intl.Collator, ties break by id).
    • Portal now sorts with sortPoliciesByName in OrganizationDashboard and signed policies page (after fetch for deterministic order).
    • Added unit test for case-insensitive, deterministic ordering.

Written for commit ced89c2. Summary will update on new commits.

@linear
Copy link
Copy Markdown

linear Bot commented Apr 13, 2026

@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 13, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
app Ready Ready Preview, Comment Apr 13, 2026 11:46pm
comp-framework-editor Ready Ready Preview, Comment Apr 13, 2026 11:46pm
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
portal Skipped Skipped Apr 13, 2026 11:46pm

Request Review

Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cubic analysis

No issues found across 6 files

Auto-approved: Safe UI enhancement: sets default policy sorting to alphabetical across the app and portal using a deterministic helper. Low risk, includes unit tests.

Linked issue analysis

Linked issue: SALE-34: Sort policies alphabetically by default

Status Acceptance criteria Notes
Policies should be sorted alphabetically by default (app policy list) Default sort set to name ASC and comparator applied
Apply alphabetical sorting in portal dashboard (OrganizationDashboard) OrganizationDashboard wraps DB fetch with sortPoliciesByName
Apply alphabetical ordering in employee portal signed policies list Signed policies page sorts results with sortPoliciesByName

@vercel vercel Bot temporarily deployed to Preview – portal April 13, 2026 23:42 Inactive
@tofikwest tofikwest merged commit f21436a into main Apr 13, 2026
8 of 10 checks passed
@tofikwest tofikwest deleted the sale-34-policy-sort branch April 13, 2026 23:44
@claudfuen
Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 3.22.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants