Skip to content

feat: add SubProgram for nested model composition - #75

Merged
meszmate merged 2 commits into
mainfrom
feature/sub-program
Mar 31, 2026
Merged

meszmate merged 2 commits into
mainfrom
feature/sub-program

Conversation

@meszmate

@meszmate meszmate commented Mar 30, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • Adds SubProgram(ChildModel, ParentMsg) generic wrapper in src/core/sub_program.zig
  • Child models have independent init/update/view lifecycle
  • Commands translate from child to parent (quit, tick, terminal commands)
  • Parent controls message routing to active child
  • Example shows two independent counters with tab-switching

Allows embedding independent child models inside a parent with
message routing, command translation, and lifecycle management.
@meszmate
meszmate merged commit 56b6039 into main Mar 31, 2026
9 checks passed
@meszmate
meszmate deleted the feature/sub-program branch March 31, 2026 03:37
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