Files
moeka-project/packages/stage-pages
leafyy 52a9f429ed feat(plugin-host): add combined lifecycle controls (#2476)
## Summary

- Add combined `Enable and Load` and `Disable and Unload` controls to
Plugin Host Debug.
- Keep enablement persistence and runtime lifecycle changes in one
sequential store action.
- Add tests for ordering, busy state, and failure handling.
- Localize the new controls and fallback error messages in English and
Simplified Chinese.

## Verification

- `pnpm exec vitest run --config packages/stage-ui/vitest.config.ts
--project node src/stores/devtools/plugin-host-debug.test.ts`
- `pnpm -F @proj-airi/i18n test`
- `pnpm -F @proj-airi/i18n build`
- `pnpm run build:packages`
- `pnpm typecheck`
- `pnpm lint`
- Manually tested the bundled `devtools-sample-plugin` in the Electron
Plugin Host Debug page. Both combined actions updated the persisted
registry and runtime session state without restarting the app.

## Visual changes

| Before | After |
|---|---|
| ![Plugin Host Debug
before](https://github.com/user-attachments/assets/c9b3a6ec-699b-444a-ba01-50bbc2ffa3ad)
| ![Plugin Host Debug
after](https://github.com/user-attachments/assets/889dec79-a157-42a8-98f5-906d2e0b41f3)
|
| Plugin Host Debug | Plugin Host Debug with combined lifecycle controls
|
2026-09-07 19:04:17 +08:00
..

Stage Pages

@proj-airi/stage-pages contains route-level Vue pages that multiple AIRI stage applications share.

Use

Add a page under src/pages. Each stage application scans this directory through its Vite router configuration.

Import a shared page through the package boundary when code needs the component directly:

import PolaroidPage from '@proj-airi/stage-pages/pages/devtools/polaroid.vue'

When to use this package

Use this package when two or more stage applications need the same page behavior and route structure.

When not to use this package

Keep application-specific pages in the owning application. Put reusable business components in @proj-airi/stage-ui.

Put primitive UI components in @proj-airi/ui. Put shared layouts in @proj-airi/stage-layouts.