fix: upload manager — URL imports, active count, board reset
1. URL imports now participate in upload manager pipeline: addUrlJob() creates a job row, uploadComplete/setFailed called on success/failure — consistent with local file uploads 2. activeCount only counts uploading/processing jobs, not failed. Failed jobs no longer inflate the "Uploads (n)" header count. 3. uploadManager.clear() called on boardId change so stale jobs from a previous board don't linger in the next board's panel.
This commit is contained in:
@@ -64,6 +64,11 @@ export default function Editor({ isPublicView }: EditorProps) {
|
||||
const canvasContainerRef = useRef<HTMLDivElement>(null);
|
||||
const [uploadManager] = useState(() => new UploadManager());
|
||||
|
||||
// Reset upload manager when switching boards
|
||||
useEffect(() => {
|
||||
uploadManager.clear();
|
||||
}, [boardId, uploadManager]);
|
||||
|
||||
// UI state
|
||||
const [activeTool, setActiveTool] = useState<ToolType>(ToolType.SELECT);
|
||||
const [color, setColor] = useState('#ffffff');
|
||||
|
||||
Reference in New Issue
Block a user