feat(p11): temps réel complet (watcher checkout principal + topic settings)
P11-A — branche du checkout principal modifiée hors Arboretum : - fs-watcher: pin « permanent » non évinçable (pinRepo/unpinRepo, repoPins dans evictIfNeeded) - worktree-manager: armMainCheckoutWatchers() + arm/désarm sur addRepo/découverte/removeRepo/hidden - index.ts: armMainCheckoutWatchers() dans runDaemon → git checkout CLI sur le principal → worktree_update <500ms sans watch client P11-B — réglages en temps réel : - protocole additif: type SettingsBroadcast (source unique, réutilisé par SettingsResponse), topic 'settings', message settings_update (validés parseClientMessage + gateway) - core/settings-bus.ts (EventEmitter) ; routes/settings émet après PATCH ; gateway relaie aux abonnés 'settings' - web: ws-client subscribeSettings + routage ; store settings applySettings/startRealtime ; AppShell abonne globalement ; SettingsView re-sync des drafts scalaires sans écraser une saisie en cours - tests: protocol (topic settings) + fs-watcher (pinRepo non évincé) ; acceptance-p11.mjs (checkout principal <500ms + settings_update)
This commit is contained in:
@@ -258,7 +258,7 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { computed, onMounted, ref } from 'vue';
|
||||
import { computed, onMounted, ref, watch } from 'vue';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { AlertCircle, Archive, Bell, BellOff, Check, CheckCircle2, Coffee, Copy, Download, FolderOpen, KeyRound, Plus, RefreshCw, ScanSearch, Send, Server, Shield, SlidersHorizontal, Terminal, Trash2, X } from '@lucide/vue';
|
||||
import type {
|
||||
@@ -470,6 +470,14 @@ async function deleteMyData(): Promise<void> {
|
||||
}
|
||||
}
|
||||
|
||||
// P11 — un settings_update WS (autre onglet/client) re-synchronise un draft SCALAIRE uniquement
|
||||
// s'il n'a pas été modifié localement (le draft valait encore l'ancienne valeur du store) → on
|
||||
// n'écrase jamais une saisie en cours.
|
||||
watch(() => settings.scanIntervalMin, (n, o) => { if (intervalDraft.value === o) intervalDraft.value = n; });
|
||||
watch(() => settings.retentionDays, (n, o) => { if (retentionDraft.value === o) retentionDraft.value = n; });
|
||||
watch(() => settings.claudeBinPath, (n, o) => { if (claudeBinDraft.value === (o ?? '')) claudeBinDraft.value = n ?? ''; });
|
||||
watch(() => settings.claudeHome, (n, o) => { if (claudeHomeDraft.value === (o ?? '')) claudeHomeDraft.value = n ?? ''; });
|
||||
|
||||
onMounted(async () => {
|
||||
await Promise.all([loadTokens(), settings.loaded ? Promise.resolve() : settings.fetch()]);
|
||||
syncDiscoveryDraft();
|
||||
@@ -477,4 +485,5 @@ onMounted(async () => {
|
||||
syncRetentionDraft();
|
||||
void push.refresh();
|
||||
});
|
||||
// Le temps réel des réglages est géré globalement par l'AppShell (settings.startRealtime).
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user