before the great git rework

This commit is contained in:
2026-10-30 11:27:44 +01:00
parent 9bdda896af
commit b9c03a7637
45 changed files with 70 additions and 562 deletions
@@ -15,7 +15,7 @@ extension WorkspaceModel {
/// Reacts to a disk change from the watcher: project and git events gather into one debounced refresh.
public func handle(_ event: WatchEvent) async {
switch event {
case .project: scheduleRefresh([.git, .tree, .symbols, .openFiles, .note])
case .project: scheduleRefresh([.git, .tree, .symbols, .openFiles])
case .git: scheduleRefresh(.git)
case .config: await reloadConfig()
case .cleanCopy: await cleanCopyChanged()
@@ -61,7 +61,7 @@ extension WorkspaceModel {
/// Reads the stores once up front, so a pass that outlives a project switch only touches the old project.
func run(_ scope: RefreshScope) async {
let sourceControl = sourceControl, explorer = explorer, editor = editor, note = note
let sourceControl = sourceControl, explorer = explorer, editor = editor
let current = generation
if scope.contains(.symbols) {
await services?.symbols.invalidate()
@@ -70,8 +70,7 @@ extension WorkspaceModel {
async let git: Void = scope.contains(.git) ? (sourceControl?.refresh() ?? ()) : ()
async let tree: Void = scope.contains(.tree) ? (explorer?.reload() ?? ()) : ()
async let files: Void = scope.contains(.openFiles) ? (editor?.filesChanged(nil) ?? ()) : ()
async let notes: Void = scope.contains(.note) ? (note?.reloadIfClean() ?? ()) : ()
_ = await (git, tree, files, notes)
_ = await (git, tree, files)
}
/// Restarts the countdown on every change, so a burst of writes loads the class list once.