Skip to content

[LLV] Kanban demo server sync#641

Draft
mat-hek wants to merge 9 commits into
mf/llv-kanbanfrom
mf/llv-kanban-comp
Draft

[LLV] Kanban demo server sync#641
mat-hek wants to merge 9 commits into
mf/llv-kanbanfrom
mf/llv-kanban-comp

Conversation

@mat-hek

@mat-hek mat-hek commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

No description provided.

mat-hek and others added 7 commits June 17, 2026 15:53
Pull the per-view fake-root-view wiring out of the startup scan's inline
loop into a reusable setupFakeView(el, initialRendered), guarded on
viewsById so a repeat call for the same element is a no-op. Add a viewSpec
helper (which reads the serialized data-pop-assigns) and have the scan build
its payload from it. Groundwork for spawning and tearing down views after
startup.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Give local views a stable, deterministic mount-point id and a phx-hook, then
drive their lifecycle from it so views the host LiveView adds, re-renders, or
removes after startup are handled:

- updated(): forward changed data-pop-assigns to the runtime via a new
  llv_update_assigns dispatcher event and an update_assigns server handler
  (guarded with function_exported?, so plain views are unaffected)
- mounted(): start views added after the initial scan (gated on Popcorn
  readiness; the idempotent setupFakeView keeps any overlap a no-op)
- destroyed(): stop the view's runtime process via a new llv_destroy event
  and drop its fake view

Pages without a host LiveView never fire hooks and keep using the startup
scan only.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Introduce the LocalComponent abstraction: a local view with LiveComponent-style
mount/1 and update/2 callbacks that takes assigns from the hosting server
LiveView. It is seeded on mount, and update/2 re-runs whenever the server
re-renders with changed assigns — wired through the __llv_update__ entrypoint the
server calls and a phx-hook on the component's mount point. Convert the kanban
example to a server LiveView that re-seeds the board this way, and document the
flow.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@mat-hek mat-hek changed the base branch from main to mf/llv-kanban June 19, 2026 10:10
@mat-hek mat-hek force-pushed the mf/llv-kanban-comp branch 3 times, most recently from 4e48cf2 to db13eed Compare June 22, 2026 14:27
@mat-hek mat-hek force-pushed the mf/llv-kanban-comp branch from db13eed to b0e9cd7 Compare June 22, 2026 15:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant