Skip to content

feat: sort app tokens by creation and expiration date - #3488

Merged
AlexAndBear merged 2 commits into
mainfrom
feat/app-tokens-sorting
Sep 30, 2026
Merged

AlexAndBear merged 2 commits into
mainfrom
feat/app-tokens-sorting

Conversation

@AlexAndBear

@AlexAndBear AlexAndBear commented Sep 29, 2026 •

Copy link
Copy Markdown
Member

Description

The app tokens list in the account settings can now be sorted by "Created at" and "Expires at" by clicking the column headers. Sorting uses the existing useSort composable, so the sort parameters are stored in the route query (sort-by, sort-dir) and persisted like in other lists. The default is still "Created at", newest first. The "Show more" limit applies to the sorted list.

Also in the table:

  • The delete action is now an icon-only button aligned to the right, with a tooltip ("Delete") and an aria-label ("Delete app token").
  • The column widths lived in a scoped <style> block that didn't apply to the cells inside oc-table. They are replaced by Tailwind classes that give both date columns 25% width, so the dates aren't truncated on desktop anymore.

Related Issue

  • Fixes <issue_link>

How Has This Been Tested?

  • test environment: local dev setup (Vite dev server + OpenCloud backend via docker-compose), Chromium at 1200px and 390px width; Vitest
  • test case 1: open App Tokens: sorted by creation date descending, sort-by=creationDate&sort-dir=desc is added to the URL
  • test case 2: click "Expires at" twice: the list is sorted descending, then ascending, and the URL updates accordingly
  • test case 3: reopen App Tokens without query: the last sort order is restored
  • test case 4: hover the delete button: the "Delete" tooltip shows, the button is right aligned
  • test case 5: 390px width: the table fits without horizontal overflow
  • test case 6: new unit tests for the default sort order, sorting from the route query and storing the sort parameters on sort

Types of changes

  • Bugfix
  • Enhancement (a change that doesn't break existing code or deployments)
  • Breaking change (a modification that affects current functionality)
  • Technical debt (addressing code that needs refactoring or improvements)
  • Tests (adding or improving tests)
  • Documentation (updates or additions to documentation)
  • Maintenance (like dependency updates or tooling adjustments)

@AlexAndBear
AlexAndBear merged commit f943abd into main Sep 30, 2026
31 checks passed
@AlexAndBear
AlexAndBear deleted the feat/app-tokens-sorting branch September 30, 2026 08:00
@openclouders openclouders mentioned this pull request Sep 30, 2026
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants