---
id: w5/m10/t002
title: Dashboard not-found state for unknown service id
worker: worker5
status: done
estimate: 30m
depends_on: [w5/m10/t001]
---

## Objective

When `server(id)` resolves to `null`, the service-detail shell renders a proper not-found state (message + link back to the services list) instead of rendering empty chrome or phantom data. This is the client half of the stub fix: even against a buggy backend, an unknown id must never look like a real service.

## Context

- `dashboard/src/routes/services.$serviceId.tsx` — the detail shell; today it has no explicit null/not-found branch (only per-tab loading/error states).
- The catch-all 404 (`src/routes/$.tsx`) and the root-route error components exist as patterns to reuse.
- Verify against the fixed stub (t001): `/services/nightly-report` must show the not-found state.

## Steps

1. Add a null-result branch in the service-detail route/shell: not-found card with a link to `/`.
2. Reuse the existing 404/error visual pattern; translate strings via `useTranslations()` (`services.*` namespace).
3. Manually verify `/services/<unknown>` and both real stub services.

## Files

- `dashboard/src/routes/services.$serviceId.tsx` (+ the shell component it renders)
- `dashboard/src/features/services/locales/{en,zh}.ts`

## Acceptance criteria

- [ ] `/services/nightly-report` renders the not-found state — header, tabs, and data all absent.
- [ ] Known service ids render exactly as before.
- [ ] Strings localized (en + zh).

## Out of scope

- List-page changes; auth/error-boundary rework.
