diff --git a/.devcontainer/setup.sh b/.devcontainer/setup.sh index 962d60f..b9f2553 100644 --- a/.devcontainer/setup.sh +++ b/.devcontainer/setup.sh @@ -38,6 +38,7 @@ npm ci echo echo "✔ Quorb devcontainer environment ready." echo " Commands (from the workspace root, which has package.json):" +echo " Git hooks: npm run hooks:install (once per clone; Lefthook pre-push: Biome + cargo fmt)" echo " Tests: npm test" echo " Rust: (cd src-tauri && cargo test --locked)" echo " Typecheck: npm run typecheck" diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 163cc20..c28e0f4 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -10,19 +10,18 @@ Thanks for taking the time to improve Quorb. Issues and pull requests are welcom ### Before you start -Quorb currently targets Windows as its main platform; a Linux port is in progress (local development only, see the README Linux notes). For Windows you need Node 22+, Rust with the MSVC toolchain, Microsoft C++ Build Tools and WebView2. See the [Tauri prerequisites](https://v2.tauri.app/start/prerequisites/). +Quorb currently targets Windows as its main platform; Linux has published `.deb` and `.AppImage` installers since v0.9.1 (see the README Linux notes). For Windows you need Node 22+, Rust with the MSVC toolchain, Microsoft C++ Build Tools and WebView2. See the [Tauri prerequisites](https://v2.tauri.app/start/prerequisites/). -**Linux contributors**: the native port is tracked under [issue #105](https://github.com/egdev6/quorb/issues/105) and its baseline, support matrix and known limits are documented in [docs/build-linux.md](./docs/build-linux.md). For Linux build and tests, use the included devcontainer (`make up` then `make test`) — it provisions Node 22, Rust stable and the Tauri Linux system dependencies without touching the host. Automatic Linux checks (`.github/workflows/linux-pr-ci.yml`) run `npm ci`, `npm test`, `npm run build` and `cargo test --locked` (in `src-tauri`) on `ubuntu-22.04` for pull requests and pushes to `main`, reporting `Tests and build (Linux)` without making it a required check. The separate manual workflow (`.github/workflows/linux-ci.yml`) runs tests by default via `workflow_dispatch`; selecting `with_bundle: bundle` also builds the decided local formats (`.deb` and `.AppImage`) and verifies them. It does not trigger on tags, pull requests or pushes; CI artifacts stay private to the run and public Linux releases are out of scope. Passing tests and compilation does not validate the real desktop or Wayland experience. Do not claim support for a distro or compositor that is not marked as measured in [the matrix](./docs/build-linux.md#6-matriz-de-8-entornos-l0b--qué-funciona-y-qué-degrada). +**Linux contributors**: the native port was delivered through issues [#105](https://github.com/egdev6/quorb/issues/105)–#108 and its baseline, support matrix and known limits are documented in [docs/build-linux.md](./docs/build-linux.md). For Linux build and tests, use the included devcontainer (`make up` then `make test`) — it provisions Node 22, Rust stable and the Tauri Linux system dependencies without touching the host. Automatic Linux checks (`.github/workflows/linux-pr-ci.yml`) run `npm ci`, `npm test`, `npm run build` and `cargo test --locked` (in `src-tauri`) on `ubuntu-22.04` for pull requests and pushes to `main`, reporting `Tests and build (Linux)` without making it a required check. The separate manual workflow (`.github/workflows/linux-ci.yml`) runs tests by default via `workflow_dispatch`; selecting `with_bundle: bundle` also builds the decided local formats (`.deb` and `.AppImage`) and verifies them. It does not trigger on tags, pull requests or pushes; CI artifacts stay private to the run; public Linux installers are attached to each release by `.github/workflows/linux-release.yml` (see [docs/release-linux.md](./docs/release-linux.md)). Passing tests and compilation does not validate the real desktop or Wayland experience. Do not claim support for a distro or compositor that is not marked as measured in [the matrix](./docs/build-linux.md#6-matriz-de-8-entornos-l0b--qué-funciona-y-qué-degrada). ```powershell git clone https://github.com/egdev6/quorb cd quorb npm install +npm run hooks:install # once per clone: Lefthook pre-push hook (Biome + cargo fmt) npm run app:dev ``` -The repository is private today, so cloning requires access. - ### Commands These are the scripts declared in `package.json`: @@ -162,7 +161,7 @@ npm run setup:signing That script generates the signing key in `%USERPROFILE%\.tauri\quorb.key` (it never overwrites an existing key), writes the public key to `src-tauri/tauri.conf.json` and, if GitHub CLI is authenticated, uploads `TAURI_SIGNING_PRIVATE_KEY` and `TAURI_SIGNING_PRIVATE_KEY_PASSWORD` as repository secrets. Keep a backup of the private key and its password: if they are lost, installed versions will not accept updates signed with a different key. -**Production release workflow status.** The production workflow is `.github/workflows/release.yml`. It never triggers on tags or pushes: a maintainer starts it manually from the Actions tab on `main`, passing the stable `version` and the full 40-character `source_sha` of an already-merged commit. It validates the inputs, manifest versions, notes file, tag collision and updater public key, then runs the tests, builds on Windows and creates a **draft** release that you publish yourself. Signing secrets are only exposed in the signing/bundle step. Until the owner provisions the updater key and the repository secrets, treat the release as blocked, not automated. +**Production release workflow status.** The production workflow is `.github/workflows/release.yml`. It never triggers on tags or pushes: a maintainer starts it manually from the Actions tab on `main`, passing the stable `version` and the full 40-character `source_sha` of an already-merged commit. It validates the inputs, manifest versions, notes file, tag collision and updater public key, then runs the tests, builds on Windows and creates a **draft** release that you publish yourself. Signing secrets are only exposed in the signing/bundle step. The updater key and the repository secrets are provisioned; v0.9.0 and v0.9.1 were published through this workflow. --- @@ -172,19 +171,18 @@ Gracias por dedicar tiempo a mejorar Quorb. Se aceptan issues y pull requests, e ### Antes de empezar -Quorb está dirigido actualmente a Windows como plataforma principal; hay un port Linux en marcha (solo desarrollo local, ver las notas de Linux del README). Para Windows se necesitan Node 22+, Rust con el toolchain MSVC, Microsoft C++ Build Tools y WebView2. Consultad los [requisitos de Tauri](https://v2.tauri.app/start/prerequisites/). +Quorb está dirigido actualmente a Windows como plataforma principal; Linux tiene instaladores `.deb` y `.AppImage` publicados desde v0.9.1 (ver las notas de Linux del README). Para Windows se necesitan Node 22+, Rust con el toolchain MSVC, Microsoft C++ Build Tools y WebView2. Consultad los [requisitos de Tauri](https://v2.tauri.app/start/prerequisites/). -**Contribuidores de Linux**: el port nativo se sigue en la [issue #105](https://github.com/egdev6/quorb/issues/105) y su baseline, matriz de soporte y límites conocidos están documentados en [docs/build-linux.md](./docs/build-linux.md). Para compilar y testear en Linux, usad el devcontainer incluido (`make up` y luego `make test`) — aprovisiona Node 22, Rust estable y las dependencias de sistema de Tauri sin tocar el host. Las comprobaciones automáticas de Linux (`.github/workflows/linux-pr-ci.yml`) ejecutan `npm ci`, `npm test`, `npm run build` y `cargo test --locked` (en `src-tauri`) sobre `ubuntu-22.04` para pull requests y pushes a `main`, con el check `Tests and build (Linux)` sin convertirlo en obligatorio. El workflow manual separado (`.github/workflows/linux-ci.yml`) ejecuta tests por defecto mediante `workflow_dispatch`; seleccionar `with_bundle: bundle` también compila los formatos locales decididos (`.deb` y `.AppImage`) y los verifica. No se dispara con tags, pull requests ni pushes; los artefactos del CI quedan privados al run y las releases públicas de Linux quedan fuera de alcance. Pasar los tests y compilar no valida la experiencia real de escritorio ni de Wayland. No afirmar soporte de ninguna distro o compositor que no esté marcado como medido en [la matriz](./docs/build-linux.md#6-matriz-de-8-entornos-l0b--qué-funciona-y-qué-degrada). +**Contribuidores de Linux**: el port nativo se entregó con las issues [#105](https://github.com/egdev6/quorb/issues/105)–#108 y su baseline, matriz de soporte y límites conocidos están documentados en [docs/build-linux.md](./docs/build-linux.md). Para compilar y testear en Linux, usad el devcontainer incluido (`make up` y luego `make test`) — aprovisiona Node 22, Rust estable y las dependencias de sistema de Tauri sin tocar el host. Las comprobaciones automáticas de Linux (`.github/workflows/linux-pr-ci.yml`) ejecutan `npm ci`, `npm test`, `npm run build` y `cargo test --locked` (en `src-tauri`) sobre `ubuntu-22.04` para pull requests y pushes a `main`, con el check `Tests and build (Linux)` sin convertirlo en obligatorio. El workflow manual separado (`.github/workflows/linux-ci.yml`) ejecuta tests por defecto mediante `workflow_dispatch`; seleccionar `with_bundle: bundle` también compila los formatos locales decididos (`.deb` y `.AppImage`) y los verifica. No se dispara con tags, pull requests ni pushes; los artefactos del CI quedan privados al run; los instaladores públicos de Linux se adjuntan a cada release con `.github/workflows/linux-release.yml` (ver [docs/release-linux.md](./docs/release-linux.md)). Pasar los tests y compilar no valida la experiencia real de escritorio ni de Wayland. No afirmar soporte de ninguna distro o compositor que no esté marcado como medido en [la matriz](./docs/build-linux.md#6-matriz-de-8-entornos-l0b--qué-funciona-y-qué-degrada). ```powershell git clone https://github.com/egdev6/quorb cd quorb npm install +npm run hooks:install # una vez por clon: hook pre-push de Lefthook (Biome + cargo fmt) npm run app:dev ``` -El repositorio es privado actualmente, así que clonarlo requiere acceso. - ### Comandos Estos son los scripts declarados en `package.json`: @@ -323,7 +321,7 @@ npm run setup:signing Ese script genera la clave de firma en `%USERPROFILE%\.tauri\quorb.key` (nunca sobrescribe una clave existente), escribe la clave pública en `src-tauri/tauri.conf.json` y, si GitHub CLI tiene sesión iniciada, sube `TAURI_SIGNING_PRIVATE_KEY` y `TAURI_SIGNING_PRIVATE_KEY_PASSWORD` como secretos del repositorio. Guardad una copia de la clave privada y su contraseña: si se pierden, las versiones instaladas no aceptarán actualizaciones firmadas con otra clave. -**Estado del workflow de producción.** El workflow de producción es `.github/workflows/release.yml`. No se dispara con tags ni pushes: un mantenedor lo inicia a mano desde la pestaña Actions sobre `main`, indicando la `version` estable y el `source_sha` completo de 40 caracteres de un commit ya fusionado. Valida los inputs, las versiones de los manifiestos, las notas, la colisión de tag y la clave pública del updater; después pasa los tests, compila en Windows y crea un **borrador** de release que publicas tú. Los secretos de firma solo se exponen en el paso de firma/empaquetado. Hasta que el owner aprovisione la clave y los secretos del repositorio, considera la release bloqueada, no automática. +**Estado del workflow de producción.** El workflow de producción es `.github/workflows/release.yml`. No se dispara con tags ni pushes: un mantenedor lo inicia a mano desde la pestaña Actions sobre `main`, indicando la `version` estable y el `source_sha` completo de 40 caracteres de un commit ya fusionado. Valida los inputs, las versiones de los manifiestos, las notas, la colisión de tag y la clave pública del updater; después pasa los tests, compila en Windows y crea un **borrador** de release que publicas tú. Los secretos de firma solo se exponen en el paso de firma/empaquetado. La clave del updater y los secretos del repositorio ya están aprovisionados; v0.9.0 y v0.9.1 se publicaron con este workflow. ## Contact diff --git a/README.es.md b/README.es.md index c5cd5c6..d0caed3 100644 --- a/README.es.md +++ b/README.es.md @@ -80,6 +80,7 @@ Necesitáis Node 22+, Rust con el toolchain MSVC, Microsoft C++ Build Tools y We git clone https://github.com/egdev6/quorb cd quorb npm install +npm run hooks:install # una vez por clon: hook pre-push de Lefthook (Biome + cargo fmt) npm run app:dev ``` @@ -96,8 +97,11 @@ Para compilar un instalador local, ejecutad `npm run app:build`. Los archivos se | `npm run app:dev` | Ejecutar la app de escritorio con hot reload | | `npm run app:build` | Compilar un instalador local | | `npm run typecheck` | Comprobar TypeScript | -| `npm test` | Tests de Vitest | +| `npm test` | Tests de Vitest y tests Node de los scripts | | `cd src-tauri; cargo test` | Tests de Rust | +| `npm run check` | Lint y comprobación de formato con Biome (CI ejecuta `npx biome ci`) | +| `npm run check:fix` | Aplicar los arreglos seguros y el formato de Biome | +| `npm run hooks:install` | Instalar el hook `pre-push` de Lefthook (una vez por clon) | | `npm run bump x.y.z` | Actualizar la versión | | `npm run setup:signing` | Preparar la firma: crea claves y puede subir secretos a GitHub | | `npm run app:release` | Compilar una actualización firmada; requiere credenciales de firma | @@ -196,13 +200,13 @@ Para sesiones en WSL, elegid la distro en Ajustes y configurad las rutas de cred ### Hoja de ruta -La firma Authenticode de Windows y distribución por winget, el modo click-through y la ventana de cuatro horas de GLM en NaN siguen siendo objetivos, no funcionalidades actuales. La release macOS ARM64 firmada y notarizada está enlazada arriba, con actualizaciones manuales. Las releases públicas de Linux y el updater de Linux no forman parte del proyecto por ahora; el desarrollo local de Linux está recogido en la sección siguiente. +La firma Authenticode de Windows y distribución por winget, el modo click-through y la ventana de cuatro horas de GLM en NaN siguen siendo objetivos, no funcionalidades actuales. La release macOS ARM64 firmada y notarizada está enlazada arriba, con actualizaciones manuales. Los instaladores `.deb` y `.AppImage` de Linux se publican en cada release desde v0.9.1, con actualizaciones manuales; el updater de Linux no forma parte del proyecto por ahora. El desarrollo local de Linux está recogido en la sección siguiente. ## Notas de desarrollo Linux -Está en marcha un port nativo de Linux (issues ODD #105–#108 del proyecto `quorb-linux-local-v1`). Desde v0.9.1 el `.deb` y el `.AppImage` se publican en cada release; para desarrollo local: +El port nativo de Linux se entregó con las issues ODD #105–#108 del proyecto `quorb-linux-local-v1`. Desde v0.9.1 el `.deb` y el `.AppImage` se publican en cada release; para desarrollo local: -- Requisitos: Node 22+, Rust y las librerías de sistema habituales de Tauri (`libwebkit2gtk-4.1-dev`, `libdbus-1-dev`, `pkg-config`, `build-essential`, `curl`, `wget`, `file`, `libxdo-dev`, `libssl-dev`, `libayatana-appindicator3-dev`, `librsvg2-dev`). Para ejecutar desde fuente, `npm install` + `npm run app:dev`. +- Requisitos: Node 22+, Rust y las librerías de sistema habituales de Tauri (`libwebkit2gtk-4.1-dev`, `libdbus-1-dev`, `pkg-config`, `build-essential`, `curl`, `wget`, `file`, `libxdo-dev`, `libssl-dev`, `libayatana-appindicator3-dev`, `librsvg2-dev`). Para ejecutar desde fuente, `npm install` + `npm run hooks:install` + `npm run app:dev`. - Los formatos de bundle local instalable ya están decididos: `.deb` para Debian/Ubuntu y `.AppImage` para Arch y el resto (ver [`docs/build-linux.md`](./docs/build-linux.md)). Se construyen y verifican con el workflow manual de Linux (`.github/workflows/linux-ci.yml`, `with_bundle: bundle`) o localmente con `npm run app:build` + los scripts `.testcontainer/verify-*.sh`. Los artefactos del CI quedan privados a cada run; los instaladores públicos se adjuntan a cada release con `.github/workflows/linux-release.yml` (ver [docs/release-linux.md](./docs/release-linux.md)). - Las limitaciones de sesión y comportamiento dependen del escritorio, y Ajustes las muestra por superficie en el bloque «Sesión de escritorio»: - X11: comportamiento completo de siempre-encima, icono de bandeja, atajos globales y transparencia (esta última solo con un compositor). diff --git a/README.md b/README.md index 89bf35e..c01a5c7 100644 --- a/README.md +++ b/README.md @@ -80,6 +80,7 @@ You need Node 22+, Rust with the MSVC toolchain, Microsoft C++ Build Tools and W git clone https://github.com/egdev6/quorb cd quorb npm install +npm run hooks:install # once per clone: Lefthook pre-push hook (Biome + cargo fmt) npm run app:dev ``` @@ -96,8 +97,11 @@ To build a local installer, run `npm run app:build`. Outputs are written under ` | `npm run app:dev` | Run the desktop app with hot reload | | `npm run app:build` | Build a local installer | | `npm run typecheck` | TypeScript checks | -| `npm test` | Vitest tests | +| `npm test` | Vitest tests plus the scripts' Node tests | | `cd src-tauri; cargo test` | Rust tests | +| `npm run check` | Biome lint + format check (CI runs `npx biome ci`) | +| `npm run check:fix` | Apply Biome safe fixes and formatting | +| `npm run hooks:install` | Install the Lefthook `pre-push` hook (once per clone) | | `npm run bump x.y.z` | Update the version | | `npm run setup:signing` | Maintainer signing setup; creates keys and can upload GitHub secrets | | `npm run app:release` | Build a signed update; requires signing credentials | @@ -194,13 +198,13 @@ For WSL sessions, select the distro in Settings and configure credential file pa ### Roadmap -Windows Authenticode signing and winget distribution, click-through mode and NaN's GLM four-hour window remain roadmap items, not current capabilities. A signed, notarized macOS ARM64 release is available above, with manual updates. Linux public releases and a Linux updater are not part of this project yet; Linux local development is covered in the section below. +Windows Authenticode signing and winget distribution, click-through mode and NaN's GLM four-hour window remain roadmap items, not current capabilities. A signed, notarized macOS ARM64 release is available above, with manual updates. Linux `.deb` and `.AppImage` installers are published with each release since v0.9.1, with manual updates; a Linux updater is not part of the project yet. Linux local development is covered in the section below. ## Linux development notes -A native Linux port is under development (tracking issues #105–#108 of the ODD project `quorb-linux-local-v1`). Since v0.9.1 the `.deb` and `.AppImage` are published in each release; for local development: +The native Linux port was delivered through issues #105–#108 of the ODD project `quorb-linux-local-v1`. Since v0.9.1 the `.deb` and `.AppImage` are published in each release; for local development: -- Requirements: Node 22+, Rust, and the usual Linux system libraries of Tauri (`libwebkit2gtk-4.1-dev`, `libdbus-1-dev`, `pkg-config`, `build-essential`, `curl`, `wget`, `file`, `libxdo-dev`, `libssl-dev`, `libayatana-appindicator3-dev`, `librsvg2-dev`). Run from source with `npm install` + `npm run app:dev`. +- Requirements: Node 22+, Rust, and the usual Linux system libraries of Tauri (`libwebkit2gtk-4.1-dev`, `libdbus-1-dev`, `pkg-config`, `build-essential`, `curl`, `wget`, `file`, `libxdo-dev`, `libssl-dev`, `libayatana-appindicator3-dev`, `librsvg2-dev`). Run from source with `npm install` + `npm run hooks:install` + `npm run app:dev`. - Local installable bundles are decided: `.deb` for Debian/Ubuntu and `.AppImage` for Arch and the rest (see [`docs/build-linux.md`](./docs/build-linux.md)). They are built and verified by the manual Linux workflow (`.github/workflows/linux-ci.yml`, `with_bundle: bundle`) or locally with `npm run app:build` + the `.testcontainer/verify-*.sh` scripts. CI artifacts stay private to each run; public installers are attached to each release by `.github/workflows/linux-release.yml` (see [docs/release-linux.md](./docs/release-linux.md)). - Session and behaviour limits depend on the desktop session, and Settings shows them per surface in the «Sesión de escritorio» block: - X11: complete behaviour of always-on-top, tray icon, global shortcuts and transparency (the last only with a compositing WM).