mirror of
https://github.com/nexu-io/open-design.git
synced 2026-06-01 03:14:35 +07:00
Four follow-up gaps surfaced from comparing the v2 spec field lists against live PostHog data on a DS-create + DS-detail walkthrough: 1. **`design_system_apply_result` had no `page_name=studio` carrier.** PR #2706 wired the home variant (NewProjectPanel picker) but the in-project header picker (`ProjectDesignSystemPicker`, lives in ProjectView chrome) PATCHed `project.designSystemId` without emitting an apply row. The funnel only saw applies from the home-side, not from running projects switching their DS. Fix: `ProjectView.handleChangeDesignSystemId` emits `design_system_apply_result` with `page_name=studio`, `action=select_design_system` or `clear_selection`, `design_system_selection_mode=manual`, and the DS's origin/status mapped from the picker's `DesignSystemSummary`. 2. **`design_system_create_result.project_id` was always missing.** The contract had `project_id` optional but the emit site never populated it, even though a successful generate path opens a workspace project (`project.id` is in scope right after `ensureDesignSystemWorkspace`). `created_as_project: true` rows carried no project id at all. Fix: `emitCreateResult` signature gains a `projectId` parameter; the success branch passes `project.id`, failure branches pass `undefined`. 3. **`design_system_review_result` only emitted on Looks good / Needs work clicks (`review_action: looks_good|needs_work`).** The spec also defines `submit_revision` and `regenerate` actions. When a user clicks Needs work → types feedback → sends, the send IS the `submit_revision` lifecycle moment, but no row fired. Dashboards couldn't separate "picked Needs work but never sent" from "picked Needs work and dispatched a revision request". Fix: `sendProjectChatMessage` checks for `feedbackSection` (set by the Needs work onClick) and emits `review_action: submit_revision`, `result: submitted`, with the section slug and the feedback length bucket. `regenerate` stays out of scope — the current UI has no explicit regenerate button; the Generate path always creates a fresh DS. 4. **`page_view{page_name=design_system_project}` carried no `project_id`.** Both the generation-active and the design_system_preview emissions had `system.id` but not the workspace project id, so the funnel couldn't join the DS detail page_view to the project the user actually edits inside. Fix: both `trackPageView` calls pass `workspaceProjectId`; the useEffect deps add `workspaceProjectId` so a delayed ensure (workspace mounts after first render) re-emits with the now- known id. Validation: pnpm --filter @open-design/web typecheck clean pnpm --filter @open-design/web test 1844/1844 |
||
|---|---|---|
| .. | ||
| daemon | ||
| desktop | ||
| landing-page | ||
| packaged | ||
| telemetry-worker | ||
| web | ||
| AGENTS.md | ||