remove fallback routing to hub/home for unknown routes (#3954)

This commit is contained in:
Zane
2025-08-08 10:37:09 -07:00
committed by GitHub
parent 0eb0108e2b
commit 48c1ec8afd
-22
View File
@@ -958,28 +958,6 @@ export default function App() {
console.log(
'Ignoring recipe config changes to prevent navigation conflicts with new window creation'
);
} else {
// Only navigate to chat route if we're not already on a valid route
const currentHash = window.location.hash;
const validRoutes = [
'#/',
'#/pair',
'#/settings',
'#/sessions',
'#/schedules',
'#/recipes',
'#/permission',
'#/configure-providers',
'#/shared-session',
'#/recipe-editor',
'#/extensions',
];
if (!validRoutes.includes(currentHash)) {
console.log('No valid route detected, navigating to chat route (hub)');
window.location.hash = '#/';
window.history.replaceState({}, '', '#/');
}
}
} catch (error) {
console.error('Error in system initialization:', error);