fix(sessions): provide plain-text extension theme

This commit is contained in:
Federico Jaramillo Martinez
2026-07-20 14:01:47 +02:00
parent b48b147b5b
commit a884773357
5 changed files with 188 additions and 5 deletions
+5 -3
View File
@@ -62,6 +62,7 @@ import {
type SessionNotificationGeneration,
type SessionNotificationMutation,
} from "./sessionNotificationStore.js";
import { plainTextTheme } from "./plainTextTheme.js";
/**
* Minimal structured-logging seam, shaped like Fastify's logger so sessiond can
@@ -2361,12 +2362,13 @@ export class PiSessionService implements SessionRouteService {
notificationId: added.notification.id,
});
};
// PI WEB is a remote UI host, but currently only extension notifications
// cross this boundary. Delegate every other UI method to Pi's headless
// defaults so unsupported dialogs cancel safely instead of hanging.
// PI WEB owns the browser-facing notification and text-formatting
// boundaries. Delegate every other UI method to Pi's headless defaults so
// unsupported dialogs cancel safely instead of hanging.
return new Proxy(baseUiContext, {
get(target, property, receiver): unknown {
if (property === "notify") return notify;
if (property === "theme") return plainTextTheme;
const value: unknown = Reflect.get(target, property, receiver);
return value;
},