diff --git a/README.md b/README.md index 7d29d61..98b9296 100644 --- a/README.md +++ b/README.md @@ -82,5 +82,6 @@ pnpm run desktop:tauri:dev - 当前前端消费 `backend_bootstrap`、`test_redis_connection`、`browse_redis_keys`、`read_redis_value`、`write_redis_value` 和 `execute_redis_command`;浏览器态仍保持明确的 demo fallback。 - 当前前端还通过共享错误映射层统一消费 `redis-core` 的稳定错误码,使连接测试、浏览、读取、保存、TTL 和命令执行失败都落到一致的操作提示上。 - `inspect_redis_key` 与 `update_redis_key_ttl` 已在桌面桥可用;当前 UI 已暴露 TTL 设置与移除控制,但删除执行仍保持未开放状态。 +- inspector 现在对 `hash/list/set/zset/stream` 提供结构化只读面板,不再要求操作者从原始 JSON 文本中手动解析 typed value。 - 连接测试、key browse、value inspector 和命令托盘在 Tauri 桌面运行时走真实后端桥;浏览器态 `pnpm run desktop:dev` 会明确回退到 demo 数据,不伪装成真实 Redis 行为。 - 具体 UI/UX 边界与 QA 验收入口见 `docs/frontend-workspace-baseline.md` 和 `docs/qa/acceptance-matrix.md`。 diff --git a/apps/desktop/src/App.tsx b/apps/desktop/src/App.tsx index 7944917..c16692b 100644 --- a/apps/desktop/src/App.tsx +++ b/apps/desktop/src/App.tsx @@ -45,6 +45,10 @@ import { toBackendErrorNotice, type OperatorNotice, } from "./lib/operator-notices"; +import { + buildStructuredInspectorSections, + type StructuredInspectorSection, +} from "./lib/structured-inspector"; import { cn } from "./lib/utils"; declare const __APP_VERSION__: string; @@ -439,6 +443,14 @@ function App() { const inspectorText = tauriAvailable ? formatInspectorValue(selectedValueRecord, selectedKey, isInspectorLoading) : (selectedKey?.value ?? ""); + const structuredInspectorSections = tauriAvailable + ? buildStructuredInspectorSections(selectedValueRecord) + : []; + const showStructuredInspector = + selectedKey !== null && + !isInspectorLoading && + structuredInspectorSections.length > 0 && + !isEditable; const supportNote = tauriAvailable ? buildLiveSupportNote(selectedValueRecord, selectedKey) @@ -1662,15 +1674,20 @@ function App() { {selectedKey ? ( -