<!-- Generated by scripts/generate_ai_collab_docs.py. Edit metadata in that script. -->

# Cook Web Domain: c-components

This file adds local guidance for `src/cook-web/src/c-components`. Read the
repository root and `src/cook-web/AGENTS.md` first, then use this file for
domain-specific frontend ownership.

## Scope

- This domain owns legacy React components used by the `c` experience,
  including branding, modal, mobile, and compatibility UI pieces.

- Representative files in this subtree:
  `src/cook-web/src/c-components/PopupModal.tsx`,
  `src/cook-web/src/c-components/TrackingVisit.tsx`,
  `src/cook-web/src/c-components/logo/LogoWithText.tsx`,
  `src/cook-web/src/c-components/m/MainButtonM.tsx`

- Keep durable frontend rules here only when they are more specific than the
  Cook Web-wide guidance in the parent directory.

- Use focused frontend verification around `src/cook-web/src/c-components/`
  before widening to global type and lint checks.

## Do

- Start from the local entry files and preserve how `c-components` currently
  separates route code, shared logic, state, and utilities.

- Preserve styling and prop behavior relied on by the legacy `c` pages before
  reshaping component interfaces.

- Keep compatibility UI concerns local to this subtree instead of mixing them
  invisibly into modern shared components.

- Treat mobile-oriented legacy components as active product surfaces while the
  `c` experience remains supported.

## Avoid

- Do not swap in modern component primitives without verifying the `c` pages
  still render and behave correctly.

- Do not copy business logic into these components when the legacy store or
  service layers already own it.

- Do not bury asset or layout assumptions in callers when the component
  boundary should keep them explicit.

- Avoid pushing domain-local rules up to shared docs unless another frontend
  subtree truly depends on the same constraint.

## Commands

- `rg -n "c-components" src/cook-web/src` to locate call sites before editing
  this subtree.

- `cd src/cook-web && npm run type-check` after TypeScript, store, hook,
  request, or route-contract changes.

- `cd src/cook-web && npm run lint` before closing the task when shared
  frontend code or route files changed.

- `cd src/cook-web && npm run test -- src/c-components/` for focused Jest
  coverage when this subtree already has or gains tests.

## Tests

- Add or update focused tests closest to `src/cook-web/src/c-components/` for
  the happy path and the most important regression or business-code error
  path.

- Rerun type-checking and linting when exported props, store fields, hook
  contracts, or route behavior move.

- When a domain depends on shared request or normalization helpers, update
  those tests or add new ones in the same task.

- Document skipped UI, browser, or provider-dependent verification in the task
  summary when local automation cannot cover it.

## Related Skills

- `src/cook-web/SKILL.md`

- `SKILL.md`

- Create a focused skill under `src/cook-web/skills/<topic>/SKILL.md` when the
  same debugging or migration workflow repeats.
