From 5b39f8a061c1d1d263a666823fd859448dfa1cb1 Mon Sep 17 00:00:00 2001 From: Hampton Lintorn-Catlin Date: Thu, 5 Mar 2026 15:16:10 -0500 Subject: [PATCH 1/2] Namespace Stimulus controllers with coplan-- prefix The engine's importmap pins controllers under controllers/coplan, which registers them as coplan--text-selection, coplan--tabs, etc. in Stimulus. The views were referencing non-namespaced identifiers (text-selection, tabs, dropdown) which only worked in the main coplan app because it had duplicate copies of the controllers at the non-namespaced path. Host apps like coplan-square that rely solely on the engine's importmap never loaded the controllers. Update all data-controller, data-*-target, and data-action attributes to use the coplan-- namespace prefix. Amp-Thread-ID: https://ampcode.com/threads/T-019cbf49-a8fa-739b-9d02-f3f3eab982f4 Co-authored-by: Amp --- .../comment_threads/_new_comment_form.html.erb | 14 +++++++------- .../comment_threads/_reply_form.html.erb | 2 +- .../coplan/comment_threads/_thread.html.erb | 2 +- engine/app/views/coplan/plans/_header.html.erb | 6 +++--- engine/app/views/coplan/plans/show.html.erb | 18 +++++++++--------- 5 files changed, 21 insertions(+), 21 deletions(-) diff --git a/engine/app/views/coplan/comment_threads/_new_comment_form.html.erb b/engine/app/views/coplan/comment_threads/_new_comment_form.html.erb index 30fb228..204b0c1 100644 --- a/engine/app/views/coplan/comment_threads/_new_comment_form.html.erb +++ b/engine/app/views/coplan/comment_threads/_new_comment_form.html.erb @@ -1,17 +1,17 @@ -
<% if CoPlan::AutomatedPlanReviewer.enabled.any? %> -