⬆️ version bump & fix race conditions in API cache and renderers
- Bump Cargo.lock version to `0.3.47`
- Fix race condition in API cache by using unique request keys and proper promise cleanup
- Avoid duplicate pending requests with `request:${key}` prefix
- Improve renderer snapshot error handling: clear invalid snapshots on failure and always clean up loading flag in `finally`
- Add debounce to renderer refresh logic (500ms) preventing excessive concurrent fetches
- Use local `currentRendererId` to avoid stale ID usage across async boundaries
This commit is contained in:
@@ -135,12 +135,18 @@ onMounted(async () => {
|
||||
});
|
||||
|
||||
// Watch renderers pour sync automatique des tabs
|
||||
// Note: on watch la taille du tableau + les IDs pour éviter un deep watch coûteux
|
||||
watch(
|
||||
() => allRenderers.value,
|
||||
(newRenderers) => {
|
||||
syncWithRenderers(filterRenderers(newRenderers));
|
||||
() => ({
|
||||
length: allRenderers.value.length,
|
||||
ids: allRenderers.value.map(r => r.id).join(','),
|
||||
}),
|
||||
(newVal, oldVal) => {
|
||||
// Re-sync uniquement si le nombre ou les IDs ont changé
|
||||
if (newVal.length !== oldVal?.length || newVal.ids !== oldVal?.ids) {
|
||||
syncWithRenderers(filterRenderers(allRenderers.value));
|
||||
}
|
||||
},
|
||||
{ deep: true },
|
||||
);
|
||||
|
||||
// Watch l'UDN du WebRenderer local : quand il s'établit, resync pour faire apparaître notre onglet
|
||||
|
||||
Reference in New Issue
Block a user