Conversation
Finding out which commands an action issues meant reading the source or opening a MONITOR session, which shows every client's traffic and slows the server down. The browser now has a third panel listing the commands RedisInsight itself sent, grouped by the action that triggered them: - the Redis client classes report every command they send, so only RedisInsight's own traffic is recorded - a global interceptor puts the operation name into an async context, which the client reads when it logs a command - entries are pushed over socket.io to a room per instance - buffers are decoded as UTF-8 when they hold text, so key names stay readable; genuinely binary payloads fall back to a size placeholder - the panel groups consecutive commands from one action and collapses repeated lines Batches are capped so a single action cannot flood the panel.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 3 potential issues.
Reviewed by Cursor Bugbot for commit 56e0998. Configure here.
| } | ||
|
|
||
| return decoded; | ||
| }; |
There was a problem hiding this comment.
Large values block Redis command path
High Severity
serializeArgument fully UTF-8-decodes every Buffer argument and runs Array.from over the whole string before truncating. Saving a large or binary value therefore allocates and scans the entire payload on the Redis send path, which can stall the API event loop.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit 56e0998. Configure here.
| } else { | ||
| subscribe() | ||
| } | ||
| }, [isPaused, subscribe]) |
There was a problem hiding this comment.
Pause ignored after socket reconnects
Medium Severity
Connect always emits Subscribe, and the pause effect bails out unless the socket is already connected. After a remount or instanceId change while paused, streaming starts again even though the button still shows Resume.
Reviewed by Cursor Bugbot for commit 56e0998. Configure here.
| socketRef.current = null | ||
| bufferRef.current = [] | ||
| } | ||
| }, [instanceId, t]) |
There was a problem hiding this comment.
Log not cleared on instance switch
Medium Severity
Changing instanceId reconnects the socket but never clears Redux entries, and resetCommandLog is never dispatched. Commands from the previous database stay in the panel and mix with the new instance.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit 56e0998. Configure here.


What
The browser gets a third panel that lists the Redis commands RedisInsight
itself sent, grouped by the action that triggered them, so you can see what a
click actually does.
Why
Today the only way to see the commands behind an action is to read the source
or run
MONITOR.MONITORstreams every client's traffic and has a realperformance cost on the server, so it is not something you leave on while
learning.
This records only RedisInsight's own commands, at the point they are sent.
How it works
RedisClientgains a static handler and aprotected logCommands()that the ioredis and node-redis clients call rightbefore sending. Nothing is recorded unless a handler is installed, and the
client layer keeps zero imports from the command-log module.
OperationContextInterceptorruns each HTTPrequest inside an
AsyncLocalStoragethat carries a human readableoperation name (
Load key details,Delete key, …). The client reads itwhen logging, so every command is attributed to the action that caused it.
the existing socket configuration.
bulk action cannot flood the panel.
Buffers. Decoding them as UTF-8 when they hold text (and only falling backto a
<binary N bytes>placeholder for genuinely binary payloads) is whatmakes the panel useful — otherwise the most informative part of every
command is hidden.
UI
command-log-panelon the browser page, in a third resizable column.the operation name and a count; repeated identical lines collapse to
×N.Changes
Backend
api/src/modules/command-log/— new module (entry model, serialisation,service, socket.io gateway).
api/src/common/context/operation.context.ts,api/src/common/interceptors/operation-context.interceptor.ts— new.api/src/modules/redis/client/**— hook in the ioredis and node-redisclients.
api/src/app.module.ts,api/src/main.ts— register the module and theglobal interceptor.
Frontend
ui/src/slices/browser/commandLog.ts— new slice.ui/src/pages/browser/components/command-log-panel/— new panel.ui/src/pages/browser/BrowserPage.tsx— third column.ui/src/i18n/locales/{en,bg}.json— 7 new keys.Tests
CommandLogList.spec.tsx(new, 10 cases) — grouping by operation, a newgroup when the operation changes or the gap is too large, collapsing
repeated lines, non-adjacent repeats stay separate.
operation name and database, key names stay readable, and commands from
another client are not recorded (which is the point versus
MONITOR).Screenshots
The panel after clicking a key — note the readable key names:
Notes for reviewers
problem can never break the command itself.
at 50 commands); nothing is persisted.
fit the roadmap.
Note
Medium Risk
Recording runs on the Redis client hot path for every command, but it is guarded, bounded, and non-blocking; streamed command lines may still expose key names and truncated argument text to connected clients.
Overview
Adds a Commands panel on the Browser page so users can see Redis commands this app sends, grouped by the UI action that triggered them—without turning on
MONITOR.On the API, a new
CommandLogModuleregisters a handler onRedisClientthat records commands before ioredis/node-redis send them, with truncated/safe serialization (text buffers decoded, large/binary args capped).OperationContextInterceptorbinds human-readable operation labels per HTTP request viaAsyncLocalStorage, and batches are pushed over a dedicated socket.io namespace (commandLog) per database instance.The UI adds a third resizable column (
CommandLogPanel), Redux state, pause/clear controls, grouping/collapse of repeated lines, and new i18n strings (en/bg).Reviewed by Cursor Bugbot for commit 56e0998. Bugbot is set up for automated code reviews on this repo. Configure here.