Files
Nexus/docs/changelog/2026-06-21-server-list-created-at-sort.md
T

28 lines
780 B
Markdown
Raw Normal View History

# 服务器列表默认按创建时间倒序
**日期**2026-06-21
## 变更摘要
服务器列表、推送/终端全量拉取默认 `sort_by=created_at&sort_order=desc`;后端 `server_repo` 无排序参数时同样默认最新在前。
## 动机
新机入库后应出现在列表顶部,便于运维发现与操作。
## 涉及文件
- `server/infrastructure/database/server_repo.py`
- `frontend/src/composables/useServerPagination.ts`
- `frontend/src/composables/push/usePushServers.ts`
- `frontend/src/composables/terminal/useTerminalSessions.ts`
- `frontend/src/utils/serverTableSort.ts`
## 迁移 / 重启
需 API 重启(后端排序逻辑)。
## 验证
打开 `#/servers`,新加服务器应排在前列;终端/推送页服务器下拉顺序一致。