Dashward now actually renders content on the dashboard workspace. The container is a separate gjs subprocess (so a WebKit crash can't take down gnome-shell), and the extension pins its window to the dashboard slot via the WindowGuard whitelist. container/src/main.ts: tiny GJS bootstrap that creates a borderless fullscreen Gtk.Window with a WebKit2 WebView and loads dashboard.html from a runtime directory passed in via argv. `GLib.set_prgname` happens before any GTK init so Wayland's xdg-shell app_id matches `top.hangmanlab.dashward.container` -- that's the wm_class fingerprint the extension matches against. extension/src/container-supervisor.ts: spawn the container via Gio.Subprocess; pump its stdout/stderr into journal under `[container stdout|stderr]` tags so we can diagnose WebKit crashes without attaching; watch display::window-created for the app_id match; on arrival, whitelist with WindowGuard before moving to dashboard (so the move's window-added doesn't bounce); make_fullscreen; clear the cached ref on the window's `unmanaged` signal. Dispose SIGTERMs the subprocess. P3 explicitly skips auto-restart / exponential backoff and DBus signaling -- those land in P4. container/runtime/runtime.ts + styles.css: a "Dashward" placeholder card on the 12-column grid so the dashboard workspace is visually distinct from a regular workspace; widget mounting / edit mode is P5+. Verified on the ubuntu2504-test VM: extension enables cleanly, dashboard shows the placeholder, switching to/from dashboard works, ding's window is still ignored. MESA/EGL stderr lines are VM-only software-rendering fallback noise (no virgl). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
29 lines
830 B
TypeScript
29 lines
830 B
TypeScript
// Page-side runtime (design §11). For P3 the grid is just decoration —
|
|
// it renders a "no widgets yet" placeholder so the dashboard workspace
|
|
// has visible content. Real widget loading / edit mode / layout
|
|
// persistence come in P5+.
|
|
|
|
declare global {
|
|
interface Window {
|
|
__dashShell__?: {
|
|
call(method: string, args?: unknown): Promise<unknown>;
|
|
};
|
|
}
|
|
}
|
|
|
|
const grid = document.getElementById('grid');
|
|
if (grid) {
|
|
const placeholder = document.createElement('section');
|
|
placeholder.className = 'placeholder';
|
|
placeholder.innerHTML = `
|
|
<h1>Dashward</h1>
|
|
<p class="hint">P3 — empty dashboard.</p>
|
|
<p class="meta">No widgets installed yet. Widget SDK + edit mode arrive in P5.</p>
|
|
`;
|
|
grid.appendChild(placeholder);
|
|
}
|
|
|
|
console.info('[dashward-runtime] P3 placeholder mounted');
|
|
|
|
export {};
|