fix(web): default home to Ask when Ask GitHub experiment is enabled (SOU-2281)

Draft
MS
2mo ago
+69-15

Fixes SOU-2281

Summary

  • Default / to the Ask landing page when EXPERIMENT_ASK_GH_ENABLED is true and no home-view cookie is set.
  • Preserve explicit ask and search cookie preferences.
  • Keep the server home page, sidebar ordering, and Settings default-home-view control aligned.

The public app is gated by the existing EXPERIMENT_ASK_GH_ENABLED server environment variable. The client receives the server-computed default through the existing server-to-client prop pattern, so no new public environment variable is introduced.

Linear issue: https://linear.app/sourcebot/issue/SOU-2281/make-ask-the-default-interface-for-public-saas

Open in Web Open in Cursor 

Summary by cubic

Fixes SOU-2303 by defaulting / to the Ask landing page when the EXPERIMENT_ASK_GH_ENABLED experiment is on and no home-view cookie is set. Previously the home page, sidebar, and settings all defaulted to Code Search.

  • Adds shared getDefaultHomeView and resolveHomeView helpers so the home page, sidebar, and settings compute the same default.
  • Explicit ask and search cookie choices still override the default.
  • No new public environment variable is introduced; the default is passed to the client through existing server-to-client props.