Copying components from one page to another can lead to cache-related issues where some components become “ghost” components.
Context:
- The issue appears when components are copied between pages.
- Some copied components may remain visible or referenced incorrectly.
- This seems related to stale cache/state after the copy operation.
- Reproduction should prioritize components using data sources, as this scenario has the highest impact and can lead to more severe consequences.
Investigation goals:
- Reproduce the issue when copying components between pages, especially with components bound to data sources.
- Identify which cache or editor state is not refreshed correctly.
- Determine why components can become ghost components after the copy.
- Assess the impact on copied components that reference data sources.
- Define and implement the required cache invalidation or state refresh.
Expected outcome:
- Copied components should be correctly attached to the target page.
- Data source bindings should remain valid and should not create stale or ghost references.
- No ghost components should remain after copy, refresh, preview, or page switch.
- Editor state should remain consistent after cross-page component copy.
Acceptance criteria:
- The ghost component scenario is reproduced and documented, with priority given to data-source-backed components.
- The root cause is identified.
- A fix or clear implementation plan is provided.
- No regression on same-page copy/paste or regular component duplication.
- No stale data source references remain after copying components between pages.
Copying components from one page to another can lead to cache-related issues where some components become “ghost” components.
Context:
Investigation goals:
Expected outcome:
Acceptance criteria: