feat: binlog-to-page correlation CLI and web UI#205
Conversation
…180) Add --correlate <tablespace> flag to `inno binlog` that maps row events to specific B+Tree leaf pages via PK lookup. Supports text, JSON, and CSV output with page number and primary key columns. Enhance the web UI Binlog tab with a correlation dropzone: drop a .ibd file to annotate row events with page numbers. Clickable page links navigate to the Pages tab with full tablespace context and a "Back to Binlog" banner for easy return.
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Code reviewFound 3 issues:
idb-utils/web/src/components/binlog.js Lines 300 to 304 in b5733ee The correlated row highlight (
Lines 158 to 168 in b5733ee All other module-level state variables are reset in
Lines 306 to 316 in b5733ee After 🤖 Generated with Claude Code - If this code review was useful, please react with 👍. Otherwise, react with 👎. |
- Use literal full class strings for bg-innodb-green/5 to prevent Tailwind JIT purging the correlated row highlight - Reset savedBinlogState in onFile() alongside other state variables - Set currentTab = 0 in restoreBinlogState() so "Back to Binlog" correctly renders the binlog tab
Summary
--correlate <tablespace>flag toinno binlogthat maps row events to B+Tree leaf pages via PK lookup, with text/JSON/CSV output (Extendinno binlogwith--correlate <tablespace>— annotate events with page numbers #179).ibdfile to annotate events with clickable page numbers that navigate to the Pages tab (Web UI Binlog tab gains correlation view — click event → navigate to page #180)Changes
CLI (
--correlate)src/cli/app.rs— newcorrelate: Option<String>arg onBinlogvariantsrc/cli/binlog.rs—execute_correlated()withCorrelatedBinlogAnalysisJSON struct, enriched text/CSV output with Page and PK columnssrc/main.rs— wirecorrelatethrough dispatchWeb UI (correlation view)
web/src/components/binlog.js— dropzone for.ibdfile, WASMcorrelate_binlog_events()call, enriched events table with Page/PK columns, clickable page navigation, clear buttonweb/src/main.js—binlogCorrelationTsstate, save/restore binlog context on page navigation, "Back to Binlog" bannerweb/src/utils/help.js— updated tab description with correlation tipsTest plan
cargo clippy -- -D warningspassescargo testpasses (982 tests including 3 new correlation output tests)cargo check --target wasm32-unknown-unknown --no-default-featurespassescd web && npm run buildsucceedsinno binlog -f <binlog> --correlate <table.ibd>shows Page/PK columnsinno binlog -f <binlog> --correlate <table.ibd> --jsonincludescorrelated_eventsarray