---
id: w5/m11/t001
title: Gate Custom Domains + Idle timeout on serviceType === 'web_service' in the Settings page
worker: worker5
status: done
estimate: 30m
depends_on: []
---

## Objective

The Settings page currently renders a Custom Domains section and an Idle timeout control for every service type, including Cron Jobs. Neither applies to a cron job (no HTTP traffic, no idle sleep). Gate both controls so they only render when `service.serviceDetails.parentServer.type === 'web_service'` (or equivalent field in the GraphQL fragment).

## Context

- Settings page: `dashboard/src/routes/services/$serviceId/settings.tsx` (or nearby)
- The service type field in the GraphQL fragment is likely `type` or `serviceType` on the `Server` / `ServiceDetails` object — check the local-bex stub's fixture and bex-api's `server` query resolver
- Render's live cron settings page has no Custom Domains section and no Idle timeout; both are web-service-only controls
- The phantom `www.eden-cms.com` domains visible in the Settings page are a stub-bleed artifact (w5/m10/t001 will fix the fixture); hiding the section for cron jobs eliminates the bug regardless of stub data

## Steps

1. Identify the service type field name in the GraphQL `server` / `service` query response — check `dashboard/scripts/local-bex.mjs` and `lego/backend/internal/graphql/` resolvers
2. In the Settings route component, wrap the Custom Domains card in `{service.type === 'web_service' && <CustomDomainsCard />}`
3. Wrap the Idle timeout control in the same condition
4. Confirm: in the stub, `nightly-report` must have `type: 'cron_job'` (add if missing — the stub fixture may have it already from the Overview tab's "Cron Job" badge)

## Files

- `dashboard/src/routes/services/$serviceId/settings.tsx` (primary)
- `dashboard/scripts/local-bex.mjs` (ensure cron fixture has correct `type`)

## Acceptance criteria

- [ ] Navigating to `/services/nightly-report/settings` shows no Custom Domains section
- [ ] Navigating to `/services/nightly-report/settings` shows no Idle timeout control
- [ ] Navigating to `/services/eden-cms-v2/settings` (a web service) still shows Custom Domains and Idle timeout
- [ ] No TypeScript errors

## Out of scope

- Adding cron-specific controls (that's t002)
- Fixing the stub's phantom domain data (that's w5/m10/t001 — hiding the section is sufficient here)
