Skip to content
This repository was archived by the owner on Sep 30, 2024. It is now read-only.

Commit db7a268

Browse files
authored
Chore: remove search console (#63322)
The search console page is broken, is not used or maintained, and is only referenced by a series of blog posts years ago. We have product support to remove it.
1 parent 611dcfa commit db7a268

File tree

11 files changed

+3
-213
lines changed

11 files changed

+3
-213
lines changed

client/shared/src/settings/settings.tsx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -302,10 +302,6 @@ export const useSettings = (): Settings | null => {
302302

303303
const defaultFeatures: SettingsExperimentalFeatures = {
304304
codeMonitoring: true,
305-
/**
306-
* Whether we show the multiline editor at /search/console
307-
*/
308-
showMultilineSearchConsole: false,
309305
codeMonitoringWebHooks: true,
310306
showCodeMonitoringLogs: true,
311307
showFullTreeContext: false,

client/web/BUILD.bazel

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1419,7 +1419,6 @@ ts_project(
14191419
"src/savedSearches/SavedSearchUpdateForm.tsx",
14201420
"src/search-jobs/utility.ts",
14211421
"src/search/QuickLinks.tsx",
1422-
"src/search/SearchConsolePage.tsx",
14231422
"src/search/SearchPageWrapper.tsx",
14241423
"src/search/autocompletion/hooks.ts",
14251424
"src/search/autocompletion/source.ts",

client/web/src/LegacyLayout.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@ export const LegacyLayout: FC<LegacyLayoutProps> = props => {
6262

6363
const isSearchRelatedPage = (routeMatch === PageRoutes.RepoContainer || routeMatch?.startsWith('/search')) ?? false
6464
const isSearchHomepage = location.pathname === '/search' && !parseSearchURLQuery(location.search)
65-
const isSearchConsolePage = routeMatch?.startsWith('/search/console')
6665
const isSearchJobsPage = routeMatch?.startsWith(PageRoutes.SearchJobs)
6766
const isSearchNotebooksPage = routeMatch?.startsWith(PageRoutes.Notebooks)
6867
const isCodySearchPage = routeMatch === PageRoutes.CodySearch
@@ -188,7 +187,6 @@ export const LegacyLayout: FC<LegacyLayoutProps> = props => {
188187
isSearchRelatedPage &&
189188
!isSearchHomepage &&
190189
!isCommunitySearchContextPage &&
191-
!isSearchConsolePage &&
192190
!isSearchNotebooksPage &&
193191
!isCodySearchPage &&
194192
!isSearchJobsPage

client/web/src/routes.tsx

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import { useEffect } from 'react'
22

33
import { Navigate, useNavigate, type RouteObject } from 'react-router-dom'
44

5-
import { useExperimentalFeatures } from '@sourcegraph/shared/src/settings/settings'
65
import { lazyComponent } from '@sourcegraph/shared/src/util/lazyComponent'
76

87
import { codyProRoutes } from './cody/codyProRoutes'
@@ -12,7 +11,6 @@ import { PageRoutes } from './routes.constants'
1211
import { isSearchJobsEnabled } from './search-jobs/utility'
1312

1413
const SiteAdminArea = lazyComponent(() => import('./site-admin/SiteAdminArea'), 'SiteAdminArea')
15-
const SearchConsolePage = lazyComponent(() => import('./search/SearchConsolePage'), 'SearchConsolePage')
1614
const SignInPage = lazyComponent(() => import('./auth/SignInPage'), 'SignInPage')
1715
const RequestAccessPage = lazyComponent(() => import('./auth/RequestAccessPage'), 'RequestAccessPage')
1816
const SignUpPage = lazyComponent(() => import('./auth/SignUpPage'), 'SignUpPage')
@@ -244,20 +242,6 @@ export const routes: RouteObject[] = [
244242
/>
245243
),
246244
},
247-
{
248-
path: PageRoutes.SearchConsole,
249-
element: (
250-
<LegacyRoute
251-
render={props => (
252-
<SearchConsolePageOrRedirect
253-
{...props}
254-
telemetryRecorder={props.platformContext.telemetryRecorder}
255-
/>
256-
)}
257-
condition={({ licenseFeatures }) => licenseFeatures.isCodeSearchEnabled}
258-
/>
259-
),
260-
},
261245
{
262246
path: PageRoutes.Welcome,
263247
// This route is deprecated after we removed the post-sign-up page experimental feature, but we keep it for now to not break links.
@@ -441,16 +425,6 @@ export const routes: RouteObject[] = [
441425
},
442426
]
443427

444-
function SearchConsolePageOrRedirect(props: LegacyLayoutRouteContext): JSX.Element {
445-
const showMultilineSearchConsole = useExperimentalFeatures(features => features.showMultilineSearchConsole)
446-
447-
return showMultilineSearchConsole ? (
448-
<SearchConsolePage {...props} />
449-
) : (
450-
<Navigate replace={true} to={PageRoutes.Search} />
451-
)
452-
}
453-
454428
function SearchPageOrUpsellPage(props: LegacyLayoutRouteContext): JSX.Element {
455429
const { isCodeSearchEnabled } = props.licenseFeatures
456430
if (!isCodeSearchEnabled) {

client/web/src/search/SearchConsolePage.module.scss

Lines changed: 0 additions & 28 deletions
This file was deleted.

client/web/src/search/SearchConsolePage.tsx

Lines changed: 0 additions & 135 deletions
This file was deleted.

client/web/src/storm/pages/LayoutPage/LayoutPage.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@ export const Layout: React.FC<LegacyLayoutProps> = props => {
6868
const isSearchRelatedPage =
6969
(isRepositoryRelatedPage || routeMatches.some(routeMatch => routeMatch.pathname.startsWith('/search'))) ?? false
7070
const isSearchHomepage = location.pathname === '/search' && !parseSearchURLQuery(location.search)
71-
const isSearchConsolePage = routeMatches.some(routeMatch => routeMatch.pathname.startsWith('/search/console'))
7271
const isSearchNotebooksPage = routeMatches.some(routeMatch => routeMatch.pathname.startsWith(PageRoutes.Notebooks))
7372
const isCodySearchPage = routeMatches.some(routeMatch => routeMatch.pathname.startsWith(PageRoutes.CodySearch))
7473

@@ -217,7 +216,6 @@ export const Layout: React.FC<LegacyLayoutProps> = props => {
217216
isSearchRelatedPage &&
218217
!isSearchHomepage &&
219218
!isCommunitySearchContextPage &&
220-
!isSearchConsolePage &&
221219
!isSearchNotebooksPage &&
222220
!isCodySearchPage
223221
}

dev/global-settings.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
// This is set from an environment variable
33
"experimentalFeatures": {
44
"batchChangesExecution": true,
5-
"showMultilineSearchConsole": true,
65
"codeMonitoring": true,
76
"enableLazyBlobSyntaxHighlighting": true,
87
"enableLazyFileResultSyntaxHighlighting": true,

internal/settings/settings_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -174,13 +174,13 @@ func TestMergeSettings(t *testing.T) {
174174
},
175175
right: &schema.Settings{
176176
ExperimentalFeatures: &schema.SettingsExperimentalFeatures{
177-
ShowMultilineSearchConsole: pointers.Ptr(false),
177+
BatchChangesExecution: pointers.Ptr(false),
178178
},
179179
},
180180
expected: &schema.Settings{
181181
ExperimentalFeatures: &schema.SettingsExperimentalFeatures{
182-
CodeMonitoringWebHooks: pointers.Ptr(true),
183-
ShowMultilineSearchConsole: pointers.Ptr(false),
182+
CodeMonitoringWebHooks: pointers.Ptr(true),
183+
BatchChangesExecution: pointers.Ptr(false),
184184
},
185185
},
186186
}, {

schema/schema.go

Lines changed: 0 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)