feat(web): add an org default home view
Closed
MS
2mo ago+243+243+012345678901234567890123456789-25-25-01234567890123456789
Fixes SOU-2281
Summary
- Add an owner-only deployment default home view setting under Settings → Security → Deployment defaults.
- Persist the setting on
Orgwith a nullableHomeViewenum column. Existing orgs resolve tosearchuntil changed. - Resolve home view as an authenticated user’s personal
sb.home-viewcookie, org default, thensearch. - Anonymous users ignore any stale personal cookie and use the org default, then
search. - Apply the same resolver to the home route, sidebar ordering/active state, and personal General settings control.
Notes
- This intentionally does not use
EXPERIMENT_ASK_GH_ENABLED. - The experiment-flag approach from closed PR #1672 was rejected in favor of this general org/admin deployment setting.
- Existing personal
sb.home-viewcookies continue to override the org setting for authenticated users. - Migration:
20260922021010_add_org_default_home_view.
Verification
- Focused resolver and Security action tests pass, including anonymous stale-cookie precedence.
- Web type-check, lint, and production build pass.
- Browser walkthrough verified owner save, General inheritance, Ask home routing, and sidebar alignment.


Summary by cubic
Adds an org-level default home view so admins can control whether the app opens to Ask or Search for users without a personal preference.
- Adds an owner-only setting under Settings → Security → Deployment defaults; the value persists on
Org.defaultHomeView. - For logged-in users, a personal
sb.home-viewcookie overrides the org default. Guests ignore the cookie and fall back to the org default, thensearch. - Resolution is applied consistently to the home route, sidebar, and personal General settings.
Summary by CodeRabbit
-
New Features
- Owners can configure the deployment’s default home view: Code Search or Ask.
- Authenticated users can override the default with their personal preference.
- Home view selection now consistently respects personal settings, deployment defaults, and authentication status.
-
Bug Fixes
- Anonymous visitors now use the configured deployment default instead of stale personal preferences.
-
Tests
- Added coverage for preference priority, validation, persistence, and owner-only access.