| @@ -60,9 +60,9 @@ | ||
| 60 | 60 | - **Desktop icons** |
| 61 | 61 | Wallpaper-layer shortcuts via `openstation_register_icon()` — targets a registered native window or an admin URL. |
| 62 | 62 | |
| 63 | 63 | - **AI Assistant + slash commands** |
| 64 | - Cmd+K palette backed by an OpenAI agentic loop whose `search_posts` / `search_pages` / `search_comments` tools run WordPress's native keyword search. Admin-configured API key + model picker. The only automatic AI analysis is comment spam scoring (on comment save), which feeds the comments-window spam score; posts, pages, and terms are not analyzed. `wp.os.registerCommand()` adds slash commands with autocomplete (`suggest()`), confirm dialogs (`ctx.confirm()`), and full lifecycle hooks (`before-run` / `after-run` / `error`). Built-in `/open [window]` is extensible via `os.open-command.items`. | |
| 64 | + Cmd+K palette backed by an OpenAI agentic loop whose `search_posts` / `search_pages` / `search_comments` tools run WordPress's native keyword search. Admin-configured API key + model picker. No content is analyzed in the background: every AI call is one a user asked for. `wp.os.registerCommand()` adds slash commands with autocomplete (`suggest()`), confirm dialogs (`ctx.confirm()`), and full lifecycle hooks (`before-run` / `after-run` / `error`). Built-in `/open [window]` is extensible via `os.open-command.items`. | |
| 65 | 65 | |
| 66 | 66 | - **Palette registry** |
| 67 | 67 | Cmd+K cycles through all registered palettes (`wp.os.registerPalette()`) — the AI assistant is palette 0 by default; additional plugin overlays share the shortcut. |
| 68 | 68 | |
| @@ -72,13 +72,16 @@ | ||
| 72 | 72 | - **Toast notifications** |
| 73 | 73 | Shell-level toasts rendered via the `<os-toast>` component. Plugins register their own tone/icon via the `openstation_toast_types` filter. Iframe pages raise a toast through the `os-notification` bridge message — it survives the iframe's own lifecycle. |
| 74 | 74 | |
| 75 | 75 | - **OpenStation Preferences** |
| 76 | - Native-window settings panel: wallpaper picker (with HD-only media filter), accent color swatches + custom gradient editor, dock size slider, AI platform config, and per-user default-on-startup window. Persisted via `/desktop-mode/v1/os-settings`. | |
| 76 | + The settings window, an App Framework app (`apps/os-settings/`): wallpaper picker (with HD-only media filter), accent color swatches + custom gradient editor, desktop layout and dock controls, themes, window effects, navigation placement, feature switches and the component reference. Persisted via `/desktop-mode/v1/os-settings`. | |
| 77 | 77 | |
| 78 | 78 | - **Session persistence** |
| 79 | 79 | Full window stack (including desktops, focus, state) is debounce-saved to `/desktop-mode/v1/session` and restored without layout flicker. Viewport-shrink clamping keeps off-screen windows reachable. |
| 80 | 80 | |
| 81 | +- **Mobile — the phone layer** | |
| 82 | + Below 768px the same window manager renders a phone: a home screen of the navigation's tiles with search, one full-screen app at a time under a slim top bar, a swipeable app switcher, a five-slot tab bar, edge-swipe Back. `wp.os.mode` reports `desktop | tablet | mobile`; a head stamp makes the first paint right; a phone restores one window and hands the desktop its session back untouched. Lazy bundle, wallpaper suspended, widgets skipped. See [`docs/mobile.md`](./docs/mobile.md). | |
| 83 | + | |
| 81 | 84 | - **postMessage bridge** |
| 82 | 85 | Typed messages for title changes, navigation (same-origin validated), focus, color-scheme sync, screen-meta panels (Screen Options / Help), external-link capture, iframe-ready handshake, and observability (`iframe-error`, `iframe-network`). |
| 83 | 86 | |
| 84 | 87 | - **UI component library** |
| @@ -96,10 +99,10 @@ | ||
| 96 | 99 | --- |
| 97 | 100 | |
| 98 | 101 | ## Still ahead |
| 99 | 102 | |
| 100 | -- **Mobile (phone OS)** — purpose-built home-screen grid, full-screen apps, app switcher, gesture nav, bottom tab bar. | |
| 101 | -- **Tablet hybrid** — split view, slide-over, horizontal dock. `wp.os.mode = 'desktop' | 'tablet' | 'mobile'` surface. | |
| 103 | +- **Mobile, the next pass** — the phone layer ships (`docs/mobile.md`: home-screen grid, full-screen apps, app switcher, edge-swipe back, bottom tab bar, `wp.os.mode`); still ahead are pull-to-refresh and a pass on real devices. | |
| 104 | +- **Tablet hybrid** — split view, slide-over, horizontal dock, on the `wp.os.mode` primitive that already reports `'tablet'`. | |
| 102 | 105 | - **Cross-window drag & drop (the North Star)** — extend the current drag bridge to Media → Gutenberg block insertion, with pluggable mime-type negotiation. |
| 103 | 106 | - **Polish** — color-scheme-aware variables across all shell surfaces, View Transitions API animations, full a11y audit (ARIA, focus traps, keyboard nav). |
| 104 | 107 | - **…and a whole lot more hooks, filters, and actions** — every new surface lands with its own extension points, so this list keeps growing. |
| 105 | 108 | |
| @@ -119,8 +122,11 @@ | ||
| 119 | 122 | │ ├── os-settings.php extended-options.php |
| 120 | 123 | │ ├── accents.php wallpapers.php toast-types.php |
| 121 | 124 | │ ├── media-query.php |
| 122 | 125 | │ └── ai-copilot/ # AI assistant (OpenAI client, analysis, search, jobs) |
| 126 | +├── apps/ # App Framework apps: <name>.os.php (window, state, actions, | |
| 127 | +│ # data) + optional <name>.os.ts (client view) + <name>.css; | |
| 128 | +│ # Code Blue lives here — see docs/app-framework.md | |
| 123 | 129 | ├── assets/ # hand-authored CSS + JS build output |
| 124 | 130 | │ ├── css/ desktop.css, windows.css, dock.css, chromeless.css, variables.css |
| 125 | 131 | │ │ variables.css carries the OpenStation palette — every design |
| 126 | 132 | │ │ token the shell and the <os-*> kit read, declared once |
| @@ -203,10 +209,8 @@ | ||
| 203 | 209 | Writes one `assets/js/<target>.js` / `.min.js` pair per target, including: |
| 204 | 210 | |
| 205 | 211 | - `assets/js/desktop.js` / `.min.js` — main shell bundle (loaded based on `SCRIPT_DEBUG`). |
| 206 | 212 | - `assets/js/iframe-bridge.js` / `.min.js` — opt-in bridge that gives any same-origin iframe access to `wp.os.iframe.*`. |
| 207 | -- `assets/js/recycle-bin.js` / `.min.js` — Recycle Bin native window. | |
| 208 | -- `assets/js/station-home.js` / `.min.js` — Station Home native Dashboard. | |
| 209 | 213 | - `assets/js/posts-window.js` / `.min.js` — Native Posts window (the `<os-table>` replacement for the `edit.php` iframe; opt-in per user via OpenStation Preferences → Features). |
| 210 | 214 | |
| 211 | 215 | **Development watch** — auto-recompiles the unminified bundle on save: |
| 212 | 216 | |