hzhang 7b5539cf75 feat(extension): P1 — WorkspaceWarden lifecycle + position invariant
Replace the workspace-warden.ts stub with a real implementation matching
design §5:

- On enable: snapshot org.gnome.mutter::dynamic-workspaces and
  org.gnome.desktop.wm.preferences::num-workspaces, persist to
  ~/.local/state/dashward/workspace-warden.json, then disable dynamic
  mode and append a new workspace as the dashboard slot. num-workspaces
  is updated to match the new count so external observers stay in sync.
- Position invariant: connect to workspace-manager's workspaces-reordered,
  workspace-added, and workspace-removed signals; whenever the dashboard
  is no longer last, reorder it back. If something external removes the
  dashboard, append a replacement.
- Defensive guards: external changes to num-workspaces or
  dynamic-workspaces are clamped back; a `suppressGuard` flag avoids
  feedback loops between our own writes and our own signal handlers.
- On disable: remove the dashboard workspace, restore both gsettings,
  delete the state file.

Supporting infrastructure:

- util/logger.ts: console.log/warn/error wrappers with [Dashward] prefix.
- util/state-store.ts: load/save/clear JSON state under XDG_STATE_HOME.
- types/globals.d.ts: minimal Shell.Global declaration covering
  workspace_manager / display / get_current_time().

Build chain fixes uncovered while wiring P1:

- Replace placeholder @girs/* versions in extension/ and container/
  package.json with real published versions from npm (gnome-shell@50.0.0,
  meta-16@16.0.0-4.0.0, etc.). Add the required @girs/gio/glib/gobject
  packages so resolution actually succeeds.
- Set tsconfig `types` arrays to include each girs `/ambient` entry so
  the `gi://*` and `resource:///*` module specifiers resolve.
- Add `override` modifiers on Extension.enable/disable (required under
  the base tsconfig's noImplicitOverride).
- Fix workspace iteration to use get_workspace_by_index in a loop
  instead of the non-existent get_workspaces() — Meta 16 doesn't expose
  the bulk getter.

Verified: `pnpm -r build` and `pnpm -r exec tsc --noEmit` are both clean.
Functional verification against a real GNOME session is pending P2 — the
extension cannot be loaded yet because we haven't packaged it for the
test VM.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-22 23:05:24 +01:00
2026-05-22 23:00:02 +01:00
2026-05-22 23:00:02 +01:00
2026-05-22 23:00:02 +01:00
2026-05-22 23:00:02 +01:00
2026-05-22 23:00:02 +01:00
2026-05-22 23:00:02 +01:00
2026-05-22 23:00:02 +01:00
2026-05-22 23:00:02 +01:00
2026-05-22 23:00:02 +01:00
2026-05-22 23:00:02 +01:00
2026-05-22 23:00:02 +01:00

Dashward

A dedicated rightmost workspace for custom widgets on Ubuntu/GNOME, in the spirit of macOS Dashboard.

  • GNOME Shell extension (GJS) creates the dashboard workspace, defends it from regular window incursions, and supervises the container.
  • WebKitGTK container (separate process) renders an HTML page on that workspace.
  • Widget SDK (TypeScript) lets you write widgets as web components.

Status: P0 skeleton. Design lives in UBUNTU-DASHBOARD-SPACE.md (see also ~/arch/UBUNTU-DASHBOARD-SPACE.md locally).

Target

  • Ubuntu 25.04 / GNOME Shell 48 / Wayland.
  • Other distros & versions: post-v1.

Repo layout

sdk/                      TS widget SDK, published as @dashward/widget-sdk
extension/                GNOME Shell extension (GJS, TS-authored)
  src/                    Extension source
  widgets-builtin/        Builtin widgets shipped with the extension
container/                WebKit kiosk process
  src/                    GJS bootstrap
  runtime/                Page-side runtime (host grid, edit mode, widget loader)
widgets/                  Example / 3rd-party widget dev tree
proto/                    Shared DBus XML + TS types
scripts/                  Build & dev helpers

Dev setup

Requires Node ≥ 20 and pnpm ≥ 9. To install pnpm:

npm install -g pnpm

Then:

pnpm install
pnpm build

Testing discipline

All Shell-side iteration happens inside the ubuntu2504-test libvirt VM, never on the host GNOME session — a buggy extension can lock you out of the Wayland session. See the design doc §17 for the dev loop.

License

TBD.

Description
Ubuntu/GNOME dashboard workspace + TS widget SDK (macOS-Dashboard style).
Readme 117 KiB
Languages
TypeScript 90%
CSS 3.3%
JavaScript 2.9%
HTML 2.4%
Shell 1.4%