← 输入框|github.com|刷新
Skip to content

web | api | docs: Search, sort and manual ordering for projects and services - #28

Merged
yekta merged 3 commits into
masterfrom
feat/projects-search-sort
Oct 17, 2026
Merged

yekta merged 3 commits into
masterfrom
feat/projects-search-sort

Conversation

@yekta

@yekta yekta commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

Closes UNB-397. Adds search, sort and manual ordering to the projects page and the services page.

Search and sort

  • Search: filters by name. On lg and up it sits next to the New Project / Add button. Below that it takes a full row above the cards, lined up with the grid. On the services page, searching a group's name shows the whole group. Ctrl+K works as before.
  • Sort: an icon button next to the search, built like the metrics filter button, with a Reset Sort item. The options are Custom (default), Newest First, Oldest First, A → Z and Z → A.
  • URL state: search and sort live in the URL (search, sort). Defaults are left out, and an invalid sort falls back to Custom.
  • No results: an empty state with a Clear Search button.

Manual ordering

  • Dragging: on Custom with no search, team editors (projects) and environment editors (services) can drag cards into place. A short click or tap still opens the card: a drag starts after 6px with a mouse, or a 250ms press on touch. With a keyboard, Space picks a card up, the arrow keys move it, and Space or Enter drops it.
  • Service groups: a group moves as one block, and its services are ordered inside it. A service can't be dragged out of its group. While dragging services, the list itself is reordered and a copy follows the pointer, because groups and service cards differ in size.
  • Sharing: the order is stored in the API and shared by everyone in the team or environment.

API and MCP

  • Storage: position on projects, services and service groups. Groups and ungrouped services share the environment's order, and grouped services have their own order inside the group.
  • Placement:
    • new projects, services and groups go to the top;
    • a service joining a group goes to the top of that group, and one leaving goes to the top of the environment;
    • deleting a group keeps its services where the group was.
  • Default order: with every position at 0 (all existing data), ties fall back to newest first, which is the order the UI shows today.
  • New endpoints: reorder-projects, reorder-services and reorder-service-group, each also an MCP tool. Items left out keep their order after the listed ones. Duplicates and items from elsewhere answer 400. Reordering leaves updated_at alone.
  • List sorting: list-projects and list-service take sort_by (custom, name, created_at, updated_at) and sort_order. They default to newest first, and the UI asks for custom.
  • Migrations: project_position and service_position.

Shared code

  • SearchInput (also used by the service settings search)
  • SearchSortToolbar
  • useSearchSortParams
  • list-sort
  • card-sorting (drag helpers)
  • one reorder helper in the API repositories

Docs: ordering sections on the projects and service groups pages, and the new MCP tools.

yekta added 2 commits October 17, 2026 11:00
- The projects page now has a search input and a sort dropdown. Both are kept in the URL search params.
- Sort options are Custom (the default), Newest First, Oldest First, A → Z and Z → A. The sort button follows the metrics filter pattern: it shows a non-default indicator and has a reset item.
- When a search matches no projects, an empty state appears with a button to clear the search.
- The search field is pulled out into a shared SearchInput component, which the settings search bar now uses too.
Projects and services can be dragged into a custom order that is stored in
the API and shared by the team. Services keep each group together: a group
moves as one block and its services are ordered inside it.

- api: position on projects, services and service groups. New items go to
  the top. reorder-projects, reorder-services and reorder-service-group
  endpoints and MCP tools. list-projects and list-service take sort_by
  (custom, name, created_at, updated_at) and sort_order, newest first by
  default.
- web: drag to reorder on the Custom sort, search and sort on the services
  page, shared toolbar and URL params for both pages. Sort keys are now
  created_desc and created_asc.
- docs: ordering on the projects and service groups pages, new MCP tools.
@yekta yekta changed the title web: add search and sort controls to the projects page web | api | docs: Search, sort and manual ordering for projects and services Oct 17, 2026
…h-sort

# Conflicts:
#	apps/api/ent/migrate/migrations/atlas.sum
#	apps/api/ent/mutation.go
@yekta
yekta merged commit 83b44b5 into master Oct 17, 2026
8 checks passed
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.

1 participant