Commit Graph

24 Commits

Author SHA1 Message Date
Jokul 1a5e4dd706 fix: patch all P2 quality/performance issues from project review
- ipc-handlers: withLog extracts actual connection ID from args[0] (P2#20)
- updater: add initialized guard to prevent duplicate IPC registration (P2#25)
- win-state: log writeFile errors instead of empty callback (P2#26)
- format: detectFormat samples up to 4096 chars instead of 100 (P2#28)
- commandLogger: add 30+ missing write commands to WRITE_COMMANDS (P2#32)
- ReJsonEditor: bind Monaco theme to monacoTheme computed (P2#19)
- keys: normalize empty SCAN pattern to '*' (P2#21)
- SlowLogView: remove duplicate <style scoped> block (P2#29)
- CliView: deduplicate XGROUP in writeCommands Set (P2#33)
- key store: use connectionStore instead of IPC for separator (P2#22)
- NewConnectionDialog: add visible guard after async watch (P2#30)
- KeyList: remove dangerouslyUseHTMLString, use plain text + i18n (P2#31)
- KeyList: batch DUMP export with Promise.allSettled (batch=20) (P2#23)
- HashEditor: lazy load field TTL on click instead of bulk HTTL (P2#24)
- P2#27 already fixed in P0#2; P2#34 is feature (N4); P2#35 not a bug
- docs: update PROJECT_REVIEW.md with P2 fix status
2026-07-12 14:30:18 +08:00
Jokul 70db25b337 fix: patch all P1 bugs from project review
- pubsub: add sender.isDestroyed() checks + destroyed event auto-cleanup (P1#10)
- pubsub: add .catch() to monitor() promise + isDestroyed check (P1#11)
- connection: move server.on('error') before server.listen() (P1#12)
- preload: onSubscribeMessage/onMonitorMessage return cleanup functions (P1#9)
- CliView: save and call IPC listener cleanup in onUnmounted (P1#9)
- KeyDetail: move setInterval into onMounted, cleanup in onUnmounted (P1#8)
- key store: add loadKeyVersion guard to prevent race condition (P1#13)
- ListEditor: LSET sentinel + LREM for index-based deletion (P1#14)
- ipc-handlers: remove non-null assertion, add null guard in reorderConnections (P1#16)
- StreamEditor: add Confirm/Cancel buttons to Trim dialog (P1#17)
- KeyBrowser: remove { immediate: true } to prevent double scan (P1#18)
- P1#7 MULTI/EXEC: investigated, not a bug (Redis server handles queuing)
- docs: update PROJECT_REVIEW.md with P1 fix status
2026-07-12 14:18:48 +08:00
Jokul 9d73ff019c fix(security): patch all P0 vulnerabilities from project review
- credential: encrypt/decrypt now throw when safeStorage unavailable instead of base64 fallback
- ipc-handlers: encrypt auth/sshPassword/sshPassphrase before storing, decrypt on read (avoid mutation)
- ipc-handlers: block FLUSHALL/FLUSHDB/SHUTDOWN/DEBUG in redis:execute, add redis:executeUnsafe for CLI
- format: whitelist allowed external formatters (xxd/jq/python3/python/php/column), clean up tmpDir
- connection: clearTimeout on ready/error paths to fix timeout race in Sentinel/Cluster/normal modes
- index: add app.on('will-quit') to disconnectAll + stopAllPubSubClients on exit
- pubsub: add stopAllPubSubClients() to clean up all sub/monitor connections
- docs: add PROJECT_REVIEW.md with full audit report and fix status
2026-07-12 14:13:44 +08:00
Jokul c8eeb7c0b9 fix: memory analysis dark mode stripe, scan speed, and NaN total size
- Dark mode: add --el-fill-color-lighter and --el-table-current-row-bg-color
  to .el-table overrides so striped rows render with proper contrast
- Scan speed: add batchKeyMemoryUsage pipeline (TYPE + MEMORY USAGE in one
  Redis round-trip instead of 2×N sequential IPC calls)
- Scan speed: decouple scan loop from UI via 300ms flush buffer, keeping
  el-table re-render frequency capped at ~3/s
- Scan speed: use shallowRef for entries to skip deep reactive proxies
- NaN fix: handle ioredis stringNumbers:true by converting via Number()
  instead of typeof === 'number'
- formatSize: guard against non-finite input, add TB/PB units
2026-07-12 10:01:30 +08:00
Jokul b7e9c80022 fix: 连接断开后 IPC handler 不再报 Client null / Connection closed
- connection.ts: 新增 requireClient(id),状态非 ready 时抛明确错误
- connection.ts: Redis client 监听 close 事件自动从 Map 清理
- 8 个 redis 模块: getClient + null check 统一替换为 requireClient
- sentinel/cluster/普通连接三种模式均添加 close 自动清理
2026-07-11 22:31:55 +08:00
Jokul 5a479d416e refactor: Scan Count 从全局设置移到连接配置
- ConnectionConfig 新增 scanCount 字段 (默认 100)
- NewConnectionDialog 基本信息区新增 Scan Count 输入框
- key.ts 改为从 activeConnection.scanCount 读取
- SettingsView 移除 Scan Count 设置项
- app store 移除 scanCount 和 setScanCount
- 主进程 store ConnectionConfig 同步新增字段
2026-07-11 15:22:58 +08:00
Jokul 56e0b05b6b fix: Linux 开发模式任务栏图标与 VS Code 归为一组
开发模式下 electron 进程 WM_CLASS 默认为 "Electron",导致桌面环境
将其与其他 Electron 应用(如 VS Code)归为一组并使用其图标。
在 app.whenReady 前调用 app.setName('JRedisDesktop') 修正 WM_CLASS。
2026-07-11 01:00:29 +08:00
Jokul bcf31e7d3a fix: safeStorage 解密失败时回退到 base64 解码
密码可能在 safeStorage 不可用时以纯 base64 存储,或因 keyring 环境
变化导致无法解密。添加 try-catch 回退,避免连接时崩溃。
2026-07-11 00:03:48 +08:00
Jokul eda30250c6 refactor: 迁移至 electron-vite 官方推荐目录结构
- electron/* -> src/main/* (主进程)
- electron/preload.ts -> src/preload/index.ts (预加载)
- src/electron-api.d.ts -> src/preload/index.d.ts (类型声明)
- src/* -> src/renderer/src/* (渲染进程)
- src/index.html -> src/renderer/index.html
- electron.vite.config.ts 简化为自动入口检测 (零配置)
- tsconfig.app.json -> tsconfig.web.json, 更新 includes/paths
- 构建产物 dist-electron/ -> out/ (修复 main/preload 输出覆盖 bug)
- 更新 package.json main 字段 + electron-builder files
- 更新 .gitignore + eslint ignores
- 更新 AGENTS.md 架构文档
2026-07-10 23:46:34 +08:00
Jokul bdcf4fe299 refactor: restructure project layout
- Move main process to electron/main/
- Move preload to electron/preload/
- Add shared types in electron/shared/
- Split redis-service into modular redis/ directory
- Flatten renderer to src/ (remove src/renderer/ nesting)
- Update electron.vite.config.ts paths
- Update tsconfig paths
- Output to electron-dist/
2026-07-04 21:12:50 +08:00
Jokul bb885c6d6d fix: 使用 BrowserWindow.setIcon 替代 app.setIcon 2026-07-04 20:36:16 +08:00
Jokul 687fea4018 fix: 更新所有图标为 JRD
- 任务栏图标使用 nativeImage
- Linux 使用 app.setIcon()
- TitleBar logo 改为 JRD
- MainArea placeholder 改为 JRD
2026-07-04 20:34:34 +08:00
Jokul c85318cc4d feat: 添加应用图标
- SVG 图标设计:数据库 + Redis R 字母 + 连接节点
- 生成各尺寸 PNG (16-512px)
- electron-builder 配置图标路径
- 主进程窗口使用图标
2026-07-04 20:28:41 +08:00
Jokul da37760e04 feat: 开发模式自动打开 DevTools 2026-07-04 20:19:09 +08:00
Jokul 7f2c753470 fix: 修复 preload 路径 (.mjs 而不是 .js)
- electron-vite v3 输出 .mjs 文件
- 更新 preload 路径为 index.mjs
- 这是 window.electronAPI undefined 的根本原因
2026-07-04 20:10:58 +08:00
Jokul d488612c27 debug: 添加连接日志 2026-07-04 20:06:43 +08:00
Jokul 88dfedc544 fix: Redis 连接等待就绪信号
- enableReadyCheck: true 等待 READY 信号
- 连接超时 12 秒
- 错误时正确断开连接
- 测试连接现在会返回具体错误信息
2026-07-04 20:03:40 +08:00
Jokul 7c0cce3e64 feat(phase7): pattern search, health check, keyboard shortcuts
- KeyList: pattern input for Redis MATCH, local filter, Go button
- ConnectionStore: health check interval (5s ping), healthOk state
- StatusBar: health indicator (unstable = yellow pulse)
- RedisService: ping, isConnected methods
- Sidebar: Delete key (Del), deselect (Esc), refresh (F5)
- useKeyboard: expanded shortcut map
2026-07-04 19:39:22 +08:00
Jokul 6b9c6a1ed5 feat(phase5): stream editor, i18n, settings, key management
- StreamEditor: view/add/trim/delete entries with field management
- KeyDetail: TTL editor dialog, rename dialog, copy key name button
- i18n: English + Chinese locale system with composable
- SettingsView: theme selector, language switch, scan count, font size
- MainArea: added Settings tab
- RedisService: stream/rename/exists operations
- Preload: stream/rename/exists IPC channels
2026-07-04 18:26:51 +08:00
Jokul 4c66263477 feat(phase4e): batch delete with multi-select
- KeyList: multi-select mode with checkbox toggle
- Batch delete bar shows selected count + delete button
- RedisService: batchDelete using pipeline
- Preload: batchDelete IPC channel
2026-07-04 18:09:01 +08:00
Jokul ff09f5dc03 feat(phase4): list/set/zset editors, CLI, slow log, DB selector
- ListEditor: pagination, push, edit, remove elements
- SetEditor: filter, add, remove members
- ZsetEditor: filter, add with score, remove members
- CliView: interactive terminal with command history
- SlowLogView: slow log table with time/duration/command
- DbSelector: dropdown to switch Redis databases (0-15)
- StatusBar integrated with DB selector
- MainArea: added CLI and Slow Log tabs
- KeyDetail: dispatch to List/Set/Zset editors
- RedisService: list/set/zset/slowlog/memory operations
- Preload: all new IPC channels typed
2026-07-04 18:07:33 +08:00
Jokul 272eb6b3af feat(phase3): key browser MVP
- useKeyStore (Pinia): scan, tree view, key data cache, db switching
- KeyBrowser: split pane with KeyList + KeyDetail
- KeyList: SCAN pagination, filter, tree toggle, load more
- KeyDetail: type badge, TTL display, delete, type-based editor dispatch
- StringEditor: view/edit with JSON auto-format
- HashEditor: field table, add/edit/delete fields
- StatusView: INFO dashboard with stat cards + section grid
- MainArea: tab host (Status / Keys)
- RedisService: selectDb, dbSize
- Preload: selectDb, dbSize IPC channels
- App.vue updated with MainArea layout
2026-07-04 17:48:41 +08:00
Jokul 4f9398c65d feat(phase2): connection management
- RedisService in main process (ioredis wrapper, execute, scan, hash ops)
- electron-store for connection/settings persistence
- safeStorage credential encrypt/decrypt
- IPC handlers for redis, storage, credential channels
- Preload API typed with all new channels
- useConnectionStore (Pinia) with connect/disconnect/save/delete
- ConnectionCard with 3D hover effect + status indicator
- ConnectionList with search filter
- NewConnectionDialog (create/edit connection form)
- Sidebar component
- StatusBar with live connection status + pulse animation
- App.vue updated with Sidebar layout
2026-07-04 17:45:19 +08:00
Jokul 7e5d61c099 feat(phase1): architecture skeleton
- Electron 33 main process with frameless window, IPC, win-state persistence
- Preload with contextBridge typed API (window, theme, dialog)
- Vue 3 + Pinia + Element Plus + Vue Router renderer
- Dark/light dual theme via CSS custom properties
- TitleBar with window controls + theme toggle
- StatusBar placeholder
- Design spec document
2026-07-04 17:21:00 +08:00