Commit a6f04f9
committed
Fix: Resolve CI build failures for Crane Visualizer panel
This commit addresses several issues that caused the CI build to fail:
1. **Corrected Module Import Paths:**
* I changed import paths in `src/crane_visualizer_panel.tsx` for
`settings_utils.ts` and `constants.ts` from `../` to `./` to
correctly resolve modules within the `src` directory.
2. **Addressed React UMD Global Errors:**
* I added `import React from 'react';` to `src/crane_visualizer_panel.tsx`
(merging with existing named React imports). This ensures `React` is
in scope for JSX compilation, as required by the `"jsx": "react"`
setting in `tsconfig.json`.
3. **Fixed `unsubscribe` TypeError and Logic:**
* I corrected the argument passed to `context.unsubscribe` in the topic
subscription `useEffect` hook in `src/crane_visualizer_panel.tsx`.
It now correctly passes an array of topic strings (`[topic]`)
instead of an array of objects (`[{ topic }]`), aligning with the
expected signature for unsubscribing by subscription ID.
This also fixes a potential memory leak where previous topics were
not being unsubscribed upon topic change.
These changes should resolve the CI build errors and ensure the panel
builds successfully.1 parent 597f129 commit a6f04f9
1 file changed
+6
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
17 | | - | |
18 | | - | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| |||
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
84 | | - | |
| 84 | + | |
| 85 | + | |
85 | 86 | | |
86 | 87 | | |
87 | 88 | | |
| |||
0 commit comments