Files
IdeA/.ideai/memory/plugin-soft-refresh-and-agent-install-tools-delivered.md

64 lines
4.1 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
name: plugin-soft-refresh-and-agent-install-tools-delivered
description: memory note plugin-soft-refresh-and-agent-install-tools-delivered
metadata:
type: project
---
# Plugin soft refresh et tools agent-facing livrés
Le ticket #279 a livré sur `develop` le flux plugins sans redémarrage applicatif quand un soft refresh UI suffit.
## Contrat livré
- Nouveau tool MCP agent-facing `idea_plugin_install_from_directory({ path, expectedPluginId? })`.
- Le tool réutilise l’installation depuis dossier existante côté application.
- Le chemin fourni par l’agent est résolu relativement au project root du requester, ou accepté en absolu seulement s’il reste sous ce project root après canonicalization.
- Rejets couverts : chemin hors project root, fichier au lieu de dossier, symlink sortant, manifest absent/id invalide, mismatch `expectedPluginId`.
- Tool classé `WriteAction`, masqué/refusé sans permission explicite.
- Installation depuis dossier renvoie `restartRequired: false` quand le soft refresh suffit et publie `PluginInstalled`.
- `idea_plugin_reload({ pluginId, expectedContentHash? })` reste le tool canonique pour hot reload d’un plugin déjà installé depuis sa source enregistrée ; il reste `WriteAction` et publie `PluginReloaded`.
## Contrat frontend
- `PluginRuntimeProvider` n’est plus un bootstrap one-shot : il écoute `pluginInstalled` et `pluginReloaded`.
- Sur événement, il relit `plugin.listRuntimeContributions()` et reconstruit un `PluginRuntimeRegistry` via `loadPlugins`.
- Le refresh remplace uniquement le contexte plugin ; il ne fait pas `window.location.reload()`, ne remonte pas `App`/`ProjectsView`, ne ferme pas les fenêtres, ne coupe pas les agents, terminaux, PTY, conversations ou background tasks.
- Les layouts `customPluginLayout` restent en place et retrouvent leur contribution par `providerPluginId/layoutId`.
- Si une contribution disparaît ou échoue, le fallback existant est conservé sans supprimer la cellule.
- Les fenêtres secondaires qui montent leur propre `PluginRuntimeProvider` bénéficient du même mécanisme.
## Commits
- `979965a` — `feat(plugins): idea_plugin_install_from_directory + reload couvrant le refresh UI — backend #279`
- `44dc677` — `feat(plugins): soft refresh UI des contributions après install/reload — frontend #279`
- `0b709b9` — merge local vers `develop`
- `3ff6208` — sync tickets #278/#279
## QA
QA verte :
- `cargo fmt --all --check`
- `git diff --check`
- `cargo test -p infrastructure --test mcp_server -- --nocapture` — 39 OK
- `cargo test -p infrastructure --test plugin_install_load -- --nocapture` — 5 OK
- `cargo test -p backend plugin_directory_resolution -- --nocapture` — 4 OK
- `cargo test -p application plugin -- --nocapture` — vert, incluant install soft-refresh, mismatch id, reload/hash/reconcile
- `cargo test -p application open_plugin_layout_window -- --nocapture` — 2 OK
- `cargo test -p application restore_open_windows -- --nocapture` — 2 OK
- `cd frontend && npm run typecheck`
- `cd frontend && npm test -- --run src/features/plugins/PluginRuntimeProvider.test.tsx src/features/plugins/plugins.test.tsx` — 13 OK
- `cd frontend && npm test -- --run src/features/plugins/PluginLayoutCellView.test.tsx src/features/projects/pluginGitRepository.test.tsx src/features/layout/layoutTabsGitGraph.test.tsx src/features/agents/CustomAgentChatView.test.tsx` — 78 OK
## AppImage
Rebuild AppImage effectué après merge avec le skill `build-appimage` :
- `npm --prefix frontend run build` — OK
- depuis `crates/app-tauri` : `CARGO_HOME=/tmp/idea-cargo-home APPIMAGE_EXTRACT_AND_RUN=1 NO_STRIP=1 ../../frontend/node_modules/.bin/tauri build --bundles appimage` — OK
Artefact produit : `/home/anthony/Documents/Projects/IdeA/target/release/bundle/appimage/IdeA_0.3.0_amd64.AppImage`, `114M`, généré le 2026-09-08 à 13:11.
## Limite live
L’AppImage installée n’a pas été remplacée et IdeA n’a pas été relancé pendant le cycle, afin de ne pas tuer l’orchestrateur actif. Pour rendre le correctif actif dans l’application courante, remplacer l’AppImage installée puis relancer IdeA quand l’utilisateur est prêt.