@fungi.computer/tourtois 0.10.0 → 0.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,87 @@
1
+ /* The first-run welcome: one compact card across the Launcher. */
2
+ .tourtois-welcome {
3
+ display: flex;
4
+ align-items: center;
5
+ gap: var(--spacing-lg);
6
+ padding: var(--spacing-md) var(--spacing-lg);
7
+ margin-block-end: var(--spacing-lg);
8
+ /* The App tiles sit 9px inside the Launcher; the card shares their left edge. */
9
+ margin-inline: calc(var(--spacing-sm) + 1px);
10
+ border: var(--border) solid
11
+ color-mix(in oklab, var(--color-base-content) 12%, transparent);
12
+ border-radius: var(--radius-box);
13
+ background: color-mix(in oklab, var(--color-base-100) 70%, transparent);
14
+ }
15
+ .tourtois-welcome-mascot {
16
+ display: block;
17
+ flex: none;
18
+ inline-size: 3rem;
19
+ block-size: 3rem;
20
+ }
21
+ .tourtois-welcome-text {
22
+ flex: 1;
23
+ min-inline-size: 0;
24
+ }
25
+ .tourtois-welcome-text h3 {
26
+ margin: 0;
27
+ font-size: var(--text-base);
28
+ font-weight: 600;
29
+ line-height: 1.3;
30
+ }
31
+ .tourtois-welcome-text p {
32
+ margin: 0;
33
+ color: var(--stipe-fg-muted);
34
+ font-size: var(--text-sm);
35
+ line-height: 1.4;
36
+ }
37
+ .tourtois-welcome-text .tourtois-welcome-hint {
38
+ margin-block-start: var(--spacing-2xs);
39
+ font-size: var(--text-xs);
40
+ }
41
+ .tourtois-welcome-actions {
42
+ display: flex;
43
+ flex: none;
44
+ align-items: center;
45
+ gap: var(--spacing-sm);
46
+ }
47
+ @media (max-width: 640px) {
48
+ .tourtois-welcome {
49
+ flex-wrap: wrap;
50
+ gap: var(--spacing-md);
51
+ }
52
+ .tourtois-welcome-text {
53
+ flex-basis: calc(100% - 4rem);
54
+ }
55
+ .tourtois-welcome-actions {
56
+ flex: 1 1 100%;
57
+ }
58
+ .tourtois-welcome-actions > * {
59
+ flex: 1;
60
+ }
61
+ }
62
+
63
+ /* The install guide is a quiet footer row under the grid, not an App tile. */
64
+ .tourtois-launcher-more {
65
+ display: flex;
66
+ justify-content: flex-end;
67
+ /* The ghost button's own padding would pull its text off the grid's edge. */
68
+ margin-inline-end: calc(-1 * (var(--spacing-md) + 1px));
69
+ margin-block-start: var(--spacing-sm);
70
+ }
71
+
72
+ /* Trial starter Apps that failed or need a runtime stack under the grid. */
73
+ .tourtois-install-notes {
74
+ display: grid;
75
+ gap: var(--spacing-sm);
76
+ margin-block-start: var(--spacing-md);
77
+ }
78
+ .tourtois-install-notes:empty {
79
+ display: none;
80
+ }
81
+ /* One-line failures centre the Retry button on the text. */
82
+ .tourtois-install-notes .caps-failure-line {
83
+ align-items: center;
84
+ }
85
+ .tourtois-install-notes .caps-failure-line > .caps-status {
86
+ margin-block-start: 0;
87
+ }
@@ -0,0 +1,20 @@
1
+ import { type ReactNode } from "react";
2
+ import type { AppStorage } from "@fungi.computer/agar/storage";
3
+ import type { AppBarItem } from "@fungi.computer/caps/blocks/app-bar";
4
+ export type WelcomeState = Readonly<{
5
+ /** True only once storage has answered that this member has not dismissed it. */
6
+ visible: boolean;
7
+ dismiss: () => void;
8
+ }>;
9
+ /** The per-member first-run welcome, remembered in the member's own storage layer. */
10
+ export declare function WelcomeProvider({ teamId, storage, children, }: {
11
+ teamId: string;
12
+ storage: AppStorage;
13
+ children: ReactNode;
14
+ }): import("react/jsx-runtime").JSX.Element;
15
+ export declare const useWelcome: () => WelcomeState;
16
+ /** Says what this place is and points at the one thing to do next. */
17
+ export declare function FirstRunWelcome({ items, onDismiss, }: {
18
+ items: readonly AppBarItem[];
19
+ onDismiss: () => void;
20
+ }): import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1,61 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { createContext, useCallback, useContext, useMemo, } from "react";
3
+ import { useQuery, useQueryClient } from "@tanstack/react-query";
4
+ import { z } from "zod";
5
+ import { Button } from "@fungi.computer/caps/components/button";
6
+ import { Keycap } from "@fungi.computer/caps/components/keycap";
7
+ import { ShiitakeAvatar } from "@fungi.computer/parakeet/agent-head";
8
+ const welcomeKey = "welcome";
9
+ const dismissedSchema = z.object({ dismissed: z.literal(true) });
10
+ const hidden = { visible: false, dismiss: () => undefined };
11
+ const WelcomeContext = createContext(hidden);
12
+ /** The per-member first-run welcome, remembered in the member's own storage layer. */
13
+ export function WelcomeProvider({ teamId, storage, children, }) {
14
+ const client = useQueryClient();
15
+ const queryKey = useMemo(() => ["tourtois", "welcome", teamId], [teamId]);
16
+ const { data } = useQuery({
17
+ queryKey,
18
+ queryFn: async () => {
19
+ const resolved = await storage.read(welcomeKey);
20
+ return {
21
+ revision: resolved.member?.revision ?? null,
22
+ dismissed: dismissedSchema.safeParse(resolved.member?.value).success,
23
+ };
24
+ },
25
+ });
26
+ const dismiss = useCallback(() => {
27
+ client.setQueryData(queryKey, {
28
+ revision: data?.revision ?? null,
29
+ dismissed: true,
30
+ });
31
+ void storage
32
+ .write({
33
+ key: welcomeKey,
34
+ scope: "member",
35
+ basedOn: data?.revision ?? null,
36
+ value: { dismissed: true },
37
+ })
38
+ .catch((cause) => {
39
+ console.error("Welcome dismissal was not saved", cause);
40
+ });
41
+ }, [client, data?.revision, queryKey, storage]);
42
+ const value = useMemo(() => ({ visible: data !== undefined && !data.dismissed, dismiss }), [data, dismiss]);
43
+ return (_jsx(WelcomeContext.Provider, { value: value, children: children }));
44
+ }
45
+ export const useWelcome = () => useContext(WelcomeContext);
46
+ const isMac = () => /Mac|iPhone|iPad/u.test(navigator.userAgent);
47
+ /** Starters are matched by their App id in the launcher's `app:<surface>` ids. */
48
+ const starter = (items, appId) => items.find((item) => item.id === `app:${appId}`);
49
+ /** Says what this place is and points at the one thing to do next. */
50
+ export function FirstRunWelcome({ items, onDismiss, }) {
51
+ const hello = starter(items, "hello");
52
+ const first = starter(items, "grove") ?? items.find((item) => item !== hello);
53
+ if (!first && !hello)
54
+ return null;
55
+ const lead = first ?? hello;
56
+ if (!lead)
57
+ return null;
58
+ return (_jsxs("section", { className: "tourtois-welcome", "aria-labelledby": "tourtois-welcome-title", children: [_jsx("span", { className: "tourtois-welcome-mascot", "aria-hidden": "true", children: _jsx(ShiitakeAvatar, { className: "h-full w-full", state: { activity: "idle", expression: "normal" } }) }), _jsxs("div", { className: "tourtois-welcome-text", children: [_jsx("h3", { id: "tourtois-welcome-title", children: "This is your Oyster" }), _jsx("p", { children: "Apps open here as windows." }), _jsxs("p", { className: "tourtois-welcome-hint", children: [_jsx(Keycap, { size: "hint", children: isMac() ? "⌘" : "Ctrl" }), " ", _jsx(Keycap, { size: "hint", children: "K" }), " then ", _jsx(Keycap, { size: "hint", children: "O" }), " ", "opens any App"] })] }), _jsxs("div", { className: "tourtois-welcome-actions", children: [_jsxs(Button, { size: "sm", variant: "primary", onClick: () => {
59
+ lead.onSelect();
60
+ }, children: ["Open ", lead.label] }), _jsx(Button, { size: "sm", variant: "ghost", onClick: onDismiss, children: "Not now" })] })] }));
61
+ }
@@ -0,0 +1,19 @@
1
+ import { type ReactNode } from "react";
2
+ import type { DesktopGill } from "../desktop-layout.js";
3
+ /** One placeable widget, with the App that owns it. */
4
+ export type WidgetChoice = Readonly<{
5
+ gill: DesktopGill;
6
+ appName: string;
7
+ /** Already on the desktop; still choosable, listed after the rest. */
8
+ placed: boolean;
9
+ icon: ReactNode;
10
+ }>;
11
+ /**
12
+ * A floating, searchable list of widgets. It never takes the page's focus
13
+ * away from its search box and stays open so several can be added in a row.
14
+ */
15
+ export declare function WidgetPicker({ choices, disabled, onChoose, }: {
16
+ choices: readonly WidgetChoice[];
17
+ disabled: boolean;
18
+ onChoose: (gill: DesktopGill) => void;
19
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,40 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useState } from "react";
3
+ import { Input } from "@fungi.computer/caps/components/input";
4
+ import { Popover, PopoverOption, } from "@fungi.computer/caps/components/popover";
5
+ /**
6
+ * A floating, searchable list of widgets. It never takes the page's focus
7
+ * away from its search box and stays open so several can be added in a row.
8
+ */
9
+ export function WidgetPicker({ choices, disabled, onChoose, }) {
10
+ const [query, setQuery] = useState("");
11
+ const [active, setActive] = useState(0);
12
+ const needle = query.trim().toLowerCase();
13
+ const shown = choices
14
+ .filter((choice) => `${choice.gill.title} ${choice.appName}`.toLowerCase().includes(needle))
15
+ .sort((a, b) => Number(a.placed) - Number(b.placed));
16
+ const current = Math.min(active, Math.max(0, shown.length - 1));
17
+ const choose = (choice) => {
18
+ if (choice && !disabled)
19
+ onChoose(choice.gill);
20
+ };
21
+ return (_jsxs(Popover, { open: true, side: "top", className: "tourtois-widget-picker", "aria-label": "Add widget", children: [_jsx(Input, { autoFocus: true, "aria-label": "Search widgets", placeholder: "Search widgets", value: query, onChange: (event) => {
22
+ setQuery(event.currentTarget.value);
23
+ setActive(0);
24
+ }, onKeyDown: (event) => {
25
+ if (event.key === "ArrowDown") {
26
+ event.preventDefault();
27
+ setActive(Math.min(shown.length - 1, current + 1));
28
+ }
29
+ else if (event.key === "ArrowUp") {
30
+ event.preventDefault();
31
+ setActive(Math.max(0, current - 1));
32
+ }
33
+ else if (event.key === "Enter") {
34
+ event.preventDefault();
35
+ choose(shown[current]);
36
+ }
37
+ } }), _jsxs("div", { role: "listbox", "aria-label": "Widgets", className: "tourtois-widget-list", children: [shown.map((choice, index) => (_jsxs(PopoverOption, { active: index === current, "aria-label": `${choice.gill.title}, ${choice.appName}`, onClick: () => {
38
+ choose(choice);
39
+ }, children: [_jsx("span", { "aria-hidden": "true", className: "tourtois-widget-icon", children: choice.icon }), _jsxs("span", { className: "tourtois-widget-text", children: [_jsx("span", { children: choice.gill.title }), _jsx("small", { children: choice.appName })] }), choice.placed ? _jsx("small", { children: "On desktop" }) : null] }, `${choice.gill.surfaceId}:${choice.gill.gillId}`))), shown.length === 0 ? (_jsx("p", { className: "tourtois-widget-none", children: "No widgets match." })) : null] })] }));
40
+ }
@@ -148,8 +148,9 @@ export function initialDesktopLayout(catalog, inboxSurfaceId) {
148
148
  id: "launcher",
149
149
  surfaceId: "tourtois",
150
150
  gillId: "launcher",
151
- size: "M",
152
- col: inbox ? 2 : 0,
151
+ // Alone, the Launcher is the desktop: wide and centred in four columns.
152
+ size: inbox ? "M" : "L",
153
+ col: inbox ? 2 : 1,
153
154
  row: 0,
154
155
  },
155
156
  ],
package/dist/layers.d.ts CHANGED
@@ -1,4 +1,9 @@
1
1
  import { type ReactNode } from "react";
2
+ /**
3
+ * Close every transient popover through the overlay dismiss channel. A window
4
+ * bar calls this as one of its popovers opens, so two never stack.
5
+ */
6
+ export declare function useDismissOverlays(): () => void;
2
7
  /** Tourtois composes Caps portal destinations with Maosaico's ordered roots. */
3
8
  export declare function TourtoisLayers({ children }: {
4
9
  children?: ReactNode;
package/dist/layers.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { OverlayRoot } from "@fungi.computer/caps/components/overlay-root";
3
3
  import { MaosaicoLayers, useLayer } from "@fungi.computer/maosaico";
4
- import { useMemo } from "react";
4
+ import { createContext, useContext, useMemo } from "react";
5
5
  function OverlayContainers({ children, subscribeDismiss, }) {
6
6
  const popover = useLayer("popover");
7
7
  const dialog = useLayer("dialog");
@@ -10,6 +10,14 @@ function OverlayContainers({ children, subscribeDismiss, }) {
10
10
  const containers = useMemo(() => ({ popover, dialog, toast, tooltip }), [popover, dialog, toast, tooltip]);
11
11
  return (_jsx(OverlayRoot, { containers: containers, subscribeDismiss: subscribeDismiss, children: children }));
12
12
  }
13
+ const DismissContext = createContext(() => undefined);
14
+ /**
15
+ * Close every transient popover through the overlay dismiss channel. A window
16
+ * bar calls this as one of its popovers opens, so two never stack.
17
+ */
18
+ export function useDismissOverlays() {
19
+ return useContext(DismissContext);
20
+ }
13
21
  /** Tourtois composes Caps portal destinations with Maosaico's ordered roots. */
14
22
  export function TourtoisLayers({ children }) {
15
23
  const dismissal = useMemo(() => {
@@ -27,5 +35,5 @@ export function TourtoisLayers({ children }) {
27
35
  },
28
36
  };
29
37
  }, []);
30
- return (_jsx(MaosaicoLayers, { onDismiss: dismissal.dismiss, children: _jsx(OverlayContainers, { subscribeDismiss: dismissal.subscribe, children: children }) }));
38
+ return (_jsx(MaosaicoLayers, { onDismiss: dismissal.dismiss, children: _jsx(DismissContext.Provider, { value: dismissal.dismiss, children: _jsx(OverlayContainers, { subscribeDismiss: dismissal.subscribe, children: children }) }) }));
31
39
  }
@@ -14,6 +14,7 @@ import { z } from "zod";
14
14
  import { useEffect, useRef, useState } from "react";
15
15
  import { createRoot } from "react-dom/client";
16
16
  import { connectionAddedSchema, connectionsViewSchema, connectionToolsSchema, createPlatformControls, PlatformControlsView, } from "./platform-controls.js";
17
+ import { createOysterSetupPort, oysterSetupSchema } from "./oyster-setup.js";
17
18
  import { modelKeysViewSchema } from "./ModelKeys.js";
18
19
  import { settingsLocationSchema } from "./settings-routes.js";
19
20
  import { OysterComputers, createOysterComputersPort, } from "./OysterComputers.js";
@@ -281,6 +282,25 @@ export const mountPlatformControls = (root, input) => {
281
282
  const computers = () => (_jsx(OysterComputers, { teamId: input.teamId, port: computersPort, onChanged: controls.changed }));
282
283
  const websitesPort = createOysterWebsiteChannelsPort(new URL(window.location.origin));
283
284
  const channels = () => (_jsx(WebsiteChannels, { port: websitesPort, copy: oysterWebsiteCopy }));
285
+ const setup = createOysterSetupPort({
286
+ readFacts: async () => oysterSetupSchema.parse(await json("/api/setup")),
287
+ openSettings: (location) => {
288
+ controls.openSettings(location, { restoreFocus: false });
289
+ },
290
+ subscribeSettingsClosed: controls.subscribeSettingsClosed,
291
+ });
292
+ // A key added or removed changes what is ready before Settings closes.
293
+ const trackedModelKeys = {
294
+ ...modelKeys,
295
+ addKey: async (draft) => {
296
+ await modelKeys.addKey(draft);
297
+ setup.changed();
298
+ },
299
+ removeKey: async (keyId) => {
300
+ await modelKeys.removeKey(keyId);
301
+ setup.changed();
302
+ },
303
+ };
284
304
  const client = createQueryClient();
285
305
  const settings = createRoot(root);
286
306
  settings.render(_jsx(QueryClientProvider, { client: client, children: _jsx(PlatformControlsView, { teamId: input.teamId, controls: controls, data: {
@@ -289,14 +309,23 @@ export const mountPlatformControls = (root, input) => {
289
309
  computers,
290
310
  channels,
291
311
  keys,
292
- modelKeys,
312
+ modelKeys: trackedModelKeys,
293
313
  requestAppAccess,
294
314
  appPermissions: OysterAppPermissions,
295
315
  } }) }));
296
316
  return Promise.resolve({
297
317
  controls: {
298
318
  ...controls,
319
+ setup,
299
320
  parseSettings: (value) => S.decodeUnknownSync(S.Json)(settingsLocationSchema.parse(value)),
321
+ retryInstall: async (installationId) => {
322
+ const response = await fetch(`/api/trial/starters/${encodeURIComponent(installationId)}/retry`, { method: "POST", credentials: "same-origin" });
323
+ if (!response.ok)
324
+ throw new AppError("The retry was not accepted", {
325
+ code: "HOST_FAILURE",
326
+ retryable: true,
327
+ });
328
+ },
300
329
  openSettings: (value, options) => {
301
330
  controls.openSettings(settingsLocationSchema.parse(value), options);
302
331
  },
@@ -0,0 +1,41 @@
1
+ import type { AppSetup, SetupNeed } from "@fungi.computer/agar";
2
+ import type { WorkbenchSetupPort } from "@fungi.computer/nacre/workbench";
3
+ import { z } from "zod";
4
+ import type { SettingsLocation } from "./settings-routes.js";
5
+ /** The owner-direct `/api/setup` reply, decoded before any App sees it. */
6
+ export declare const oysterSetupSchema: z.ZodObject<{
7
+ models: z.ZodEnum<{
8
+ missing: "missing";
9
+ ready: "ready";
10
+ unknown: "unknown";
11
+ }>;
12
+ media: z.ZodEnum<{
13
+ missing: "missing";
14
+ ready: "ready";
15
+ unknown: "unknown";
16
+ }>;
17
+ git: z.ZodEnum<{
18
+ missing: "missing";
19
+ ready: "ready";
20
+ unknown: "unknown";
21
+ }>;
22
+ terminal: z.ZodEnum<{
23
+ missing: "missing";
24
+ ready: "ready";
25
+ unknown: "unknown";
26
+ "exec-only": "exec-only";
27
+ }>;
28
+ }, z.core.$strict>;
29
+ /** Where each need is fixed in this host's Settings. */
30
+ export declare function settingsForNeed(need: SetupNeed): SettingsLocation;
31
+ export type OysterSetupDeps = Readonly<{
32
+ /** The host facts, already decoded with `oysterSetupSchema`. */
33
+ readFacts(): Promise<AppSetup>;
34
+ openSettings(location: SettingsLocation): void;
35
+ /** Settings closing is when a freshly added key becomes visible. */
36
+ subscribeSettingsClosed(listener: () => void): () => void;
37
+ }>;
38
+ /** The setup port: facts read live, plus the Settings page for each need. */
39
+ export declare function createOysterSetupPort(deps: OysterSetupDeps): WorkbenchSetupPort & Readonly<{
40
+ changed(): void;
41
+ }>;
@@ -0,0 +1,39 @@
1
+ import { z } from "zod";
2
+ const state = z.enum(["ready", "missing", "unknown"]);
3
+ /** The owner-direct `/api/setup` reply, decoded before any App sees it. */
4
+ export const oysterSetupSchema = z.strictObject({
5
+ models: state,
6
+ media: state,
7
+ git: state,
8
+ terminal: z.enum(["ready", "exec-only", "missing", "unknown"]),
9
+ });
10
+ /** Where each need is fixed in this host's Settings. */
11
+ export function settingsForNeed(need) {
12
+ // Models and media both come from a key; git and a runtime from Computers.
13
+ return need === "model" || need === "media"
14
+ ? { category: "keys" }
15
+ : { category: "computers" };
16
+ }
17
+ /** The setup port: facts read live, plus the Settings page for each need. */
18
+ export function createOysterSetupPort(deps) {
19
+ const listeners = new Set();
20
+ const changed = () => {
21
+ for (const listener of listeners)
22
+ listener();
23
+ };
24
+ deps.subscribeSettingsClosed(changed);
25
+ return {
26
+ read: () => deps.readFacts(),
27
+ subscribe: (listener) => {
28
+ listeners.add(listener);
29
+ return () => {
30
+ listeners.delete(listener);
31
+ };
32
+ },
33
+ open: (need) => {
34
+ deps.openSettings(settingsForNeed(need));
35
+ return Promise.resolve("opened");
36
+ },
37
+ changed,
38
+ };
39
+ }
@@ -20,6 +20,8 @@ export type PlatformControls = Readonly<{
20
20
  openSettings: (location: SettingsLocation) => void;
21
21
  /** Settings the host backs with real data; undefined means all of them. */
22
22
  sections?: readonly SettingsLocation["category"][] | undefined;
23
+ /** Ask a trial Oyster to retry one starter App that failed to install. */
24
+ retryInstall?: ((installationId: string) => Promise<void>) | undefined;
23
25
  registerDesktopSettings: (handler: WorkbenchDesktopSettings) => Promise<WorkbenchDesktopRegistration>;
24
26
  /** Observe Team App changes these controls made, to refresh a directory. */
25
27
  subscribeChanges: (listener: () => void) => () => void;
@@ -225,7 +225,14 @@ export function PlatformControlsView({ teamId, controls, data, }) {
225
225
  },
226
226
  };
227
227
  const requestAppAccess = data.requestAppAccess;
228
- return controls.attach(requestAppAccess === undefined
228
+ const refreshAfterGrant = async (outcome) => {
229
+ const settled = await outcome;
230
+ // The admitted App re-reads its grants and context without a reload.
231
+ if (settled === "granted")
232
+ controls.changed();
233
+ return settled;
234
+ };
235
+ const ask = requestAppAccess === undefined
229
236
  ? async (target, input) => {
230
237
  const current = await data.directory();
231
238
  const app = current.apps.find((candidate) => candidate.surfaceId === target.surfaceId);
@@ -251,7 +258,9 @@ export function PlatformControlsView({ teamId, controls, data, }) {
251
258
  });
252
259
  return outcome === "customize" ? openSettings() : outcome;
253
260
  }
254
- : (target, input) => requestAppAccess(target, input, dialog));
261
+ : (target, input) => requestAppAccess(target, input, dialog);
262
+ const attached = controls.attach((target, input) => refreshAfterGrant(ask(target, input)));
263
+ return attached;
255
264
  }, [controls, data]);
256
265
  const settings = (_jsxs(_Fragment, { children: [_jsx(RouterProvider, { router: controls.router }), _jsx(AppAccessConsent, { request: consent }), _jsx(DeferredSystemSettings, { location: location, sections: controls.sections, onNavigate: (next) => {
257
266
  controls.navigate(next);
package/dist/shell.css CHANGED
@@ -1,6 +1,8 @@
1
1
  @import "./chrome.css";
2
2
  @import "./spa.css";
3
3
  @import "./settings-navigation.css";
4
+ @import "./desktop/arrange.css";
5
+ @import "./desktop/welcome.css";
4
6
 
5
7
  /* SH-1: a 32px desktop menu bar on desktop widths, matching the window
6
8
  title bar and footer so the three chrome bars read as one system.
@@ -101,6 +103,26 @@
101
103
  padding: var(--spacing-md);
102
104
  }
103
105
 
106
+ .tourtois-app-consent-rights {
107
+ margin: 0;
108
+ padding-inline-start: var(--spacing-lg);
109
+ list-style: disc;
110
+ display: flex;
111
+ flex-direction: column;
112
+ gap: var(--spacing-xs);
113
+ }
114
+
115
+ .tourtois-app-consent-footer {
116
+ justify-content: space-between;
117
+ align-items: center;
118
+ margin-top: var(--spacing-sm);
119
+ }
120
+
121
+ .tourtois-app-consent-decision {
122
+ display: flex;
123
+ gap: var(--spacing-sm);
124
+ }
125
+
104
126
  .tourtois-settings-layout {
105
127
  display: grid;
106
128
  grid-template-columns: 9rem minmax(0, 1fr);
@@ -566,35 +588,35 @@
566
588
  min-width: 0;
567
589
  width: 100%;
568
590
  }
591
+ /* The failure fills the body so the footer stays at the window's bottom. */
569
592
  .tourtois-window-status {
570
- padding: var(--spacing-xs) var(--spacing-md);
571
- font-size: 12px;
593
+ display: grid;
594
+ flex: 1 1 auto;
595
+ min-height: 0;
596
+ padding: var(--spacing-lg);
597
+ place-items: center;
598
+ }
599
+ .tourtois-window-failure {
600
+ inline-size: min(100%, 36rem);
601
+ }
602
+ .tourtois-window-failure-note {
572
603
  color: var(--stipe-fg-muted);
604
+ display: block;
605
+ font-size: var(--text-xs);
606
+ margin-block-start: var(--spacing-xs);
573
607
  }
608
+ /* The loader covers the App's body but sits beneath the window's header and
609
+ footer, which stay in place so the window can be closed or minimised. */
574
610
  .tourtois-app-loading {
575
- align-items: center;
576
611
  background: var(--color-base-100);
577
- color: var(--color-base-content);
578
- display: flex;
579
- gap: var(--spacing-md);
580
612
  inset: 0;
581
- justify-content: center;
582
- padding: var(--spacing-lg);
583
613
  position: absolute;
584
614
  z-index: 1;
585
615
  }
586
- .tourtois-app-loading > :is(svg, .caps-monogram) {
587
- flex: none;
588
- height: 2rem;
589
- width: 2rem;
590
- }
591
- .tourtois-app-loading > div {
592
- display: grid;
593
- gap: var(--spacing-xs);
594
- }
595
- .tourtois-app-loading span {
596
- color: var(--stipe-fg-muted);
597
- font-size: var(--text-sm);
616
+ .tourtois-pane .caps-window-header,
617
+ .tourtois-pane .tourtois-window-status-bar {
618
+ position: relative;
619
+ z-index: 2;
598
620
  }
599
621
 
600
622
  .tourtois-team-git {
@@ -734,27 +756,6 @@
734
756
  overflow: auto;
735
757
  padding: 16px;
736
758
  }
737
- /* The arrange toolbar sits in the chrome layer, directly under the menu bar,
738
- so no window covers it. */
739
- .tourtois-desktop-controls {
740
- position: absolute;
741
- inset-inline: 0;
742
- top: var(--spacing-3xl);
743
- box-sizing: border-box;
744
- display: flex;
745
- flex-wrap: wrap;
746
- align-items: center;
747
- gap: 8px;
748
- padding: 8px 16px;
749
- background: var(--color-base-200);
750
- box-shadow: inset 0 -1px 0 var(--color-base-300);
751
- pointer-events: auto;
752
- }
753
- @media (min-width: 541px) {
754
- .tourtois-desktop-controls {
755
- top: var(--spacing-2xl);
756
- }
757
- }
758
759
  /* The recovery card sits mid-desktop, bounded like any panel EmptyState. */
759
760
  .tourtois-desktop-empty {
760
761
  display: grid;
@@ -764,16 +765,6 @@
764
765
  .tourtois-desktop-empty > .empty-state {
765
766
  width: min(100%, 32rem);
766
767
  }
767
- .tourtois-desktop-add-gill {
768
- width: 11rem;
769
- flex: 0 0 auto;
770
- }
771
- .tourtois-gill-controls {
772
- display: flex;
773
- flex-wrap: nowrap;
774
- align-items: center;
775
- gap: 4px;
776
- }
777
768
  .tourtois-gill-sizes {
778
769
  display: inline-flex;
779
770
  flex: 0 0 auto;
@@ -827,9 +818,6 @@
827
818
  }
828
819
 
829
820
  @media (max-width: 640px), (any-pointer: coarse) {
830
- .tourtois-gill-sizes {
831
- gap: 20px;
832
- }
833
821
  /* Reset Caps join composition when its expanded touch targets apply. */
834
822
  .tourtois-gill-sizes > .join-item {
835
823
  --join-ss: initial;