diff --git a/.changeset/plugin-rendered-cards-column-flags.md b/.changeset/plugin-rendered-cards-column-flags.md new file mode 100644 index 0000000000..1fc565ea39 --- /dev/null +++ b/.changeset/plugin-rendered-cards-column-flags.md @@ -0,0 +1,7 @@ +--- +"@runfusion/fusion": patch +--- + +summary: Cards drawn by plugin views and the right dock now use the board's own lane names. +category: fix +dev: Both `renderTaskCard` producers built a `TaskCard` without `taskColumnFlags` despite having the per-task map in scope. diff --git a/packages/dashboard/app/components/dashboard/MainContent.tsx b/packages/dashboard/app/components/dashboard/MainContent.tsx index c399b2f888..99f0bd0fee 100644 --- a/packages/dashboard/app/components/dashboard/MainContent.tsx +++ b/packages/dashboard/app/components/dashboard/MainContent.tsx @@ -375,6 +375,9 @@ export function MainContent({ renderTaskCard: (task: Task | TaskDetail) => ( ({ })); vi.mock("../../TaskCard", () => ({ - TaskCard: ({ task, onOpenDetail }: { task: Task | TaskDetail; onOpenDetail: (task: Task | TaskDetail) => void }) => ( - + TaskCard: ({ task, onOpenDetail, taskColumnFlags }: { + task: Task | TaskDetail; + onOpenDetail: (task: Task | TaskDetail) => void; + taskColumnFlags?: Record; + }) => ( + ), })); @@ -301,4 +312,34 @@ describe("MainContent graph task pop-out wiring", () => { act(() => result.current.popOut(otherTask)); expect(result.current.tasks.map((task) => task.id)).toEqual(["FN-GRAPH", "FN-OTHER"]); }); + /* + FNXC:WorkflowResolvedColumns 2026-07-31-05:20: + A PLUGIN-RENDERED CARD RESOLVED NO COLUMN TRAITS AT ALL. + + `renderTaskCard` is how a plugin view draws a real task card. It built a `TaskCard` without + `taskColumnFlags`, so every role helper inside that card fell back to the legacy id — archive and + revert affordances, progress, the elapsed-time indicator, the planning badge — for every plugin + view on every board. The map was already in this component's scope; the card was simply never + given it. + + The same omission existed in `useRightDockController`'s `renderTaskCard`, which also had the map in + scope. Both are fixed together: this is one affordance with two producers, which is the shape the + Surface Enumeration rule exists for. + + REVERT CHECK: drop `taskColumnFlags` from either `renderTaskCard` and this reads "none". + */ + it("hands a plugin-rendered card its own resolved column traits", () => { + hostContexts.length = 0; + render( + , + ); + + const card = screen.getByTestId("rendered-task-card").querySelector("button"); + expect(card?.getAttribute("data-column-flags")).toBe(JSON.stringify({ complete: true })); + }); }); diff --git a/packages/dashboard/app/components/useRightDockController.tsx b/packages/dashboard/app/components/useRightDockController.tsx index 57031ecfc1..627ff6baff 100644 --- a/packages/dashboard/app/components/useRightDockController.tsx +++ b/packages/dashboard/app/components/useRightDockController.tsx @@ -174,6 +174,10 @@ export function useRightDockController(input: RightDockControllerInput): RightDo const renderTaskCard = useCallback((task: Task | TaskDetail) => ( input.openDetailTask(value)} onDeleteTask={input.onDeleteTask}