fix(portals): preserve Xtream restore retry state

This commit is contained in:
4gray committed 2026-07-30 00:58:38 +02:00
1 parent b0598f8f70
commit 83fb06e79a
24 files changed
+913 -115

No files matched your search

@@ -67,7 +67,6 @@ export class WorkspaceShellXtreamImportService {
readonly canCancelXtreamImport = computed(
() =>
this.isElectron &&
this.xtreamStore.isImporting() &&
Boolean(this.xtreamStore.activeImportSessionId()) &&
!this.xtreamStore.isCancellingImport()
);
@@ -193,7 +192,7 @@ export class WorkspaceShellXtreamImportService {
readonly isImportRunning = computed(
() =>
!this.xtreamStore.contentInitBlockReason() &&
this.xtreamStore.isImporting()
Boolean(this.xtreamStore.activeImportSessionId())
);
readonly isRefreshPreparationRunning = computed(() =>
Boolean(this.activeRefreshPreparation())
@@ -444,6 +444,18 @@ describe('WorkspaceShellFacade', () => {
expect(facade.showXtreamImportOverlay()).toBe(true);
});
it('keeps a cache-only Xtream import session blocking and cancellable', () => {
const xtreamStore = TestBed.inject(
XtreamStore
) as unknown as MockXtreamStore;
const xtreamImport = TestBed.inject(WorkspaceShellXtreamImportService);
xtreamStore.activeImportSessionId.set('xtream-import-session');
expect(xtreamStore.isImporting()).toBe(false);
expect(facade.showXtreamImportOverlay()).toBe(true);
expect(xtreamImport.canCancelXtreamImport()).toBe(true);
});
it('shows the Xtream overlay during refresh preparation on the dashboard', () => {
facade.currentUrl.set('/workspace/dashboard');
refreshPreparationSignal.set({