Files
formbricks/apps
Dhruwang 650aee4a86 fix: show copy icon on legacy environmentId and reintroduce duplicate survey action (ENG-978, ENG-987)
ENG-978 — legacy environmentId badge had `copyDisabled` set, so the copy
icon was hidden even though clicking the badge already triggered a copy
(the onClick was always wired). Removing the prop makes the affordance
match the behavior: icon, tooltip, hover state, and click all work
together — same as every other IdBadge on the page.

ENG-987 — survey overview dropdown lost the Duplicate action when the
overview was migrated to the v3 API flow. Backend copy still works
(`copySurveyToOtherWorkspaceAction` + `copySurveyToOtherWorkspace` in
`survey/list/lib/survey.ts`, which already creates the copy with
`status: "draft"`).

Reintroduces a Duplicate menu item in `survey-dropdown-menu.tsx` for
users with manage access. Calls the existing action with
`targetWorkspaceId = workspace.id`, then routes to the new draft's
editor on success. Matches the pattern already used by `SurveyAnalysisCTA`.

Updates the Playwright assertion that expected `Duplicate` to be absent
from drafts — it should now be visible, since drafts are exactly the
case users want to duplicate.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-20 17:22:10 +05:30
..