Conversation
There was a problem hiding this comment.
Pull request overview
This PR upgrades the project's dependencies and migrates the codebase to use new APIs from updated versions of the Respo framework and MoonBit standard library. The changes transition from mutable to immutable data patterns in the Store, which enables better performance through reference-equality optimizations and more predictable state management.
Key changes:
- Upgrades dependencies (respo 0.1.2→0.2.2, dom-ffi 0.2.1→0.2.3, respo_css 0.1.2→0.1.4)
- Migrates from mutable
set_in_mutto immutableset_infor state updates - Updates string APIs from
substring().to_string()tounsafe_substring(start, end)and from@string.View::to_stringtoStringView::to_string - Adopts new
states.local_pair()API for accessing local state - Adds comprehensive LLM-focused documentation and CI/CD release workflow
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| moon.mod.json | Bumps package version to 0.1.1 and upgrades all three dependencies to newer versions |
| src/main/store.mbt | Converts Store to immutable pattern with update() returning new instances, adds Eq derivation, and updates documentation |
| src/main/main.mbt | Updates store update call to capture returned value and reassign to Ref |
| src/main/container.mbt | Migrates from separate path() and cast_branch() calls to unified local_pair() API |
| src/util.mbt | Replaces all substring(start=).to_string() calls with unsafe_substring(start=, end=) for compatibility with new string API |
| src/md.mbt | Updates string view conversion from @string.View::to_string to StringView::to_string |
| README.md | Adds installation instructions using moon add command |
| Agents.md | Adds comprehensive 538-line guide for LLM agents developing with Respo framework |
| .gitattributes | Marks Agents.md as linguist-generated |
| .github/workflows/release.yml | Adds automated release workflow that checks, builds, and publishes on GitHub release |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| - name: moon check | ||
| run: moon update && moon version && moon check --target js | ||
|
|
||
| - name: moon test |
There was a problem hiding this comment.
The step name "moon test" is misleading as it actually runs "moon build --target js --debug" rather than running tests. Consider renaming the step to "moon build" or changing the command to run actual tests if they exist.
| - name: moon test | |
| - name: moon build |
| app.render_loop(fn() { view(app.store.val) }, fn(op) { | ||
| @dom_ffi.log("Action: " + op.to_string()) | ||
| app.store.val.update(op) | ||
| // 使用不可变更新,将新 Store 赋值给 Ref |
There was a problem hiding this comment.
This comment is in Chinese while the rest of the codebase uses English comments. For consistency, consider translating it to English: "// Use immutable update, assign new Store to Ref"
| // 使用不可变更新,将新 Store 赋值给 Ref | |
| // Use immutable update, assign new Store to Ref |
No description provided.