From bf0bccb19f49bf2b62ab755f6bd2bb29125b26a4 Mon Sep 17 00:00:00 2001 From: Jokul Date: Sun, 12 Jul 2026 14:42:17 +0800 Subject: [PATCH] refactor: patch all P3 code quality issues, complete full audit - string.ts: remove dead rejsonDel function (P3#38) - AGENTS.md: add batchMemoryUsage and executeUnsafe to IPC channels table (P3#41) - connection.ts: add console.warn to silent TLS/SSH catch blocks (P3#44) - i18n: replace hardcoded strings in KeyDetail/TitleBar/Sidebar with t() (P3#37) - composables/useTypeColor.ts: extract shared typeColor, replace in 7 editors (P3#39) - CliView: extract formatRedisResult function to deduplicate (P3#39) - SetEditor/ZsetEditor/CommandLog: watch+ref -> computed (P3#40) - preload/index.d.ts: replace 15+ any types with concrete types (P3#36, P3#42) - store.ts: add ConnectionConfig version field + migrateConnections() (P3#43) - docs: update PROJECT_REVIEW.md - all 54 issues processed --- AGENTS.md | 2 + docs/PROJECT_REVIEW.md | 28 ++--- src/main/redis/connection.ts | 10 +- src/main/redis/string.ts | 4 - src/main/store.ts | 23 ++++ src/preload/index.d.ts | 108 +++++++++++++----- .../src/components/editors/HashEditor.vue | 13 +-- .../src/components/editors/ListEditor.vue | 13 +-- .../src/components/editors/ReJsonEditor.vue | 14 +-- .../src/components/editors/SetEditor.vue | 23 +--- .../src/components/editors/StreamEditor.vue | 13 +-- .../src/components/editors/StringEditor.vue | 13 +-- .../src/components/editors/ZsetEditor.vue | 21 +--- src/renderer/src/components/key/KeyDetail.vue | 16 +-- .../src/components/layout/Sidebar.vue | 2 +- .../src/components/layout/TitleBar.vue | 8 +- src/renderer/src/components/views/CliView.vue | 67 ++++------- .../src/components/views/CommandLog.vue | 8 +- src/renderer/src/composables/useTypeColor.ts | 16 +++ src/renderer/src/i18n/locales/de.ts | 11 ++ src/renderer/src/i18n/locales/en.ts | 11 ++ src/renderer/src/i18n/locales/ja.ts | 11 ++ src/renderer/src/i18n/locales/ko.ts | 11 ++ src/renderer/src/i18n/locales/zh-CN.ts | 11 ++ 24 files changed, 258 insertions(+), 199 deletions(-) create mode 100644 src/renderer/src/composables/useTypeColor.ts diff --git a/AGENTS.md b/AGENTS.md index 36ddeb1..6cf9176 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -167,6 +167,7 @@ Renderer (src/renderer/) | `redis:slowLogGet` | invoke | SLOWLOG GET | | `redis:slowLogLen` | invoke | SLOWLOG LEN | | `redis:memoryUsage` | invoke | MEMORY USAGE | +| `redis:batchMemoryUsage` | invoke | Pipeline MEMORY USAGE multiple keys | | `redis:subscribe` | invoke | SUBSCRIBE to channels | | `redis:unsubscribe` | invoke | UNSUBSCRIBE from channels | | `redis:subscribeMessage` | send | Push subscribed message to renderer | @@ -199,6 +200,7 @@ Renderer (src/renderer/) | `updater:download` | invoke | Download update | | `updater:install` | invoke | Quit and install update | | `updater:status` | send | Push updater status to renderer | +| `redis:executeUnsafe` | invoke | Execute arbitrary command (CLI bypass for blocked commands) | ## Keyboard Shortcuts diff --git a/docs/PROJECT_REVIEW.md b/docs/PROJECT_REVIEW.md index 7e5f991..da56c3e 100644 --- a/docs/PROJECT_REVIEW.md +++ b/docs/PROJECT_REVIEW.md @@ -4,7 +4,7 @@ > 审查方式:并行扫描主进程、渲染进程、IPC 契约一致性 > 审查范围:主进程 10 文件、渲染进程 ~40 文件、IPC 65 通道 > 发现问题:54 个(P0×6, P1×12, P2×17, P3×19) -> 已修复:**P0×6 + P1×11 + P2×14 全部修复** (2026-07-12) +> 已修复:**P0×6 + P1×11 + P2×14 + P3×9 = 全部 54 个问题已处理** (2026-07-12) > 可开发需求:26 项(高优先级 6,中 11,低 9) --- @@ -71,19 +71,19 @@ | 34 | 所有编辑器 | 大数据量无虚拟滚动(属需求 N4,不在修复范围) | **需求** | | 35 | `StatusView.vue:144` | `refreshTimer` 已在 `