Skip to content

fix(miniapp): finalize agent-generated updates - #1902

Merged
bobleer merged 1 commit into
GCWing:mainfrom
bobleer:bob/fix-miniapp-agent-updates
Jul 30, 2026
Merged

fix(miniapp): finalize agent-generated updates#1902
bobleer merged 1 commit into
GCWing:mainfrom
bobleer:bob/fix-miniapp-agent-updates

Conversation

@bobleer

@bobleer bobleer commented Jul 30, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • add a first-class FinalizeMiniApp Agent tool that reloads edited files, recompiles the app, persists the runtime revision, and refreshes open MiniApp surfaces
  • track stable MiniApp content hashes so unchanged filesystem syncs and draft applies do not manufacture versions or snapshots
  • keep customization actions blocked until the Agent turn reaches a terminal state
  • document separate active-app and customization-draft workflows in the bundled miniapp-dev skill

Type and Areas

Type:

Bug fix / regression fix

Areas:

Rust product domains, Agent tools, MiniApp runtime, Web UI, bundled skills

Motivation / Impact

Agent-created MiniApps could report a newer version while the running application still used stale compiled content. Generic file edits had no explicit lifecycle handoff, open runtimes were not notified, and the skill did not require a final synchronization step. Users can now update generated MiniApps reliably, while no-op finalization keeps the existing version.

Verification

  • cargo test -p bitfun-product-domains --features miniapp --test miniapp_contracts — 39 passed
  • cargo test -p bitfun-core finalize_miniapp — 2 passed
  • cargo test -p bitfun-core sync_from_fs_recompiles_without_versioning_unchanged_content — passed
  • cargo test -p bitfun-core unchanged_draft_apply_does_not_require_manifest_or_create_a_version — passed
  • cargo test -p bitfun-core miniapp_lifecycle_tools_in_defaults — 2 passed
  • cargo test -p bitfun-tool-packs --features product-full product_provider_group_plan_preserves_builtin_tool_order — passed
  • pnpm --dir src/web-ui run test:run src/app/scenes/miniapps/customization/miniAppCustomizationSession.test.ts src/app/scenes/miniapps/customization/miniAppCustomizationPrompt.test.ts — 12 passed
  • pnpm run type-check:web — passed
  • pnpm run lint:web — passed
  • pnpm run check:repo-hygiene — passed
  • skill-creator quick_validate.py for miniapp-dev — passed
  • cargo check --workspace --exclude bitfun-desktop — passed

Reviewer Notes

A full cargo check --workspace was attempted. The Desktop Tauri build script stopped before compilation because src/mobile-web/dist is absent in this worktree. The non-Desktop workspace check and focused bitfun-core tests passed.

The persisted runtime.content_hash field is serde-defaulted for backward compatibility. Existing apps are upgraded when their runtime state is next loaded.

Checklist

  • This PR is focused and does not include secrets, temporary prompts, generated scratch files, or unrelated artifacts.
  • Relevant verification is recorded above, or skipped checks are explained.
  • User-facing strings, docs, and locales are updated where applicable.

Add a first-class FinalizeMiniApp tool that syncs source files, recompiles runtime output, and notifies open MiniApps. Track content hashes so no-op syncs and draft applies do not manufacture versions, and keep customization actions blocked until the Agent turn finishes. Document the active-app and draft workflows in the bundled skill.
@bobleer
bobleer merged commit b285abe into GCWing:main Jul 30, 2026
7 checks passed
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