Files
Nexus/docs/changelog/2026-06-12-push-server-search-history.md
T
Nexus Agent e0133b9098 feat(push,terminal): 推送搜索历史5条与终端中间搜索
推送页独立 combobox 历史(MySQL push_search,上限5);终端空态搜索回中间卡片,右侧栏仅列表。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-12 01:58:33 +08:00

1.2 KiB
Raw Blame History

推送页服务器搜索历史(5 条)

日期2026-06-12

动机

推送页搜索服务器需记住最近查询,便于重复筛选;与服务器页历史独立,最多保留 5 条。

变更

  • 后端GET/PUT /api/servers/push-search-historyadmin_ui_preferences 上下文 push_search,上限 5 条
  • 前端:搜索框改为 combobox;回车或选历史项写入;与服务器页历史互不影响
  • 复用useServerSearchHistory('push') 与现有 MySQL 偏好存储一致

涉及文件

  • server/utils/server_search_history.py
  • server/api/servers.py
  • frontend/src/composables/useServerSearchHistory.ts
  • frontend/src/composables/push/usePushServers.ts
  • frontend/src/composables/push/usePushPage.ts
  • frontend/src/components/push/PushServerGrid.vue
  • frontend/src/pages/PushPage.vue
  • tests/test_server_search_history.py

验证

cd frontend && npm run type-check
pytest tests/test_server_search_history.py -q

推送页:输入关键词回车 → 下拉可见最近 5 条;换浏览器登录同一账号仍可恢复。

迁移

无新表;首次写入自动创建 push_search 偏好记录。