Skip to content

Upgrades#4

Merged
NoEgAm merged 3 commits into
mainfrom
upgrades
Dec 16, 2025
Merged

Upgrades#4
NoEgAm merged 3 commits into
mainfrom
upgrades

Conversation

@tiye
Copy link
Copy Markdown
Member

@tiye tiye commented Dec 13, 2025

No description provided.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_mut to immutable set_in for state updates
  • Updates string APIs from substring().to_string() to unsafe_substring(start, end) and from @string.View::to_string to StringView::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
Copy link

Copilot AI Dec 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
- name: moon test
- name: moon build

Copilot uses AI. Check for mistakes.
Comment thread src/main/main.mbt
app.render_loop(fn() { view(app.store.val) }, fn(op) {
@dom_ffi.log("Action: " + op.to_string())
app.store.val.update(op)
// 使用不可变更新,将新 Store 赋值给 Ref
Copy link

Copilot AI Dec 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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"

Suggested change
// 使用不可变更新,将新 Store 赋值给 Ref
// Use immutable update, assign new Store to Ref

Copilot uses AI. Check for mistakes.
@NoEgAm NoEgAm merged commit 19aa832 into main Dec 16, 2025
8 checks passed
@NoEgAm NoEgAm deleted the upgrades branch December 16, 2025 13:21
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.

3 participants