@@ -157,7 +157,7 @@ export function getViewNodeId(type: string, context: AmbientContext): string {
157157 uniqueness += `/worktree/${ context . worktree . uri . path } ` ;
158158 }
159159 if ( context . remote != null ) {
160- uniqueness += `/remote/${ context . remote . name } ` ;
160+ uniqueness += `/remote/${ context . remote . id } ` ;
161161 }
162162 if ( context . tag != null ) {
163163 uniqueness += `/tag/${ context . tag . id } ` ;
@@ -237,25 +237,35 @@ export abstract class ViewNode<
237237 return types . includes ( this . type as unknown as T [ number ] ) ;
238238 }
239239
240- protected _uniqueId ! : string ;
241- splatted = false ;
240+ splatted : boolean | undefined ;
241+
242242 // NOTE: @eamodio uncomment to track node leaks
243243 // readonly uuid = uuid();
244244
245+ protected _uniqueId ! : string ;
246+
245247 constructor (
246248 public readonly type : Type ,
247249 // public readonly id: string | undefined,
248250 uri : GitUri ,
249251 public readonly view : TView ,
250252 protected parent ?: ViewNode | undefined ,
251- //** Indicates if this node is only shown as its children, not itself */
252- splatted ?: boolean ,
253253 ) {
254- this . splatted = splatted ?? false ;
255-
256254 // NOTE: @eamodio uncomment to track node leaks
257255 // queueMicrotask(() => this.view.registerNode(this));
258256 this . _uri = uri ;
257+
258+ const originalGetChildren = this . getChildren ;
259+ this . getChildren = function ( this : ViewNode ) {
260+ this . splatted ??= true ;
261+ return originalGetChildren . call ( this ) ;
262+ } ;
263+
264+ const originalGetTreeItem = this . getTreeItem ;
265+ this . getTreeItem = function ( this : ViewNode ) {
266+ this . splatted = false ;
267+ return originalGetTreeItem . call ( this ) ;
268+ } ;
259269 }
260270
261271 protected _disposed = false ;
0 commit comments