diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 976780f2b05595fa56e22514ff56a0dc245c2df6..70b9b7c04b68c5719a3f05fa2ea84ecc7f1ae28a 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,7 +1,7 @@ { // Runs the whole product in a GitHub Codespace (a cloud machine with 8 GB of memory), so full browser runs work // without a laptop or a paid server. The application starts by itself; open the forwarded port 8800. - "name": "Trio Co-Worker (demo)", + "name": "Patchwise (demo)", "build": { "dockerfile": "../Dockerfile", "context": ".." }, "hostRequirements": { "cpus": 2, "memory": "8gb" }, // root inside this throwaway machine: avoids file-ownership differences between the image and the Codespace @@ -18,7 +18,7 @@ }, "forwardPorts": [8800], "portsAttributes": { - "8800": { "label": "Trio Co-Worker", "onAutoForward": "openBrowser" } + "8800": { "label": "Patchwise", "onAutoForward": "openBrowser" } }, "postStartCommand": "sh .devcontainer/start.sh" } diff --git a/.devcontainer/start.sh b/.devcontainer/start.sh index 300cb14220b3b612df6b22ef1adb657ec362b746..a7b6af0f8392d2cfff5c840d0b5f17496c5c57de 100644 --- a/.devcontainer/start.sh +++ b/.devcontainer/start.sh @@ -27,7 +27,7 @@ else fi echo "" -echo " Trio Co-Worker is running." +echo " Patchwise is running." echo " Open the PORTS tab, then the globe icon next to port 8800." echo " Sign in with user: admin password: $(cat /data/demo-password.txt)" echo "" diff --git a/.env.example b/.env.example index b81dfc6c665b69160ce0ad49be42efe73367dd47..dc3155c5291cdd2e521fa84671ebd3ec5cff0715 100644 --- a/.env.example +++ b/.env.example @@ -1,4 +1,4 @@ -# Trio Co-Worker settings. Copy to .env for local development; on a server set them as environment variables +# Patchwise settings. Copy to .env for local development; on a server set them as environment variables # (Hugging Face: Space variables and secrets; Render: environment group). Every setting has a safe default; the full # list with types is coworker/config.py (class Settings). Settings are validated when the app starts and it refuses to # start with a malformed value. Never commit a real .env (it is git-ignored). @@ -13,7 +13,7 @@ FPT_COOKIE_SECURE=auto # auto | always (behind https) | never (plai FPT_CORS_ORIGINS=["http://127.0.0.1:5173","http://localhost:5173"] # [] in production: the web app is same-origin FPT_API_DOCS=1 # 0 on a public server: hides /api/docs and /api/openapi.json FPT_EMBED_ORIGIN= # e.g. https://huggingface.co when the app is shown inside that site -FPT_PRODUCT_NAME=Trio Co-Worker +FPT_PRODUCT_NAME=Patchwise FPT_ORG_NAME= FPT_TZ=Asia/Kolkata # default time zone for new schedules diff --git a/Dockerfile b/Dockerfile index 7af05e4ef48e6fcbc575ec0da8fed4c1a7154d77..139e1d1d66802bf96ffcd38450d07b51ac6268d3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -# Trio Co-Worker: one application image (web app + API + workflow worker + test executor + practice pod). +# Patchwise: one application image (web app + API + workflow worker + test executor + practice pod). # Build from the project root: docker build -t patch-coworker:1.0.0 . # Run with deploy/docker-compose.yml (adds Temporal and an HTTPS proxy). All customer data lives in the /data volume. diff --git a/README.md b/README.md index a1f99f01a3d81215190ca7c33ae370080883c204..c8605da1469314eccb7f422dd23c178d956eedf9 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ --- -title: Trio Co-Worker +title: Patchwise emoji: "๐Ÿงช" colorFrom: indigo colorTo: gray @@ -8,9 +8,9 @@ app_port: 8800 pinned: false --- -

Trio Co-Worker

+

Patchwise

-# Trio Co-Worker +# Patchwise A digital co-worker that tests Oracle Fusion Cloud business processes after the monthly and quarterly patches. AI agents read what the patch changes and what the test environment has, choose test scenarios, run them in a real diff --git a/config/coworker.yaml b/config/coworker.yaml index aa21b79960e2dfe7fec0170d75f166f86e2c6d2a..907c17fdf4d7599747f285bc3086491da9c7abb8 100644 --- a/config/coworker.yaml +++ b/config/coworker.yaml @@ -1,4 +1,4 @@ -# Trio Co-Worker: NON-SECRET configuration (env vars and .env override every key; env wins). +# Patchwise: NON-SECRET configuration (env vars and .env override every key; env wins). # Secrets never go here: they live in the vault (var/secrets/vault.json or FPT_SECRET_* env). # The only pod in this project is the LOCAL MOCK app (mock-app/, 127.0.0.1:3100). It is not Oracle Fusion. diff --git a/coworker/README.md b/coworker/README.md index ad8a35cce900338e464f18767bb4e46989cb2757..b98560fbe9dcfb3dc02a5a0febe46920dcfbb029 100644 --- a/coworker/README.md +++ b/coworker/README.md @@ -1,4 +1,4 @@ -# Trio Co-Worker (pilot) +# Patchwise (pilot) > **Mock app, not Oracle Fusion.** The only "pod" is the local mock (`mock-app/`, http://127.0.0.1:3100). No Oracle Fusion > pod, credentials or client data exist in this project. Every report, the web app and the desktop app say so. @@ -24,7 +24,7 @@ fpt.cmd down & rem stop what `up` started ( | `fpt.cmd up` / `down` | Temporal + worker (when `orchestrator: temporal`) + mock (if down) + backend (`/` = app, `/api` = API, `/api/docs` = OpenAPI UI). Builds `web/dist` if missing | | `fpt.cmd web-dev` | Vite dev server on http://127.0.0.1:5173 proxying `/api` to :8800 (start the API with `fpt.cmd api`) | | `fpt.cmd desktop` | Electron app in local mode (spawns the backend on a free port) | -| `fpt.cmd package` | builds `web/dist`, then the NSIS installer `desktop\dist\Trio Co-Worker Setup 1.0.0.exe` (unsigned) | +| `fpt.cmd package` | builds `web/dist`, then the NSIS installer `desktop\dist\Patchwise Setup 1.0.0.exe` (unsigned) | | `fpt.cmd create-user --username U --role viewer\|consultant\|qa_approver\|admin [--password-env VAR \| --password-stdin]` | local user | | `fpt.cmd test` | coworker pytest + coworker selftest + architecture selftest (27) + triage tests (71) | | `fpt.cmd selftest [--live]` | offline end-to-end checks (35); `--live` adds 3 real P2P cases in Chromium against the mock | diff --git a/coworker/__main__.py b/coworker/__main__.py index 6303b08e4655d8c967c81491355dcebb9ffa85d8..3998fddb362b6bd0211cb5b11dd05b38b035b180 100644 --- a/coworker/__main__.py +++ b/coworker/__main__.py @@ -204,7 +204,7 @@ def cmd_up(a) -> int: if loopback_ok(url + "/api/ready", timeout=2): break time.sleep(0.5) - print(f"\nTrio Co-Worker is up: {url} (API docs {url}/api/docs)", flush=True) + print(f"\nPatchwise is up: {url} (API docs {url}/api/docs)", flush=True) if cfg.orchestrator == "temporal": print(f"Temporal Web UI: {cfg.temporal_ui_url} (worker log var/logs/worker.out.log)", flush=True) print("Target: mock app on " + cfg.pod_base_url + " -- MOCK APP, NOT ORACLE FUSION. Ctrl+C or `fpt.cmd down` to stop.", flush=True) diff --git a/coworker/api/app.py b/coworker/api/app.py index 71d751c9335be661c4a8fc8094f18a656c408ac5..34b69272a6c527d9862eedd93fc5b77ad1c5c224 100644 --- a/coworker/api/app.py +++ b/coworker/api/app.py @@ -74,7 +74,7 @@ def create_app(svc: Services | None = None, cfg: Settings | None = None, *, back if syncer: syncer.stop() - app = FastAPI(title="Trio Co-Worker API", version=VERSION, lifespan=lifespan, + app = FastAPI(title="Patchwise API", version=VERSION, lifespan=lifespan, description="Pilot backend. Runs against the local mock app or a registered Oracle Fusion TEST pod (never production); " "every run and report names its target.", docs_url="/api/docs" if svc.cfg.api_docs else None, redoc_url=None, diff --git a/coworker/config.py b/coworker/config.py index 52c69a98dc3b0b69e7a4dd30551c168394157fa3..427835ed744880548ba2ae549cd9950d4fb416ac 100644 --- a/coworker/config.py +++ b/coworker/config.py @@ -37,7 +37,7 @@ class Settings(BaseSettings): web_dist: Path = Field(default=ROOT / "web" / "dist", validation_alias=_alias("fpt_web_dist", "web_dist")) oidc_issuer: str = "" # shown in the menu and on the sign-in page (a reseller or customer can set its own) - product_name: str = Field("Trio Co-Worker", validation_alias=_alias("fpt_product_name", "product_name")) + product_name: str = Field("Patchwise", validation_alias=_alias("fpt_product_name", "product_name")) org_name: str = Field("", validation_alias=_alias("fpt_org_name", "org_name")) # ---- Supabase (optional): identity provider for sign-in / registration, and storage for the encrypted state archive. diff --git a/coworker/platform/assets/wordmark-horizontal-light.svg b/coworker/platform/assets/wordmark-horizontal-light.svg index ee422c932f296e9fce14ed89c5a25b874c7291fb..f17e5bd48f067bda39934c5b782e449045bfb9ff 100644 --- a/coworker/platform/assets/wordmark-horizontal-light.svg +++ b/coworker/platform/assets/wordmark-horizontal-light.svg @@ -1,21 +1 @@ -Trio Co-Worker - - - - - - - - - - - - - - - - - - - - + diff --git a/coworker/platform/brand.py b/coworker/platform/brand.py index dd7278b9312828c6fc18aa642a87a4672263c6de..33d3e5cefb8c5b17534201b84293812738fad2ef 100644 --- a/coworker/platform/brand.py +++ b/coworker/platform/brand.py @@ -1,6 +1,6 @@ """The product name and logo for documents (report HTML/PDF, Excel). The web app reads the name from /api/ready (product_name). -The logo is concept A, "Visor" (docs/design/brand/BRAND.md): a graphite bot head with a person in its face plate and one green status dot. +The logo is the orbit mark (docs/design/brand/BRAND.md): three agents on orbits around a release core, one green "tested" node. The wordmark in the asset is outlined paths (no font needed), so it renders the same in PDF, email and on machines without Inter.""" from __future__ import annotations @@ -11,8 +11,8 @@ from pathlib import Path from ..config import VERSION -NAME = "Trio Co-Worker" -LEGAL = "Trio Co-Worker is independent software. Oracle and Fusion are trademarks of Oracle Corporation." +NAME = "Patchwise" +LEGAL = "Patchwise is independent software. Oracle and Fusion are trademarks of Oracle Corporation." _WORDMARK = Path(__file__).with_name("assets") / "wordmark-horizontal-light.svg" diff --git a/coworker/platform/test_script.py b/coworker/platform/test_script.py index 973daa44da074f2eadf0f80ebb20a16e2e3ffaf7..a84ee32387fa17e1d8a125ed17fe72f9cfa2a886 100644 --- a/coworker/platform/test_script.py +++ b/coworker/platform/test_script.py @@ -54,7 +54,7 @@ def build(run: dict, scenarios: list[dict], failures: list[dict], *, area_names: # business order: by area, then the process flow (Requisition before Purchase order...), then scenario id scenarios = sorted(scenarios, key=lambda x: (x.get("module") or "", order.get(x.get("step") or "", 999), x.get("step") or "~", x["id"])) wb = Workbook() - wb.properties.creator = "Trio Co-Worker" + wb.properties.creator = "Patchwise" # ---- Read me ws = wb.active @@ -63,7 +63,7 @@ def build(run: dict, scenarios: list[dict], failures: list[dict], *, area_names: ws.column_dimensions["B"].width = 96 areas = sorted({s.get("module") or "" for s in scenarios}) rows = [ - ("Test script", "Trio Co-Worker"), + ("Test script", "Patchwise"), ("Test run", run.get("run_id")), ("Test environment", (run.get("inputs") or {}).get("pod_name") if isinstance(run.get("inputs"), dict) else None), ("Patch", run.get("patch_id") or "the release the pod reports"), diff --git a/coworker/tests/test_brand.py b/coworker/tests/test_brand.py index fd626b40315f0539357dfc4783a0a110eb1283c0..e2f52ed06cfbea94fd78f9838f2269bffb9ab439 100644 --- a/coworker/tests/test_brand.py +++ b/coworker/tests/test_brand.py @@ -1,4 +1,4 @@ -"""The product is "Trio Co-Worker": default name, API docs title, and the report header and footer.""" +"""The product is "Patchwise": default name, API docs title, and the report header and footer.""" from __future__ import annotations import unittest @@ -9,21 +9,21 @@ from coworker.platform import brand class TestBrand(unittest.TestCase): def test_default_product_name(self): - self.assertEqual(Settings().product_name, "Trio Co-Worker") + self.assertEqual(Settings().product_name, "Patchwise") def test_report_header_has_the_wordmark_as_a_data_uri(self): h = brand.header_html() self.assertIn("data:image/svg+xml;base64,", h) # one self-contained file: no external logo request - self.assertIn("alt='Trio Co-Worker'", h) + self.assertIn("alt='Patchwise'", h) - def test_the_logo_is_the_visor_mark_with_an_outlined_wordmark(self): + def test_the_logo_is_the_orbit_mark_with_an_outlined_wordmark(self): import base64 h = brand.header_html() svg = base64.b64decode(h.split("base64,")[1].split("'")[0]).decode("utf-8") self.assertNotIn(" AI models). Values saved there win over these. diff --git a/deploy/DEPLOY.md b/deploy/DEPLOY.md index 6b8bdbd0ac8ce967f268fd58bc3942b1adf706d7..ad2e454b5257cef3ac2a43d428b41ffaf4aaaaca 100644 --- a/deploy/DEPLOY.md +++ b/deploy/DEPLOY.md @@ -1,4 +1,4 @@ -# Deploying Trio Co-Worker in a customer's cloud +# Deploying Patchwise in a customer's cloud One deployment serves one customer. Everything the product stores stays on the customer's own server, in Docker volumes: nothing is kept outside their environment. diff --git a/deploy/docker-compose.yml b/deploy/docker-compose.yml index 560aeb7aba2733b9b5e05d3e15be6a6ab0fb1df4..a207cfc406a9fc814e6acc200bf751f0acd00831 100644 --- a/deploy/docker-compose.yml +++ b/deploy/docker-compose.yml @@ -1,4 +1,4 @@ -# Trio Co-Worker: single-tenant deployment for one customer environment. +# Patchwise: single-tenant deployment for one customer environment. # cp .env.example .env (edit it) then: docker compose up -d # Three containers: the application, Temporal (durable workflows) and Caddy (HTTPS). All customer data stays in the # named volumes on this host: nothing is stored outside the customer's environment. diff --git a/desktop/package.json b/desktop/package.json index f6d2ad4239e79d4cdb1cb1b0bbfb5a180c5aee1c..6c0b23a71c92f43bfa3aba8700b4399af428026f 100644 --- a/desktop/package.json +++ b/desktop/package.json @@ -1,8 +1,8 @@ { "name": "fpt-desktop", - "productName": "Trio Co-Worker", + "productName": "Patchwise", "version": "1.0.0", - "description": "Windows desktop shell for Trio Co-Worker (loads the same web app). Mock app, not Oracle Fusion.", + "description": "Windows desktop shell for Patchwise (loads the same web app). Mock app, not Oracle Fusion.", "main": "src/main.js", "author": "FPT pilot team", "license": "UNLICENSED", @@ -19,11 +19,11 @@ }, "build": { "appId": "local.fpt.coworker", - "productName": "Trio Co-Worker", + "productName": "Patchwise", "directories": { "output": "dist", "buildResources": "build" }, "files": ["src/**/*", "build/icon.png", "build/icon.ico", "package.json"], "win": { "target": [{ "target": "nsis", "arch": ["x64"] }], "icon": "build/icon.ico", "signAndEditExecutable": false }, - "nsis": { "oneClick": false, "perMachine": false, "allowToChangeInstallationDirectory": true, "createDesktopShortcut": true, "shortcutName": "Trio Co-Worker", "installerIcon": "build/icon.ico", "uninstallerIcon": "build/icon.ico" }, + "nsis": { "oneClick": false, "perMachine": false, "allowToChangeInstallationDirectory": true, "createDesktopShortcut": true, "shortcutName": "Patchwise", "installerIcon": "build/icon.ico", "uninstallerIcon": "build/icon.ico" }, "forceCodeSigning": false } } diff --git a/desktop/src/loading.html b/desktop/src/loading.html index 4917918e4ae750f039f2fe896dc6337221f4c0e3..158620ecf9e89833274b3ebb33eb4f57ad6a40c2 100644 --- a/desktop/src/loading.html +++ b/desktop/src/loading.html @@ -1,6 +1,6 @@ -Starting Trio Co-Worker +Starting Patchwise

Starting the co-worker...

Starting the local backend and waiting for it to be ready (or contacting the server).

diff --git a/desktop/src/main.js b/desktop/src/main.js index 86dd2815dda6092b8e8a17979e6051e5f2dc9bcd..40f8472dba7e16301d91c1758588dcf0c968ba30 100644 --- a/desktop/src/main.js +++ b/desktop/src/main.js @@ -1,5 +1,5 @@ 'use strict'; -// Trio Co-Worker desktop shell (Electron). Loads the SAME built web app the backend serves; no second UI codebase. +// Patchwise desktop shell (Electron). Loads the SAME built web app the backend serves; no second UI codebase. // local mode : spawns the project's venv Python -> FastAPI on a free 127.0.0.1 port, waits for /api/ready, kills it on quit // remote mode: loads a shared backend URL entered in Settings // Security: contextIsolation on, nodeIntegration off, sandboxed renderer, minimal preload bridge, CSP, external links in @@ -151,7 +151,7 @@ function secureWebContents(wc) { const WEB_PREFS = { preload: path.join(__dirname, 'preload.js'), contextIsolation: true, nodeIntegration: false, sandbox: true, webSecurity: true, spellcheck: false }; function createMainWindow() { - win = new BrowserWindow({ width: 1360, height: 900, minWidth: 380, title: 'Trio Co-Worker (mock app, not Oracle Fusion)', show: false, + win = new BrowserWindow({ width: 1360, height: 900, minWidth: 380, title: 'Patchwise (mock app, not Oracle Fusion)', show: false, icon: path.join(__dirname, '..', 'build', 'icon.png'), webPreferences: WEB_PREFS }); secureWebContents(win.webContents); win.once('ready-to-show', () => win.show()); @@ -161,7 +161,7 @@ function createMainWindow() { function openSettings(message) { if (settingsWin) { settingsWin.focus(); return; } - settingsWin = new BrowserWindow({ width: 560, height: 560, title: 'Trio Co-Worker settings', parent: win || undefined, webPreferences: WEB_PREFS }); + settingsWin = new BrowserWindow({ width: 560, height: 560, title: 'Patchwise settings', parent: win || undefined, webPreferences: WEB_PREFS }); secureWebContents(settingsWin.webContents); settingsWin.loadFile(path.join(__dirname, 'settings.html'), { query: message ? { message } : {} }); settingsWin.on('closed', () => { settingsWin = null; }); @@ -186,7 +186,7 @@ async function connect() { await win.loadURL(`${base}/`); buildTray(); } catch (e) { - dialog.showErrorBox('Trio Co-Worker', String(e && e.message ? e.message : e)); + dialog.showErrorBox('Patchwise', String(e && e.message ? e.message : e)); openSettings(String(e && e.message ? e.message : e)); } } @@ -194,7 +194,7 @@ async function connect() { function buildTray() { if (!tray) { tray = new Tray(nativeImage.createFromPath(path.join(__dirname, 'tray.png'))); - tray.setToolTip('Trio Co-Worker (mock app, not Oracle Fusion)'); + tray.setToolTip('Patchwise (mock app, not Oracle Fusion)'); tray.on('click', () => { if (win) { win.show(); win.focus(); } }); } const cfg = loadConfig(); diff --git a/desktop/src/settings.html b/desktop/src/settings.html index 34dac9a7f4b6984dc94d633b6845cf0978f8a1d9..c6e6c81b551ab72db024a6f260fe36111eab306e 100644 --- a/desktop/src/settings.html +++ b/desktop/src/settings.html @@ -3,7 +3,7 @@ - Trio Co-Worker settings + Patchwise settings diff --git a/docker-compose.temporal.yml b/docker-compose.temporal.yml index 683fbec1169d8f58b8c15cbbacb4c9d96ef59c70..94d23fc1b3a3640900b89627116ffacf464288f2 100644 --- a/docker-compose.temporal.yml +++ b/docker-compose.temporal.yml @@ -1,4 +1,4 @@ -# Temporal dev server for Trio Co-Worker (pilot). Single container: Temporal server (SQLite persisted in a named +# Temporal dev server for Patchwise (pilot). Single container: Temporal server (SQLite persisted in a named # volume) + bundled Web UI. Ports bound to loopback only. Started by `fpt.cmd temporal` / `fpt.cmd up`. name: fpt-temporal services: diff --git a/docs/AUDIT.md b/docs/AUDIT.md index 03824d80aa78e14078d9fc50e94481f5c420e4a0..00657b61dd4f456aeaad36096c8abb24792809fe 100644 --- a/docs/AUDIT.md +++ b/docs/AUDIT.md @@ -1,4 +1,4 @@ -# Trio Co-Worker: production audit +# Patchwise: production audit Branch `production-hardening`, started from `trio-apple-ui` at `1c7e8c0` on 3 Nov 2026. Every finding below comes from reading the code at that commit or from a command run against it; file references are `path:line` at that commit. @@ -6,7 +6,7 @@ Status: **Fixed** means fixed on this branch with a test; **Open** means still t ## 1. What the product is -Trio Co-Worker is a digital co-worker that tests Oracle Fusion Cloud business processes after the monthly and quarterly +Patchwise is a digital co-worker that tests Oracle Fusion Cloud business processes after the monthly and quarterly patches. AI agents (a LangGraph workflow) read the patch notes and the test environment, choose test scenarios, wait for a consultant to approve them, run them in a real browser (Playwright) against an Oracle Fusion test pod (or a built-in practice app), classify failures, ask a QA approver to judge real defects, and produce a go/no-go report that diff --git a/docs/FINAL_REPORT.md b/docs/FINAL_REPORT.md index def5885f07fcab06035564350b2622113cb05d9e..11af4e23dd9ddc3790a380718e6449d19c0626e2 100644 --- a/docs/FINAL_REPORT.md +++ b/docs/FINAL_REPORT.md @@ -78,4 +78,5 @@ All run on 2-3 Nov 2026 on this branch: 3. Registration on the public URL: keep (viewer) or switch off in Settings > Features. 4. Rotate the credentials shared in chat during this project (Fusion test user, NVIDIA key, Hugging Face token, Supabase token). -5. Deploy this branch to the Space: nothing from this pass is deployed yet. The Space runs the 31 Oct build. +5. Deployed to the Space on 3 Nov 2026 (Space commit `4545bb3`): ready, data restored from the backup, HSTS on, + new sign-ups are viewers, API docs hidden, metrics need sign-in. A real Fusion run on the Space is still to be done. diff --git a/docs/design/BEUI.md b/docs/design/BEUI.md new file mode 100644 index 0000000000000000000000000000000000000000..f4a83ee00740a7d10aabe6dea640b855a6685a96 --- /dev/null +++ b/docs/design/BEUI.md @@ -0,0 +1,70 @@ +# beUI in Patchwise + +Branch `beui-ui-upgrade`. beUI (https://beui.dev) components are added one screen at a time on top of the existing +Mantine UI. Sources read first: https://beui.dev/llms.txt, https://beui.dev/docs/ai-agents, https://beui.dev/docs/theme. + +## Dependencies added (one at a time) + +| Package | Version | Why | +|---|---|---| +| react, react-dom (upgrade) | 18.3 to 19.2 | beUI components use React 19 APIs (ref as a prop). Mantine 7.17, React Query 5, React Router 6 and Testing Library accept 19. | +| @types/react, @types/react-dom | 19.2 | matching types (`JSX.Element` became `ReactElement` in one file) | +| tailwindcss, @tailwindcss/vite | 4.1.14 (dev) | beUI is styled with Tailwind 4 utility classes | +| motion | 12.23 | beUI's animations | +| clsx, tailwind-merge | 2.1, 3.3 | the `cn()` class helper beUI components import | +| lucide-react | 0.548 | icons inside beUI components (the app keeps Tabler icons elsewhere) | +| three (+ @types/three, dev) | 0.180 | the 3D hero on the sign-in page (`pages/login/ReleaseScene.tsx`); loaded on demand after the form | + +## How it fits next to Mantine + +- `src/beui.css` loads Tailwind's theme and utilities **without its base reset** (Mantine styles the base elements). +- Tailwind only scans `src/components/ui` and the screens converted so far (`@source` lines), so existing class + names in the rest of the app never turn into Tailwind utilities. +- Colours are the app's own tokens (`apple.css`): beUI's `primary` is the graphite action colour, `destructive` the + app's red, borders the app's separators. The app's `--accent` is not redefined (shadcn's "accent" is a hover surface; + it maps to `--fill`). Dark mode follows Mantine (`data-mantine-color-scheme`), not a `.dark` class. +- beUI files live in `src/components/ui/motion/` and `src/lib/` (`ease.ts`, `presence-gate.tsx`, + `hooks/use-hover-capable.ts`), as published. ESLint relaxes two style rules for that folder only. +- Install: the `@beui/` namespace did not resolve with shadcn 3.5.0; the direct registry URLs work: + `npx shadcn@3.5.0 add https://beui.dev/r/.json`. The CLI writes to `src/@components` and `src/@lib`; move the + files to `src/components/ui` and `src/lib` and change `@/@lib/` imports to `@/lib/`. + +## Screens converted + +| Screen | beUI parts | Notes | +|---|---|---| +| Sign in (`pages/LoginPage.tsx`), third design | `input`, `checkbox`, `button-stateful`, `alert`, plus a three.js hero | Always dark. Left: the Patchwise mark, the promise and a live 3D scene (a release core, three agents on orbits, a shell of test points that turn green as a test wave passes). Right: a glass card with the form. Reduced motion: one still frame. No WebGL: a gradient. Same labels, hooks and behaviour. | + +| Create account, forgot password, reset password | `input`, `button-stateful`, `alert` in the shared `AuthShell` frame | Same frame as sign-in (3D hero + glass card). Password strength as a meter with words. All four account pages load on demand and share one chunk. | + +## Bundle + +| Build | Main JS | Sign-in chunk | CSS | +|---|---|---|---| +| Before beUI (React 19) | 904 kB (274 kB gzip) | in main | 355 kB | +| Sign-in on beUI, eager | 1,075 kB (331 kB gzip) | in main | 366 kB | +| Sign-in on beUI, lazy | 902 kB (273 kB gzip) | 173 kB (56 kB gzip), only on /login | 366 kB (+11 kB) | +| Sign-in redesigned (input, checkbox) | 902 kB (273 kB gzip) | 190 kB (62 kB gzip), only on /login | 374 kB (+19 kB) | +| Third design with the 3D hero | 902 kB (273 kB gzip) | 190 kB + 3D scene 477 kB (121 kB gzip), both only on /login, the scene after the form | 377 kB | +| All four account pages on the shared frame | 894 kB (271 kB gzip) | shared frame 186 kB (61 kB gzip) + pages 1-3 kB each + 3D scene 477 kB (121 kB gzip) | 377 kB | + +## Accessibility + +- Reduced motion: both components read `prefers-reduced-motion` (Motion's `useReducedMotion`): the button and the + alert only cross-fade, nothing moves. +- The stateful button keeps one accessible name ("Sign in"; the animated letters are hidden from screen readers), + sets `aria-busy` while signing in and announces state changes politely. Focus uses the app's global focus ring. +- The error alert has `role="alert"`. +- The app has no Tailwind reset, so converted screens clear browser defaults themselves (`m-0`, `list-none`, + `border-0` on native buttons and inputs). beUI fields draw their own focus ring; `.beui-field` stops the app's global + outline from doubling it. +- The show/hide control is named "Show what you typed", so "Password" stays the only label of that name. + +## License + +The beUI pages call the components "free, open-source"; no license name is shown on the pages read. Check the +repository's LICENSE (https://github.com/starc007/ui-components) before shipping to a client. + +## Not changed + +No backend code, API calls, state logic or routes (the sign-in route now loads its page on demand; same path). diff --git a/docs/design/brand/BRAND.md b/docs/design/brand/BRAND.md index ad9d1eda12136076fe34dfc22309de02bd391a00..70be8b8d9d0dafe5f52055cbbd21ab0984c7af8e 100644 --- a/docs/design/brand/BRAND.md +++ b/docs/design/brand/BRAND.md @@ -1,124 +1,35 @@ -# Trio Co-Worker: brand +# Patchwise brand -Status: approved (logo concept A, "Visor", chosen 24 Oct 2026). Replaces "Patch Testing Co-worker" / "FPT Co-worker" as the product name everywhere a person can see it. -All assets in this folder are original, hand-written SVG on a 100 x 100 grid (rounded rectangles, circles and one curve). Nothing is copied from Apple, SF Symbols or any -other brand. Apple's HIG explicitly forbids using SF Symbols, or images confusingly similar to them, in app icons and logos, so the mark is -drawn from plain shapes. The wordmark is Inter (SIL OFL 1.1) converted to outlines, so no font is needed to display it. +## Name -## 1. The name +**Patchwise**: one word, capital P. It says what the product does: it knows what each Oracle patch changes and makes +sure it is tested before it goes live. The tagline, where one is needed: *Oracle patch testing*. -- **Spelling: "Trio Co-Worker"**. Capital T, capital C, capital W, hyphen, singular. Never "Trio Coworker", "TrioCoWorker", "Trio co-worker" (except - inside a running sentence, see below), "TRIO", or "Trio CW". -- In a sentence, after first use, "Trio" alone is fine ("Trio asks you before it starts testing"). Do not use "the Trio". -- Descriptor, when a line of explanation is needed: "patch testing for Oracle Fusion". Always lower case, never part of the name. - Do not write "Trio for Oracle", "Oracle Trio" or anything that implies Oracle makes or endorses the product. -- Why "Trio": three parties do the work together, the **consultant** (decides), the **AI agents** (plan, write, triage) and the **test browser** - (does the clicking on a real pod). The mark shows the same three. -- Legal line for About and report footers: "Trio Co-Worker is independent software. Oracle and Fusion are trademarks of Oracle Corporation." - (Oracle's name is used only to say which system is tested.) +Technical identifiers keep their old names on purpose (environment variables `FPT_*`, the `fpt_csrf` cookie, the +`patch-coworker` image, bucket and Space names): renaming them would break existing deployments. -## 2. The mark: "Visor" +## The mark -A friendly bot head with an antenna and ear pods. Its face plate is a window onto a person's head and shoulders, so the consultant is literally inside -the agent's face: the digital co-worker works on your behalf and you stay in the loop. Three parts, one silhouette: - -- the **bot** (head, ear pods, antenna): the AI agents; -- the **person** in the face plate: the consultant, who decides; -- the **green dot** on the antenna: the test browser's status light ("online"). It is the only colour in the logo. - -Geometry: rim 12-13 units, antenna 5 units, no thin details. At 16 px the plate reads as one friendly "eye", which is still a recognisable bot. - -Files (the web copies are in `web/public/`, the document copy in `coworker/platform/assets/`): +Three agents on orbits around a release core; one agent's node is green: the update has been tested. The three +orbits are the three jobs (research the patch, test it in a browser, prepare the review); the core is the release. | File | Use | |---|---| -| `app-icon.svg` (graphite squircle, off-white mark) | app icon on light UI: sign-in, register, forgot, reset (116 px), desktop app, PWA, social card | -| `app-icon-paper.svg` (paper squircle, graphite mark) | the same on dark UI | -| `favicon.svg` (adaptive: graphite squircle, paper squircle when the browser tab is dark) | browser tab (``) | -| `favicon-graphite.svg`, `favicon-paper.svg` | the two halves of the favicon, used directly by the sidebar brand row (30 px) in light and dark | -| `favicon-16.png`, `favicon-32.png`, `favicon-48.png` (in `web/public/`) | `` fallback, Windows shortcuts | -| `apple-touch-icon-180.png` (full bleed, no transparency; iOS applies its own mask) | `` | -| `icon-512.png` | PWA manifest, Electron `build.icon` source (convert to .ico/.icns in the desktop build), README social image | -| `logo-mark.svg`, `logo-mark-dark.svg` | bare mark with the green dot (on light / dark surfaces) | -| `logo-mark-mono-black.svg`, `logo-mark-mono-white.svg` | one-colour print, Excel header image, fax-like contexts, watermarks (the dot becomes ink) | -| `wordmark-horizontal-light.svg` / `-dark.svg` | report HTML/PDF headers, email header, README, docs | -| `wordmark-stacked-light.svg` / `-dark.svg` | About, splash, slides | - -The favicon variants differ from the app icon on purpose: the mark fills about 76 % of the tile (55 % in the app icon), the antenna is heavier and the green dot is larger -(radius 9.5 instead of 6.5 units), so the dot is still a visible colour hint at 16 px. Nothing else changes. - -In the web UI the name next to the mark is live text in the UI font stack, so it follows the user's font and theme. The wordmark files are **outlined from Inter** ("Trio" 700, -"Co-Worker" 500, tracking -1.1 at 46 px, kerning applied) so they render the same in PDF, Excel, email and Telegram and on machines without the font. - -Wordmark rules: one colour (graphite `#1d1d1f` on light, `#f5f5f7` on dark), "Trio" in the bold weight and "Co-Worker" in the medium weight, no all-caps, no tracking changes, -no outline or shadow. Never set the name in two lines inside the horizontal lockup; the stacked lockup is the only two-row form. - -## 3. Colour - -The logo is graphite plus **one green status dot**. The product accent is graphite too (see `../UI-APPLE.md` section 3.1); there is no blue anywhere in the brand. - -| Role | Light | Dark | -|---|---|---| -| Mark and wordmark | `#1d1d1f` | `#f5f5f7` | -| Green status dot | `#34c759` | `#30d158` | -| App icon squircle | graphite gradient `#4a4a4d` to `#1c1c1e`, off-white mark `#f5f5f7` | paper gradient `#ffffff` to `#e4e4e9`, graphite mark | -| Name text in the app | `#1d1d1f` | `#f5f5f7` | - -Rules: -- The green dot is a **status accent**: it means "online / ready" and nothing else. It is never recoloured to orange or red inside the logo and never used as a decoration elsewhere. - Status (ready, waiting for you / practice pod, not ready) is shown in the app, not by changing the logo. -- On a photo or a busy background use the one-colour mono mark (white on dark photos), or the app icon. -- Never put the graphite mark on a dark surface or the paper mark on a light one; pick the matching file. Never add blue, a gradient to the bare mark or a drop shadow. - -## 4. Clear space and size - -- **Clear space** around the mark or lockup = the width of one ear pod (x, about 22 % of the mark's width). Nothing (text, edge, other logo) inside that. - Around the app icon: 1/4 of its width. -- **Minimum sizes**: app icon and favicon **20 px** on screen (below 20 px use the favicon variants, which have the larger dot; the 16 px browser tab is the one exception and uses - `favicon-16.png`/`favicon.svg`); bare mark 20 px; horizontal wordmark 120 px wide (about 28 px high); stacked 90 px wide. Below that, show the mark only. -- Do not rotate, stretch, recolour the person or the bot separately, put the mark in a circle, or animate it, except for the optional 1.2 s "loading" pulse of the green dot - (opacity 1 to 0.4; disabled under reduced motion). - -## 5. Tagline - -One line, plain English. Recommended first, used on the sign-in screen and README: - -1. **"It tests. You decide."** (short, true to the approval model; use as the sign-in subtitle with a second sentence) -2. "Your Oracle patch testing partner." -3. "Quarterly patch testing, done with you." -4. "Test every patch. Sign off with confidence." -5. "You, the agents and a real browser, working as one." - -Sign-in microcopy (used in the mockup): "Your team's patch testing partner. It plans and runs the tests. You decide." - -Avoid: "AI-powered", "next-gen", "revolutionary", anything promising that the product replaces a human sign-off. Sign-off stays a person's. +| `app-icon.svg` | graphite tile, light orbits: on light backgrounds | +| `app-icon-paper.svg` | paper tile, graphite orbits: on dark backgrounds | +| `favicon.svg` | browser tab; follows the system light/dark setting; heavier strokes for 16 px | +| `favicon-graphite.svg`, `favicon-paper.svg` | the sidebar's small mark in light and dark | +| `logo-mark.svg`, `logo-mark-dark.svg` | the mark alone | +| `wordmark-horizontal-light.svg`, `-dark.svg` | mark + name; the name is outlined from Inter Bold (no live text) | -## 6. Every place the name and logo must appear +PNG icons (16, 32, 48, 180, 512) in `web/public` are rendered from `app-icon.svg`. All assets are generated by one +script (kept with the project notes) so they stay consistent. -The product name comes from one source of truth: `product_name` in `coworker/config.py` (env `FPT_PRODUCT_NAME`), served by `/api/ready` and read by the web -app (`useBrand`). Fallback strings in code must be changed too, so the name never flashes the old value. +## Colour -| # | Place | What | Logo form | -|---|---|---|---| -| 1 | Sign-in, register, forgot, reset (`web/src/pages/AuthShell.tsx`) | heading "Sign in to Trio Co-Worker", tagline, `data-testid="brand"` kept | `app-icon.svg` / `app-icon-paper.svg` 116 px above the heading (light / dark UI) | -| 2 | Sidebar brand row (`AppSidebar.tsx`) | "Trio Co-Worker" + org name | `favicon-graphite.svg` / `favicon-paper.svg` 30 px (light / dark UI) | -| 3 | Browser tab | ``: "Trio Co-Worker" (+ page, + "practice pod, mock app" while a practice pod is selected) | `favicon.svg`, `favicon-32.png`, `apple-touch-icon` in `web/public/` and `web/index.html` | -| 4 | `web/index.html` meta description | "Trio Co-Worker. Patch testing for Oracle Fusion. Mock app, not Oracle Fusion." | | -| 5 | Report HTML bundle (`coworker/graph/nodes/report.py`, title and `<h1>` area) | header: wordmark; footer: "Generated by Trio Co-Worker v{version}. Tested on {pod}. {practice-pod line}" | `wordmark-horizontal-light.svg` (outlined) inlined as a data URI (reports must be self-contained; `coworker/platform/assets/`) | -| 6 | Report PDF (`coworker/adapters/pdf.py`) | page header wordmark, footer text with page numbers and run reference | same, vector | -| 7 | Excel exports (`coworker/platform/test_script.py` and the results workbook) | "Read me" sheet: logo image top-left + "Trio Co-Worker"; replace the "Patch testing co-worker" cell; document property Creator = "Trio Co-Worker" | the creator property only; no image is embedded (the mono mark may be added later) | -| 8 | Emails and notifications (none exist in the repo today; add when built) | subject prefix "[Trio Co-Worker]", header wordmark, footer line, plain-text fallback with the name | `wordmark-horizontal-light.svg` (PNG for mail clients that block SVG) | -| 9 | Desktop notifications (`web/src/desktop.ts`, Electron `DesktopNotifier`) and Electron `productName`/window title | title "Trio Co-Worker", body names the run | `icon-512.png` to .ico/.icns | -| 10 | Telegram / Hermes messages (Hermes integration) | first line "Trio Co-Worker:" then the sentence; bot name and photo = `icon-512.png`; the Hermes honesty line stays ("Answered by the Hermes assistant using NVIDIA's AI model") | `icon-512.png` as bot photo | -| 11 | Ask page and dock | assistant avatar, "Ask Trio" is not used: the box says "Ask about a run, a defect or an area" | `favicon.svg` 32 px | -| 12 | README (title and badge), `README.md` HF Spaces front matter `title:`, `coworker/README.md`, `deploy/DEPLOY.md` | "Trio Co-Worker" | horizontal wordmark at the top of README | -| 13 | API docs (`coworker/api/app.py`, FastAPI `title=`; Swagger/ReDoc pages) | "Trio Co-Worker API"; set `swagger_ui_parameters`/custom favicon via `/favicon.svg` | `favicon.svg` | -| 14 | CLI banner (`coworker/__main__.py`), launcher (`fpt.cmd` header comment), start script messages (`.devcontainer/start.sh`) | "Trio Co-Worker is up: URL" | text | -| 15 | Audit log and exported evidence (`generated_by` fields where a product name is recorded) | "Trio Co-Worker vX.Y" | text | -| 16 | Docs and design files (`docs/design/*.md` headings, mockup) | name only in new docs; do not rewrite history in old design docs | | -| 17 | Mock app / practice pod chrome | stays "Practice App": it is not our product and must not look like it | none | +Graphite `#1d1d1f` and paper `#f5f5f7`; the green node is the only colour (`#34c759` on graphite, `#1d7a35` on +paper). No blue. -## 7. Voice +## Clear space and size -Sentence case. Plain words ("test run", "scenario", "Waiting for you", "Approve"). No jargon in headings. One sentence of explanation, then the action. -Honesty first: always say practice pod versus Oracle Fusion, and always say who decides. +Keep clear space of a quarter of the mark's width on every side. Smallest size: 16 px (favicon variant). diff --git a/docs/design/brand/app-icon-paper.svg b/docs/design/brand/app-icon-paper.svg index 77c32dba7937f9fe6b99916e853486b41b78f1a6..930ab13b701beba67dc5709c6fa4d4b5449b7976 100644 --- a/docs/design/brand/app-icon-paper.svg +++ b/docs/design/brand/app-icon-paper.svg @@ -1,28 +1 @@ -<svg xmlns="http://www.w3.org/2000/svg" role="img" aria-label="Trio Co-Worker" viewBox="0 0 1024 1024" width="1024" height="1024"> -<defs> - <linearGradient id="i2g" x1="0" y1="0" x2="0" y2="1"><stop offset="0" stop-color="#ffffff"/><stop offset="1" stop-color="#e4e4e9"/></linearGradient> - <linearGradient id="i2s" x1="0" y1="0" x2="0" y2="1"><stop offset="0" stop-color="#fff" stop-opacity="0"/><stop offset=".45" stop-color="#fff" stop-opacity="0"/></linearGradient> - <filter id="i2d" x="-20%" y="-20%" width="140%" height="140%"><feDropShadow dx="0" dy="10" stdDeviation="14" flood-color="#000" flood-opacity="0.12"/></filter> -</defs> -<path d="M1024.0 512.0L1023.8 652.2L1023.4 697.0L1022.6 729.4L1021.5 755.8L1020.0 778.3L1018.3 798.1L1016.2 815.9L1013.8 832.1L1011.1 846.9L1008.0 860.7L1004.6 873.4L1000.9 885.3L996.8 896.5L992.4 906.9L987.6 916.7L982.4 926.0L976.8 934.6L970.9 942.8L964.5 950.5L957.7 957.7L950.5 964.5L942.8 970.9L934.6 976.8L926.0 982.4L916.7 987.6L906.9 992.4L896.5 996.8L885.3 1000.9L873.4 1004.6L860.7 1008.0L846.9 1011.1L832.1 1013.8L815.9 1016.2L798.1 1018.3L778.3 1020.0L755.8 1021.5L729.4 1022.6L697.0 1023.4L652.2 1023.8L512.0 1024.0L371.8 1023.8L327.0 1023.4L294.6 1022.6L268.2 1021.5L245.7 1020.0L225.9 1018.3L208.1 1016.2L191.9 1013.8L177.1 1011.1L163.3 1008.0L150.6 1004.6L138.7 1000.9L127.5 996.8L117.1 992.4L107.3 987.6L98.0 982.4L89.4 976.8L81.2 970.9L73.5 964.5L66.3 957.7L59.5 950.5L53.1 942.8L47.2 934.6L41.6 926.0L36.4 916.7L31.6 906.9L27.2 896.5L23.1 885.3L19.4 873.4L16.0 860.7L12.9 846.9L10.2 832.1L7.8 815.9L5.7 798.1L4.0 778.3L2.5 755.8L1.4 729.4L0.6 697.0L0.2 652.2L0.0 512.0L0.2 371.8L0.6 327.0L1.4 294.6L2.5 268.2L4.0 245.7L5.7 225.9L7.8 208.1L10.2 191.9L12.9 177.1L16.0 163.3L19.4 150.6L23.1 138.7L27.2 127.5L31.6 117.1L36.4 107.3L41.6 98.0L47.2 89.4L53.1 81.2L59.5 73.5L66.3 66.3L73.5 59.5L81.2 53.1L89.4 47.2L98.0 41.6L107.3 36.4L117.1 31.6L127.5 27.2L138.7 23.1L150.6 19.4L163.3 16.0L177.1 12.9L191.9 10.2L208.1 7.8L225.9 5.7L245.7 4.0L268.2 2.5L294.6 1.4L327.0 0.6L371.8 0.2L512.0 0.0L652.2 0.2L697.0 0.6L729.4 1.4L755.8 2.5L778.3 4.0L798.1 5.7L815.9 7.8L832.1 10.2L846.9 12.9L860.7 16.0L873.4 19.4L885.3 23.1L896.5 27.2L906.9 31.6L916.7 36.4L926.0 41.6L934.6 47.2L942.8 53.1L950.5 59.5L957.7 66.3L964.5 73.5L970.9 81.2L976.8 89.4L982.4 98.0L987.6 107.3L992.4 117.1L996.8 127.5L1000.9 138.7L1004.6 150.6L1008.0 163.3L1011.1 177.1L1013.8 191.9L1016.2 208.1L1018.3 225.9L1020.0 245.7L1021.5 268.2L1022.6 294.6L1023.4 327.0L1023.8 371.8Z" fill="url(#i2g)"/> -<path d="M1024.0 512.0L1023.8 652.2L1023.4 697.0L1022.6 729.4L1021.5 755.8L1020.0 778.3L1018.3 798.1L1016.2 815.9L1013.8 832.1L1011.1 846.9L1008.0 860.7L1004.6 873.4L1000.9 885.3L996.8 896.5L992.4 906.9L987.6 916.7L982.4 926.0L976.8 934.6L970.9 942.8L964.5 950.5L957.7 957.7L950.5 964.5L942.8 970.9L934.6 976.8L926.0 982.4L916.7 987.6L906.9 992.4L896.5 996.8L885.3 1000.9L873.4 1004.6L860.7 1008.0L846.9 1011.1L832.1 1013.8L815.9 1016.2L798.1 1018.3L778.3 1020.0L755.8 1021.5L729.4 1022.6L697.0 1023.4L652.2 1023.8L512.0 1024.0L371.8 1023.8L327.0 1023.4L294.6 1022.6L268.2 1021.5L245.7 1020.0L225.9 1018.3L208.1 1016.2L191.9 1013.8L177.1 1011.1L163.3 1008.0L150.6 1004.6L138.7 1000.9L127.5 996.8L117.1 992.4L107.3 987.6L98.0 982.4L89.4 976.8L81.2 970.9L73.5 964.5L66.3 957.7L59.5 950.5L53.1 942.8L47.2 934.6L41.6 926.0L36.4 916.7L31.6 906.9L27.2 896.5L23.1 885.3L19.4 873.4L16.0 860.7L12.9 846.9L10.2 832.1L7.8 815.9L5.7 798.1L4.0 778.3L2.5 755.8L1.4 729.4L0.6 697.0L0.2 652.2L0.0 512.0L0.2 371.8L0.6 327.0L1.4 294.6L2.5 268.2L4.0 245.7L5.7 225.9L7.8 208.1L10.2 191.9L12.9 177.1L16.0 163.3L19.4 150.6L23.1 138.7L27.2 127.5L31.6 117.1L36.4 107.3L41.6 98.0L47.2 89.4L53.1 81.2L59.5 73.5L66.3 66.3L73.5 59.5L81.2 53.1L89.4 47.2L98.0 41.6L107.3 36.4L117.1 31.6L127.5 27.2L138.7 23.1L150.6 19.4L163.3 16.0L177.1 12.9L191.9 10.2L208.1 7.8L225.9 5.7L245.7 4.0L268.2 2.5L294.6 1.4L327.0 0.6L371.8 0.2L512.0 0.0L652.2 0.2L697.0 0.6L729.4 1.4L755.8 2.5L778.3 4.0L798.1 5.7L815.9 7.8L832.1 10.2L846.9 12.9L860.7 16.0L873.4 19.4L885.3 23.1L896.5 27.2L906.9 31.6L916.7 36.4L926.0 41.6L934.6 47.2L942.8 53.1L950.5 59.5L957.7 66.3L964.5 73.5L970.9 81.2L976.8 89.4L982.4 98.0L987.6 107.3L992.4 117.1L996.8 127.5L1000.9 138.7L1004.6 150.6L1008.0 163.3L1011.1 177.1L1013.8 191.9L1016.2 208.1L1018.3 225.9L1020.0 245.7L1021.5 268.2L1022.6 294.6L1023.4 327.0L1023.8 371.8Z" fill="none" stroke="url(#i2s)" stroke-width="5" transform="translate(2.5 2.5) scale(.9951)"/> -<path d="M1024.0 512.0L1023.8 652.2L1023.4 697.0L1022.6 729.4L1021.5 755.8L1020.0 778.3L1018.3 798.1L1016.2 815.9L1013.8 832.1L1011.1 846.9L1008.0 860.7L1004.6 873.4L1000.9 885.3L996.8 896.5L992.4 906.9L987.6 916.7L982.4 926.0L976.8 934.6L970.9 942.8L964.5 950.5L957.7 957.7L950.5 964.5L942.8 970.9L934.6 976.8L926.0 982.4L916.7 987.6L906.9 992.4L896.5 996.8L885.3 1000.9L873.4 1004.6L860.7 1008.0L846.9 1011.1L832.1 1013.8L815.9 1016.2L798.1 1018.3L778.3 1020.0L755.8 1021.5L729.4 1022.6L697.0 1023.4L652.2 1023.8L512.0 1024.0L371.8 1023.8L327.0 1023.4L294.6 1022.6L268.2 1021.5L245.7 1020.0L225.9 1018.3L208.1 1016.2L191.9 1013.8L177.1 1011.1L163.3 1008.0L150.6 1004.6L138.7 1000.9L127.5 996.8L117.1 992.4L107.3 987.6L98.0 982.4L89.4 976.8L81.2 970.9L73.5 964.5L66.3 957.7L59.5 950.5L53.1 942.8L47.2 934.6L41.6 926.0L36.4 916.7L31.6 906.9L27.2 896.5L23.1 885.3L19.4 873.4L16.0 860.7L12.9 846.9L10.2 832.1L7.8 815.9L5.7 798.1L4.0 778.3L2.5 755.8L1.4 729.4L0.6 697.0L0.2 652.2L0.0 512.0L0.2 371.8L0.6 327.0L1.4 294.6L2.5 268.2L4.0 245.7L5.7 225.9L7.8 208.1L10.2 191.9L12.9 177.1L16.0 163.3L19.4 150.6L23.1 138.7L27.2 127.5L31.6 117.1L36.4 107.3L41.6 98.0L47.2 89.4L53.1 81.2L59.5 73.5L66.3 66.3L73.5 59.5L81.2 53.1L89.4 47.2L98.0 41.6L107.3 36.4L117.1 31.6L127.5 27.2L138.7 23.1L150.6 19.4L163.3 16.0L177.1 12.9L191.9 10.2L208.1 7.8L225.9 5.7L245.7 4.0L268.2 2.5L294.6 1.4L327.0 0.6L371.8 0.2L512.0 0.0L652.2 0.2L697.0 0.6L729.4 1.4L755.8 2.5L778.3 4.0L798.1 5.7L815.9 7.8L832.1 10.2L846.9 12.9L860.7 16.0L873.4 19.4L885.3 23.1L896.5 27.2L906.9 31.6L916.7 36.4L926.0 41.6L934.6 47.2L942.8 53.1L950.5 59.5L957.7 66.3L964.5 73.5L970.9 81.2L976.8 89.4L982.4 98.0L987.6 107.3L992.4 117.1L996.8 127.5L1000.9 138.7L1004.6 150.6L1008.0 163.3L1011.1 177.1L1013.8 191.9L1016.2 208.1L1018.3 225.9L1020.0 245.7L1021.5 268.2L1022.6 294.6L1023.4 327.0L1023.8 371.8Z" fill="none" stroke="#000" stroke-opacity=".09" stroke-width="3" transform="translate(1.5 1.5) scale(.997)"/> -<g filter="url(#i2d)"><g transform="translate(227 227) scale(5.7)"> -<defs> - <mask id="A3m" maskUnits="userSpaceOnUse" x="-20" y="-20" width="140" height="140"><rect x="-20" y="-20" width="140" height="140" fill="#fff"/><rect x="28" y="40" width="44" height="38" rx="14" fill="#000"/></mask> - <clipPath id="A3c"><rect x="28" y="40" width="44" height="38" rx="14"/></clipPath> -</defs> -<g transform="translate(0 3.5)"> - <g fill="#1d1d1f" mask="url(#A3m)"> - <rect x="14" y="27" width="72" height="61" rx="23"/> - <rect x="5.5" y="46" width="22" height="22" rx="7"/> - <rect x="72.5" y="46" width="22" height="22" rx="7"/> - <rect x="47.5" y="13" width="5" height="18" rx="2.5"/> - </g> - <circle cx="50" cy="11.5" r="6.5" fill="#34c759"/> - <g clip-path="url(#A3c)" fill="#1d1d1f"> - <circle cx="50" cy="53" r="10"/> - <path d="M24 90 C24 73 36 66.5 50 66.5 C64 66.5 76 73 76 90Z"/> - </g> -</g></g></g> -</svg> \ No newline at end of file +<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64" role="img" aria-label="Patchwise"><rect width="64" height="64" rx="16" fill="#f5f5f7"/><g fill="none" stroke="#1d1d1f" stroke-width="2.6"><ellipse cx="32" cy="32" rx="20" ry="8.5"/><ellipse cx="32" cy="32" rx="20" ry="8.5" transform="rotate(60 32 32)"/><ellipse cx="32" cy="32" rx="20" ry="8.5" transform="rotate(120 32 32)"/></g><circle cx="32" cy="32" r="5" fill="#1d1d1f"/><circle cx="52" cy="32" r="4.6" fill="#1d7a35" stroke="#f5f5f7" stroke-width="1.6"/></svg> diff --git a/docs/design/brand/app-icon.svg b/docs/design/brand/app-icon.svg index eec0efe15684a3442cba428bd1c805651b1e64fc..ccda1ede6ab6bbf068d68e9984e5c0ef903c88fa 100644 --- a/docs/design/brand/app-icon.svg +++ b/docs/design/brand/app-icon.svg @@ -1,28 +1 @@ -<svg xmlns="http://www.w3.org/2000/svg" role="img" aria-label="Trio Co-Worker" viewBox="0 0 1024 1024" width="1024" height="1024"> -<defs> - <linearGradient id="i0g" x1="0" y1="0" x2="0" y2="1"><stop offset="0" stop-color="#4a4a4d"/><stop offset="1" stop-color="#1c1c1e"/></linearGradient> - <linearGradient id="i0s" x1="0" y1="0" x2="0" y2="1"><stop offset="0" stop-color="#fff" stop-opacity="0.22"/><stop offset=".45" stop-color="#fff" stop-opacity="0"/></linearGradient> - <filter id="i0d" x="-20%" y="-20%" width="140%" height="140%"><feDropShadow dx="0" dy="10" stdDeviation="14" flood-color="#000" flood-opacity="0.3"/></filter> -</defs> -<path d="M1024.0 512.0L1023.8 652.2L1023.4 697.0L1022.6 729.4L1021.5 755.8L1020.0 778.3L1018.3 798.1L1016.2 815.9L1013.8 832.1L1011.1 846.9L1008.0 860.7L1004.6 873.4L1000.9 885.3L996.8 896.5L992.4 906.9L987.6 916.7L982.4 926.0L976.8 934.6L970.9 942.8L964.5 950.5L957.7 957.7L950.5 964.5L942.8 970.9L934.6 976.8L926.0 982.4L916.7 987.6L906.9 992.4L896.5 996.8L885.3 1000.9L873.4 1004.6L860.7 1008.0L846.9 1011.1L832.1 1013.8L815.9 1016.2L798.1 1018.3L778.3 1020.0L755.8 1021.5L729.4 1022.6L697.0 1023.4L652.2 1023.8L512.0 1024.0L371.8 1023.8L327.0 1023.4L294.6 1022.6L268.2 1021.5L245.7 1020.0L225.9 1018.3L208.1 1016.2L191.9 1013.8L177.1 1011.1L163.3 1008.0L150.6 1004.6L138.7 1000.9L127.5 996.8L117.1 992.4L107.3 987.6L98.0 982.4L89.4 976.8L81.2 970.9L73.5 964.5L66.3 957.7L59.5 950.5L53.1 942.8L47.2 934.6L41.6 926.0L36.4 916.7L31.6 906.9L27.2 896.5L23.1 885.3L19.4 873.4L16.0 860.7L12.9 846.9L10.2 832.1L7.8 815.9L5.7 798.1L4.0 778.3L2.5 755.8L1.4 729.4L0.6 697.0L0.2 652.2L0.0 512.0L0.2 371.8L0.6 327.0L1.4 294.6L2.5 268.2L4.0 245.7L5.7 225.9L7.8 208.1L10.2 191.9L12.9 177.1L16.0 163.3L19.4 150.6L23.1 138.7L27.2 127.5L31.6 117.1L36.4 107.3L41.6 98.0L47.2 89.4L53.1 81.2L59.5 73.5L66.3 66.3L73.5 59.5L81.2 53.1L89.4 47.2L98.0 41.6L107.3 36.4L117.1 31.6L127.5 27.2L138.7 23.1L150.6 19.4L163.3 16.0L177.1 12.9L191.9 10.2L208.1 7.8L225.9 5.7L245.7 4.0L268.2 2.5L294.6 1.4L327.0 0.6L371.8 0.2L512.0 0.0L652.2 0.2L697.0 0.6L729.4 1.4L755.8 2.5L778.3 4.0L798.1 5.7L815.9 7.8L832.1 10.2L846.9 12.9L860.7 16.0L873.4 19.4L885.3 23.1L896.5 27.2L906.9 31.6L916.7 36.4L926.0 41.6L934.6 47.2L942.8 53.1L950.5 59.5L957.7 66.3L964.5 73.5L970.9 81.2L976.8 89.4L982.4 98.0L987.6 107.3L992.4 117.1L996.8 127.5L1000.9 138.7L1004.6 150.6L1008.0 163.3L1011.1 177.1L1013.8 191.9L1016.2 208.1L1018.3 225.9L1020.0 245.7L1021.5 268.2L1022.6 294.6L1023.4 327.0L1023.8 371.8Z" fill="url(#i0g)"/> -<path d="M1024.0 512.0L1023.8 652.2L1023.4 697.0L1022.6 729.4L1021.5 755.8L1020.0 778.3L1018.3 798.1L1016.2 815.9L1013.8 832.1L1011.1 846.9L1008.0 860.7L1004.6 873.4L1000.9 885.3L996.8 896.5L992.4 906.9L987.6 916.7L982.4 926.0L976.8 934.6L970.9 942.8L964.5 950.5L957.7 957.7L950.5 964.5L942.8 970.9L934.6 976.8L926.0 982.4L916.7 987.6L906.9 992.4L896.5 996.8L885.3 1000.9L873.4 1004.6L860.7 1008.0L846.9 1011.1L832.1 1013.8L815.9 1016.2L798.1 1018.3L778.3 1020.0L755.8 1021.5L729.4 1022.6L697.0 1023.4L652.2 1023.8L512.0 1024.0L371.8 1023.8L327.0 1023.4L294.6 1022.6L268.2 1021.5L245.7 1020.0L225.9 1018.3L208.1 1016.2L191.9 1013.8L177.1 1011.1L163.3 1008.0L150.6 1004.6L138.7 1000.9L127.5 996.8L117.1 992.4L107.3 987.6L98.0 982.4L89.4 976.8L81.2 970.9L73.5 964.5L66.3 957.7L59.5 950.5L53.1 942.8L47.2 934.6L41.6 926.0L36.4 916.7L31.6 906.9L27.2 896.5L23.1 885.3L19.4 873.4L16.0 860.7L12.9 846.9L10.2 832.1L7.8 815.9L5.7 798.1L4.0 778.3L2.5 755.8L1.4 729.4L0.6 697.0L0.2 652.2L0.0 512.0L0.2 371.8L0.6 327.0L1.4 294.6L2.5 268.2L4.0 245.7L5.7 225.9L7.8 208.1L10.2 191.9L12.9 177.1L16.0 163.3L19.4 150.6L23.1 138.7L27.2 127.5L31.6 117.1L36.4 107.3L41.6 98.0L47.2 89.4L53.1 81.2L59.5 73.5L66.3 66.3L73.5 59.5L81.2 53.1L89.4 47.2L98.0 41.6L107.3 36.4L117.1 31.6L127.5 27.2L138.7 23.1L150.6 19.4L163.3 16.0L177.1 12.9L191.9 10.2L208.1 7.8L225.9 5.7L245.7 4.0L268.2 2.5L294.6 1.4L327.0 0.6L371.8 0.2L512.0 0.0L652.2 0.2L697.0 0.6L729.4 1.4L755.8 2.5L778.3 4.0L798.1 5.7L815.9 7.8L832.1 10.2L846.9 12.9L860.7 16.0L873.4 19.4L885.3 23.1L896.5 27.2L906.9 31.6L916.7 36.4L926.0 41.6L934.6 47.2L942.8 53.1L950.5 59.5L957.7 66.3L964.5 73.5L970.9 81.2L976.8 89.4L982.4 98.0L987.6 107.3L992.4 117.1L996.8 127.5L1000.9 138.7L1004.6 150.6L1008.0 163.3L1011.1 177.1L1013.8 191.9L1016.2 208.1L1018.3 225.9L1020.0 245.7L1021.5 268.2L1022.6 294.6L1023.4 327.0L1023.8 371.8Z" fill="none" stroke="url(#i0s)" stroke-width="5" transform="translate(2.5 2.5) scale(.9951)"/> - -<g filter="url(#i0d)"><g transform="translate(227 227) scale(5.7)"> -<defs> - <mask id="A1m" maskUnits="userSpaceOnUse" x="-20" y="-20" width="140" height="140"><rect x="-20" y="-20" width="140" height="140" fill="#fff"/><rect x="28" y="40" width="44" height="38" rx="14" fill="#000"/></mask> - <clipPath id="A1c"><rect x="28" y="40" width="44" height="38" rx="14"/></clipPath> -</defs> -<g transform="translate(0 3.5)"> - <g fill="#f5f5f7" mask="url(#A1m)"> - <rect x="14" y="27" width="72" height="61" rx="23"/> - <rect x="5.5" y="46" width="22" height="22" rx="7"/> - <rect x="72.5" y="46" width="22" height="22" rx="7"/> - <rect x="47.5" y="13" width="5" height="18" rx="2.5"/> - </g> - <circle cx="50" cy="11.5" r="6.5" fill="#30d158"/> - <g clip-path="url(#A1c)" fill="#f5f5f7"> - <circle cx="50" cy="53" r="10"/> - <path d="M24 90 C24 73 36 66.5 50 66.5 C64 66.5 76 73 76 90Z"/> - </g> -</g></g></g> -</svg> \ No newline at end of file +<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64" role="img" aria-label="Patchwise"><rect width="64" height="64" rx="16" fill="#1d1d1f"/><g fill="none" stroke="#f5f5f7" stroke-width="2.6"><ellipse cx="32" cy="32" rx="20" ry="8.5"/><ellipse cx="32" cy="32" rx="20" ry="8.5" transform="rotate(60 32 32)"/><ellipse cx="32" cy="32" rx="20" ry="8.5" transform="rotate(120 32 32)"/></g><circle cx="32" cy="32" r="5" fill="#f5f5f7"/><circle cx="52" cy="32" r="4.6" fill="#34c759" stroke="#1d1d1f" stroke-width="1.6"/></svg> diff --git a/docs/design/brand/favicon-graphite.svg b/docs/design/brand/favicon-graphite.svg index 3b750c8a6418f299697587a37801a737104e8c08..ccda1ede6ab6bbf068d68e9984e5c0ef903c88fa 100644 --- a/docs/design/brand/favicon-graphite.svg +++ b/docs/design/brand/favicon-graphite.svg @@ -1,20 +1 @@ -<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64" width="64" height="64" role="img" aria-label="Trio Co-Worker"><title>Trio Co-Worker - - - - - - - - - - - - - - - - - - - + diff --git a/docs/design/brand/favicon-paper.svg b/docs/design/brand/favicon-paper.svg index 0ccd5c508fe1f9577f3d018e3f69224e0a893e42..930ab13b701beba67dc5709c6fa4d4b5449b7976 100644 --- a/docs/design/brand/favicon-paper.svg +++ b/docs/design/brand/favicon-paper.svg @@ -1,20 +1 @@ -Trio Co-Worker - - - - - - - - - - - - - - - - - - - + diff --git a/docs/design/brand/favicon.svg b/docs/design/brand/favicon.svg index 45d8860f42b25c4fcae02c6eaed8037a469dc26d..97be097d263685cd19ac4adcd629125482be33f4 100644 --- a/docs/design/brand/favicon.svg +++ b/docs/design/brand/favicon.svg @@ -1,39 +1 @@ -Trio Co-Worker - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + diff --git a/docs/design/brand/logo-mark-dark.svg b/docs/design/brand/logo-mark-dark.svg index 3fc10ab9b8b56f30967cbba41440ccaaeaf170ad..930ab13b701beba67dc5709c6fa4d4b5449b7976 100644 --- a/docs/design/brand/logo-mark-dark.svg +++ b/docs/design/brand/logo-mark-dark.svg @@ -1,19 +1 @@ -Trio Co-Worker - - - - - - - - - - - - - - - - - - + diff --git a/docs/design/brand/logo-mark-mono-black.svg b/docs/design/brand/logo-mark-mono-black.svg deleted file mode 100644 index 4082bfe28276f4d1c499cc5c79844a61d6f5ef2e..0000000000000000000000000000000000000000 --- a/docs/design/brand/logo-mark-mono-black.svg +++ /dev/null @@ -1,19 +0,0 @@ -Trio Co-Worker - - - - - - - - - - - - - - - - - - diff --git a/docs/design/brand/logo-mark-mono-white.svg b/docs/design/brand/logo-mark-mono-white.svg deleted file mode 100644 index f0422c352528705f37421f3ca9388146095bb77b..0000000000000000000000000000000000000000 --- a/docs/design/brand/logo-mark-mono-white.svg +++ /dev/null @@ -1,19 +0,0 @@ -Trio Co-Worker - - - - - - - - - - - - - - - - - - diff --git a/docs/design/brand/logo-mark.svg b/docs/design/brand/logo-mark.svg index 0d31aa75ebea90c3799d52cbade3a991a1b0c98a..ccda1ede6ab6bbf068d68e9984e5c0ef903c88fa 100644 --- a/docs/design/brand/logo-mark.svg +++ b/docs/design/brand/logo-mark.svg @@ -1,19 +1 @@ -Trio Co-Worker - - - - - - - - - - - - - - - - - - + diff --git a/docs/design/brand/wordmark-horizontal-dark.svg b/docs/design/brand/wordmark-horizontal-dark.svg index dc4abb208bd8027080612b757c7e215ddb8f9b33..73f7c078682943ea2427e8eaba8bde20419096f7 100644 --- a/docs/design/brand/wordmark-horizontal-dark.svg +++ b/docs/design/brand/wordmark-horizontal-dark.svg @@ -1,21 +1 @@ -Trio Co-Worker - - - - - - - - - - - - - - - - - - - - + diff --git a/docs/design/brand/wordmark-horizontal-light.svg b/docs/design/brand/wordmark-horizontal-light.svg index ee422c932f296e9fce14ed89c5a25b874c7291fb..f17e5bd48f067bda39934c5b782e449045bfb9ff 100644 --- a/docs/design/brand/wordmark-horizontal-light.svg +++ b/docs/design/brand/wordmark-horizontal-light.svg @@ -1,21 +1 @@ -Trio Co-Worker - - - - - - - - - - - - - - - - - - - - + diff --git a/docs/design/brand/wordmark-stacked-dark.svg b/docs/design/brand/wordmark-stacked-dark.svg deleted file mode 100644 index 57d34fa500e058538fb7799c16577c3512202176..0000000000000000000000000000000000000000 --- a/docs/design/brand/wordmark-stacked-dark.svg +++ /dev/null @@ -1,20 +0,0 @@ -Trio Co-Worker - - - - - - - - - - - - - - - - - - - diff --git a/docs/design/brand/wordmark-stacked-light.svg b/docs/design/brand/wordmark-stacked-light.svg deleted file mode 100644 index 2afce1bd575762bdfa9ffbe28a8d9c8ebc785d75..0000000000000000000000000000000000000000 --- a/docs/design/brand/wordmark-stacked-light.svg +++ /dev/null @@ -1,20 +0,0 @@ -Trio Co-Worker - - - - - - - - - - - - - - - - - - - diff --git a/fpt.cmd b/fpt.cmd index 3b72f212c3974504108fc08f88ca5a351f8003b7..681468249385469386838a449e090f87858d3fe5 100644 --- a/fpt.cmd +++ b/fpt.cmd @@ -1,5 +1,5 @@ @echo off -rem Trio Co-Worker launcher (Windows). Mock app only, never Oracle Fusion. +rem Patchwise launcher (Windows). Mock app only, never Oracle Fusion. rem fpt setup | up | down | api | mock | web-dev | desktop | package | create-user | test | selftest | kill | unkill | run | resume setlocal cd /d %~dp0 diff --git a/qa/test-strategy.md b/qa/test-strategy.md index 4891e23b82b8b6e5259b59bfd5df6e35c9aaa6e4..c2a515ed3e663701dec86243790ddc32f8c66bd8 100644 --- a/qa/test-strategy.md +++ b/qa/test-strategy.md @@ -11,7 +11,7 @@ Earlier: v0.5 made the strategy module-generic with P1โ€“P4 score bands; v0.4 sy ## 1. Purpose and scope -Purpose: show that each **module pack** of Trio Co-Worker can design, automate, run, triage and report +Purpose: show that each **module pack** of Patchwise can design, automate, run, triage and report regression tests for its module, and that its reported counts can be trusted. ### 1a. Module packs diff --git a/render.yaml b/render.yaml index ef744e6da6a6ce9a0c420aae4e8e2bbf3b25448e..a180bdb9b78bf522a2344e61a6a002fdcf9da012 100644 --- a/render.yaml +++ b/render.yaml @@ -1,4 +1,4 @@ -# Render blueprint for a DEMO of Trio Co-Worker. +# Render blueprint for a DEMO of Patchwise. # In Render: New > Blueprint > pick this repository. Render builds the Dockerfile and starts one web service. # # Demo limits (by design, to fit a small instance): @@ -29,7 +29,7 @@ services: - key: PATCH_WATCH_ENABLED value: "0" - key: FPT_PRODUCT_NAME - value: Trio Co-Worker + value: Patchwise - key: FPT_ORG_NAME value: Demo - key: FPT_BOOTSTRAP_ADMIN_USER diff --git a/web/components.json b/web/components.json new file mode 100644 index 0000000000000000000000000000000000000000..7b772ed3ad8af8b2ed5b4e61d523758e8b8867a4 --- /dev/null +++ b/web/components.json @@ -0,0 +1,21 @@ +{ + "$schema": "https://ui.shadcn.com/schema.json", + "style": "new-york", + "rsc": false, + "tsx": true, + "tailwind": { + "config": "", + "css": "src/beui.css", + "baseColor": "neutral", + "cssVariables": true, + "prefix": "" + }, + "aliases": { + "components": "@/components", + "utils": "@/lib/utils", + "ui": "@/components/ui", + "lib": "@/lib", + "hooks": "@/hooks" + }, + "iconLibrary": "lucide" +} diff --git a/web/e2e/coworker.e2e.ts b/web/e2e/coworker.e2e.ts index 3bc03d9154d417d4162aff2432722109e27b7c57..b0b0bae1926ee45c5f3d22abcf79fb0ed44616a4 100644 --- a/web/e2e/coworker.e2e.ts +++ b/web/e2e/coworker.e2e.ts @@ -247,13 +247,13 @@ test('chat: ask about readiness, propose a quick simulation, confirm, and the te test('brand and keyboard: the product name, the command palette (Ctrl K) and the dark appearance', async ({ page }) => { await page.goto('/login'); - await expect(page).toHaveTitle(/Trio Co-Worker/); - await expect(page.getByRole('heading', { name: 'Sign in to Trio Co-Worker' })).toBeVisible(); + await expect(page).toHaveTitle(/Patchwise/); + await expect(page.getByRole('heading', { name: 'Sign in to Patchwise' })).toBeVisible(); await page.getByLabel('Username').fill(E2E_USER); await page.getByLabel('Password').fill(E2E_PASSWORD); await page.getByRole('button', { name: 'Sign in' }).click(); await expect(page.getByRole('heading', { name: 'Patch readiness' })).toBeVisible(); - await expect(page.getByTestId('brand')).toContainText('Trio Co-Worker'); + await expect(page.getByTestId('brand')).toContainText('Patchwise'); // Ctrl K: type, Enter, and the first match opens await page.keyboard.press('Control+k'); await expect(page.getByTestId('palette')).toBeVisible(); diff --git a/web/eslint.config.js b/web/eslint.config.js index 5d4467fb04695ede8c3c4b879f1b87bdfe801fef..72250979128297de0a2ca576c18cc43a2f7146de 100644 --- a/web/eslint.config.js +++ b/web/eslint.config.js @@ -17,4 +17,13 @@ export default tseslint.config( '@typescript-eslint/no-non-null-assertion': 'off', }, }, + { + // beUI components copied from its registry, kept as published so they can be updated from beui.dev; only the + // two style rules their code differs on are relaxed (empty prop interfaces, a guarded measure-every-render effect) + files: ['src/components/ui/**/*.{ts,tsx}'], + rules: { + '@typescript-eslint/no-empty-object-type': 'off', + 'react-hooks/exhaustive-deps': 'off', + }, + }, ); diff --git a/web/index.html b/web/index.html index 6e395b666c8b8bac0a44cdec2806073c2ea82935..31ea882c0bb63f2fb467e3454c8c664d7d903bec 100644 --- a/web/index.html +++ b/web/index.html @@ -9,8 +9,8 @@ - - Trio Co-Worker + + Patchwise
diff --git a/web/package-lock.json b/web/package-lock.json index 2e41db7a5149b5397ed8e004b3899ab31a372dee..9ea226c262dc487e385b81eda1f147ecdcb7487d 100644 --- a/web/package-lock.json +++ b/web/package-lock.json @@ -14,20 +14,27 @@ "@mantine/notifications": "^7.17.8", "@tabler/icons-react": "^3.49.0", "@tanstack/react-query": "^5.104.1", + "clsx": "^2.1.1", + "lucide-react": "^0.548.0", + "motion": "^12.43.0", "openapi-fetch": "^0.17.0", - "react": "^18.3.1", - "react-dom": "^18.3.1", - "react-router-dom": "^6.30.6" + "react": "^19.2.0", + "react-dom": "^19.2.0", + "react-router-dom": "^6.30.6", + "tailwind-merge": "^3.7.0", + "three": "^0.180.0" }, "devDependencies": { "@eslint/js": "^9.39.0", "@playwright/test": "1.64.0", + "@tailwindcss/vite": "^4.1.14", "@testing-library/jest-dom": "^6.6.3", "@testing-library/react": "^16.3.0", "@testing-library/user-event": "^14.6.1", "@types/node": "^22.15.0", - "@types/react": "^18.3.23", - "@types/react-dom": "^18.3.7", + "@types/react": "^19.2.2", + "@types/react-dom": "^19.2.2", + "@types/three": "^0.180.0", "@vitejs/plugin-react": "^4.7.0", "eslint": "^9.39.0", "eslint-plugin-react-hooks": "^5.2.0", @@ -35,6 +42,7 @@ "globals": "^16.2.0", "jsdom": "^26.1.0", "openapi-typescript": "^7.13.0", + "tailwindcss": "^4.1.14", "typescript": "~5.9.3", "typescript-eslint": "^8.71.0", "vite": "^6.4.4", @@ -475,6 +483,13 @@ "node": ">=18" } }, + "node_modules/@dimforge/rapier3d-compat": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/@dimforge/rapier3d-compat/-/rapier3d-compat-0.12.0.tgz", + "integrity": "sha512-uekIGetywIgopfD97oDL5PfeezkFpNhwlzlaEYNOA0N6ghdsOvh/HYjSMek5Q2O1PYvRSDFcqFVJl4r4ZBwOow==", + "dev": true, + "license": "Apache-2.0" + }, "node_modules/@esbuild/aix-ppc64": { "version": "0.25.12", "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.25.12.tgz", @@ -1202,6 +1217,19 @@ "url": "https://github.com/sponsors/nzakas" } }, + "node_modules/@isaacs/fs-minipass": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@isaacs/fs-minipass/-/fs-minipass-4.0.1.tgz", + "integrity": "sha512-wgm9Ehl2jpeqP3zw/7mo3kRHFp5MEDhqAdwy1fTGkHAwnkGOVsgpvQhL8B5n1qlb01jV3n/bI0ZfZp5lWA1k4w==", + "dev": true, + "license": "ISC", + "dependencies": { + "minipass": "^7.0.4" + }, + "engines": { + "node": ">=18.0.0" + } + }, "node_modules/@jridgewell/gen-mapping": { "version": "0.3.13", "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.13.tgz", @@ -1848,6 +1876,295 @@ "react": ">= 16" } }, + "node_modules/@tailwindcss/node": { + "version": "4.1.14", + "resolved": "https://registry.npmjs.org/@tailwindcss/node/-/node-4.1.14.tgz", + "integrity": "sha512-hpz+8vFk3Ic2xssIA3e01R6jkmsAhvkQdXlEbRTk6S10xDAtiQiM3FyvZVGsucefq764euO/b8WUW9ysLdThHw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/remapping": "^2.3.4", + "enhanced-resolve": "^5.18.3", + "jiti": "^2.6.0", + "lightningcss": "1.30.1", + "magic-string": "^0.30.19", + "source-map-js": "^1.2.1", + "tailwindcss": "4.1.14" + } + }, + "node_modules/@tailwindcss/oxide": { + "version": "4.1.14", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide/-/oxide-4.1.14.tgz", + "integrity": "sha512-23yx+VUbBwCg2x5XWdB8+1lkPajzLmALEfMb51zZUBYaYVPDQvBSD/WYDqiVyBIo2BZFa3yw1Rpy3G2Jp+K0dw==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "dependencies": { + "detect-libc": "^2.0.4", + "tar": "^7.5.1" + }, + "engines": { + "node": ">= 10" + }, + "optionalDependencies": { + "@tailwindcss/oxide-android-arm64": "4.1.14", + "@tailwindcss/oxide-darwin-arm64": "4.1.14", + "@tailwindcss/oxide-darwin-x64": "4.1.14", + "@tailwindcss/oxide-freebsd-x64": "4.1.14", + "@tailwindcss/oxide-linux-arm-gnueabihf": "4.1.14", + "@tailwindcss/oxide-linux-arm64-gnu": "4.1.14", + "@tailwindcss/oxide-linux-arm64-musl": "4.1.14", + "@tailwindcss/oxide-linux-x64-gnu": "4.1.14", + "@tailwindcss/oxide-linux-x64-musl": "4.1.14", + "@tailwindcss/oxide-wasm32-wasi": "4.1.14", + "@tailwindcss/oxide-win32-arm64-msvc": "4.1.14", + "@tailwindcss/oxide-win32-x64-msvc": "4.1.14" + } + }, + "node_modules/@tailwindcss/oxide-android-arm64": { + "version": "4.1.14", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-android-arm64/-/oxide-android-arm64-4.1.14.tgz", + "integrity": "sha512-a94ifZrGwMvbdeAxWoSuGcIl6/DOP5cdxagid7xJv6bwFp3oebp7y2ImYsnZBMTwjn5Ev5xESvS3FFYUGgPODQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@tailwindcss/oxide-darwin-arm64": { + "version": "4.1.14", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-darwin-arm64/-/oxide-darwin-arm64-4.1.14.tgz", + "integrity": "sha512-HkFP/CqfSh09xCnrPJA7jud7hij5ahKyWomrC3oiO2U9i0UjP17o9pJbxUN0IJ471GTQQmzwhp0DEcpbp4MZTA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@tailwindcss/oxide-darwin-x64": { + "version": "4.1.14", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-darwin-x64/-/oxide-darwin-x64-4.1.14.tgz", + "integrity": "sha512-eVNaWmCgdLf5iv6Qd3s7JI5SEFBFRtfm6W0mphJYXgvnDEAZ5sZzqmI06bK6xo0IErDHdTA5/t7d4eTfWbWOFw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@tailwindcss/oxide-freebsd-x64": { + "version": "4.1.14", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-freebsd-x64/-/oxide-freebsd-x64-4.1.14.tgz", + "integrity": "sha512-QWLoRXNikEuqtNb0dhQN6wsSVVjX6dmUFzuuiL09ZeXju25dsei2uIPl71y2Ic6QbNBsB4scwBoFnlBfabHkEw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@tailwindcss/oxide-linux-arm-gnueabihf": { + "version": "4.1.14", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm-gnueabihf/-/oxide-linux-arm-gnueabihf-4.1.14.tgz", + "integrity": "sha512-VB4gjQni9+F0VCASU+L8zSIyjrLLsy03sjcR3bM0V2g4SNamo0FakZFKyUQ96ZVwGK4CaJsc9zd/obQy74o0Fw==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@tailwindcss/oxide-linux-arm64-gnu": { + "version": "4.1.14", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm64-gnu/-/oxide-linux-arm64-gnu-4.1.14.tgz", + "integrity": "sha512-qaEy0dIZ6d9vyLnmeg24yzA8XuEAD9WjpM5nIM1sUgQ/Zv7cVkharPDQcmm/t/TvXoKo/0knI3me3AGfdx6w1w==", + "cpu": [ + "arm64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@tailwindcss/oxide-linux-arm64-musl": { + "version": "4.1.14", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm64-musl/-/oxide-linux-arm64-musl-4.1.14.tgz", + "integrity": "sha512-ISZjT44s59O8xKsPEIesiIydMG/sCXoMBCqsphDm/WcbnuWLxxb+GcvSIIA5NjUw6F8Tex7s5/LM2yDy8RqYBQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@tailwindcss/oxide-linux-x64-gnu": { + "version": "4.1.14", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-x64-gnu/-/oxide-linux-x64-gnu-4.1.14.tgz", + "integrity": "sha512-02c6JhLPJj10L2caH4U0zF8Hji4dOeahmuMl23stk0MU1wfd1OraE7rOloidSF8W5JTHkFdVo/O7uRUJJnUAJg==", + "cpu": [ + "x64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@tailwindcss/oxide-linux-x64-musl": { + "version": "4.1.14", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-x64-musl/-/oxide-linux-x64-musl-4.1.14.tgz", + "integrity": "sha512-TNGeLiN1XS66kQhxHG/7wMeQDOoL0S33x9BgmydbrWAb9Qw0KYdd8o1ifx4HOGDWhVmJ+Ul+JQ7lyknQFilO3Q==", + "cpu": [ + "x64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@tailwindcss/oxide-wasm32-wasi": { + "version": "4.1.14", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-wasm32-wasi/-/oxide-wasm32-wasi-4.1.14.tgz", + "integrity": "sha512-uZYAsaW/jS/IYkd6EWPJKW/NlPNSkWkBlaeVBi/WsFQNP05/bzkebUL8FH1pdsqx4f2fH/bWFcUABOM9nfiJkQ==", + "bundleDependencies": [ + "@napi-rs/wasm-runtime", + "@emnapi/core", + "@emnapi/runtime", + "@tybys/wasm-util", + "@emnapi/wasi-threads", + "tslib" + ], + "cpu": [ + "wasm32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "@emnapi/core": "^1.5.0", + "@emnapi/runtime": "^1.5.0", + "@emnapi/wasi-threads": "^1.1.0", + "@napi-rs/wasm-runtime": "^1.0.5", + "@tybys/wasm-util": "^0.10.1", + "tslib": "^2.4.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@tailwindcss/oxide-win32-arm64-msvc": { + "version": "4.1.14", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-win32-arm64-msvc/-/oxide-win32-arm64-msvc-4.1.14.tgz", + "integrity": "sha512-Az0RnnkcvRqsuoLH2Z4n3JfAef0wElgzHD5Aky/e+0tBUxUhIeIqFBTMNQvmMRSP15fWwmvjBxZ3Q8RhsDnxAA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@tailwindcss/oxide-win32-x64-msvc": { + "version": "4.1.14", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-win32-x64-msvc/-/oxide-win32-x64-msvc-4.1.14.tgz", + "integrity": "sha512-ttblVGHgf68kEE4om1n/n44I0yGPkCPbLsqzjvybhpwa6mKKtgFfAzy6btc3HRmuW7nHe0OOrSeNP9sQmmH9XA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@tailwindcss/vite": { + "version": "4.1.14", + "resolved": "https://registry.npmjs.org/@tailwindcss/vite/-/vite-4.1.14.tgz", + "integrity": "sha512-BoFUoU0XqgCUS1UXWhmDJroKKhNXeDzD7/XwabjkDIAbMnc4ULn5e2FuEuBbhZ6ENZoSYzKlzvZ44Yr6EUDUSA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@tailwindcss/node": "4.1.14", + "@tailwindcss/oxide": "4.1.14", + "tailwindcss": "4.1.14" + }, + "peerDependencies": { + "vite": "^5.2.0 || ^6 || ^7" + } + }, "node_modules/@tanstack/query-core": { "version": "5.104.1", "resolved": "https://registry.npmjs.org/@tanstack/query-core/-/query-core-5.104.1.tgz", @@ -1964,6 +2281,13 @@ "@testing-library/dom": ">=7.21.4" } }, + "node_modules/@tweenjs/tween.js": { + "version": "23.1.3", + "resolved": "https://registry.npmjs.org/@tweenjs/tween.js/-/tween.js-23.1.3.tgz", + "integrity": "sha512-vJmvvwFxYuGnF2axRtPYocag6Clbb5YS7kLL+SO/TeVFzHqDIWrNKYtcsPMibjDx9O+bu+psAy9NKfWklassUA==", + "dev": true, + "license": "MIT" + }, "node_modules/@types/aria-query": { "version": "5.0.4", "resolved": "https://registry.npmjs.org/@types/aria-query/-/aria-query-5.0.4.tgz", @@ -2059,34 +2383,56 @@ "undici-types": "~6.21.0" } }, - "node_modules/@types/prop-types": { - "version": "15.7.15", - "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.15.tgz", - "integrity": "sha512-F6bEyamV9jKGAFBEmlQnesRPGOQqS2+Uwi0Em15xenOxHaf2hv6L8YCVn3rPdPJOiJfPiCnLIRyvwVaqMY3MIw==", - "devOptional": true, - "license": "MIT" - }, "node_modules/@types/react": { - "version": "18.3.31", - "resolved": "https://registry.npmjs.org/@types/react/-/react-18.3.31.tgz", - "integrity": "sha512-vfEqpXTvwT91yhmwdfouStN2hSKwTvyRs8qpLfADyrq/kxDw0hZM7Wk9Ug1FELj8hIby+S/+kQCSRFF32nv2Qw==", + "version": "19.2.2", + "resolved": "https://registry.npmjs.org/@types/react/-/react-19.2.2.tgz", + "integrity": "sha512-6mDvHUFSjyT2B2yeNx2nUgMxh9LtOWvkhIU3uePn2I2oyNymUAX1NIsdgviM4CH+JSrp2D2hsMvJOkxY+0wNRA==", "devOptional": true, "license": "MIT", "dependencies": { - "@types/prop-types": "*", - "csstype": "^3.2.2" + "csstype": "^3.0.2" } }, "node_modules/@types/react-dom": { - "version": "18.3.7", - "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-18.3.7.tgz", - "integrity": "sha512-MEe3UeoENYVFXzoXEWsvcpg6ZvlrFNlOQ7EOsvhI3CfAXwzPfO8Qwuxd40nepsYKqyyVQnTdEfv68q91yLcKrQ==", + "version": "19.2.2", + "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-19.2.2.tgz", + "integrity": "sha512-9KQPoO6mZCi7jcIStSnlOWn2nEF3mNmyr3rIAsGnAbQKYbRLyqmeSc39EVgtxXVia+LMT8j3knZLAZAh+xLmrw==", "dev": true, "license": "MIT", "peerDependencies": { - "@types/react": "^18.0.0" + "@types/react": "^19.2.0" + } + }, + "node_modules/@types/stats.js": { + "version": "0.17.4", + "resolved": "https://registry.npmjs.org/@types/stats.js/-/stats.js-0.17.4.tgz", + "integrity": "sha512-jIBvWWShCvlBqBNIZt0KAshWpvSjhkwkEu4ZUcASoAvhmrgAUI2t1dXrjSL4xXVLB4FznPrIsX3nKXFl/Dt4vA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/three": { + "version": "0.180.0", + "resolved": "https://registry.npmjs.org/@types/three/-/three-0.180.0.tgz", + "integrity": "sha512-ykFtgCqNnY0IPvDro7h+9ZeLY+qjgUWv+qEvUt84grhenO60Hqd4hScHE7VTB9nOQ/3QM8lkbNE+4vKjEpUxKg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@dimforge/rapier3d-compat": "~0.12.0", + "@tweenjs/tween.js": "~23.1.3", + "@types/stats.js": "*", + "@types/webxr": "*", + "@webgpu/types": "*", + "fflate": "~0.8.2", + "meshoptimizer": "~0.22.0" } }, + "node_modules/@types/webxr": { + "version": "0.5.24", + "resolved": "https://registry.npmjs.org/@types/webxr/-/webxr-0.5.24.tgz", + "integrity": "sha512-h8fgEd/DpoS9CBrjEQXR+dIDraopAEfu4wYVNY2tEPwk60stPWhvZMf4Foo5FakuQ7HFZoa8WceaWFervK2Ovg==", + "dev": true, + "license": "MIT" + }, "node_modules/@typescript-eslint/eslint-plugin": { "version": "8.71.1", "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.71.1.tgz", @@ -2518,6 +2864,13 @@ "url": "https://opencollective.com/vitest" } }, + "node_modules/@webgpu/types": { + "version": "0.1.74", + "resolved": "https://registry.npmjs.org/@webgpu/types/-/types-0.1.74.tgz", + "integrity": "sha512-lgiI4hbuLcI9unnm2cL/tvCaQU45dp0xcLWJh5uB/9MBGvIA4F8XIk7nSiBeg+K4xWGYwgZKn80LmERI5CxoTA==", + "dev": true, + "license": "BSD-3-Clause" + }, "node_modules/acorn": { "version": "8.19.0", "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.19.0.tgz", @@ -2789,6 +3142,16 @@ "node": ">= 16" } }, + "node_modules/chownr": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-3.0.0.tgz", + "integrity": "sha512-+IxzY9BZOQd/XuYPRmrvEVjF/nqj5kgT4kEq7VofrDoM1MxoRjEWkrCC3EtLi59TVawxTAn+orJwFQcrqEN1+g==", + "dev": true, + "license": "BlueOak-1.0.0", + "engines": { + "node": ">=18" + } + }, "node_modules/clsx": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/clsx/-/clsx-2.1.1.tgz", @@ -2947,6 +3310,16 @@ "node": ">=6" } }, + "node_modules/detect-libc": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.1.2.tgz", + "integrity": "sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=8" + } + }, "node_modules/detect-node-es": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/detect-node-es/-/detect-node-es-1.1.0.tgz", @@ -2978,6 +3351,20 @@ "dev": true, "license": "ISC" }, + "node_modules/enhanced-resolve": { + "version": "5.26.0", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.26.0.tgz", + "integrity": "sha512-9vhedylFonb2YGogzUKX6+Ja72gOJbN1QHAqdrvqLwhdl/QWbKopzoUC9EbQNVsAns/bx/4uyqalrQAoy1IByw==", + "dev": true, + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.2.4", + "tapable": "^2.3.3" + }, + "engines": { + "node": ">=10.13.0" + } + }, "node_modules/entities": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/entities/-/entities-6.0.1.tgz", @@ -3300,6 +3687,13 @@ } } }, + "node_modules/fflate": { + "version": "0.8.3", + "resolved": "https://registry.npmjs.org/fflate/-/fflate-0.8.3.tgz", + "integrity": "sha512-tbZNuJrLwGUp3zshBtdy4W+ORxZuIh8a5ilyIEQDC5rY1f3U20JMry0Ll3WBzU58EZKsEuJFXhb5gwv8CsPvgA==", + "dev": true, + "license": "MIT" + }, "node_modules/file-entry-cache": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-8.0.0.tgz", @@ -3351,6 +3745,33 @@ "dev": true, "license": "ISC" }, + "node_modules/framer-motion": { + "version": "12.43.0", + "resolved": "https://registry.npmjs.org/framer-motion/-/framer-motion-12.43.0.tgz", + "integrity": "sha512-1eaL3RvR/kAlbG7UYcpMptEyzPoENO0c6w7ZnB3/hh2vSAz/6uGAFn6fdoqTBguNstf3MsFhJHsD/0DHiclG+g==", + "license": "MIT", + "dependencies": { + "motion-dom": "^12.43.0", + "motion-utils": "^12.39.0", + "tslib": "^2.4.0" + }, + "peerDependencies": { + "@emotion/is-prop-valid": "*", + "react": "^18.0.0 || ^19.0.0", + "react-dom": "^18.0.0 || ^19.0.0" + }, + "peerDependenciesMeta": { + "@emotion/is-prop-valid": { + "optional": true + }, + "react": { + "optional": true + }, + "react-dom": { + "optional": true + } + } + }, "node_modules/fsevents": { "version": "2.3.3", "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", @@ -3411,6 +3832,13 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/graceful-fs": { + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", + "dev": true, + "license": "ISC" + }, "node_modules/has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", @@ -3572,6 +4000,16 @@ "dev": true, "license": "ISC" }, + "node_modules/jiti": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/jiti/-/jiti-2.7.0.tgz", + "integrity": "sha512-AC/7JofJvZGrrneWNaEnJeOLUx+JlGt7tNa0wZiRPT4MY1wmfKjt2+6O2p2uz2+skll8OZZmJMNqeke7kKbNgQ==", + "dev": true, + "license": "MIT", + "bin": { + "jiti": "lib/jiti-cli.mjs" + } + }, "node_modules/js-levenshtein": { "version": "1.1.6", "resolved": "https://registry.npmjs.org/js-levenshtein/-/js-levenshtein-1.1.6.tgz", @@ -3722,6 +4160,257 @@ "node": ">= 0.8.0" } }, + "node_modules/lightningcss": { + "version": "1.30.1", + "resolved": "https://registry.npmjs.org/lightningcss/-/lightningcss-1.30.1.tgz", + "integrity": "sha512-xi6IyHML+c9+Q3W0S4fCQJOym42pyurFiJUHEcEyHS0CeKzia4yZDEsLlqOFykxOdHpNy0NmvVO31vcSqAxJCg==", + "dev": true, + "license": "MPL-2.0", + "dependencies": { + "detect-libc": "^2.0.3" + }, + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + }, + "optionalDependencies": { + "lightningcss-darwin-arm64": "1.30.1", + "lightningcss-darwin-x64": "1.30.1", + "lightningcss-freebsd-x64": "1.30.1", + "lightningcss-linux-arm-gnueabihf": "1.30.1", + "lightningcss-linux-arm64-gnu": "1.30.1", + "lightningcss-linux-arm64-musl": "1.30.1", + "lightningcss-linux-x64-gnu": "1.30.1", + "lightningcss-linux-x64-musl": "1.30.1", + "lightningcss-win32-arm64-msvc": "1.30.1", + "lightningcss-win32-x64-msvc": "1.30.1" + } + }, + "node_modules/lightningcss-darwin-arm64": { + "version": "1.30.1", + "resolved": "https://registry.npmjs.org/lightningcss-darwin-arm64/-/lightningcss-darwin-arm64-1.30.1.tgz", + "integrity": "sha512-c8JK7hyE65X1MHMN+Viq9n11RRC7hgin3HhYKhrMyaXflk5GVplZ60IxyoVtzILeKr+xAJwg6zK6sjTBJ0FKYQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-darwin-x64": { + "version": "1.30.1", + "resolved": "https://registry.npmjs.org/lightningcss-darwin-x64/-/lightningcss-darwin-x64-1.30.1.tgz", + "integrity": "sha512-k1EvjakfumAQoTfcXUcHQZhSpLlkAuEkdMBsI/ivWw9hL+7FtilQc0Cy3hrx0AAQrVtQAbMI7YjCgYgvn37PzA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-freebsd-x64": { + "version": "1.30.1", + "resolved": "https://registry.npmjs.org/lightningcss-freebsd-x64/-/lightningcss-freebsd-x64-1.30.1.tgz", + "integrity": "sha512-kmW6UGCGg2PcyUE59K5r0kWfKPAVy4SltVeut+umLCFoJ53RdCUWxcRDzO1eTaxf/7Q2H7LTquFHPL5R+Gjyig==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-arm-gnueabihf": { + "version": "1.30.1", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm-gnueabihf/-/lightningcss-linux-arm-gnueabihf-1.30.1.tgz", + "integrity": "sha512-MjxUShl1v8pit+6D/zSPq9S9dQ2NPFSQwGvxBCYaBYLPlCWuPh9/t1MRS8iUaR8i+a6w7aps+B4N0S1TYP/R+Q==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-arm64-gnu": { + "version": "1.30.1", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-gnu/-/lightningcss-linux-arm64-gnu-1.30.1.tgz", + "integrity": "sha512-gB72maP8rmrKsnKYy8XUuXi/4OctJiuQjcuqWNlJQ6jZiWqtPvqFziskH3hnajfvKB27ynbVCucKSm2rkQp4Bw==", + "cpu": [ + "arm64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-arm64-musl": { + "version": "1.30.1", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-musl/-/lightningcss-linux-arm64-musl-1.30.1.tgz", + "integrity": "sha512-jmUQVx4331m6LIX+0wUhBbmMX7TCfjF5FoOH6SD1CttzuYlGNVpA7QnrmLxrsub43ClTINfGSYyHe2HWeLl5CQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-x64-gnu": { + "version": "1.30.1", + "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-gnu/-/lightningcss-linux-x64-gnu-1.30.1.tgz", + "integrity": "sha512-piWx3z4wN8J8z3+O5kO74+yr6ze/dKmPnI7vLqfSqI8bccaTGY5xiSGVIJBDd5K5BHlvVLpUB3S2YCfelyJ1bw==", + "cpu": [ + "x64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-x64-musl": { + "version": "1.30.1", + "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-musl/-/lightningcss-linux-x64-musl-1.30.1.tgz", + "integrity": "sha512-rRomAK7eIkL+tHY0YPxbc5Dra2gXlI63HL+v1Pdi1a3sC+tJTcFrHX+E86sulgAXeI7rSzDYhPSeHHjqFhqfeQ==", + "cpu": [ + "x64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-win32-arm64-msvc": { + "version": "1.30.1", + "resolved": "https://registry.npmjs.org/lightningcss-win32-arm64-msvc/-/lightningcss-win32-arm64-msvc-1.30.1.tgz", + "integrity": "sha512-mSL4rqPi4iXq5YVqzSsJgMVFENoa4nGTT/GjO2c0Yl9OuQfPsIfncvLrEW6RbbB24WtZ3xP/2CCmI3tNkNV4oA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-win32-x64-msvc": { + "version": "1.30.1", + "resolved": "https://registry.npmjs.org/lightningcss-win32-x64-msvc/-/lightningcss-win32-x64-msvc-1.30.1.tgz", + "integrity": "sha512-PVqXh48wh4T53F/1CCu8PIPCxLzWyCnn/9T5W1Jpmdy5h9Cwd+0YQS6/LwhHXSafuc61/xg9Lv5OrCby6a++jg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, "node_modules/locate-path": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", @@ -3774,6 +4463,15 @@ "yallist": "^3.0.2" } }, + "node_modules/lucide-react": { + "version": "0.548.0", + "resolved": "https://registry.npmjs.org/lucide-react/-/lucide-react-0.548.0.tgz", + "integrity": "sha512-63b16z63jM9yc1MwxajHeuu0FRZFsDtljtDjYm26Kd86UQ5HQzu9ksEtoUUw4RBuewodw/tGFmvipePvRsKeDA==", + "license": "ISC", + "peerDependencies": { + "react": "^16.5.1 || ^17.0.0 || ^18.0.0 || ^19.0.0" + } + }, "node_modules/lz-string": { "version": "1.5.0", "resolved": "https://registry.npmjs.org/lz-string/-/lz-string-1.5.0.tgz", @@ -3795,6 +4493,13 @@ "@jridgewell/sourcemap-codec": "^1.5.5" } }, + "node_modules/meshoptimizer": { + "version": "0.22.0", + "resolved": "https://registry.npmjs.org/meshoptimizer/-/meshoptimizer-0.22.0.tgz", + "integrity": "sha512-IebiK79sqIy+E4EgOr+CAw+Ke8hAspXKzBd0JdgEmPHiAwmvEj2S4h1rfvo+o/BnfEYd/jAOg5IeeIjzlzSnDg==", + "dev": true, + "license": "MIT" + }, "node_modules/min-indent": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/min-indent/-/min-indent-1.0.1.tgz", @@ -3818,6 +4523,70 @@ "node": "*" } }, + "node_modules/minipass": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.3.tgz", + "integrity": "sha512-tEBHqDnIoM/1rXME1zgka9g6Q2lcoCkxHLuc7ODJ5BxbP5d4c2Z5cGgtXAku59200Cx7diuHTOYfSBD8n6mm8A==", + "dev": true, + "license": "BlueOak-1.0.0", + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, + "node_modules/minizlib": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-3.1.0.tgz", + "integrity": "sha512-KZxYo1BUkWD2TVFLr0MQoM8vUUigWD3LlD83a/75BqC+4qE0Hb1Vo5v1FgcfaNXvfXzr+5EhQ6ing/CaBijTlw==", + "dev": true, + "license": "MIT", + "dependencies": { + "minipass": "^7.1.2" + }, + "engines": { + "node": ">= 18" + } + }, + "node_modules/motion": { + "version": "12.43.0", + "resolved": "https://registry.npmjs.org/motion/-/motion-12.43.0.tgz", + "integrity": "sha512-BQgQbSa9Hn3/mtbib0MK53y6JSANa+YKUKlaYnWzAVDH424RYQ5LVpV3pNiWH00BA2z4ojsSdMzqT7g2FQwjuQ==", + "license": "MIT", + "dependencies": { + "framer-motion": "^12.43.0", + "tslib": "^2.4.0" + }, + "peerDependencies": { + "@emotion/is-prop-valid": "*", + "react": "^18.0.0 || ^19.0.0", + "react-dom": "^18.0.0 || ^19.0.0" + }, + "peerDependenciesMeta": { + "@emotion/is-prop-valid": { + "optional": true + }, + "react": { + "optional": true + }, + "react-dom": { + "optional": true + } + } + }, + "node_modules/motion-dom": { + "version": "12.43.0", + "resolved": "https://registry.npmjs.org/motion-dom/-/motion-dom-12.43.0.tgz", + "integrity": "sha512-azKON4d9S65PEoFUiQTMTgPheEmzf2QngdRc50AKfJp9Q9mmcBVw22c8eMq9k8kxOFHdL7+WZY7N/5F/lwiDag==", + "license": "MIT", + "dependencies": { + "motion-utils": "^12.39.0" + } + }, + "node_modules/motion-utils": { + "version": "12.39.0", + "resolved": "https://registry.npmjs.org/motion-utils/-/motion-utils-12.39.0.tgz", + "integrity": "sha512-8nadJAJjTtqRkmRF36FoJTrywK9nnFmnPwnSMyxaOCU7GDjN9RTMJIxx9De8ErM+vpPhMccr/6fo5WciyQLnMQ==", + "license": "MIT" + }, "node_modules/ms": { "version": "2.1.3", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", @@ -4213,28 +4982,24 @@ } }, "node_modules/react": { - "version": "18.3.1", - "resolved": "https://registry.npmjs.org/react/-/react-18.3.1.tgz", - "integrity": "sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ==", + "version": "19.2.0", + "resolved": "https://registry.npmjs.org/react/-/react-19.2.0.tgz", + "integrity": "sha512-tmbWg6W31tQLeB5cdIBOicJDJRR2KzXsV7uSK9iNfLWQ5bIZfxuPEHp7M8wiHyHnn0DD1i7w3Zmin0FtkrwoCQ==", "license": "MIT", - "dependencies": { - "loose-envify": "^1.1.0" - }, "engines": { "node": ">=0.10.0" } }, "node_modules/react-dom": { - "version": "18.3.1", - "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.3.1.tgz", - "integrity": "sha512-5m4nQKp+rZRb09LNH59GM4BxTh9251/ylbKIbpe7TpGxfJ+9kv6BLkLBXIjjspbgbnIBNqlI23tRnTWT0snUIw==", + "version": "19.2.0", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-19.2.0.tgz", + "integrity": "sha512-UlbRu4cAiGaIewkPyiRGJk0imDN2T3JjieT6spoL2UeSf5od4n5LB/mQ4ejmxhCFT1tYe8IvaFulzynWovsEFQ==", "license": "MIT", "dependencies": { - "loose-envify": "^1.1.0", - "scheduler": "^0.23.2" + "scheduler": "^0.27.0" }, "peerDependencies": { - "react": "^18.3.1" + "react": "^19.2.0" } }, "node_modules/react-is": { @@ -4507,13 +5272,10 @@ } }, "node_modules/scheduler": { - "version": "0.23.2", - "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.2.tgz", - "integrity": "sha512-UOShsPwz7NrMUqhR6t0hWjFduvOzbtv7toDH1/hIrfRNIDBnnBWd0CwJTGvTpngVlmwGCdP9/Zl/tVrDqcuYzQ==", - "license": "MIT", - "dependencies": { - "loose-envify": "^1.1.0" - } + "version": "0.27.0", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.27.0.tgz", + "integrity": "sha512-eNv+WrVbKu1f3vbYJT/xtiF5syA5HPIMtf9IgY/nKg0sWqzAUEvqY/xm7OcZc/qafLx/iO9FgOmeSAp4v5ti/Q==", + "license": "MIT" }, "node_modules/semver": { "version": "6.3.1", @@ -4646,9 +5408,73 @@ "license": "MIT" }, "node_modules/tabbable": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/tabbable/-/tabbable-6.5.0.tgz", - "integrity": "sha512-wieBHXygIm7OyQOu5hQlkk62/WyCFYGlWg7L6/ZCUZwx0o398Zkn4pVmMyfYhfMG8kGrj/Krt8eIk6UKC6VzwA==", + "version": "6.5.1", + "resolved": "https://registry.npmjs.org/tabbable/-/tabbable-6.5.1.tgz", + "integrity": "sha512-dMCuwDUY6Noz3zVKLefBC4wq+aJV20yc7vWmM7uTNGwtQSFF5kX7OUIUsxuVajz/bdt5Xqdah3/0NLjth+cM5A==", + "license": "MIT" + }, + "node_modules/tailwind-merge": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/tailwind-merge/-/tailwind-merge-3.7.0.tgz", + "integrity": "sha512-XPPUyAc+cvspz3lHTcR/QgPfW2A0lv/xQNIjX3HGhLR+Nq2lHaLq5MtTesHn8GUr3W3DguT2KT5x3NVgRtYwmA==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/dcastil" + } + }, + "node_modules/tailwindcss": { + "version": "4.1.14", + "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-4.1.14.tgz", + "integrity": "sha512-b7pCxjGO98LnxVkKjaZSDeNuljC4ueKUddjENJOADtubtdo8llTaJy7HwBMeLNSSo2N5QIAgklslK1+Ir8r6CA==", + "dev": true, + "license": "MIT" + }, + "node_modules/tapable": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.3.3.tgz", + "integrity": "sha512-uxc/zpqFg6x7C8vOE7lh6Lbda8eEL9zmVm/PLeTPBRhh1xCgdWaQ+J1CUieGpIfm2HdtsUpRv+HshiasBMcc6A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + } + }, + "node_modules/tar": { + "version": "7.5.22", + "resolved": "https://registry.npmjs.org/tar/-/tar-7.5.22.tgz", + "integrity": "sha512-MFO/QzvtAOmJbkhOaCTvbGcFN9L9b+JunIsDwaKljSOdcLMea3NJ1k9Usz/rjdfSXTq4dfzfeS7W4p4YOAAHeA==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "@isaacs/fs-minipass": "^4.0.0", + "chownr": "^3.0.0", + "minipass": "^7.1.2", + "minizlib": "^3.1.0", + "yallist": "^5.0.0" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/tar/node_modules/yallist": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-5.0.0.tgz", + "integrity": "sha512-YgvUTfwqyc7UXVMrB+SImsVYSmTS8X/tSrtdNZMImM+n7+QTriRXyXim0mBrTXNeqzVF0KWGgHPeiyViFFrNDw==", + "dev": true, + "license": "BlueOak-1.0.0", + "engines": { + "node": ">=18" + } + }, + "node_modules/three": { + "version": "0.180.0", + "resolved": "https://registry.npmjs.org/three/-/three-0.180.0.tgz", + "integrity": "sha512-o+qycAMZrh+TsE01GqWUxUIKR1AL0S8pq7zDkYOQw8GqfX8b8VoCKYUoHbhiX5j+7hr8XsuHDVU6+gkQJQKg9w==", "license": "MIT" }, "node_modules/tinybench": { diff --git a/web/package.json b/web/package.json index 2bb64c9532e99cf47994dad78142cf32d7690f0d..03cc0549543380aa5ec5ac077f7baee5a622b47a 100644 --- a/web/package.json +++ b/web/package.json @@ -2,7 +2,7 @@ "name": "fpt-web", "private": true, "version": "1.0.0", - "description": "Trio Co-Worker web app (React + Mantine). Talks only to the REST API. Mock app, not Oracle Fusion.", + "description": "Patchwise web app (React + Mantine). Talks only to the REST API. Mock app, not Oracle Fusion.", "type": "module", "scripts": { "dev": "vite", @@ -21,20 +21,27 @@ "@mantine/notifications": "^7.17.8", "@tabler/icons-react": "^3.49.0", "@tanstack/react-query": "^5.104.1", + "clsx": "^2.1.1", + "lucide-react": "^0.548.0", + "motion": "^12.43.0", "openapi-fetch": "^0.17.0", - "react": "^18.3.1", - "react-dom": "^18.3.1", - "react-router-dom": "^6.30.6" + "react": "^19.2.0", + "react-dom": "^19.2.0", + "react-router-dom": "^6.30.6", + "tailwind-merge": "^3.7.0", + "three": "^0.180.0" }, "devDependencies": { "@eslint/js": "^9.39.0", "@playwright/test": "1.64.0", + "@tailwindcss/vite": "^4.1.14", "@testing-library/jest-dom": "^6.6.3", "@testing-library/react": "^16.3.0", "@testing-library/user-event": "^14.6.1", "@types/node": "^22.15.0", - "@types/react": "^18.3.23", - "@types/react-dom": "^18.3.7", + "@types/react": "^19.2.2", + "@types/react-dom": "^19.2.2", + "@types/three": "^0.180.0", "@vitejs/plugin-react": "^4.7.0", "eslint": "^9.39.0", "eslint-plugin-react-hooks": "^5.2.0", @@ -42,6 +49,7 @@ "globals": "^16.2.0", "jsdom": "^26.1.0", "openapi-typescript": "^7.13.0", + "tailwindcss": "^4.1.14", "typescript": "~5.9.3", "typescript-eslint": "^8.71.0", "vite": "^6.4.4", diff --git a/web/public/app-icon-paper.svg b/web/public/app-icon-paper.svg index 77c32dba7937f9fe6b99916e853486b41b78f1a6..930ab13b701beba67dc5709c6fa4d4b5449b7976 100644 --- a/web/public/app-icon-paper.svg +++ b/web/public/app-icon-paper.svg @@ -1,28 +1 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file + diff --git a/web/public/app-icon.svg b/web/public/app-icon.svg index eec0efe15684a3442cba428bd1c805651b1e64fc..ccda1ede6ab6bbf068d68e9984e5c0ef903c88fa 100644 --- a/web/public/app-icon.svg +++ b/web/public/app-icon.svg @@ -1,28 +1 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file + diff --git a/web/public/apple-touch-icon-180.png b/web/public/apple-touch-icon-180.png index 93f35d2a60ea10a9570048209b65822f4293abb9..85e7444abb856ecdbacf9dd0c5a0bfbf39789fa4 100644 Binary files a/web/public/apple-touch-icon-180.png and b/web/public/apple-touch-icon-180.png differ diff --git a/web/public/favicon-16.png b/web/public/favicon-16.png index 075f14abc496fc505791c6b5a9d6df38ac80677a..003e2cc85a0aff7b86e7993ffd4476103709099c 100644 Binary files a/web/public/favicon-16.png and b/web/public/favicon-16.png differ diff --git a/web/public/favicon-32.png b/web/public/favicon-32.png index 8cda6bba069c8cc248382973667fd0b0411cac35..567702b52970e7615a9611dec2ac280ae1621952 100644 Binary files a/web/public/favicon-32.png and b/web/public/favicon-32.png differ diff --git a/web/public/favicon-48.png b/web/public/favicon-48.png index c1bce1909c17b348e3d80e685d9e4faddd0d3a74..51d74d3280f16536fe3da8b6986a50678b4ae407 100644 Binary files a/web/public/favicon-48.png and b/web/public/favicon-48.png differ diff --git a/web/public/favicon-graphite.svg b/web/public/favicon-graphite.svg index 3b750c8a6418f299697587a37801a737104e8c08..ccda1ede6ab6bbf068d68e9984e5c0ef903c88fa 100644 --- a/web/public/favicon-graphite.svg +++ b/web/public/favicon-graphite.svg @@ -1,20 +1 @@ -Trio Co-Worker - - - - - - - - - - - - - - - - - - - + diff --git a/web/public/favicon-paper.svg b/web/public/favicon-paper.svg index 0ccd5c508fe1f9577f3d018e3f69224e0a893e42..930ab13b701beba67dc5709c6fa4d4b5449b7976 100644 --- a/web/public/favicon-paper.svg +++ b/web/public/favicon-paper.svg @@ -1,20 +1 @@ -Trio Co-Worker - - - - - - - - - - - - - - - - - - - + diff --git a/web/public/favicon.svg b/web/public/favicon.svg index 45d8860f42b25c4fcae02c6eaed8037a469dc26d..97be097d263685cd19ac4adcd629125482be33f4 100644 --- a/web/public/favicon.svg +++ b/web/public/favicon.svg @@ -1,39 +1 @@ -Trio Co-Worker - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + diff --git a/web/public/icon-512.png b/web/public/icon-512.png index 0b68dbea8507307cf8b6419c0e88449194cf3fc6..40e65454948c3658ac5be8fcd4243de5c13fcfc3 100644 Binary files a/web/public/icon-512.png and b/web/public/icon-512.png differ diff --git a/web/public/logo-mark-dark.svg b/web/public/logo-mark-dark.svg index 3fc10ab9b8b56f30967cbba41440ccaaeaf170ad..930ab13b701beba67dc5709c6fa4d4b5449b7976 100644 --- a/web/public/logo-mark-dark.svg +++ b/web/public/logo-mark-dark.svg @@ -1,19 +1 @@ -Trio Co-Worker - - - - - - - - - - - - - - - - - - + diff --git a/web/public/logo-mark.svg b/web/public/logo-mark.svg index 0d31aa75ebea90c3799d52cbade3a991a1b0c98a..ccda1ede6ab6bbf068d68e9984e5c0ef903c88fa 100644 --- a/web/public/logo-mark.svg +++ b/web/public/logo-mark.svg @@ -1,19 +1 @@ -Trio Co-Worker - - - - - - - - - - - - - - - - - - + diff --git a/web/src/App.tsx b/web/src/App.tsx index e130ed7231dc7ff39b2df978c8e45d41fe90930e..7cba0f0bcfd364faa35f346639eb8aa455d39c07 100644 --- a/web/src/App.tsx +++ b/web/src/App.tsx @@ -7,9 +7,6 @@ import { Layout } from './components/Layout'; import { AdminOnly } from './components/AdminOnly'; import { NotFoundPage } from './components/ErrorPages'; import { PodsPage } from './pages/PodsPage'; -import { LoginPage } from './pages/LoginPage'; -import { RegisterPage } from './pages/RegisterPage'; -import { ForgotPage, ResetPage } from './pages/PasswordPages'; import { ReadinessPage } from './pages/ReadinessPage'; import { TicketsPage } from './pages/QueuesPages'; import { RunWorkspace } from './pages/RunWorkspace'; @@ -33,6 +30,11 @@ const ScenariosLibraryPage = named(() => import('./pages/LibraryPages'), 'Scenar const HealPage = named(() => import('./pages/QueuesPages'), 'HealPage'); const ScriptsPage = named(() => import('./pages/QueuesPages'), 'ScriptsPage'); const AccountPage = named(() => import('./pages/AccountPage'), 'AccountPage'); +// the sign-in page carries the beUI animation library: only people who sign in download it +const LoginPage = named(() => import('./pages/LoginPage'), 'LoginPage'); +const RegisterPage = named(() => import('./pages/RegisterPage'), 'RegisterPage'); +const ForgotPage = named(() => import('./pages/PasswordPages'), 'ForgotPage'); +const ResetPage = named(() => import('./pages/PasswordPages'), 'ResetPage'); // Dev-only fixture screens for design review; the branch is removed from the production build. const DevFixtures = import.meta.env.DEV ? lazy(() => import('./pages/DevFixtures').then((m) => ({ default: m.DevFixtures }))) : null; @@ -40,6 +42,11 @@ const DevApprovalFixtures = import.meta.env.DEV ? lazy(() => import('./pages/Dev /** The fixture routes this build registers (none outside dev builds). */ export const DEV_FIXTURE_PATHS: string[] = import.meta.env.DEV ? ['/dev/board-fixture', '/dev/approval-fixture'] : []; +/** The account pages (sign in, register, forgot, reset) load on demand: they carry the beUI and 3D libraries. */ +function SignInRoute({ children }: { children: ReactNode }) { + return }>{children}; +} + function RequireAuth({ children }: { children: ReactNode }) { const { user, loading } = useAuth(); const loc = useLocation(); @@ -58,10 +65,10 @@ function NewRunRedirect() { export function AppRoutes() { return ( - } /> - } /> - } /> - } /> + } /> + } /> + } /> + } /> }> } /> } /> diff --git a/web/src/api/openapi.json b/web/src/api/openapi.json index 67ae22ae221f1541353608ef2e9a4d4358b00700..f68e2cf1683bda3fb3c63851d167fe933817d1fd 100644 --- a/web/src/api/openapi.json +++ b/web/src/api/openapi.json @@ -2945,7 +2945,7 @@ }, "info": { "description": "Pilot backend. Runs against the local mock app or a registered Oracle Fusion TEST pod (never production); every run and report names its target.", - "title": "Trio Co-Worker API", + "title": "Patchwise API", "version": "1.0.0-pilot" }, "openapi": "3.1.0", diff --git a/web/src/apple-components.css b/web/src/apple-components.css index bf543f3c8a0524debb6fc8d7fd4fe8029042e1ff..d8d6d1bd2ab2987af88539f89a851a4ce5a86123 100644 --- a/web/src/apple-components.css +++ b/web/src/apple-components.css @@ -1,4 +1,4 @@ -/* Trio Co-Worker, shared components of the Apple-style layer (UI-APPLE.md section 6). Loaded after apple.css. */ +/* Patchwise, shared components of the Apple-style layer (UI-APPLE.md section 6). Loaded after apple.css. */ /* ------------------------------------------------------------------ page head and text roles */ .trio-head { display: flex; align-items: flex-start; gap: 12px; } diff --git a/web/src/apple-pages.css b/web/src/apple-pages.css index 27f250a57af7350f8a971d36b28ca928dea67492..b5fa182e95d0ec6f74807c87e729915eb9d3f95a 100644 --- a/web/src/apple-pages.css +++ b/web/src/apple-pages.css @@ -1,4 +1,4 @@ -/* Trio Co-Worker, lists and settings screens: test runs, scenarios, defects, reports, test environments, settings, approvals. Loaded last. */ +/* Patchwise, lists and settings screens: test runs, scenarios, defects, reports, test environments, settings, approvals. Loaded last. */ /* ------------------------------------------------------------------ segmented filter (FilterChips) */ .fpt-filterchips { display: inline-flex; gap: 0; flex-wrap: nowrap; padding: 2px; border-radius: var(--r-pill); background: var(--fill); width: fit-content; max-width: 100%; -webkit-mask-image: none; mask-image: none; } diff --git a/web/src/apple-run.css b/web/src/apple-run.css index 01b95035f9ce05ddfb631714c1569fd53c35aa13..721d54f4d44f4b50ec423a7546c8fd313b047459 100644 --- a/web/src/apple-run.css +++ b/web/src/apple-run.css @@ -1,4 +1,4 @@ -/* Trio Co-Worker, the run workspace: stage rail, stage cards, approvals, decisions, result, the details panel and the live browser. */ +/* Patchwise, the run workspace: stage rail, stage cards, approvals, decisions, result, the details panel and the live browser. */ /* ------------------------------------------------------------------ workspace frame */ .fpt-main:has(> .fpt-ws) { padding: 0; overflow: hidden; box-shadow: none; } diff --git a/web/src/apple-screens.css b/web/src/apple-screens.css index 7907e9baee4c0eb05d3c00490955d8de77beef70..d9ff6a8089bc5500224255a948b2f1875c80394c 100644 --- a/web/src/apple-screens.css +++ b/web/src/apple-screens.css @@ -1,4 +1,4 @@ -/* Trio Co-Worker, per-screen rules of the Apple-style layer. Loaded last. One section per screen. */ +/* Patchwise, per-screen rules of the Apple-style layer. Loaded last. One section per screen. */ /* ------------------------------------------------------------------ sign-in, create account, forgot, reset */ .trio-auth { position: fixed; inset: 0; display: grid; place-items: center; overflow-y: auto; padding: 24px 0; diff --git a/web/src/apple.css b/web/src/apple.css index 858fd8e5ee85fe254ced575679125d90f8cf90e8..52d1d5f7f24e68b882c4fa0977345308510b2d38 100644 --- a/web/src/apple.css +++ b/web/src/apple.css @@ -1,4 +1,4 @@ -/* Trio Co-Worker: the Apple-style layer (UI-APPLE.md). Loaded after styles.css and the Mantine styles. +/* Patchwise: the Apple-style layer (UI-APPLE.md). Loaded after styles.css and the Mantine styles. 1 tokens 2 legacy aliases (the older --fpt-* names now read from these) 3 base 4 Mantine controls 5 materials and shell 6 shared components 7 screens (appended below, one section per screen). */ diff --git a/web/src/beui.css b/web/src/beui.css new file mode 100644 index 0000000000000000000000000000000000000000..3b7ab978da152f0e9cbf2fdca509fdadea2b88e0 --- /dev/null +++ b/web/src/beui.css @@ -0,0 +1,106 @@ +/* beUI / shadcn layer, merged with the app's own design tokens (apple.css). Loaded after the Mantine and app styles. + * + * - Tailwind CSS 4: theme and utilities only. Its base reset (preflight) is NOT loaded: Mantine styles the base + * elements and a second reset would change every existing screen. + * - Dark mode follows Mantine's colour scheme (data-mantine-color-scheme on ), not a .dark class. + * - Colours point at the app's tokens, so beUI components look like the rest of Trio (graphite, not beUI's cyan). + * The app's own --accent (graphite action colour) is NOT redefined: shadcn's "accent" (a subtle hover surface) maps + * to --fill instead, through the Tailwind colour token only. + */ +@import "tailwindcss/theme.css" layer(theme); +@import "tailwindcss/utilities.css" layer(utilities) source(none); + +/* Tailwind generates classes only from these files: the beUI components and the screens converted to them. Scanning + the whole app would turn existing class names (e.g. "hidden", "border") into Tailwind utilities and restyle screens. */ +@source "./components/ui"; +@source "./pages/LoginPage.tsx"; +@source "./pages/login"; +@source "./pages/AuthShell.tsx"; +@source "./pages/RegisterPage.tsx"; +@source "./pages/PasswordPages.tsx"; + +@custom-variant dark (&:where([data-mantine-color-scheme="dark"], [data-mantine-color-scheme="dark"] *)); + +/* shadcn variable names beUI components may read directly, defined from the app's tokens (light and dark follow + automatically, because the app's tokens switch with the colour scheme). */ +:root { + --background: var(--bg); + --foreground: var(--label); + --card: var(--bg-elev); + --card-foreground: var(--label); + --popover: var(--bg-elev); + --popover-foreground: var(--label); + --primary: var(--accent); + --primary-foreground: var(--on-accent); + --secondary: var(--fill); + --secondary-foreground: var(--label); + --muted: var(--fill); + --muted-foreground: var(--label-2); + --border: var(--sep); + --border-strong: var(--sep-strong); + --input: var(--sep-strong); + --danger: var(--red); + --destructive: var(--red); + --success: var(--green); + --warning: var(--orange); + --accent-fg: var(--on-accent); + --radius: 10px; +} + +@theme inline { + --color-background: var(--bg); + --color-foreground: var(--label); + --color-card: var(--bg-elev); + --color-card-foreground: var(--label); + --color-popover: var(--bg-elev); + --color-popover-foreground: var(--label); + --color-primary: var(--accent); + --color-primary-foreground: var(--on-accent); + --color-secondary: var(--fill); + --color-secondary-foreground: var(--label); + --color-muted: var(--fill); + --color-muted-foreground: var(--label-2); + --color-accent: var(--fill); + --color-accent-foreground: var(--label); + --color-destructive: var(--red); + --color-danger: var(--red); + --color-success: var(--green); + --color-warning: var(--orange); + --color-border: var(--sep); + --color-border-strong: var(--sep-strong); + --color-input: var(--sep-strong); + --color-ring: var(--accent); + --radius-sm: 6px; + --radius-md: 8px; + --radius-lg: 10px; + --radius-xl: 14px; + --font-sans: var(--font); + --ease-out: cubic-bezier(0.22, 1, 0.36, 1); + --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1); +} + +/* Motion is functional, never decorative: with reduced motion requested, animated beUI parts appear without movement. */ +@media (prefers-reduced-motion: reduce) { + .beui-motion, .beui-motion * { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; } +} + +/* The app draws a global :focus-visible outline. A beUI field already shows its focus ring on the rounded field + around the input, so the inner input does not draw a second one (the ring stays visible). */ +.beui-field input:focus-visible { outline: none; box-shadow: none; } + +/* A region that is dark whatever the app's theme (the sign-in hero). The app's dark tokens, and the shadcn names + re-declared here so beUI parts inside resolve them locally (a variable defined on :root keeps :root's value). */ +.trio-force-dark { + color-scheme: dark; + --bg: #1c1c1e; --bg-elev: #2a2a2d; --bg-elev-2: #313134; + --fill: rgba(235, 235, 245, 0.10); --fill-2: rgba(235, 235, 245, 0.16); + --sep: rgba(235, 235, 245, 0.13); --sep-strong: rgba(235, 235, 245, 0.26); + --label: #f5f5f7; --label-2: #a1a1a6; --label-3: #6e6e73; + --accent: #f5f5f7; --on-accent: #1d1d1f; --focus: #f5f5f7; --focus-gap: #1c1c1e; + --green: #30d158; --orange: #ff9f0a; --red: #ff7a72; + --background: var(--bg); --foreground: var(--label); --card: var(--bg-elev); --card-foreground: var(--label); + --primary: var(--accent); --primary-foreground: var(--on-accent); --muted: var(--fill); --muted-foreground: var(--label-2); + --border: var(--sep); --border-strong: var(--sep-strong); --input: var(--sep-strong); + --danger: var(--red); --destructive: var(--red); --success: var(--green); --warning: var(--orange); + color: var(--label); +} diff --git a/web/src/components/components.test.tsx b/web/src/components/components.test.tsx index 4587eeb10c3480e7849e4a15c5364222a04fd846..9bebeeb450eb71ec8534c9e30eda573985ba21bd 100644 --- a/web/src/components/components.test.tsx +++ b/web/src/components/components.test.tsx @@ -106,9 +106,9 @@ describe('components', () => { it('desktop notifications fire only on attention transitions', () => { expect(statusTransitions({ a: 'running', b: 'queued' }, { a: 'waiting_approval', b: 'running', c: 'completed' })) - .toEqual([{ title: 'Trio Co-Worker (mock app)', body: 'Run a is waiting for case approval' }]); + .toEqual([{ title: 'Patchwise (mock app)', body: 'Run a is waiting for case approval' }]); expect(statusTransitions({ a: 'waiting_approval' }, { a: 'waiting_approval|reminder: run a is still waiting at approve_cases' })) - .toEqual([{ title: 'Trio Co-Worker (mock app)', body: 'reminder: run a is still waiting at approve_cases' }]); + .toEqual([{ title: 'Patchwise (mock app)', body: 'reminder: run a is still waiting at approve_cases' }]); }); it('login form has labelled inputs and shows API errors', async () => { diff --git a/web/src/components/shell/AppSidebar.tsx b/web/src/components/shell/AppSidebar.tsx index 859ec56bf28e95d0fbc823112bfa59589474b213..1a60a0ee1cbed92972e6653065e6d152fa34964a 100644 --- a/web/src/components/shell/AppSidebar.tsx +++ b/web/src/components/shell/AppSidebar.tsx @@ -35,7 +35,7 @@ const SETTINGS: NavItem = { to: '/admin', label: 'Settings', icon: (name ?? 'Trio Co-Worker').split(/\s+/).slice(0, 2).map((w) => w[0]?.toUpperCase() ?? '').join('') || 'TC'; +export const initials = (name?: string) => (name ?? 'Patchwise').split(/\s+/).slice(0, 2).map((w) => w[0]?.toUpperCase() ?? '').join('') || 'TC'; function NavLink({ item, badge, onNavigate }: { item: NavItem; badge?: number; onNavigate?: () => void }) { const loc = useLocation(); @@ -76,7 +76,7 @@ export function AppSidebar({ onNavigate }: { onNavigate?: () => void }) { const { colorScheme, setColorScheme } = useMantineColorScheme(); const mine = useWaitsOnMe(); const waiting = (runs.data?.items ?? []).filter(mine).length; - const name = brand.data?.product_name ?? 'Trio Co-Worker'; + const name = brand.data?.product_name ?? 'Patchwise'; const whoami = `${user?.username} (${user?.role})`; const toggleChat = () => { if (!chat) return; if (chat.open) chat.setOpen(false); else chat.focusInput(); onNavigate?.(); }; const scheme = [ diff --git a/web/src/components/ui/motion/alert.tsx b/web/src/components/ui/motion/alert.tsx new file mode 100644 index 0000000000000000000000000000000000000000..f1fd228d8e7a56bdd4cee9731f478aeab10575a9 --- /dev/null +++ b/web/src/components/ui/motion/alert.tsx @@ -0,0 +1,238 @@ +"use client"; +// beui.dev/components/motion/alert + +import { AlertCircle, CheckCircle2, Info, TriangleAlert, X } from "lucide-react"; +import { AnimatePresence, type HTMLMotionProps, motion, useReducedMotion } from "motion/react"; +import { + createContext, + type ComponentProps, + type RefObject, + useCallback, + useContext, + useLayoutEffect, + useMemo, + useRef, + useState, +} from "react"; +import { EASE_OUT, EASE_OUT_CSS, SPRING_LAYOUT, SPRING_PRESS } from "@/lib/ease"; +import { PresenceGate } from "@/lib/presence-gate"; +import { cn } from "@/lib/utils"; + +export type AlertVariant = "default" | "info" | "success" | "warning" | "destructive"; + +export type AlertState = { + open: boolean; + variant: AlertVariant; + setOpen: (open: boolean) => void; + dismiss: () => void; +}; + +const AlertContext = createContext<(AlertState & { reduce: boolean }) | null>(null); + +function useAlertContext(component: string) { + const context = useContext(AlertContext); + if (!context) throw new Error(`${component} must be used within `); + return context; +} + +/** Shared visibility and variant for custom alert children. */ +export function useAlert(): AlertState { + return useAlertContext("useAlert"); +} + +const VARIANT_CLASS: Record = { + default: "bg-background text-foreground", + info: "bg-primary/5 text-primary", + success: "bg-emerald-500/5 text-emerald-700 dark:text-emerald-400", + warning: "bg-amber-500/5 text-amber-800 dark:text-amber-300", + destructive: "bg-destructive/5 text-destructive", +}; + +const VARIANT_ICON = { + default: Info, + info: Info, + success: CheckCircle2, + warning: TriangleAlert, + destructive: AlertCircle, +}; + +export interface AlertProps extends Omit, "initial" | "animate" | "exit" | "layout" | "transition" | "role"> { + variant?: AlertVariant; + open?: boolean; + defaultOpen?: boolean; + onOpenChange?: (open: boolean) => void; + /** Focus this element when closing hides the currently focused alert control. */ + returnFocusRef?: RefObject; + /** Layout classes for the inner row, separate from the animated surface. */ + contentClassName?: string; + /** Defaults to alert for warning/destructive, and status for other variants. */ + role?: "alert" | "status"; +} + +export function Alert({ + variant = "default", + open: controlledOpen, + defaultOpen = true, + onOpenChange, + returnFocusRef, + contentClassName, + className, + children, + role = variant === "warning" || variant === "destructive" ? "alert" : "status", + style, + ref, + ...props +}: AlertProps) { + const [internalOpen, setInternalOpen] = useState(defaultOpen); + const open = controlledOpen ?? internalOpen; + const reduce = useReducedMotion() ?? false; + const surfaceRef = useRef(null); + const stateRef = useRef({ open, controlled: controlledOpen !== undefined, onOpenChange }); + + useLayoutEffect(() => { + stateRef.current = { open, controlled: controlledOpen !== undefined, onOpenChange }; + }, [controlledOpen, onOpenChange, open]); + + const setOpen = useCallback((next: boolean) => { + const state = stateRef.current; + if (next === state.open) return; + if (!state.controlled) { + stateRef.current = { ...state, open: next }; + setInternalOpen(next); + } + state.onOpenChange?.(next); + }, []); + const dismiss = useCallback(() => setOpen(false), [setOpen]); + const context = useMemo(() => ({ open, variant, reduce, setOpen, dismiss }), [open, variant, reduce, setOpen, dismiss]); + + const setRef = useCallback((node: HTMLDivElement | null) => { + surfaceRef.current = node; + const cleanup = typeof ref === "function" ? ref(node) : undefined; + if (ref && typeof ref !== "function") ref.current = node; + if (!node) return; + return () => { + surfaceRef.current = null; + if (typeof cleanup === "function") cleanup(); + else if (typeof ref === "function") ref(null); + else if (ref) ref.current = null; + }; + }, [ref]); + + useLayoutEffect(() => { + if (!open && surfaceRef.current?.contains(document.activeElement)) { + returnFocusRef?.current?.focus({ preventScroll: true }); + } + }, [open, returnFocusRef]); + + return ( + + + {open && ( + + {({ gate, isPresent }) => ( + + + {children} + + + )} + + )} + + + ); +} + +export interface AlertIconProps extends ComponentProps<"span"> {} + +export function AlertIcon({ className, children, ...props }: AlertIconProps) { + const { variant, reduce } = useAlertContext("AlertIcon"); + const Icon = VARIANT_ICON[variant]; + return ( + + ); +} + +export interface AlertContentProps extends ComponentProps<"div"> {} + +export function AlertContent({ className, ...props }: AlertContentProps) { + return
; +} + +export interface AlertTitleProps extends ComponentProps<"div"> {} + +export function AlertTitle({ className, ...props }: AlertTitleProps) { + return
; +} + +export interface AlertDescriptionProps extends ComponentProps<"div"> {} + +export function AlertDescription({ className, ...props }: AlertDescriptionProps) { + return
; +} + +export interface AlertActionProps extends ComponentProps<"div"> {} + +/** Compose buttons or links here; this part never creates a nested button. */ +export function AlertAction({ className, ...props }: AlertActionProps) { + return
; +} + +export interface AlertCloseProps extends Omit, "layout"> {} + +export function AlertClose({ className, children, onClick, ...props }: AlertCloseProps) { + const { dismiss, reduce } = useAlertContext("AlertClose"); + return ( + { + onClick?.(event); + if (!event.defaultPrevented) dismiss(); + }} + > + {children ?? + ); +} diff --git a/web/src/components/ui/motion/button/base.tsx b/web/src/components/ui/motion/button/base.tsx new file mode 100644 index 0000000000000000000000000000000000000000..98fd3d59a6dfdb61896318b20959ff1235dd884f --- /dev/null +++ b/web/src/components/ui/motion/button/base.tsx @@ -0,0 +1,189 @@ +"use client"; + +import { + AnimatePresence, + type HTMLMotionProps, + motion, + useReducedMotion, +} from "motion/react"; +import { + forwardRef, + type PointerEvent, + type ReactNode, + useCallback, + useRef, + useState, +} from "react"; +import { EASE_OUT, SPRING_PRESS } from "@/lib/ease"; +import { useHoverCapable } from "@/lib/hooks/use-hover-capable"; +import { cn } from "@/lib/utils"; + +export type ButtonVariant = "primary" | "secondary" | "ghost" | "outline"; +export type ButtonSize = "sm" | "md" | "lg" | "icon"; + +export interface ButtonProps extends Omit< + HTMLMotionProps<"button">, + "children" +> { + variant?: ButtonVariant; + size?: ButtonSize; + pressScale?: number; + /** Spawn a Material-style ripple from the press point. Off by default. */ + ripple?: boolean; + children?: ReactNode; +} + +export interface ButtonLinkProps extends Omit< + HTMLMotionProps<"a">, + "children" +> { + variant?: ButtonVariant; + size?: ButtonSize; + pressScale?: number; + children?: ReactNode; +} + +type Ripple = { id: number; x: number; y: number; size: number }; + +const VARIANT_CLASS: Record = { + primary: "bg-primary text-primary-foreground hover:bg-primary/90", + secondary: "border border-border bg-card text-foreground hover:border-border", + ghost: "text-muted-foreground hover:text-foreground hover:bg-muted/60", + outline: + "border border-border bg-transparent text-foreground hover:bg-muted/60", +}; + +const SIZE_CLASS: Record = { + sm: "h-8 px-3 text-xs gap-1.5 rounded-full", + md: "h-10 px-5 text-sm gap-2 rounded-full", + lg: "h-12 px-6 text-base gap-2 rounded-full", + icon: "h-8 w-8 rounded-lg", +}; + +export const Button = forwardRef( + function Button( + { + variant = "primary", + size = "md", + pressScale = 0.93, + ripple = false, + className, + children, + onPointerDown, + ...rest + }, + ref, + ) { + const reduce = useReducedMotion(); + const canHover = useHoverCapable(); + const [ripples, setRipples] = useState([]); + const nextId = useRef(0); + + const handlePointerDown = useCallback( + (event: PointerEvent) => { + if (ripple && !reduce) { + const rect = event.currentTarget.getBoundingClientRect(); + const size = Math.max(rect.width, rect.height) * 2; + const id = nextId.current++; + setRipples((prev) => [ + ...prev, + { + id, + x: event.clientX - rect.left, + y: event.clientY - rect.top, + size, + }, + ]); + } + onPointerDown?.(event); + }, + [ripple, reduce, onPointerDown], + ); + + return ( + + {ripple && !reduce ? ( + + + {ripples.map((r) => ( + + setRipples((prev) => prev.filter((x) => x.id !== r.id)) + } + /> + ))} + + + ) : null} + {children} + + ); + }, +); + +export const ButtonLink = forwardRef( + function ButtonLink( + { + variant = "primary", + size = "md", + pressScale = 0.93, + className, + children, + ...rest + }, + ref, + ) { + const reduce = useReducedMotion(); + const canHover = useHoverCapable(); + + return ( + + {children} + + ); + }, +); diff --git a/web/src/components/ui/motion/button/stateful.tsx b/web/src/components/ui/motion/button/stateful.tsx new file mode 100644 index 0000000000000000000000000000000000000000..e3e27d1100687d42cdc5d4483f8495a54b1cf890 --- /dev/null +++ b/web/src/components/ui/motion/button/stateful.tsx @@ -0,0 +1,243 @@ +"use client"; +// beui.dev/components/motion/button + +import { Check, Loader2, X } from "lucide-react"; +import { + AnimatePresence, + motion, + useReducedMotion, + type Variants, +} from "motion/react"; +import { + forwardRef, + type ReactNode, + useLayoutEffect, + useRef, + useState, +} from "react"; +import { EASE_OUT, SPRING_SWAP } from "@/lib/ease"; +import { Button, type ButtonProps } from "./base"; + +export type ButtonState = "idle" | "loading" | "success" | "error"; + +export interface StatefulButtonProps extends Omit { + state?: ButtonState; + children: ReactNode; + loadingText?: ReactNode; + successText?: ReactNode; + errorText?: ReactNode; + icon?: ReactNode; +} + +const CASCADE_STAGGER = 0.025; +const ROLL_BLUR = "blur(6px)"; + +const CASCADE_LETTER_VARIANTS: Variants = { + initial: { opacity: 0, y: "105%", filter: ROLL_BLUR }, + animate: (delay: number = 0) => ({ + opacity: 1, + y: "0%", + filter: "blur(0px)", + transition: { ...SPRING_SWAP, delay }, + }), + exit: (delay: number = 0) => ({ + opacity: 0, + y: "-105%", + filter: ROLL_BLUR, + transition: { duration: 0.16, ease: EASE_OUT, delay: delay * 0.5 }, + }), +}; + +const ICON_VARIANTS: Variants = { + // Width collapses too, so the icon adds/removes its own space smoothly + // instead of popping the row width in a single frame. + initial: { opacity: 0, width: 0, scale: 0.7, filter: ROLL_BLUR }, + animate: { + opacity: 1, + width: "1.5rem", + scale: 1, + filter: "blur(0px)", + transition: SPRING_SWAP, + }, + exit: { + opacity: 0, + width: 0, + scale: 0.7, + filter: ROLL_BLUR, + transition: { duration: 0.16, ease: EASE_OUT }, + }, +}; + +function IconSlot({ keyId, children }: { keyId: string; children: ReactNode }) { + const reduce = useReducedMotion(); + return ( + + {children} + + ); +} + +function TextSlot({ + value, + children, +}: { + value: string; + children: ReactNode; +}) { + const reduce = useReducedMotion(); + const measureRef = useRef(null); + const [width, setWidth] = useState(); + const label = typeof children === "string" ? children : null; + const cascade = label !== null && !reduce; + + // Measure strings with the same per-letter layout as the cascade. Measuring + // the whole string preserves kerning, which can make it narrower than the + // inline-block letters and clip the final glyph during the width animation. + useLayoutEffect(() => { + const nextWidth = measureRef.current?.offsetWidth; + if (!nextWidth) return; + setWidth((current) => (current === nextWidth ? current : nextWidth)); + }); + + return ( + + + {cascade + ? label.split("").map((char, index) => ( + + {char} + + )) + : children} + + + {cascade ? ( + <> + {label} + + + {label.split("").map((char, index) => ( + + {char} + + ))} + + + + ) : ( + + + {children} + + + )} + + ); +} + +export const StatefulButton = forwardRef(function StatefulButton( + { + state = "idle", + children, + loadingText = "Loading", + successText = "Done", + errorText = "Try again", + icon, + disabled, + ...rest + }, + ref, +) { + const isBusy = state === "loading"; + const stateText = + state === "loading" + ? loadingText + : state === "success" + ? successText + : state === "error" + ? errorText + : children; + const textKey = + typeof stateText === "string" ? `${state}-${stateText}` : state; + + return ( + + ); +}); diff --git a/web/src/components/ui/motion/checkbox.tsx b/web/src/components/ui/motion/checkbox.tsx new file mode 100644 index 0000000000000000000000000000000000000000..1c8b31804281ea99e0618facd2cb203a5b959314 --- /dev/null +++ b/web/src/components/ui/motion/checkbox.tsx @@ -0,0 +1,147 @@ +"use client"; +// beui.dev/components/motion/checkbox + +import { AnimatePresence, motion, useReducedMotion } from "motion/react"; +import { useId } from "react"; +import { EASE_OUT, SPRING_PRESS } from "@/lib/ease"; +import { cn } from "@/lib/utils"; + +const CHECK_PATH = "M5 13l4 4L19 7"; +const INDETERMINATE_PATH = "M6 12h12"; + +export interface CheckboxProps { + checked: boolean; + onCheckedChange: (checked: boolean) => void; + disabled?: boolean; + indeterminate?: boolean; + label?: string; + /** Supporting text under the label, announced as the description rather than the name. */ + description?: string; + className?: string; + id?: string; + "aria-label"?: string; + /** Associates an external message (e.g. a form error) with the control. */ + "aria-describedby"?: string; +} + +export function Checkbox({ + checked, + onCheckedChange, + disabled, + indeterminate, + label, + description, + className, + id: idProp, + "aria-label": ariaLabel, + "aria-describedby": ariaDescribedBy, +}: CheckboxProps) { + const autoId = useId(); + const id = idProp ?? autoId; + const reduce = useReducedMotion(); + const showMark = checked || indeterminate; + const path = indeterminate ? INDETERMINATE_PATH : CHECK_PATH; + const descriptionId = description ? `${id}-description` : undefined; + // The wrapping