Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions assets/css/desktop-files.css
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,19 @@
pointer-events: none;
}

/*
* The wallpaper's layer starts where the work area starts. The grid
* canvas is the work area's SIZE (`gridCanvasFor()`), and tiles are
* placed from the layer's top-left, so a band claimed at the top or
* left — a reserved band (`wp.os.workArea.reserve()`), a dock there —
* must move the layer's origin too, or the first row/column of icons
* lands under it. Folder windows' layers fill their own canvas.
*/
#os-area > .os-files-layer {
top: var( --os-work-area-inset-top, 0px );
left: var( --os-work-area-inset-left, 0px );
}

/*
* Live drop-cell preview. A soft outline that hovers at the cell
* the dropped tile will land in, so the user can predict where the
Expand Down
1 change: 1 addition & 0 deletions desktop-mode.php
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@ function openstation_request_needs_admin_modules() {
// Content-changes must load before the recycle bin — the bin's
// changelog delegates into the generic recorder.
require_once OPENSTATION_DIR . 'includes/content-changes.php';
require_once OPENSTATION_DIR . 'includes/pulse-monitor.php';
require_once OPENSTATION_DIR . 'includes/recycle-bin/bootstrap.php';
require_once OPENSTATION_DIR . 'includes/desktop-files/bootstrap.php';
require_once OPENSTATION_DIR . 'includes/desktop-themes/bootstrap.php';
Expand Down
1 change: 1 addition & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ If you are **building a plugin** that interacts with the desktop shell — opens
15. **[Files on the Desktop](./files-on-desktop.md)** — *Experimental.* `OpenStation_File` base class, `openstation_register_file_type()`, and `wp.os.files.*`. The registry, folders, opener associations with per-user overrides, folder sharing, real file storage, and the Trash pin-to-desktop flow are all live.
16. **[Desktop Themes](./desktop-themes.md)** — *Experimental.* Whole-OS reskins uploaded as a ZIP of `theme.json` plus images and fonts: every design token, the typeface, a texture on any of 24 surfaces (chrome, dock, desk, menus, dialogs, tables, buttons) plus a documented way to add your own, and a complete iconset down to the window control glyphs. No author CSS or JS ever executes — PHP validates the manifest and compiles the stylesheet, `@font-face` rules included. Read before authoring a theme, or before touching the texture and typography tokens in `variables.css`. See also [examples/register-desktop-theme.md](./examples/register-desktop-theme.md).
17. **[Folder Sharing](./folder-sharing.md)** — *Experimental.* Per-principal read / write grants on desktop folders with first-sight opt-in, polymorphic `target_type` schema, If-Match conflict detection, and a `<os-modal>`-based Share Settings UI.
17a. **[Pulse Monitor](./pulse-monitor.md)** — *Experimental.* An ECG wired to the site, as a wallpaper and a widget that share one engine, one signal hub and one settings bag: every request, page load, Heartbeat tick, click, visitor, comment and login is a labelled beat; failed (amber) beats say why; and the rhythm is a health diagnosis (sinus, PVCs, atrial fibrillation, ventricular tachycardia, flatline). Covers the signal sources, the Heartbeat server feed and its cost model, the `openstation_pulse_*` filters, the `pulse/beat` channel and the `os.pulse.beat` action.
18. **[Mio](./mio.md)** — *Experimental.* The desk companion: a PixiJS soft-body blob with a chroma neon outline that floats over the wallpaper, feels the gravity of nearby windows and settles onto them, watches your cursor (including across window iframes), and can be dragged anywhere. Covers the simulation, the four soft-body failure modes worth knowing before touching it, the `openstation_mio_config` filter, and `wp.os.mio`.
19. **[Icons](./icons.md)**: *Stable.* The thirty-icon set and the one rule behind it: Core owns the verbs, OpenStation owns the nouns. Covers `osIcon()` / `osIconSvg()` / `osIconDataUri()`, the sizing floor below which a Core glyph goes faint, the three groups that stay hand-drawn and why, and how the same eleven reach WordPress's own icon registry as outlines. Read before drawing any glyph.
20. **[Native Desktop Host](./desktop-host.md)** — *Experimental.* The optional Electron layer, shipped as an **extension** so core never mentions Electron: any window can be **set free** into a real OS window ("Send to your Mac"). Covers the two generic core capabilities it stands on (`wp.os.registerWindowAction()` and `?openstation_solo=`), the capability-probe detection model, and the deliberately cheap liveness pulse. Read before touching the ⋯ menu or solo mode.
Expand Down
3 changes: 3 additions & 0 deletions docs/data-model.md
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,7 @@ The sections below name the exact tables and keys.
| OAuth relay | | | | | | ● | |
| PWA | | ● | | | | ● | |
| Content changes feed | | | | | ● | | |
| Pulse Monitor | | | | | ● | | |
| Caches: content graph, Woo, feeds, stats | | | | | ● | ● | |
| Migrations | | | | | ● | | |

Expand Down Expand Up @@ -296,6 +297,8 @@ profile screen). AI agents are ordinary `wp_users` rows flagged with
| `desktop_mode_terms_cache_version` | Content graph | Cache version for terms. |
| `_desktop_mode_presence` | Presence | Snapshot of every user's presence (`autoload = no`). Heartbeat updates it with a write throttle; a daily cron prunes it. |
| `_desktop_mode_content_changes_log` | Content changes | Recent content changes for the feed, capped at 100 entries (`autoload = no`). |
| `openstation_pulse_log` | Pulse Monitor | `{ seq, entries }`: the rolling log of site-wide requests relayed to listening monitors over Heartbeat, at most 200 rows and two minutes old (`autoload = no`). A row is `{ seq, ts, kind, status, error, user }`; no URL, IP or user agent. Written on `shutdown` only while someone listens. See [Pulse Monitor](pulse-monitor.md). |
| `openstation_pulse_listeners` | Pulse Monitor | Listener leases, user id → unix expiry (`autoload = yes`, read on every request's `shutdown`). A Heartbeat tick from a mounted monitor extends its user's lease for three minutes, rewriting it past half-life only. |
| `_desktop_mode_recycle_bin_change_ts` | Recycle Bin | Timestamp of the last bin change, for the badge (`autoload = no`). |
| `openstation_app_store` | App Framework | The `Store` contract with `site` scope. |
| `openstation_installed_at` | First run | `{ at, via }`: when the plugin was activated (`autoload = no`). `via` is `activation` from the activation hook, `backfill` when reconstructed on `admin_init` for an install that predates the stamp; a backfilled age reads as unknown everywhere. |
Expand Down
26 changes: 26 additions & 0 deletions docs/hooks-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -1854,6 +1854,32 @@ apply_filters( 'openstation_wallpapers', array $registry );

---

### Pulse Monitor filters — Experimental

The server feed behind the built-in Pulse Monitor wallpaper and widget (`includes/pulse-monitor.php`). Full design in [Pulse Monitor](./pulse-monitor.md).

```php
// Capability required to receive the site-wide feed. Default 'manage_options'.
apply_filters( 'openstation_pulse_capability', string $capability );

// Kind a request is classified as ('visitors', 'bots', 'api', 'team', 'cron').
// Return '' to keep the request off the monitor.
apply_filters( 'openstation_pulse_request_kind', string $kind );

// Whether a user agent counts as a bot (bot beats draw smaller).
apply_filters( 'openstation_pulse_is_bot', bool $is_bot, string $user_agent );

// One event before it is logged: { kind, status, error, user }. Return false to drop it.
apply_filters( 'openstation_pulse_event', array|false $row );

// Health snapshot sent with every Heartbeat: { siteHealth, requests, failures, cronLate }.
apply_filters( 'openstation_pulse_health', array $snapshot );
```

`openstation_pulse_record( string $kind, array $args = array() )` — *Experimental (PHP function).* Queue a beat for the current request (`$args['error']` draws it as a failed beat). Explicit events replace the request's own classification, so a comment POST beats once, as a comment.

---

### `openstation_network_enabled` — Experimental

Whether the OpenStation Network is enabled site-wide. The default comes from the `network` extended option (OpenStation Preferences → Features → Extended options, admins only) — **off by default**: the network is opt-in. When the resolved value is `false`, `includes/network/bootstrap.php` loads **none** of the network module — no keypair, no identity or list route, no registry, no Network window, no hop token minted or spent — a single site has no site switcher, and a multisite keeps the one it has on its own. Pairings already made survive a disable. See [network.md](network.md).
Expand Down
Loading
Loading