removed unused welcome route (#8196)
This commit is contained in:
@@ -200,8 +200,8 @@ describe('App Component - Brand New State', () => {
|
|||||||
window.location.hash = '';
|
window.location.hash = '';
|
||||||
window.location.search = '';
|
window.location.search = '';
|
||||||
window.location.pathname = '/';
|
window.location.pathname = '/';
|
||||||
window.sessionStorage.clear();
|
window.sessionStorage?.clear?.();
|
||||||
window.localStorage.clear();
|
window.localStorage?.clear?.();
|
||||||
});
|
});
|
||||||
|
|
||||||
afterEach(() => {
|
afterEach(() => {
|
||||||
@@ -246,10 +246,10 @@ describe('App Component - Brand New State', () => {
|
|||||||
expect(mockElectron.reactReady).toHaveBeenCalled();
|
expect(mockElectron.reactReady).toHaveBeenCalled();
|
||||||
});
|
});
|
||||||
|
|
||||||
expect(screen.getByText(/^Select an AI model provider/)).toBeInTheDocument();
|
expect(screen.getByText(/^Welcome to goose/)).toBeInTheDocument();
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should not redirect to /welcome when provider is configured', async () => {
|
it('should not redirect when provider is configured', async () => {
|
||||||
// Mock provider configured
|
// Mock provider configured
|
||||||
mockElectron.getConfig.mockReturnValue({
|
mockElectron.getConfig.mockReturnValue({
|
||||||
GOOSE_DEFAULT_PROVIDER: 'openai',
|
GOOSE_DEFAULT_PROVIDER: 'openai',
|
||||||
|
|||||||
+1
-21
@@ -52,7 +52,7 @@ import { useNavigation } from './hooks/useNavigation';
|
|||||||
import { errorMessage } from './utils/conversionUtils';
|
import { errorMessage } from './utils/conversionUtils';
|
||||||
import { getInitialWorkingDir } from './utils/workingDir';
|
import { getInitialWorkingDir } from './utils/workingDir';
|
||||||
import { usePageViewTracking } from './hooks/useAnalytics';
|
import { usePageViewTracking } from './hooks/useAnalytics';
|
||||||
import { trackOnboardingCompleted, trackErrorWithContext } from './utils/analytics';
|
import { trackErrorWithContext } from './utils/analytics';
|
||||||
import { AppEvents } from './constants/events';
|
import { AppEvents } from './constants/events';
|
||||||
import { registerPlatformEventHandlers } from './utils/platform_events';
|
import { registerPlatformEventHandlers } from './utils/platform_events';
|
||||||
|
|
||||||
@@ -247,25 +247,6 @@ const ConfigureProvidersRoute = () => {
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
const WelcomeRoute = () => {
|
|
||||||
const navigate = useNavigate();
|
|
||||||
|
|
||||||
return (
|
|
||||||
<div className="w-screen h-screen bg-background-primary">
|
|
||||||
<ProviderSettings
|
|
||||||
onClose={() => {
|
|
||||||
navigate('/', { replace: true });
|
|
||||||
}}
|
|
||||||
isOnboarding={true}
|
|
||||||
onProviderLaunched={(model?: string) => {
|
|
||||||
trackOnboardingCompleted('other', model);
|
|
||||||
navigate('/', { replace: true });
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
// Wrapper component for SharedSessionRoute to access parent state
|
// Wrapper component for SharedSessionRoute to access parent state
|
||||||
const SharedSessionRouteWrapper = ({
|
const SharedSessionRouteWrapper = ({
|
||||||
isLoadingSharedSession,
|
isLoadingSharedSession,
|
||||||
@@ -627,7 +608,6 @@ export function AppInner() {
|
|||||||
<div style={{ position: 'relative', width: '100%', height: '100%' }}>
|
<div style={{ position: 'relative', width: '100%', height: '100%' }}>
|
||||||
<Routes>
|
<Routes>
|
||||||
<Route path="launcher" element={<LauncherView />} />
|
<Route path="launcher" element={<LauncherView />} />
|
||||||
<Route path="welcome" element={<WelcomeRoute />} />
|
|
||||||
<Route path="configure-providers" element={<ConfigureProvidersRoute />} />
|
<Route path="configure-providers" element={<ConfigureProvidersRoute />} />
|
||||||
<Route path="standalone-app" element={<StandaloneAppView />} />
|
<Route path="standalone-app" element={<StandaloneAppView />} />
|
||||||
<Route
|
<Route
|
||||||
|
|||||||
@@ -821,7 +821,6 @@ const createChat = async (app: App, options: CreateChatOptions = {}) => {
|
|||||||
permission: '/permission',
|
permission: '/permission',
|
||||||
ConfigureProviders: '/configure-providers',
|
ConfigureProviders: '/configure-providers',
|
||||||
sharedSession: '/shared-session',
|
sharedSession: '/shared-session',
|
||||||
welcome: '/welcome',
|
|
||||||
};
|
};
|
||||||
|
|
||||||
if (viewType) {
|
if (viewType) {
|
||||||
|
|||||||
@@ -3,7 +3,6 @@ import { Recipe } from '../api';
|
|||||||
import { UserInput } from '../types/message';
|
import { UserInput } from '../types/message';
|
||||||
|
|
||||||
export type View =
|
export type View =
|
||||||
| 'welcome'
|
|
||||||
| 'chat'
|
| 'chat'
|
||||||
| 'pair'
|
| 'pair'
|
||||||
| 'settings'
|
| 'settings'
|
||||||
@@ -77,9 +76,6 @@ export const createNavigationHandler = (navigate: NavigateFunction) => {
|
|||||||
navigate('/shared-session', { state: options });
|
navigate('/shared-session', { state: options });
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'welcome':
|
|
||||||
navigate('/welcome', { state: options });
|
|
||||||
break;
|
|
||||||
case 'extensions':
|
case 'extensions':
|
||||||
navigate('/extensions', { state: options });
|
navigate('/extensions', { state: options });
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in New Issue
Block a user