diff --git a/webui/src/app/router.test.tsx b/webui/src/app/router.test.tsx index ea6e3510..f347a5be 100644 --- a/webui/src/app/router.test.tsx +++ b/webui/src/app/router.test.tsx @@ -54,7 +54,6 @@ function mockIssuesFetch() { function createShellBridge(overrides: Partial = {}): ShellBridge { return { - getCurrentPageId: vi.fn<() => ShellPageId>(() => 'dashboard'), getCurrentProfileContext: vi.fn(() => ({ profileId: 1, isAdmin: false })), isPageAllowed: vi.fn(() => true), getProfileHomePage: vi.fn<() => ShellPageId>(() => 'discover'), diff --git a/webui/src/platform/shell/bridge.test.ts b/webui/src/platform/shell/bridge.test.ts index 3d6ec03f..24787e1b 100644 --- a/webui/src/platform/shell/bridge.test.ts +++ b/webui/src/platform/shell/bridge.test.ts @@ -14,7 +14,6 @@ describe('waitForShellContext', () => { getProfileHomePage: vi.fn(() => 'discover'), isPageAllowed: vi.fn(() => true), activateLegacyPath: vi.fn(), - getCurrentPageId: vi.fn(() => 'issues'), getCurrentProfileContext: vi.fn(() => ({ profileId: 2, isAdmin: true })), resolveLegacyPath: vi.fn(() => 'issues'), setActivePageChrome: vi.fn(), @@ -36,7 +35,6 @@ describe('waitForShellContext', () => { getProfileHomePage: vi.fn(() => 'discover'), isPageAllowed: vi.fn(() => true), activateLegacyPath: vi.fn(), - getCurrentPageId: vi.fn(() => 'issues'), getCurrentProfileContext, resolveLegacyPath: vi.fn(() => 'issues'), setActivePageChrome: vi.fn(), diff --git a/webui/src/platform/shell/bridge.ts b/webui/src/platform/shell/bridge.ts index 253ff3a9..04db84c8 100644 --- a/webui/src/platform/shell/bridge.ts +++ b/webui/src/platform/shell/bridge.ts @@ -79,9 +79,6 @@ export async function waitForShellContext(): Promise { export function bindWindowWebRouter(router: AnyRouter) { window.SoulSyncWebRouter = { routeManifest: [...shellRouteManifest], - getCurrentPageId() { - return resolveShellPageFromPath(window.location.pathname); - }, getCurrentPath() { return normalizeShellPath(window.location.pathname); }, diff --git a/webui/src/platform/shell/globals.d.ts b/webui/src/platform/shell/globals.d.ts index 1a07fdb5..c7bd15a1 100644 --- a/webui/src/platform/shell/globals.d.ts +++ b/webui/src/platform/shell/globals.d.ts @@ -17,7 +17,6 @@ declare global { }; SoulSyncWebRouter?: { routeManifest: ShellRouteDefinition[]; - getCurrentPageId: () => ShellPageId | null; getCurrentPath: () => string; resolvePageId: (pathname: string) => ShellPageId | null; navigateToPage: ( @@ -28,7 +27,6 @@ declare global { ) => Promise; }; SoulSyncWebShellBridge?: { - getCurrentPageId: () => ShellPageId; getCurrentProfileContext: () => ShellProfileContext | null; isPageAllowed: (pageId: ShellPageId) => boolean; getProfileHomePage: () => ShellPageId; diff --git a/webui/src/routes/issues/-route.test.tsx b/webui/src/routes/issues/-route.test.tsx index 1b0b13dc..402966e1 100644 --- a/webui/src/routes/issues/-route.test.tsx +++ b/webui/src/routes/issues/-route.test.tsx @@ -16,7 +16,6 @@ function createResponse(body: unknown, ok = true, status = 200) { function createShellBridge(overrides: Partial = {}): ShellBridge { return { - getCurrentPageId: vi.fn<() => ShellPageId>(() => 'issues'), getCurrentProfileContext: vi.fn(() => ({ profileId: 2, isAdmin: true })), isPageAllowed: vi.fn(() => true), getProfileHomePage: vi.fn<() => ShellPageId>(() => 'discover'), diff --git a/webui/static/shell-bridge.js b/webui/static/shell-bridge.js index e161cbf7..2dc493be 100644 --- a/webui/static/shell-bridge.js +++ b/webui/static/shell-bridge.js @@ -124,9 +124,6 @@ window.SoulSyncWorkflowActions = { }; window.SoulSyncWebShellBridge = { - getCurrentPageId() { - return currentPage || getWebRouter()?.resolvePageId?.(window.location.pathname) || _getPageFromPath(); - }, getCurrentProfileContext() { if (!currentProfile) return null; return {