Skip to content

✨ feat(meilisearch): 新增系统工作区及密钥和任务管理功能 - #6955

Merged
t8y2 merged 2 commits into
t8y2:mainfrom
eryajf:feat_meilisearch
Aug 22, 2026
Merged

✨ feat(meilisearch): 新增系统工作区及密钥和任务管理功能#6955
t8y2 merged 2 commits into
t8y2:mainfrom
eryajf:feat_meilisearch

Conversation

@eryajf

@eryajf eryajf commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

变更说明

新增 Meilisearch 系统管理工作区:

  • 在连接树中增加“系统管理”入口,并以顶部 Tab 展示总览、API 密钥和任务。
  • 支持 API 密钥创建、查看、编辑、删除、明文复制、过期时间配置及列显示持久化。
  • 支持全局与索引级任务查看、UID/索引/状态筛选、详情查看、取消活动任务和删除已完成历史。
  • 补齐 Tauri 与 Web 的 Keys、Tasks、Overview 调用链,并在只读连接中拦截管理操作。
  • 移除 Prometheus /metrics 采集,避免实例未启用指标时带来兼容性问题。
  • 移除旧版 Meilisearch 不支持的 reverse 任务参数,并防止管理任务轮询期间重复触发 mutation。

变更类型

  • 新功能
  • Bug 修复
  • 性能优化
  • 代码重构
  • 文档更新
  • CI / 构建

涉及前端

  • 本 PR 涉及前端改动,已附截图/录屏(见下方)

总览界面:

image

密钥:

image

task:

image

验证

  • make check 通过(未运行)
  • make cargo-check-fast 通过(未运行)
  • 相关测试通过

已执行:

  • pnpm exec vitest run ...MeilisearchTasksPage.spec.ts ...MeilisearchKeysPage.spec.ts ...meilisearchManagement.spec.ts ...meilisearchTaskColumns.spec.ts ...meilisearchKeyColumns.spec.ts
  • pnpm typecheck
  • cargo fmt --check
  • cargo test -p dbx-core --lib meilisearch_driver::tests::task_selector_encodes_all_filters_and_cursor_safe_values
  • git diff --check

关联 Issue

- 增加 Meilisearch 系统概览、API 密钥管理与任务管理入口
- 支持密钥创建、查看、编辑、删除、复制及过期时间配置
- 新增索引和操作权限多选组件,并支持密钥列表列配置
- 在索引视图中新增任务页面导航
@github-actions github-actions Bot added area/core Shared DBX core runtime area/desktop Desktop application or Tauri shell area/web Web backend or web API enhancement New feature or request ui-change Changes user-visible interface, text, or visual assets labels Aug 22, 2026

@t8y2 t8y2 left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Request changes。

  1. apps/desktop/src/types/meilisearchManagement.ts:195hasExplicitTaskSelector 解构了未使用的 key,exact-head frontend typecheck 失败:TS6133: 'key' is declared but its value is never read. 请先修复该 typecheck blocker。

  2. crates/dbx-core/src/db/meilisearch_driver.rs:1442parse_key 对所有密钥响应都强制要求存在明文 key。API 密钥列表应能处理只返回 metadata、没有明文 secret 的响应;当前会导致 /keys 列表整体解析失败,而不是正常显示 UID、权限、索引和过期时间。请将创建响应与列表/详情响应的 secret 生命周期分开处理,并保持列表不传播明文密钥。

请修复后重新运行 frontend check 及相关 Meilisearch 测试。

@t8y2 t8y2 left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Maintainer patch pushed in 28ca7c2.

  • Root cause: the task-selector helper destructured an unused key, causing the frontend typecheck to fail.
  • Patch: ignore the unused tuple slot while preserving the selector-value logic.
  • Validation: meilisearchManagement.spec.ts (5/5), pnpm typecheck, and git diff --check all passed.
  • Correction: I rechecked the earlier /keys response concern; that concern is withdrawn and is not a blocker for this PR.

@t8y2
t8y2 merged commit e55ee60 into t8y2:main Aug 22, 2026
15 checks passed
@t8y2

t8y2 commented Aug 22, 2026

Copy link
Copy Markdown
Owner

Thanks for the contribution! Merged in e55ee60, will be released in the next version.

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

Labels

area/core Shared DBX core runtime area/desktop Desktop application or Tauri shell area/web Web backend or web API enhancement New feature or request ui-change Changes user-visible interface, text, or visual assets

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants