UX-908: fix record expansion slowness on master#2266
UX-908: fix record expansion slowness on master#2266malinskibeniamin merged 3 commits intomasterfrom
Conversation
|
@claude review |
|
Claude finished @malinskibeniamin's task in 2m 19s —— View job Code Review
Good performance-focused PR. The three core optimizations are sound: disabling Monaco Issues to Address🔴 Biome lint failures (will block CI)Four issues flagged by the automated reviewer need to be fixed: 1. // current
if (!editor || !container) {
// suggested
if (!(editor && container)) {2. // current
({ children, isDisabled, ...props }, ref) => (
<button ref={ref} disabled={Boolean(isDisabled)} {...props}>
// suggested (spread before disabled to avoid overwriting)
({ children, isDisabled, ...props }, ref) => (
<button disabled={Boolean(isDisabled)} ref={ref} {...props}>3. 4. Fix all test file lint issues →%20on%20line%2023%2C%20change%20Button%20forwardRef%20to%20put%20%60disabled%3D%7BBoolean(isDisabled)%7D%60%20before%20%60ref%3D%7Bref%7D%60%20and%20before%20%60%7B...props%7D%60%3B%202)%20remove%20the%20blank%20line%20before%20the%20%60import%20%7B%20CompressionType%2C%20type%20Payload%2C%20type%20TopicMessage%20%7D%60%20import%20on%20line%2033.&repo=redpanda-data/console) Observations / Minor Notes
|
|
Addressed the review follow-ups in a0a9df5: stabilized the Monaco viewer config/callbacks, removed redundant cached-JSON fallback casts, and added the changed-message rerender regression test. Focused tests are passing locally. |
What
Optimize topic message expansion for object/protobuf payloads on
masterwhile keeping Monaco in the read-only JSON viewer path.Why
The topic message expansion slowdown is still rooted in cumulative frontend work: mounted Monaco viewers in expanded rows, extra rerenders in expanded-message rendering, and repeated
JSON.stringify(...)work in object previews.masteralready has a modular message-display structure, so this backport applies the same behavioral fix to those current files.How
kowl-json-view, disableautomaticLayout, and manually relayout only when the container size actually changesmasterand layer the read-only viewer optimizations on topExpandedMessagein the modular message-display path and move row-specific callbacks inside it so stable parent props can skip rerenderskeyJson/valueJsonin the key/value preview components instead of re-stringifying payload objects during renderfrontend/vitest.setup.tsso the new tests run cleanly in this branch’s jsdom environmentAcceptance Criteria
masterTesting Steps
cd frontend && ./node_modules/.bin/vitest run src/components/misc/kowl-json-view.test.tsx src/components/pages/topics/Tab.Messages/message-display/message-display.test.tsxmasterbuild