changelog.d/4727-interactive-artifacts.md
Rama main · réplica de lectura del repositorio original.
- **A Project can run its own JavaScript with shared data, such as a poll or a task list (#4720, default off).** With the workspace flag `artifact_interactive` (on top of `artifact_projects` and `artifact_dashboard_data`), `CREWSHIP_PAGE_RUNTIME_ORIGIN` set and a web build with `NEXT_PUBLIC_ARTIFACT_DASHBOARDS=true` (the library lists an interactive Project as a Dashboard), a Project that contains `interactive.json` opens its screens in a sandboxed frame on the separate Page runtime origin. Its scripts never run on the Crewship site and receive no credential; `window.crewship.data` reaches the Project's declared Dashboard collections only through the viewer's browser, over a private message port, and the server applies the viewer's own permissions and version checks: the owner and people with edit access write at the latest version, readers only read. With the flag off a Project opens as the ordinary script-free preview. The artifact project snapshot gains an optional `interactive` field, and the migration `20261107142708_artifact_interactive_flag` adds the flag, off; `CREWSHIP_ARTIFACT_INTERACTIVE_ENABLED=true` turns it on for every workspace.