-
Notifications
You must be signed in to change notification settings - Fork 41
migration activity channels
Status: shipped in 1.0.0. Affects plugins that subscribe to, or filter, one of the framework's own activity channels.
The eleven channels the shell publishes on the activity bus were named desktop-mode/<event>. That prefix predates the OpenStation rebranding; the hook prefix (os.activity.), the broadcast topics (os.data-changed, os.post.changed, …) and the global (wp.os) had already moved. The channels now match:
| Before | After |
|---|---|
desktop-mode/toast-requested |
os/toast-requested |
desktop-mode/toast-shown |
os/toast-shown |
desktop-mode/notification-requested |
os/notification-requested |
desktop-mode/notification-shown |
os/notification-shown |
desktop-mode/window-attention-requested |
os/window-attention-requested |
desktop-mode/badge-changed |
os/badge-changed |
desktop-mode/open-requested |
os/open-requested |
desktop-mode/presence-changed |
os/presence-changed |
desktop-mode/presence-snapshot-applied |
os/presence-snapshot-applied |
desktop-mode/game-score-recorded |
os/game-score-recorded |
desktop-mode/upload-hud-complete |
os/upload-hud-complete |
There is no alias. The old names are not published and not filtered. A subscriber still registered against desktop-mode/badge-changed stops firing silently, because an activity subscription for a channel nobody publishes is not an error.
Payload shapes are unchanged. Only the channel slug moved.
Two adjacent renames ride along, both internal and neither part of the channel contract: the createSharedStore key backing the presence store (desktop-mode/presence → os/presence) and the five planned, not-yet-published folder-sharing channels in folder-sharing.md.
Rename the slug at every subscribe / publish / filter call site:
-wp.os.activity.subscribe( 'desktop-mode/badge-changed', repaint );
+wp.os.activity.subscribe( 'os/badge-changed', repaint );If you register through raw wp.hooks instead of the activity API, the hook name changes with it — the channel's separator is a period on the hook bus, so the shell's own segment is now os rather than desktop-mode:
wp.hooks.addFilter(
- 'os.activity.desktop-mode.notification-requested',
+ 'os.activity.os.notification-requested',
'my-plugin/dnd',
( intent ) => ( isDndActive() ? { ...intent, cancel: true } : intent ),
);Search your whole project, not just the channels in the table above. A plugin-owned channel of your own that happens to start with desktop-mode/ is yours and must NOT be renamed; a blanket find-and-replace across a project will move it and break your own subscribers. Rename the eleven slugs by name.
ActivityChannelMap is declared in openstation/activity. Augmenting it requires the .d.ts to be a module, which means at least one top-level import or export. Without one, TypeScript reads the block as an ambient module declaration — it invents a new, empty openstation/activity that shadows the real one, and you silently get no payload checking and no error saying so:
+import type {} from 'openstation/activity';
+
-declare module 'desktop-mode/activity' {
+declare module 'openstation/activity' {
interface ActivityChannelMap {
'my-plugin/something-happened': { id: number; reason: string };
}
}The specifier moved with the package name (openstation), and ./activity is now a declared exports subpath so it actually resolves. The bare import type {} line is load-bearing — with it, publish( 'my-plugin/something-happened', { id: 'x' } ) is a compile error; without it, that call typechecks.
-
Your own channels. The convention is still
<plugin>/<event>; nothing about plugin-owned slugs moved.os/is now the shell's namespace — subscribe and filter freely, but publish under your own slug. -
REST namespaces, options, tables, upload directories, cron hooks, post types, query vars and web-storage keys. Everything reading
desktop-mode/desktop_mode_there is frozen data that live installs already depend on, and it stays. -
Broadcast topics.
wp.os.broadcast()topics were alreadyos.*. -
wp.hookshandler namespaces andwp.os.fetchsource:tags. Strings likedesktop-mode/commands-registry(the second argument toaddAction) andsource: 'desktop-mode/release-art'still carry the old prefix. They are labels, not addresses — nothing subscribes by them — so they are a separate cosmetic pass rather than part of this contract change.
- The event-driven framework — the full channel table.
-
JS reference —
activity— payload shapes and the hook-name mapping.
This wiki is generated from the docs/ directory — edits made here are overwritten by the next sync.
To change a page, open a pull request against docs/.
Guides
- Development guide
- Releasing openstation
- Agents security model
- API Index
- Architecture
- Bridge protocol — wiring overview
- <os-*> component reference
- Native Desktop Host — Experimental
- Desktop themes
- Dock customization — two registries, one mental model
- The event-driven framework
- Files on the Desktop
- Folder sharing
- Getting Started
- Hooks Reference
- Icons
- JavaScript Reference
- The Living Tree — algorithm definition
- Mio
- Native Windows & Framework Interop
- Plugin compatibility layer
- Progressive Web App (PWA)
- Station Home
- Using openstation from your own plugin
Migration notes
- Migration: built-in activity channels move to the os/ namespace
- Migration: window, wallpaper and widget bundles load on demand
- Migration — the navigation model
- Migration: a native window's tabs move to the window chrome
All examples
- AI Agents — extend and invoke from a plugin
- wp.os.ai.ask() — programmatic AI Copilot
- Tune the AI model config
- Custom arrange-menu action
- Open a child window its owner can't cover
- Style a specific admin page inside the iframe
- Code Blue — register your plugin's log file
- Open a file in the Code editor (deep-link from any window)
- Connect to a window — title-bar button + iframe pub/sub
- Content changes — live-refresh every window listing your type
- Custom window chrome (Experimental)
- Register a custom unfocused-window effect
- Example: render a data table
- Real file storage — react to uploads, gate policy, share from PHP
- React to a window being set free onto the real desktop
- Cross-window devtools — instrumentation primitives
- Add a dock item with a badge
- Decorate the dock without forking the renderer
- Replace the dock rail entirely
- Retune the Drafts widget's AI writing assistant
- Gate OpenStation by role
- Iframe-initiated window opens
- Build a feed reader without the bookkeeping
- Inject data into openStationConfig
- Render a list without losing clicks — renderKeyedList()
- Example: layout primitives (body → panel → row → col)
- Use <os-*> components from a plugin that ships as a zip
- Restyle and drive Mio
- Add an action that works on a whole selection
- WP Explorer — custom post types and their folder
- Add an action button to a WP Explorer preview pane
- Example: native Posts window
- Example: native window with tabs
- Native windows
- Customize note → post conversion
- Send a notification
- OAuth relay — connect to an external service
- OS-file drop
- <os-flyout> — window-scoped sliding card
- Plugins window — extras
- Track who's around — wp.os.presence
- Example: progress bar
- PWA install — surface your own button
- React to window events
- Example: extend the Trash
- Register a slash-command
- Register a desktop theme from a plugin
- Register a game
- Example: register a desktop icon (Jorvy)
- Register a wallpaper
- Register a widget
- Related entities — extend the title bar's "Related" menu
- The native-window render ctx
- Programmatic folder sharing
- Share state across multi-bundle plugins — wp.os.createSharedStore()
- Example: loading spinner
- Add an opt-in card to Station Home
- Accept drops on your desktop icon
- Give a tile two icons, one per state
- Add a row to a window's ⋯ menu
- Example: window activity & the status ring
- Window controls
- Subscribe to window lifecycle events
- Window links — relate windows and restyle the ties (Experimental)
- Window loading state — spinner overlay & ready signal
- Show a banner at the top of a window
- Pulse a window's icon — Window.requestAttention()
- Register a custom window reveal
- Window slots
- Window themes
- Native window with bundle-bound config