OpenGenerativeUI icon indicating copy to clipboard operation
OpenGenerativeUI copied to clipboard

fix: ExplainerCardsPortal relies on CopilotKit internal DOM structure

Open jerelvelarde opened this issue 8 months ago • 0 comments

Description

Severity: P2 — Fragility

ExplainerCardsPortal in apps/app/src/components/explainer-cards.tsx:108-118 reaches into CopilotKit's internal DOM via welcomeScreen.children[0] and .lastElementChild. There are no guards for structural changes.

Failure mode

Cards silently disappear or render in the wrong location after a CopilotKit upgrade.

Suggested fix

  • Add defensive checks: verify mainContent has the expected role/testid before inserting
  • Consider a comment with the CopilotKit version this was tested against
  • Alternatively, use a CopilotKit-provided extension point if one exists

From self-review finding F05

jerelvelarde avatar Mar 14 '26 04:03 jerelvelarde