From ff05e82d80b5cfb6c1699c57e3d6e2aff0daaaf8 Mon Sep 17 00:00:00 2001 From: Michael Hughes Date: Thu, 1 Oct 2026 16:16:40 -0700 Subject: [PATCH] fix(phishell): wire app entries and expose shipped integration status --- docs/os/APP_AVAILABILITY.md | 67 +++++++ docs/os/DESKTOP_OPERATION.md | 5 + .../app-launcher-field-observation.json | 34 ++++ packaging/arch/phishell/PKGBUILD | 2 +- phishell/src/PhiShell.tsx | 187 +++++++----------- phishell/src/components/AppLauncher.tsx | 53 +++++ phishell/src/shell/appLauncher.test.tsx | 98 +++++++++ phishell/src/shell/appLauncher.ts | 113 +++++++++++ phishell/src/shell/model.ts | 1 + phishell/src/styles.css | 4 +- 10 files changed, 444 insertions(+), 120 deletions(-) create mode 100644 docs/os/APP_AVAILABILITY.md create mode 100644 docs/os/evidence/app-launcher-field-observation.json create mode 100644 phishell/src/components/AppLauncher.tsx create mode 100644 phishell/src/shell/appLauncher.test.tsx create mode 100644 phishell/src/shell/appLauncher.ts diff --git a/docs/os/APP_AVAILABILITY.md b/docs/os/APP_AVAILABILITY.md new file mode 100644 index 00000000..a75624ab --- /dev/null +++ b/docs/os/APP_AVAILABILITY.md @@ -0,0 +1,67 @@ +# Apps in the experimental PhiOS image + +The desktop boots, but that does not mean every app named in the original shell +mockup has been packaged. The owner reported on 2026-10-01 that app tiles could +not be clicked. Source inspection confirmed that the Home and Start tiles had +no click handlers. The PhiVessel prompt and quick actions were also inert. +This observation is preserved in `evidence/app-launcher-field-observation.json`. + +The exact normal #283 package inventory contains Chromium, Foot, Wayfire, +Waybar, Wofi, the PhiOS Python tools and PhiShell. It contains no Browsallax +package, Ollama runtime or model weights. The source package contains BrainC +client code and SOMA contracts/tools; those are not complete graphical apps. + +## What the shell opens + +| Entry | Included behavior | +| --- | --- | +| System Inspector | Existing host/service/process/package/device observations | +| Reality Ledger | Existing governed canonical-history panel; existing read/compare grants still apply | +| ΦDream | Existing Symbol Lab curiosity workspace | +| Builder | Build workspace preview; no compilation or command execution | +| Apps | Included-tool status and ordinary desktop-app instructions | +| Browsallax | Not bundled; status explains the included Chromium alternative | +| PhiVessel | Advisory context dock; conversational runtime not connected | +| BrainC | Client/terminal status command only; Ollama and weights not bundled | +| SOMA | Contracts/terminal tools only; separate graphical app not bundled | +| PhiOffice, Domistika, Professor Φ | Application runtimes not bundled | + +Home, Start and command search use the same entries. Selecting an included tool +opens, restores or focuses its shell window. Selecting an unfinished integration +opens a status explanation. The unconnected chat/translation controls are +explicitly unavailable. These labels describe the shipped image, not a scan +of apps installed separately and not a runtime-health assertion. +The **Apps** button above the desktop windows also opens the library, so the +initial overlapping windows do not hide the entry point. + +## Use the included desktop basics + +- **Chromium:** Super+Space, then choose Chromium. +- **Foot:** Super+Alt+Enter. +- **PhiOS tools:** Super+Enter; enter `help` for commands. +- **BrainC endpoint check:** in the Phi terminal, enter `brainc status`. This + checks the configured endpoint; it does not install a model or establish + inference quality. +- **Network settings:** Super+N. +- **SOMA/Spine tools:** in Foot, run `phi-spine --help`. +- **Lock:** Super+L; enter the account password to unlock. The separate + VirtualBox wrong-password/unlock test remains pending. + +Approved external app desktop entries continue through the existing governed +desktop-launch path. `phi-app catalog-desktop-apps` in Foot inspects the catalog; +it does not install an app or grant launch permissions. Empty discovery is not +evidence that the ecosystem apps were installed. + +## Candidate boundary + +The launcher repair changes UI state and connects existing read-only panels. +It introduces no HTTP process-launch endpoint, download, install, model pull, +grant, policy change or private kernel implementation. Packaging increments +PhiShell's Arch package revision from 3 to 4 at the same `0.16.0` version. +The OS release remains `0.1.0-alpha.1` experimental. Full external app integration +needs its own exact source/artifact selection, runtime contract and qualification. + +The qualified #283 source/ISO and #285 field report remain historical evidence. +Changed frontend/package bytes require their own normal/QA image qualification +and a fresh VirtualBox click test. This correction does not qualify the physical +Skytech/RTX 5070 machine or authorize merging, tagging or publishing. diff --git a/docs/os/DESKTOP_OPERATION.md b/docs/os/DESKTOP_OPERATION.md index 87fdabc4..035838df 100644 --- a/docs/os/DESKTOP_OPERATION.md +++ b/docs/os/DESKTOP_OPERATION.md @@ -7,6 +7,11 @@ operator decisions, bindings or leases and do not authorize an agent or browser to perform a general desktop effect. The restricted installed proof broker and its UID separation remain described in LINUX_PROOF_WORKFLOW.md. +PhiShell's app names do not imply installed ecosystem runtimes. See +[APP_AVAILABILITY.md](APP_AVAILABILITY.md) for included tools, unfinished +integrations and the Home/Start/search launcher correction. Ordinary Linux +apps continue through the desktop shortcuts below. + ## Open, lock and end the session | Action | Current path | diff --git a/docs/os/evidence/app-launcher-field-observation.json b/docs/os/evidence/app-launcher-field-observation.json new file mode 100644 index 00000000..14e17cf8 --- /dev/null +++ b/docs/os/evidence/app-launcher-field-observation.json @@ -0,0 +1,34 @@ +{ + "schema_version": "phios.field_observation.v0.1", + "received_date": "2026-10-01", + "source": "owner continuation in ChatGPT after the separate local VirtualBox report", + "observation": "Owner could not click app entries and expected Browsallax, PhiVessel and BrainC basics to be installed.", + "artifact_binding": { + "status": "not independently established for this additional observation", + "context": "The preceding report identifies the #283 ISO; this additional statement supplies no new ISO hash, log, screenshot or click transcript." + }, + "source_inspection": { + "parent_head": "161eb063416d134dff0fb59ce5a0a55539458967", + "qualified_runtime_head": "d1a4a2bc515907d1011b6aa1c2a203acc200cad8", + "confirmed": [ + "Home app tiles and Start pinned tiles lack click handlers", + "PhiVessel prompt/send and quick-action controls have no runtime binding", + "Normal #283 image inventory includes Chromium, Foot, Wayfire, Waybar, Wofi, PhiOS and PhiShell", + "Image packaging does not bundle Browsallax, Ollama or model weights", + "BrainC client and SOMA contracts/tools are present in the PhiOS Python package" + ], + "inventory_reference": "GitHub run 36916494462 normal compact artifact 11191232645, image-packages.txt", + "existing_field_receipt": "virtualbox-field-9510024d.json" + }, + "repair_scope": "Wire included shell tools and integration-status windows; preserve existing read/compare grants and zero-privilege OS effect adapter.", + "unqualified": [ + "Full Browsallax app runtime", + "Conversational PhiVessel runtime", + "Bundled BrainC inference runtime and model weights", + "Changed-candidate VirtualBox click test", + "Physical Skytech/RTX 5070 qualification" + ], + "execution_authority": false, + "publication_authority": false, + "release_ready": false +} diff --git a/packaging/arch/phishell/PKGBUILD b/packaging/arch/phishell/PKGBUILD index aa127976..853dd7f4 100644 --- a/packaging/arch/phishell/PKGBUILD +++ b/packaging/arch/phishell/PKGBUILD @@ -1,6 +1,6 @@ pkgname=phishell pkgver=0.16.0 -pkgrel=3 +pkgrel=4 pkgdesc='PhiShell browser interface and local observation transport' arch=('any') url='https://github.com/MichaelWave369/PhiOS' diff --git a/phishell/src/PhiShell.tsx b/phishell/src/PhiShell.tsx index 2a30a92b..0de80d56 100644 --- a/phishell/src/PhiShell.tsx +++ b/phishell/src/PhiShell.tsx @@ -9,6 +9,9 @@ import { PackageObservationPanel } from "./components/PackageObservationPanel"; import { DeviceObservationPanel } from "./components/DeviceObservationPanel"; import { SystemStatePanel } from "./components/SystemStatePanel"; import { SymbolLab } from "./components/SymbolLab"; +import { PersistentHistoryPanel } from "./components/PersistentHistoryPanel"; +import { AppDetails, AppLibrary, AppTiles } from "./components/AppLauncher"; +import { findShellApp, SHELL_APPS, shellAppEvent, windowTemplates } from "./shell/appLauncher"; import { INITIAL_SHELL_STATE, type AuthorityRequest, @@ -42,69 +45,13 @@ const projects = [ ["Browsallax", "Browser", "1d"], ]; -const apps = [ - ["Browsallax", "◉"], - ["PhiOffice", "▧"], - ["Domistika", "⌂"], - ["SOMA", "◌"], - ["Professor Φ", "Φ"], - ["Reality Ledger", "▤"], - ["Builder", "⌘"], - ["Apps", "⊞"], -]; - -const windowTemplates: Record = { - "research-window": { - id: "research-window", - title: "Research Field", - subtitle: "Evidence, provenance, synthesis, and source context.", - kind: "workspace", - x: 7, - y: 10, - width: 54, - height: 58, - z: 1, - state: "open", - }, - "ledger-window": { - id: "ledger-window", - title: "Reality Ledger", - subtitle: "Read-only receipts and system history projection.", - kind: "system", - x: 46, - y: 30, - width: 46, - height: 48, - z: 2, - state: "open", - }, - "build-window": { - id: "build-window", - title: "Build Field", - subtitle: "Projects, tests, artifacts, and governed execution proposals.", - kind: "workspace", - x: 20, - y: 16, - width: 58, - height: 56, - z: 1, - state: "open", - }, - "system-window": { - id: "system-window", - title: "System Inspector", - subtitle: "Session history, canonical recall, and temporary governed comparison of two persistent machine states.", - kind: "system", - x: 22, - y: 10, - width: 68, - height: 72, - z: 1, - state: "open", - }, -}; - const commands: CommandItem[] = [ + ...SHELL_APPS.map((app): CommandItem => ({ + id: `app-${app.id}`, + label: `${app.name} · ${app.status}`, + detail: app.description, + action: { type: "open-app", appId: app.id }, + })), { id: "view-research", label: "Go to Research", @@ -209,7 +156,7 @@ function Rail({ ); } -function Home() { +function Home({ openApp }: { openApp: (id: string) => void }) { return (
@@ -233,7 +180,7 @@ function Home() {
CAPABILITY OBSERVATIONS
{[ - ["PhiVessel", "Advisory"], + ["PhiVessel", "Advisory only"], ["Models", "Not observed"], ["Memory", "Not observed"], ["SOMA", "Not observed"], @@ -263,14 +210,7 @@ function Home() {
APP LAUNCHER
-
- {apps.map(([name, icon]) => ( - - ))} -
+
@@ -335,8 +275,8 @@ function Workspace({ title, subtitle }: { title: string; subtitle: string }) { ); } -function Center({ view }: { view: View }) { - if (view === "home") return ; +function Center({ view, openApp }: { view: View; openApp: (id: string) => void }) { + if (view === "home") return ; if (view === "dream") return ; const copy: Record, [string, string]> = { research: [ @@ -364,25 +304,15 @@ function Center({ view }: { view: View }) { return ; } -function WindowBody({ item }: { item: WindowModel }) { +function WindowBody({ item, openApp }: { item: WindowModel; openApp: (id: string) => void }) { + if (item.id === "apps-window") return ; + if (item.id === "dream-window") return ; + if (item.id.startsWith("app:")) { + const app = findShellApp(item.id.slice(4)); + if (app) return ; + } if (item.id === "ledger-window") { - return ( -
-
- shell.window.focus - RECEIPT -
-
- authority.execution - FALSE -
-
- linux.adapter - ZERO PRIVILEGE -
-

Projection only. No ledger entry displayed here grants authority.

-
- ); + return ; } if (item.id === "system-window") { @@ -449,9 +379,11 @@ function WindowBody({ item }: { item: WindowModel }) { function DesktopWindow({ item, dispatch, + openApp, }: { item: WindowModel; dispatch: (event: ShellEvent) => void; + openApp: (id: string) => void; }) { const drag = useRef<{ pointerId: number; @@ -546,7 +478,7 @@ function DesktopWindow({
ADVISORY / VISUAL STATE · EXECUTION AUTHORITY FALSE
- +
); @@ -555,22 +487,24 @@ function DesktopWindow({ function DesktopLayer({ windows, dispatch, + openApp, }: { windows: WindowModel[]; dispatch: (event: ShellEvent) => void; + openApp: (id: string) => void; }) { return (
{[...windows] .sort((a, b) => a.z - b.z) .map((item) => ( - + ))}
); } -function PhiVessel() { +function PhiVessel({ openApp }: { openApp: (id: string) => void }) { const [mode, setMode] = useState("chat"); return ( ); @@ -619,10 +560,12 @@ function StartMenu({ close, openCommand, requestPower, + openApp, }: { close: () => void; openCommand: () => void; requestPower: () => void; + openApp: (id: string) => void; }) { return (
@@ -635,18 +578,11 @@ function StartMenu({ ⌕ Search apps, memory, windows, commands…
PINNED
-
- {apps.slice(0, 6).map(([name, icon]) => ( - - ))} -
+
Operator
- +
@@ -657,9 +593,11 @@ function StartMenu({ function CommandOverlay({ query, dispatch, + openApp, }: { query: string; dispatch: (event: ShellEvent) => void; + openApp: (id: string) => void; }) { const filtered = useMemo(() => { const needle = query.trim().toLowerCase(); @@ -671,7 +609,9 @@ function CommandOverlay({ }, [query]); function run(item: CommandItem) { - if (item.action.type === "open-view") { + if (item.action.type === "open-app") { + openApp(item.action.appId); + } else if (item.action.type === "open-view") { dispatch({ type: "SET_VIEW", view: item.action.view }); } else if (item.action.type === "open-window") { const template = windowTemplates[item.action.windowId]; @@ -812,6 +752,13 @@ export function PhiShell() { [state.view], ); + const openApp = (id: string) => { + const event = shellAppEvent(id); + if (!event) return; + setStart(false); + dispatch(event); + }; + useEffect(() => { const handleKey = (event: KeyboardEvent) => { if ((event.ctrlKey || event.metaKey) && event.key.toLowerCase() === "k") { @@ -855,13 +802,16 @@ export function PhiShell() {
- {title} +
+ {title} + +
PhiShell v{packageMetadata.version} · canonical history comparison · execution authority false
-
- +
+
- +
+ ))} +
+ ); +} + +export function AppDetails({ app }: { app: ShellApp }) { + return ( +
+
{app.name} · {app.status}
+

{app.description}

+

This describes the shipped PhiOS image. Apps added separately are not detected here.

+
+ ); +} + +export function AppLibrary({ openApp }: { openApp: (id: string) => void }) { + return ( +
+
PHIOS TOOLS AND INTEGRATIONS
+

Select a tool to open it, or an integration to see what still needs setup.

+ +
+
INCLUDED LINUX DESKTOP APPS
+
+
Chromium browser
Super+Space, then choose Chromium.
+
Foot terminal
Super+Alt+Enter.
+
PhiOS terminal tools
Super+Enter. Enter help to see commands.
+
Network settings
Super+N.
+
Governed installed apps
Use the desktop menu for approved launchers. In Foot, phi-app catalog-desktop-apps inspects the existing catalog.
+
+
+

This list describes the shipped image, not a scan of apps you added separately.

+
+ ); +} diff --git a/phishell/src/shell/appLauncher.test.tsx b/phishell/src/shell/appLauncher.test.tsx new file mode 100644 index 00000000..05f4437b --- /dev/null +++ b/phishell/src/shell/appLauncher.test.tsx @@ -0,0 +1,98 @@ +import { Children, isValidElement, type ReactNode } from "react"; +import { renderToStaticMarkup } from "react-dom/server"; +import { describe, expect, it, vi } from "vitest"; +import { AppDetails, AppTiles } from "../components/AppLauncher"; +import { PhiShell } from "../PhiShell"; +import { findShellApp, SHELL_APPS, shellAppEvent } from "./appLauncher"; +import { INITIAL_SHELL_STATE, type ShellState } from "./model"; +import { shellReducer } from "./reducer"; + +function tileButtons(node: ReactNode): Array<{ label: string; click: () => void }> { + return Children.toArray(node).flatMap((child) => { + if (!isValidElement<{ children?: ReactNode; "aria-label"?: string; onClick?: () => void }>(child)) return []; + if (child.type === "button" && child.props.onClick) { + return [{ label: child.props["aria-label"] ?? "", click: child.props.onClick }]; + } + return tileButtons(child.props.children); + }); +} + +const destinations: Record = { + "Browsallax": "app:browsallax", "PhiVessel": "app:phivessel", "BrainC": "app:brainc", + "PhiOffice": "app:phioffice", "Domistika": "app:domistika", "SOMA": "app:soma", + "Professor Φ": "app:professor", "Reality Ledger": "ledger-window", + "Builder": "build-window", "System Inspector": "system-window", + "ΦDream": "dream-window", "Apps": "apps-window", +}; + +describe("rendered app launcher clicks", () => { + it.each([false, true])("wires every %s-pinned tile to its actual shell destination", (pinned) => { + let state: ShellState = { ...INITIAL_SHELL_STATE, windows: [] }; + const fetcher = vi.spyOn(globalThis, "fetch"); + try { + const tiles = tileButtons(AppTiles({ pinned, openApp: (id) => { + const event = shellAppEvent(id); + if (event) state = shellReducer(state, event); + } })); + expect(tiles).toHaveLength(pinned ? 6 : 12); + for (const tile of tiles) { + tile.click(); + const name = tile.label.split(" · ")[0]; + expect(state.windows.at(-1)?.id).toBe(destinations[name]); + expect(state.authorityRequest).toBeNull(); + } + expect(fetcher).not.toHaveBeenCalled(); + } finally { + fetcher.mockRestore(); + } + }); + + it("restores a minimized tool and recreates a closed tool without duplicate windows", () => { + const event = shellAppEvent("system"); + if (!event) throw new Error("missing system launcher"); + const opened = shellReducer(INITIAL_SHELL_STATE, event); + const minimized = shellReducer(opened, { type: "MINIMIZE_WINDOW", id: "system-window" }); + const restored = shellReducer(minimized, event); + expect(restored.windows.filter((item) => item.id === "system-window")).toHaveLength(1); + expect(restored.windows.find((item) => item.id === "system-window")?.state).toBe("open"); + expect(restored.windows.find((item) => item.id === "system-window")?.z).toBeGreaterThan(opened.nextZ); + const closed = shellReducer(restored, { type: "CLOSE_WINDOW", id: "system-window" }); + expect(shellReducer(closed, event).windows.filter((item) => item.id === "system-window")).toHaveLength(1); + }); + + it.each(["", "constructor", "__proto__", "../../bin/sh", "chromium --no-sandbox"])( + "ignores unrecognized app IDs: %s", (id) => expect(shellAppEvent(id)).toBeNull(), + ); + + it("does not let moving a window mutate the shared launch template", () => { + const event = shellAppEvent("apps"); + if (!event || event.type !== "OPEN_WINDOW") throw new Error("missing apps launcher"); + event.window.x = 99; + const fresh = shellAppEvent("apps"); + expect(fresh?.type === "OPEN_WINDOW" && fresh.window.x).toBe(10); + }); +}); + +describe("shipped integration status", () => { + it.each([ + ["browsallax", "Not bundled", "Chromium"], + ["phivessel", "Advisory only", "cannot answer prompts"], + ["brainc", "Client only", "Ollama and model weights are not bundled"], + ])("explains why %s does not launch a full runtime", (id, status, detail) => { + const app = findShellApp(id); + if (!app) throw new Error("missing integration"); + expect(app.status).toBe(status); + expect(app.windowId).toBeUndefined(); + expect(renderToStaticMarkup()).toContain(detail); + }); + + it("includes status on every tile and disables the unconnected chat prompt", () => { + const html = renderToStaticMarkup(); + for (const app of SHELL_APPS) expect(html).toContain(`${app.name} · ${app.status}`); + expect(html).toMatch(/]*aria-label="PhiVessel chat unavailable"[^>]*disabled/); + expect(html).toMatch(/]*aria-label="Send unavailable: chat runtime not connected"[^>]*disabled/); + expect(html).toContain("Reading governed persistent history"); + expect(html).not.toContain("Ask PhiVessel anything"); + expect(html).not.toContain("shell.window.focus"); + }); +}); diff --git a/phishell/src/shell/appLauncher.ts b/phishell/src/shell/appLauncher.ts new file mode 100644 index 00000000..651a53f0 --- /dev/null +++ b/phishell/src/shell/appLauncher.ts @@ -0,0 +1,113 @@ +import type { ShellEvent, ShellWindow } from "./model"; + +export interface ShellApp { + id: string; + name: string; + icon: string; + status: string; + description: string; + windowId?: string; +} + +// Shipped shell destinations, not an installed-app or runtime-health probe. +export const SHELL_APPS: readonly ShellApp[] = [ + { id: "browsallax", name: "Browsallax", icon: "◉", status: "Not bundled", + description: "Browsallax is not included in this image. Chromium is the included browser; open it from the desktop application menu with Super+Space." }, + { id: "phivessel", name: "PhiVessel", icon: "◉", status: "Advisory only", + description: "The PhiVessel dock shows read-only runtime context. A conversational PhiVessel runtime is not connected, so the dock cannot answer prompts." }, + { id: "brainc", name: "BrainC", icon: "Φ", status: "Client only", + description: "PhiOS includes BrainC client code and the brainc status terminal command. Ollama and model weights are not bundled; local inference needs a separately configured runtime. Open the Phi terminal with Super+Enter and enter brainc status to check the configured endpoint." }, + { id: "phioffice", name: "PhiOffice", icon: "▧", status: "Not bundled", + description: "PhiOffice is not included in this image." }, + { id: "domistika", name: "Domistika", icon: "⌂", status: "Not bundled", + description: "Domistika is not included in this image." }, + { id: "soma", name: "SOMA", icon: "◌", status: "CLI tools only", + description: "PhiOS includes SOMA contracts and Spine terminal tools. This image does not include a separate SOMA graphical app. Open Foot with Super+Alt+Enter and run phi-spine --help to inspect the included commands." }, + { id: "professor", name: "Professor Φ", icon: "Φ", status: "Not bundled", + description: "A Professor Φ application runtime is not included in this image." }, + { id: "ledger", name: "Reality Ledger", icon: "▤", status: "Read-only tool", + description: "Open governed canonical history. Reads still require the existing history and memory grants.", windowId: "ledger-window" }, + { id: "builder", name: "Builder", icon: "⌘", status: "Workspace preview", + description: "Open the build proposal workspace. It does not compile projects or run commands.", windowId: "build-window" }, + { id: "system", name: "System Inspector", icon: "⚙", status: "Read-only tool", + description: "Inspect host, services, processes, packages and devices.", windowId: "system-window" }, + { id: "dream", name: "ΦDream", icon: "☾", status: "Symbol Lab", + description: "Open the included Symbol Lab curiosity workspace.", windowId: "dream-window" }, + { id: "apps", name: "Apps", icon: "⊞", status: "App status", + description: "See what this image includes and how to open ordinary Linux apps.", windowId: "apps-window" }, +]; + +export function findShellApp(id: string): ShellApp | undefined { + return SHELL_APPS.find((app) => app.id === id); +} + +function appWindow(id: string, title: string, subtitle: string): ShellWindow { + return { id, title, subtitle, kind: "workspace", x: 10, y: 8, width: 78, + height: 80, z: 1, state: "open" }; +} + +export const appWindowTemplates: Record = { + "apps-window": appWindow("apps-window", "Apps", "Included tools and integration status."), + "dream-window": appWindow("dream-window", "ΦDream / Symbol Lab", "Curiosity workspace."), +}; + +export const windowTemplates: Record = { + ...appWindowTemplates, + "research-window": { + id: "research-window", + title: "Research Field", + subtitle: "Evidence, provenance, synthesis, and source context.", + kind: "workspace", + x: 7, + y: 10, + width: 54, + height: 58, + z: 1, + state: "open", + }, + "ledger-window": { + id: "ledger-window", + title: "Reality Ledger", + subtitle: "Read-only receipts and system history projection.", + kind: "system", + x: 46, + y: 30, + width: 46, + height: 48, + z: 2, + state: "open", + }, + "build-window": { + id: "build-window", + title: "Build Field", + subtitle: "Projects, tests, artifacts, and governed execution proposals.", + kind: "workspace", + x: 20, + y: 16, + width: 58, + height: 56, + z: 1, + state: "open", + }, + "system-window": { + id: "system-window", + title: "System Inspector", + subtitle: "Session history, canonical recall, and temporary governed comparison of two persistent machine states.", + kind: "system", + x: 22, + y: 10, + width: 68, + height: 72, + z: 1, + state: "open", + }, +}; + +export function shellAppEvent(id: string): ShellEvent | null { + const app = findShellApp(id); + if (!app) return null; + const template = app.windowId + ? windowTemplates[app.windowId] + : appWindow(`app:${app.id}`, app.name, app.status); + return template ? { type: "OPEN_WINDOW", window: { ...template } } : null; +} diff --git a/phishell/src/shell/model.ts b/phishell/src/shell/model.ts index bd107f7c..2be8a8cb 100644 --- a/phishell/src/shell/model.ts +++ b/phishell/src/shell/model.ts @@ -41,6 +41,7 @@ export interface CommandItem { label: string; detail: string; action: + | { type: "open-app"; appId: string } | { type: "open-view"; view: View } | { type: "open-window"; windowId: string } | { type: "request-authority"; capability: string }; diff --git a/phishell/src/styles.css b/phishell/src/styles.css index 8b43ed40..ac4b6320 100644 --- a/phishell/src/styles.css +++ b/phishell/src/styles.css @@ -19,6 +19,7 @@ linear-gradient(150deg,#03070a,#061015 48%,#041016)} .rail-item:hover{color:var(--secondary);border-color:var(--soft)}.rail-item.active{background:linear-gradient(180deg,rgba(39,223,255,.08),rgba(39,223,255,.025));border-color:#245a68;color:var(--cyan);box-shadow:inset 2px 0 0 var(--gold)} .rail-icon{font-size:20px;line-height:1} .field{grid-column:2;grid-row:2;overflow:auto;padding:14px 16px 28px}.field-title{height:30px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid rgba(23,67,84,.55);margin-bottom:14px;color:var(--secondary);font-size:12px}.field-title small{color:var(--muted);font-size:10px} +.field-destination{display:flex;align-items:center;gap:12px}.field-destination button{padding:4px 10px;border:1px solid var(--border);border-radius:5px;background:var(--abyss);color:var(--cyan);font-size:10px;cursor:pointer}.field-destination button:focus-visible{outline:2px solid var(--cyan)} .home-grid{display:grid;grid-template-columns:1fr 1fr 1fr;grid-template-rows:minmax(310px,1.45fr) minmax(260px,1fr);gap:12px;min-height:calc(100vh - 154px)} .hero-card{grid-column:1/3;position:relative;overflow:hidden;border:1px solid var(--border);border-radius:12px;background: radial-gradient(circle at 43% 47%,rgba(39,223,255,.10),transparent 19rem), @@ -31,7 +32,8 @@ linear-gradient(135deg,rgba(13,32,42,.92),rgba(5,13,17,.96));box-shadow:inset 0 .panel{border:1px solid var(--border);border-radius:10px;background:linear-gradient(160deg,rgba(12,28,37,.92),rgba(7,18,24,.92));padding:13px;box-shadow:inset 0 1px rgba(255,255,255,.02)}.panel-title{color:var(--cyan);font-size:9px;letter-spacing:.16em;font-weight:800;margin-bottom:12px} .status{grid-column:3;grid-row:1}.status-row{display:flex;justify-content:space-between;align-items:center;padding:9px 2px;border-bottom:1px solid rgba(23,67,84,.45);font-size:11px}.status-row b{color:var(--green);font-size:9px;font-weight:600}.status-row:last-child{border-bottom:0} .project{display:grid;grid-template-columns:12px 1fr auto;gap:9px;align-items:center;padding:9px 0;border-bottom:1px solid rgba(23,67,84,.4)}.project:last-child{border:0}.project-dot{width:7px;height:7px;border-radius:50%;background:var(--cyan);box-shadow:0 0 9px rgba(39,223,255,.45)}.project b{display:block;font-size:10px}.project small{display:block;color:var(--muted);font-size:8px;margin-top:2px}.project time{font-size:8px;color:var(--muted)} -.app-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:7px}.app-tile{height:82px;background:rgba(255,255,255,.015);border:1px solid var(--soft);border-radius:8px;color:var(--secondary);cursor:pointer}.app-tile:hover{border-color:#2b6170;background:rgba(39,223,255,.035)}.app-tile span{display:block;color:var(--cyan);font-size:24px}.app-tile small{display:block;font-size:8px;margin-top:7px} +.app-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:7px}.app-tile{min-height:92px;padding:8px 4px;background:rgba(255,255,255,.015);border:1px solid var(--soft);border-radius:8px;color:var(--secondary);cursor:pointer}.app-tile:hover{border-color:#2b6170;background:rgba(39,223,255,.035)}.app-tile span{display:block;color:var(--cyan);font-size:24px}.app-tile small{display:block;font-size:9px;margin-top:7px} +.app-tile em,.start-apps em{display:block;font-style:normal;font-size:8px;color:var(--muted);margin-top:5px}.app-tile:focus-visible,.start-apps button:focus-visible{outline:2px solid var(--cyan);outline-offset:2px}.start-apps button{cursor:pointer}.start-apps small{display:block}.start-apps button{height:auto!important;min-height:82px;padding:8px 4px}.app-library,.app-details{font-size:12px;line-height:1.6}.app-library .app-grid{margin-bottom:18px}.app-desktop-help dl{margin:0}.app-desktop-help dl>div{display:grid;grid-template-columns:150px 1fr;gap:12px;padding:9px 0;border-bottom:1px solid var(--soft)}.app-desktop-help dt{color:var(--cyan)}.app-desktop-help dd{margin:0;color:var(--secondary)}.vessel-tabs button:disabled,.prompt input:disabled,.prompt button:disabled,.start-footer button:disabled{opacity:.55;cursor:default} .notice{padding:9px 0;border-bottom:1px solid rgba(23,67,84,.4)}.notice:last-child{border:0}.notice b{display:block;font-size:10px}.notice small{color:var(--muted);font-size:8px} .meter{display:grid;grid-template-columns:50px 1fr 30px;gap:8px;align-items:center;margin:13px 0;font-size:9px}.meter div{height:5px;border-radius:4px;background:#071017;overflow:hidden}.meter i{display:block;height:100%;background:linear-gradient(90deg,var(--blue),var(--teal));border-radius:4px}.meter b{text-align:right;color:var(--secondary);font-size:8px} .vessel{grid-column:3;grid-row:2;border-left:1px solid var(--soft);background:linear-gradient(180deg,rgba(8,25,32,.96),rgba(4,13,17,.97));display:flex;flex-direction:column;min-height:0}.vessel-head{display:flex;gap:10px;align-items:center;padding:16px;border-bottom:1px solid var(--soft)}.vessel-mark{width:34px;height:34px;border-radius:50%;border:1px solid var(--cyan);display:flex;align-items:center;justify-content:center;color:var(--cyan);box-shadow:0 0 14px rgba(39,223,255,.12)}.vessel-head b{display:block}.vessel-head small{display:block;color:var(--muted);font-size:9px;margin-top:3px}