Engineering/AI documentation
Configuration
The Configuration tab connects interface work with design-tool setup, including Figma-oriented import or export flows.
Concepts: wcag
Implementation Summary
The Configuration tab connects interface work with design-tool setup, including Figma-oriented import/export flows and Stitch-backed generation setup. Configuration is project-owned: a token or API key saved here belongs to the active project, not to a global process setting.
Frontend Surface
frontend/src/components/interfaces/FigmaTab.tsxfrontend/src/components/interfaces/InterfacesOnboarding.tsxfrontend/src/stores/interfacesStore.tsbackend/app/api/routes/interfaces_common.pybackend/app/api/routes/interfaces_integrations.pybackend/app/models/interface_config.pybackend/app/services/figma_service.pybackend/app/services/stitch_service.py
State, API, And Backend Contracts
Stores
frontend/src/stores/interfacesStore.ts
API And Backend
backend/app/api/routes/interfaces_integrations.pybackend/app/models/interface_config.py
Architecture Notes
- The feature is mounted through
frontend/src/components/interfaces/FigmaTab.tsxbehind theConfigurationtab label, and the UI navigation path is recorded in the inventory. tests/test_project_scope_contracts.pyguards the source-level tab-label contract so the project-facing Interfaces tab does not regress to the oldFigmamenu copy.- Configuration actions require an active project in the UI and call project-scoped backend routes. Global admins still configure a concrete project; the route does not fall back to a global configuration path.
- Figma and Stitch secrets are stored on
ProjectInterfaceConfigas encrypted per-project fields. The configure routes no longer mutatesettings.figma_api_token,settings.stitch_api_key, or process environment values. - Figma file helpers require
project_id, check project access, and use the active project's Figma token before reading components or design-system data. - The real-user benchmark treats live Figma and Stitch calls as optional unless bounded test credentials are explicitly supplied. It may exercise mock/setup-error paths, but scoring should not fail because private design-tool tokens are absent.
- The frontmatter and manifest entries are the durable contract for agents updating this page after code changes.
- When the referenced component, store, route, agent, skill, or test behavior changes, regenerate and validate the feature documentation.
Agents, Skills, LLM, MCP, And Permissions
- Stitch is reached through the Stitch MCP protocol with the active project's encrypted API key. It must never use a process-wide fallback for project-facing Interfaces flows.
Tests And Verification
tests/test_interfaces.pytests/test_project_scope_contracts.pytests/real_user_benchmark/run.mjs
Related Features
Related Concepts
Compass Evidence
- Spec/task: CF-SPEC-53 / CF-657; CF-SPEC-59 / CF-740; CF-SPEC-60 / CF-763; CF-SPEC-121
- Inventory source:
docs/features/inventory.json
When To Update
- Update this page whenever the listed UI components, stores, routes, model behavior, permissions, or tests change.
- Regenerate the site and machine manifests with
python scripts/feature_docs.py --seed-missing --generate-site --check.