Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions apps/staged/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
<link rel="apple-touch-icon" href="/icons/apple-touch-icon.png" />
<link rel="manifest" href="/manifest.webmanifest" />
<meta name="theme-color" content="#060606" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
<meta
name="viewport"
content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"
Expand Down
2 changes: 2 additions & 0 deletions apps/staged/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
"@types/node": "^24.10.1",
"bits-ui": "^2.18.1",
"clsx": "^2.1.1",
"fake-indexeddb": "^6.2.5",
"prettier": "^3.7.4",
"prettier-plugin-svelte": "^3.4.1",
"shadcn-svelte": "^1.2.7",
Expand All @@ -52,6 +53,7 @@
"@tauri-apps/plugin-store": "^2.4.2",
"@tauri-apps/plugin-updater": "^2.10.0",
"ansi-to-html": "^0.7.2",
"idb-keyval": "^6.2.2",
"marked": "^17.0.1",
"sanitize-html": "^2.17.0",
"shiki": "^3.20.0"
Expand Down
18 changes: 17 additions & 1 deletion apps/staged/src/App.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@
import { projectStateStore } from './lib/stores/projectState.svelte';
import { initBloxEnv } from './lib/stores/bloxEnv.svelte';
import { listenForSessionStatus } from './lib/listeners/sessionStatusListener';
import { listenForCacheInvalidation } from './lib/listeners/cacheInvalidationListener';
import { listenForPageLifecycle } from './lib/listeners/pageLifecycleListener';
import { darkMode } from './lib/stores/isDark.svelte';
import * as prPollingService from './lib/services/prPollingService';
import { projectsList } from './lib/features/projects/projectsSidebarState.svelte';
Expand All @@ -61,6 +63,8 @@
let unlistenZoomOut: UnlistenFn | undefined;
let unlistenZoomReset: UnlistenFn | undefined;
let unlistenSessionStatus: UnlistenFn | undefined;
let unlistenCacheInvalidation: UnlistenFn | undefined;
let unlistenPageLifecycle: (() => void) | undefined;
let unregisterShortcuts: (() => void) | null = null;
let stopUpdaterLoop: (() => void) | null = null;
let storeIncompat = $state<StoreIncompatibility | null>(null);
Expand All @@ -86,7 +90,7 @@
const projectId = navigation.selectedProjectId;
if (!projectId) return;
try {
const branches = await commands.listBranchesForProject(projectId);
const { data: branches } = await commands.listBranchesForProject(projectId);
await Promise.allSettled(branches.map((b) => commands.refreshBranchGitState(b.id)));
} catch {
// best-effort refresh; ignore failures
Expand Down Expand Up @@ -228,6 +232,14 @@
darkMode.init();
document.addEventListener('keydown', handleKonamiKey);

// Web resume accelerator: the restored project id is available synchronously
// (navigation seeds it from localStorage at module load). Warm that project's
// branch timelines in parallel right away so cards find data ready, rather
// than each doing its own serialized IndexedDB read after ProjectHome mounts.
if (navigation.selectedProjectId) {
void commands.warmProjectTimelines(navigation.selectedProjectId);
}

// Listen for the app menu Preferences item.
unlistenSettings = listenToEvent('menu:settings', () => {
if (!triggerShortcut('app-open-settings')) openSettings();
Expand All @@ -254,6 +266,8 @@
// Global session-status listener — must live at App level so it works
// regardless of which view the user is on. See sessionStatusListener.ts.
unlistenSessionStatus = listenForSessionStatus();
unlistenCacheInvalidation = listenForCacheInvalidation();
unlistenPageLifecycle = listenForPageLifecycle();

try {
await initPreferences();
Expand Down Expand Up @@ -422,6 +436,8 @@
unlistenZoomOut?.();
unlistenZoomReset?.();
unlistenSessionStatus?.();
unlistenCacheInvalidation?.();
unlistenPageLifecycle?.();
stopUpdaterLoop?.();
});

Expand Down
Loading