fix(web): configure default home page for Ask GH (SOU-2281)

Merged
MS
2mo ago
+49-15

Fixes SOU-2281

Related duplicate: SOU-2303

Summary

  • Add DEFAULT_HOME_VIEW_PAGE, defaulting to search for backwards compatibility.
  • Allow the public deployment to set DEFAULT_HOME_VIEW_PAGE=ask to make Ask the default home page.
  • Preserve explicit search and ask cookie preferences.
  • Keep the server home page, sidebar ordering, and client useHomeView fallback aligned.
  • Document DEFAULT_HOME_VIEW_PAGE in the environment variable reference.

DEFAULT_HOME_VIEW_PAGE is validated server-side and defaults to search when unset. Server Components read the configured value directly, while the client receives it through the existing useHomeView prop. EXPERIMENT_ASK_GH_ENABLED is no longer used to select the default home page, though it remains available for its other existing Ask GH behavior. No org/admin default-home setting, Prisma column, or Settings → Security deployment-default UI is added.

E2E verification

Existing dual-state UI evidence covers the authenticated new-user and anonymous flows, sidebar ordering, and cookie overrides. The current configuration rename was additionally smoke-tested on Sourcebot Cloud environment 3748cd60-8e0f-41dd-b260-77d11353d533:

  • DEFAULT_HOME_VIEW_PAGE unset → / rendered the Code Search landing page.
  • DEFAULT_HOME_VIEW_PAGE=ask → / rendered the Ask landing page.
  • The Ask landing UI may show the expected local warning that no language model is configured; routing does not require a model request.

Canonical Linear issue: https://linear.app/sourcebot/issue/SOU-2281/make-ask-the-default-interface-for-public-saas
Related duplicate issue: https://linear.app/sourcebot/issue/SOU-2303/default-home-to-ask-when-experiment-ask-gh-enabled

Open in Web Open in Cursor 

Summary by cubic

Fixes SOU-2281 by making the default home page configurable per deployment. When no saved preference exists, the app now defaults to search or ask based on DEFAULT_HOME_VIEW_PAGE, which defaults to search for backwards compatibility.

  • Explicit search and ask cookie preferences continue to take precedence.
  • The server page, sidebar, client hook, and General settings view use the same configured default.
  • EXPERIMENT_ASK_GH_ENABLED no longer selects the default home page.
  • The environment variable is validated, documented, and covered by tests.

Summary by CodeRabbit

  • New Features
    • Administrators can configure the default home page as Code Search or Ask. This setting applies when no saved preference exists; saved preferences take precedence. Code Search remains the default when no alternative is configured. General settings use the configured default.