Skip to content

feat(lustre): add keyed application host - #23

Merged
GG-O-BP merged 1 commit into
mainfrom
feat/issue-6-keyed-lustre-host
Sep 7, 2026
Merged

feat(lustre): add keyed application host#23
GG-O-BP merged 1 commit into
mainfrom
feat/issue-6-keyed-lustre-host

Conversation

@GG-O-BP

@GG-O-BP GG-O-BP commented Sep 7, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • add glendix/lustre.keyed_host, a typed props-and-render API that preserves a hosted application for an unchanged key and remounts it when the key changes
  • use redraw.keyed for React key assignment while keeping the minimal stable hook-owning host inside the existing Lustre FFI boundary
  • add focused React lifecycle contracts for initial mount, unchanged key, fresh props, changed key, cleanup, empty keys, and nested Lustre/Redraw embedding
  • document the package-backed approach in English, Korean, and Japanese, including why directly keying an evaluated use_tea result and lustre/element/keyed do not provide host-level remounting

Ecosystem boundary

Redraw provides key assignment, but use_tea invokes hooks while its element is being produced. A key applied only after that evaluation cannot remount the hook owner. The small existing-boundary KeyedHost defers the render callback into a stable React component; redraw.keyed then keys that component. No new FFI file or application-specific datasource logic is introduced.

Verification

  • ./scripts/verify.sh inner glendix
  • GLENDIX_MENDIX_URL=http://127.0.0.1:18080 ./scripts/verify.sh final
    • the isolated verification checkout used alternate mxcli app/admin/serve ports because port 8080 was occupied by an external listener; no committed source was changed for this workaround
  • reference consumer (GG-O-BP/mendix-ironcalc-spreadui) with its local SpreadUiHost/keyed_host JavaScript removed and this branch used as a path dependency:
    • gleam format --check src test
    • gleam check
    • gleam build --warnings-as-errors
    • gleam test --runtime bun
    • bun test test/*.test.mjs
    • gleam run -m glendix/install --runtime bun
    • gleam run -m glendix/build --runtime bun

Closes #6

@GG-O-BP
GG-O-BP merged commit 5071385 into main Sep 7, 2026
1 check passed
@GG-O-BP
GG-O-BP deleted the feat/issue-6-keyed-lustre-host branch September 7, 2026 03:20
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.

[react] Provide a typed keyed host for props-driven remounting

1 participant