60 Commits
Author SHA1 Message Date
GitHub Actions 7f5dd660c7 chore: bump version to 4.11.223 [skip ci] 2026-11-03 02:51:30 +00:00
litruv 7c33ae587d Add automated testing infrastructure (Vitest + Playwright E2E) (#110)
Build / prepare (push) Successful in 14s
Checks / checks (push) Successful in 2m5s
Build / build-windows (push) Successful in 4m43s
Build / build-linux (push) Successful in 2m37s
Build / finalize-release (push) Successful in 5s
Co-authored-by: litruv <litruv@gmail.com>
2026-11-03 13:51:15 +11:00
GitHub Actions 2444654a58 chore: bump version to 4.11.222 [skip ci] 2026-11-02 15:56:02 +00:00
litruv e021368628 Bump cinny: prism index-key rule off and stale directives dropped.
Build / prepare (push) Successful in 15s
Checks / checks (push) Successful in 2m5s
Build / build-windows (push) Successful in 4m8s
Build / build-linux (push) Successful in 2m49s
Build / finalize-release (push) Successful in 5s
2026-11-03 02:53:55 +11:00
litruv 238b969d38 Bump cinny: TikTok embeds removed and CSS scope helpers merged. [skip build]
Build / prepare (push) Successful in 11s
Build / build-windows (push) Skipped
Build / build-linux (push) Skipped
Build / finalize-release (push) Skipped
Checks / checks (push) Successful in 2m5s
2026-11-03 02:33:28 +11:00
litruv 5026f0efc2 Bump cinny: key conflict handler and crypto store prefix. [skip build]
Build / prepare (push) Successful in 11s
Build / build-windows (push) Skipped
Build / build-linux (push) Skipped
Build / finalize-release (push) Skipped
Checks / checks (push) Successful in 2m5s
2026-11-03 02:14:16 +11:00
litruv 1cbf407f9e Bump cinny: accepted rules off, design tokens, alt text, last type errors. [skip build]
Build / prepare (push) Successful in 11s
Build / build-windows (push) Skipped
Build / build-linux (push) Skipped
Build / finalize-release (push) Skipped
Checks / checks (push) Successful in 2m16s
2026-11-03 01:11:47 +11:00
litruv ec4976293f Bump cinny: space create event types. [skip build]
Build / prepare (push) Successful in 11s
Build / build-windows (push) Skipped
Build / build-linux (push) Skipped
Build / finalize-release (push) Skipped
Checks / checks (push) Successful in 2m8s
2026-11-02 05:25:02 +11:00
litruv 16f4127ed3 Bump cinny: event type augmentation and dep arrays. [skip build]
Build / prepare (push) Successful in 11s
Build / build-windows (push) Skipped
Build / build-linux (push) Skipped
Build / finalize-release (push) Skipped
Checks / checks (push) Successful in 2m10s
2026-11-02 05:12:47 +11:00
litruv ce4d13740c Bump cinny: reaction content type and lint sites. [skip build]
Build / prepare (push) Successful in 13s
Build / build-windows (push) Skipped
Build / build-linux (push) Skipped
Build / finalize-release (push) Skipped
Checks / checks (push) Successful in 2m10s
2026-11-02 04:22:09 +11:00
litruv 95ef4261ed Bump cinny: any sites in crypto, settings, components. [skip build]
Build / prepare (push) Successful in 11s
Build / build-windows (push) Skipped
Build / build-linux (push) Skipped
Build / finalize-release (push) Skipped
Checks / checks (push) Successful in 2m8s
2026-11-02 03:56:19 +11:00
litruv 9143ef18e1 Bump cinny: paarrot api and WebKit globals. [skip build]
Build / prepare (push) Successful in 11s
Build / build-windows (push) Skipped
Build / build-linux (push) Skipped
Build / finalize-release (push) Skipped
Checks / checks (push) Successful in 2m10s
2026-11-02 02:22:16 +11:00
litruv 60b3706b22 Bump cinny: window and power-level types. [skip build]
Build / prepare (push) Successful in 11s
Build / build-windows (push) Skipped
Build / build-linux (push) Skipped
Build / finalize-release (push) Skipped
Checks / checks (push) Successful in 2m10s
2026-11-02 01:46:02 +11:00
litruv 8d2de8ee44 Bump cinny: Capacitor code moved to the mobile overlay. [skip build]
Build / prepare (push) Successful in 12s
Build / build-windows (push) Skipped
Build / build-linux (push) Skipped
Build / finalize-release (push) Skipped
Checks / checks (push) Successful in 2m12s
2026-11-02 01:07:33 +11:00
litruv ae77701424 Bump cinny with the type fixes. [skip build]
Build / prepare (push) Successful in 11s
Build / build-windows (push) Skipped
Build / build-linux (push) Skipped
Build / finalize-release (push) Skipped
Checks / checks (push) Successful in 2m12s
2026-11-02 00:51:41 +11:00
litruv 3546e166b0 Bump cinny with the rule decisions. [skip build]
Build / prepare (push) Successful in 11s
Build / build-windows (push) Skipped
Build / build-linux (push) Skipped
Build / finalize-release (push) Skipped
Checks / checks (push) Successful in 2m11s
2026-11-02 00:09:39 +11:00
litruv 42be279a31 Bump cinny with the EventType call sites. [skip build]
Build / prepare (push) Successful in 11s
Build / build-windows (push) Skipped
Build / build-linux (push) Skipped
Build / finalize-release (push) Skipped
Checks / checks (push) Successful in 2m9s
2026-11-01 23:50:21 +11:00
litruv f8b4f8cd5a Bump cinny with the exhaustive-deps and cause fixes. [skip build]
Build / prepare (push) Successful in 12s
Build / build-windows (push) Skipped
Build / build-linux (push) Skipped
Build / finalize-release (push) Skipped
Checks / checks (push) Successful in 2m12s
2026-11-01 23:04:45 +11:00
litruv f01be83a71 Bump cinny with the updater and Tauri types. [skip build]
Build / prepare (push) Successful in 11s
Build / build-windows (push) Skipped
Build / build-linux (push) Skipped
Build / finalize-release (push) Skipped
Checks / checks (push) Successful in 2m12s
2026-11-01 22:36:52 +11:00
litruv 86dc5ec9e3 Bump cinny with the electron and matrix types. [skip build]
Build / prepare (push) Successful in 11s
Build / build-windows (push) Skipped
Build / build-linux (push) Skipped
Build / finalize-release (push) Skipped
Checks / checks (push) Successful in 2m15s
2026-11-01 22:08:35 +11:00
litruv 06be5c9aaf Bump cinny with the accessibility and key fixes. [skip build]
Build / prepare (push) Successful in 11s
Build / build-windows (push) Skipped
Build / build-linux (push) Skipped
Build / finalize-release (push) Skipped
Checks / checks (push) Successful in 2m12s
2026-11-01 21:32:45 +11:00
litruv 1fc1e5e830 Bump cinny with the iterator and reorder fixes. [skip build]
Build / prepare (push) Successful in 11s
Build / build-windows (push) Skipped
Build / build-linux (push) Skipped
Build / finalize-release (push) Skipped
Checks / checks (push) Successful in 2m14s
2026-11-01 21:06:00 +11:00
litruv 609a822777 Bump cinny with the mechanical lint fixes. [skip build]
Build / prepare (push) Successful in 12s
Build / build-windows (push) Skipped
Build / build-linux (push) Skipped
Build / finalize-release (push) Skipped
Checks / checks (push) Successful in 2m20s
2026-11-01 20:31:28 +11:00
litruv d017cf1959 Bump cinny to mount the dialog host at the app root. [skip build]
Build / prepare (push) Successful in 11s
Build / build-windows (push) Skipped
Build / build-linux (push) Skipped
Build / finalize-release (push) Skipped
Checks / checks (push) Successful in 2m13s
2026-11-01 19:55:32 +11:00
litruv cfc7e5fca3 Bump cinny to replace the native confirm and alert with an in-app dialog. [skip build]
Build / prepare (push) Successful in 11s
Build / build-windows (push) Skipped
Build / build-linux (push) Skipped
Build / finalize-release (push) Skipped
Checks / checks (push) Successful in 2m13s
2026-11-01 11:44:23 +11:00
litruv 979f7a6ddb Bump cinny to drop autofocus and move the search reset out of render. [skip build]
Build / prepare (push) Successful in 11s
Build / build-windows (push) Skipped
Build / build-linux (push) Skipped
Build / finalize-release (push) Skipped
Checks / checks (push) Successful in 2m10s
2026-11-01 10:49:00 +11:00
litruv d402f4dcfd Bump cinny to drop the unused eslint-disable directives. [skip build]
Build / prepare (push) Successful in 11s
Build / build-windows (push) Skipped
Build / build-linux (push) Skipped
Build / finalize-release (push) Skipped
Checks / checks (push) Successful in 2m12s
2026-11-01 10:39:48 +11:00
litruv b477977a7b Bump cinny to fix the small mechanical rules. [skip build]
Build / prepare (push) Successful in 11s
Build / build-windows (push) Skipped
Build / build-linux (push) Skipped
Build / finalize-release (push) Skipped
Checks / checks (push) Successful in 2m15s
2026-11-01 10:29:08 +11:00
litruv 96f011defc Bump cinny to turn off the React Compiler rules and no-bitwise. [skip build]
Build / prepare (push) Successful in 11s
Build / build-windows (push) Skipped
Build / build-linux (push) Skipped
Build / finalize-release (push) Skipped
Checks / checks (push) Successful in 2m16s
2026-11-01 09:59:34 +11:00
litruv 1b414d23de Bump cinny to move the untyped dependency into an ambient declaration file. [skip build]
Build / prepare (push) Successful in 12s
Build / build-windows (push) Skipped
Build / build-linux (push) Skipped
Build / finalize-release (push) Skipped
Checks / checks (push) Successful in 2m15s
2026-11-01 09:58:03 +11:00
litruv 527cc8fdf4 Bump cinny to put the repo in the commit link. [skip build]
Build / prepare (push) Successful in 11s
Build / build-windows (push) Skipped
Build / build-linux (push) Skipped
Build / finalize-release (push) Skipped
Checks / checks (push) Successful in 2m13s
2026-11-01 09:30:12 +11:00
litruv 85766610d9 Bump cinny to use globalThis and React.JSX. [skip build]
Build / prepare (push) Successful in 11s
Build / build-windows (push) Skipped
Build / build-linux (push) Skipped
Build / finalize-release (push) Skipped
Checks / checks (push) Successful in 2m15s
2026-11-01 09:09:09 +11:00
GitHub Actions cf9899391c chore: bump version to 4.11.221 [skip ci] 2026-10-31 22:04:30 +00:00
litruv e7e2a43037 Bump cinny to add the debug packet recorder.
Build / prepare (push) Successful in 15s
Checks / checks (push) Successful in 2m20s
Build / build-windows (push) Successful in 4m35s
Build / build-linux (push) Successful in 2m38s
Build / finalize-release (push) Successful in 13s
2026-11-01 09:01:55 +11:00
litruv 4dc6c8c427 Bump cinny to fix the mechanical style rules. [skip build] 2026-11-01 09:01:50 +11:00
litruv 121244e97b Add the debug packet window to the Electron main process. 2026-11-01 09:01:45 +11:00
litruv 54c4cf4386 Bump cinny to turn off the base unused-vars rule for the TS files. [skip build]
Build / prepare (push) Successful in 11s
Build / build-windows (push) Skipped
Build / build-linux (push) Skipped
Build / finalize-release (push) Skipped
Checks / checks (push) Successful in 2m15s
2026-11-01 07:02:48 +11:00
litruv 9cc406b770 Bump cinny to drop the unused imports and inert variables. [skip build]
Build / prepare (push) Successful in 11s
Build / build-windows (push) Skipped
Build / build-linux (push) Skipped
Build / finalize-release (push) Skipped
Checks / checks (push) Successful in 2m20s
2026-11-01 06:09:37 +11:00
litruv 9595b9922d Bump cinny to turn off no-undef for the TS files. [skip build]
Build / prepare (push) Successful in 10s
Build / build-windows (push) Skipped
Build / build-linux (push) Skipped
Build / finalize-release (push) Skipped
Checks / checks (push) Successful in 2m15s
2026-11-01 05:48:42 +11:00
litruv 33af5c9abf Bump cinny to drop the dead Tauri branches and the plugin packages. [skip build]
Build / prepare (push) Successful in 11s
Build / build-windows (push) Skipped
Build / build-linux (push) Skipped
Build / finalize-release (push) Skipped
Checks / checks (push) Successful in 2m19s
2026-11-01 05:35:15 +11:00
litruv 999d5da26c Bump cinny to fix the single-violation style findings. [skip build] 2026-11-01 05:35:01 +11:00
litruv 0ed6df6e97 Bump cinny to remove the playground, and drop the dead playground script. [skip build]
Build / prepare (push) Successful in 11s
Build / build-windows (push) Skipped
Build / build-linux (push) Skipped
Build / finalize-release (push) Skipped
Checks / checks (push) Successful in 2m22s
2026-11-01 04:55:10 +11:00
litruv b78e8187ca Record the skip build rule for checks backlog commits.
Build / prepare (push) Canceled after 0s
Build / build-windows (push) Canceled after 0s
Build / build-linux (push) Canceled after 0s
Build / finalize-release (push) Canceled after 0s
Checks / checks (push) Successful in 2m18s
2026-11-01 04:32:33 +11:00
GitHub Actions 0bbca0d94d chore: bump version to 4.11.220 [skip ci] 2026-10-31 17:31:32 +00:00
litruv 8afd17e176 Bump cinny to export the default in the raw module declaration.
Build / prepare (push) Successful in 14s
Build / build-windows (push) Canceled after 0s
Build / build-linux (push) Canceled after 0s
Build / finalize-release (push) Canceled after 0s
Checks / checks (push) Successful in 2m24s
2026-11-01 04:27:40 +11:00
GitHub Actions 7adc4cdec0 chore: bump version to 4.11.219 [skip ci] 2026-10-31 17:26:28 +00:00
litruv dd2916c30e Bump cinny to apply the auto-fixable lint rules and the formatter.
Build / prepare (push) Successful in 14s
Build / build-windows (push) Canceled after 0s
Build / build-linux (push) Canceled after 0s
Build / finalize-release (push) Canceled after 0s
Checks / checks (push) Successful in 2m14s
2026-11-01 04:24:05 +11:00
litruv 4c6b71fc3b Bump cinny to drop the redundant try around the render check fetch.
Build / prepare (push) Canceled after 0s
Build / build-windows (push) Canceled after 0s
Build / build-linux (push) Canceled after 0s
Build / finalize-release (push) Canceled after 0s
Checks / checks (push) Successful in 2m3s
2026-11-01 04:01:47 +11:00
GitHub Actions 5970c5fb7a chore: bump version to 4.11.218 [skip ci] 2026-10-31 17:00:38 +00:00
litruv 84296e7f87 Bump cinny to point the commit link at the public web base.
Build / prepare (push) Successful in 12s
Checks / checks (push) Successful in 2m2s
Build / build-windows (push) Canceled after 0s
Build / build-linux (push) Canceled after 0s
Build / finalize-release (push) Canceled after 0s
2026-11-01 03:58:28 +11:00
litruv da763937de Point the checks workflow at the public web base. 2026-11-01 03:58:24 +11:00
litruv 4bbffdb840 Skip the Electron build when the commit message marks it.
Build / prepare (push) Successful in 14s
Checks / checks (push) Successful in 2m1s
Build / build-linux (push) Canceled after 0s
Build / finalize-release (push) Canceled after 0s
Build / build-windows (push) Canceled after 2m57s
2026-11-01 03:55:49 +11:00
GitHub Actions 230171e16c chore: bump version to 4.11.217 [skip ci] 2026-10-31 16:48:08 +00:00
litruv e23c40585f Bump cinny to drop the explicit undefined initialisation.
Build / prepare (push) Canceled after 0s
Build / build-windows (push) Canceled after 0s
Build / build-linux (push) Canceled after 0s
Build / finalize-release (push) Canceled after 0s
Checks / checks (push) Successful in 2m1s
2026-11-01 03:45:55 +11:00
litruv b2f6c732e4 Bump cinny to comment the fixing commit when a check issue closes.
Build / prepare (push) Successful in 13s
Build / build-windows (push) Canceled after 0s
Build / build-linux (push) Canceled after 0s
Build / finalize-release (push) Canceled after 0s
Checks / checks (push) Canceled after 1m10s
2026-11-01 03:43:50 +11:00
litruv a2b0a3f930 Pass the commit sha to the checks workflow. 2026-11-01 03:43:47 +11:00
litruv adf6329149 Bump cinny to strip the ANSI codes from check output.
Build / prepare (push) Failing after 14s
Build / build-windows (push) Skipped
Build / build-linux (push) Skipped
Build / finalize-release (push) Skipped
Checks / checks (push) Successful in 2m0s
2026-11-01 03:37:40 +11:00
GitHub Actions 3382db4603 chore: bump version to 4.11.216 [skip ci] 2026-10-31 16:35:36 +00:00
litruv bbaf526e5f Bump cinny to page the open issue list.
Build / prepare (push) Successful in 16s
Checks / checks (push) Successful in 2m0s
Build / build-windows (push) Failing after 3m27s
Build / build-linux (push) Failing after 1m36s
Build / finalize-release (push) Skipped
2026-11-01 03:32:43 +11:00
GitHub Actions 667aed487a chore: bump version to 4.11.215 [skip ci] 2026-10-31 16:23:19 +00:00
16 changed files with 1656 additions and 8 deletions
+5
View File
@@ -49,6 +49,11 @@ jobs:
SHOULD_BUILD=false
fi
# [skip build] runs the checks workflow but skips the Electron build.
if echo "$COMMIT_MSG" | grep -qi '\[skip build\]'; then
SHOULD_BUILD=false
fi
echo "CURRENT_VERSION=$CURRENT" >> $GITHUB_OUTPUT
echo "SHOULD_BUMP=$SHOULD_BUMP" >> $GITHUB_OUTPUT
echo "SHOULD_BUILD=$SHOULD_BUILD" >> $GITHUB_OUTPUT
+3
View File
@@ -58,7 +58,10 @@ jobs:
- name: Run checks
env:
API_BASE: ${{ github.server_url }}/api/v1
# github.server_url is the internal runner host, so the commit link needs the public one.
WEB_BASE: https://git.ruv.wtf
REPO: ${{ github.repository }}
SHA: ${{ github.sha }}
# Prefer a PAT with issue write scope (secret: GITEA_TOKEN).
# Default GITHUB_TOKEN is usually scoped to this repo only.
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
+94
View File
@@ -0,0 +1,94 @@
name: Tests
on:
pull_request:
jobs:
unit:
# act_runner mounts /var/run/docker.sock into every container job, so a fork PR reaches
# the Docker daemon on the runner host. Both jobs need the same guard.
if: github.event.pull_request.head.repo.full_name == github.repository
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '22'
- name: Install dependencies
run: npm ci
- name: Run unit tests
run: npm run test:unit
e2e:
# A fork PR controls both the test files and these steps, so only same-repository
# PRs can be trusted with the E2E_PASSWORD secret.
if: github.event.pull_request.head.repo.full_name == github.repository
runs-on: ubuntu-latest
# Needs the DOCKER-USER exception on the runner host: ruv.wtf is a macvlan interface on a
# container there, so the reply to a bridge-networked job arrives on that container's bridge
# and Docker's inter-bridge isolation drops it. The exception is host-wide, so it also covers
# fork PR jobs, and the bridge name is Docker-generated: recreating the caddy container
# renames it and the test fails closed.
env:
# Dedicated test account on the homeserver, not a personal one.
E2E_HOMESERVER: ruv.wtf
E2E_USER: giteaci
# Repo secret: E2E_PASSWORD. The test fails with a clear message when it is missing.
E2E_PASSWORD: ${{ secrets.E2E_PASSWORD }}
steps:
# .gitmodules uses a relative URL, so the runner resolves it against origin.
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: true
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '22'
- name: Install dependencies
run: npm ci
# The E2E run drives the vite dev server, so cinny's dependencies are needed too.
- name: Install dependencies (cinny)
working-directory: ./cinny
run: npm ci
# Electron needs system libraries the runner image does not ship. Do not narrow this to
# chromium: Playwright's chromium dep set covers its own bundled browser, not Electron,
# and drops libgtk-3-0t64, libegl1, libegl-mesa0, libgles2, libsecret-1-0, libxtst6 and
# libxss1, which Electron needs to launch. Narrowing it fails with "Process failed to
# launch!".
- name: Install system libraries for Electron
run: npx playwright install-deps
# The container runner image has no xvfb and no fresh apt lists. The host runner already
# has xvfb, so the guard skips the install there; both share the ubuntu-latest label, so
# which one runs is not fixed.
- name: Ensure a display for Electron
run: command -v xvfb-run >/dev/null || (sudo apt-get update && sudo apt-get install -y xvfb)
# The login form only renders after the auth-flows request succeeds, so an
# unreachable homeserver shows up as a 30s locator timeout. Fail fast instead, on
# connect failure or a non-2xx status.
- name: Homeserver reachable from the runner
run: curl -sSf --max-time 20 -o /dev/null -w '%{http_code}\n' "https://$E2E_HOMESERVER/.well-known/matrix/client"
- name: Run login E2E
run: xvfb-run -a npm run test:e2e
# Gitea implements the v3 artifact protocol; v4 rejects it as GHES.
- name: Upload test artifacts
if: failure()
uses: actions/upload-artifact@v3
with:
name: e2e-artifacts
path: |
test-results
playwright-report
+2
View File
@@ -5,3 +5,5 @@ devAssets
.DS_Store
dist-electron/
playwright-report/
test-results/
+10
View File
@@ -0,0 +1,10 @@
# Checks backlog
Lint and typecheck fix commits carry `[skip build]` in the commit message while
the `ci-checks` issues are being worked down across the cinny repos. The checks
workflow still runs; the Electron and mobile builds do not.
Honored in `cinny-desktop/.gitea/workflows/build.yml` and
`cinny-mobile/.gitea/workflows/build.yml`.
Do not use `[skip ci]` for these commits. It also suppresses the version bump.
+22
View File
@@ -30,6 +30,28 @@ To build the app locally, run:
To start local dev server, run:
* `npm run dev`
## Testing
* `npm run test` - unit and E2E
* `npm run test:unit` - Vitest
* `npm run test:e2e` - Playwright driving Electron
The E2E test drives the real Electron app against the vite dev server, so it needs the
cinny dependencies installed and an X display. On a headless machine run it under xvfb:
`xvfb-run -a npm run test:e2e`.
The E2E test logs in to a live homeserver over the network, so it needs network access and a
working test account. It uses a dedicated account, never a personal one:
Variable | Default
---|---
`E2E_HOMESERVER` | `ruv.wtf`
`E2E_USER` | `giteaci`
`E2E_PASSWORD` | required, read from the environment, never committed
A failed E2E run attaches a screenshot and the main and renderer console logs to the
report. CI uploads `test-results/` and `playwright-report/` as artifacts.
## Plugin System
Paarrot includes a plugin system for extending and customising the app with JavaScript modules.
+1 -1
Submodule cinny updated: 6e6d4322c5...9b3956d85f
+122
View File
@@ -0,0 +1,122 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Debug Packets</title>
<style>
:root { color-scheme: dark; }
body { margin: 0; background: #14161a; color: #d9dce1; font: 13px/1.45 ui-monospace, SFMono-Regular, Menlo, monospace; }
main { display: flex; flex-direction: column; height: 100vh; }
header { display: flex; gap: 8px; align-items: center; padding: 8px; border-bottom: 1px solid #262a31; flex-wrap: wrap; }
input[type="search"] { flex: 1 1 160px; min-width: 120px; background: #1b1f25; color: inherit; border: 1px solid #2b3038; border-radius: 4px; padding: 6px 8px; font: inherit; }
button { background: #1b1f25; color: inherit; border: 1px solid #2b3038; border-radius: 4px; padding: 6px 10px; font: inherit; cursor: pointer; }
button:hover { border-color: #3b424d; }
label { display: flex; gap: 6px; align-items: center; }
#count { color: #8b93a1; }
#list { flex: 1; overflow: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 4px 8px; border-bottom: 1px solid #21252b; white-space: nowrap; }
th { position: sticky; top: 0; background: #171a1f; color: #8b93a1; }
tbody tr { cursor: pointer; }
tbody tr:hover, tbody tr.sel { background: #1b1f25; }
#detail { max-height: 40vh; overflow: auto; margin: 0; padding: 10px; border-top: 1px solid #262a31; white-space: pre-wrap; word-break: break-word; }
</style>
</head>
<body>
<main>
<header>
<input id="filter" type="search" placeholder="Filter (method, path, status, txnId, eventId, body)" aria-label="Filter packets">
<label><input id="autoscroll" type="checkbox" checked> Autoscroll</label>
<button id="clear">Clear</button>
<button id="copy">Copy all</button>
<button id="download">Download JSON lines</button>
<span id="count">0</span>
</header>
<div id="list">
<table>
<thead>
<tr><th>Time</th><th>Phase</th><th>Method</th><th>Path</th><th>Status</th><th>ms</th><th>txnId / eventId</th></tr>
</thead>
<tbody id="rows"></tbody>
</table>
</div>
<pre id="detail"></pre>
</main>
<script>
const MAX = 2000;
const packets = [];
const rows = document.getElementById('rows');
const list = document.getElementById('list');
const detail = document.getElementById('detail');
const filter = document.getElementById('filter');
const autoscroll = document.getElementById('autoscroll');
const count = document.getElementById('count');
const text = (v) => (v === undefined || v === null ? '' : String(v));
function matches(p) {
const q = filter.value.trim().toLowerCase();
if (!q) return true;
return [p.method, p.path, p.status, p.txnId, p.eventId, p.error, p.req, p.res]
.some((f) => text(f).toLowerCase().includes(q));
}
function addRow(p) {
const tr = document.createElement('tr');
[new Date(p.ts).toLocaleTimeString(), p.phase, p.method, p.path, p.status, p.ms, p.txnId || p.eventId]
.forEach((v) => {
const td = document.createElement('td');
td.textContent = text(v);
tr.appendChild(td);
});
tr.addEventListener('click', () => {
document.querySelectorAll('tr.sel').forEach((r) => r.classList.remove('sel'));
tr.classList.add('sel');
detail.textContent = JSON.stringify(p, null, 2);
});
rows.appendChild(tr);
}
function render() {
rows.textContent = '';
packets.filter(matches).forEach(addRow);
count.textContent = packets.length;
if (autoscroll.checked) list.scrollTop = list.scrollHeight;
}
function add(p) {
packets.push(p);
if (packets.length > MAX) packets.shift();
count.textContent = packets.length;
if (!matches(p)) return;
addRow(p);
if (autoscroll.checked) list.scrollTop = list.scrollHeight;
}
filter.addEventListener('input', render);
document.getElementById('clear').addEventListener('click', () => {
packets.length = 0;
detail.textContent = '';
render();
});
const lines = () => packets.map((p) => JSON.stringify(p)).join('\n');
document.getElementById('copy').addEventListener('click', () => {
window.electron?.clipboard?.writeText(lines());
});
document.getElementById('download').addEventListener('click', () => {
window.electron?.media?.saveFile({
filename: 'packets.jsonl',
mimeType: 'application/x-jsonlines',
data: lines(),
});
});
// Main sends the backlog as one batch (array), later packets one at a time
const unsubscribe = window.electron?.debug?.onPacket((data) => {
(Array.isArray(data) ? data : [data]).forEach(add);
});
window.addEventListener('beforeunload', () => unsubscribe?.());
</script>
</body>
</html>
+46
View File
@@ -113,6 +113,9 @@ let tray = null;
let isQuitting = false;
let apiServer = null;
let pendingDeepLink = null;
let debugWindow = null;
const debugPacketBacklog = [];
const DEBUG_PACKET_LIMIT = 2000;
let protocolRegistrationState = {
before: false,
registerCall: false,
@@ -1960,6 +1963,49 @@ ipcMain.handle('discord-collectibles:download-assets', async (event, { assets })
}
});
// Debug packet window
ipcMain.handle('debug:open-window', () => {
if (debugWindow && !debugWindow.isDestroyed()) {
debugWindow.focus();
return { success: true };
}
debugWindow = new BrowserWindow({
width: 900,
height: 600,
title: 'Debug Packets',
webPreferences: {
preload: path.join(__dirname, 'preload.js'),
contextIsolation: true,
nodeIntegration: false,
webSecurity: true
}
});
debugWindow.on('closed', () => {
debugWindow = null;
});
// Send the backlog as one batch once the page has registered its listener
debugWindow.webContents.on('did-finish-load', () => {
debugWindow.webContents.send('debug:packet', debugPacketBacklog);
});
debugWindow.loadFile(path.join(__dirname, 'debug.html'));
return { success: true };
});
ipcMain.on('debug:packet', (event, packet) => {
if (!packet || typeof packet !== 'object') return;
debugPacketBacklog.push(packet);
if (debugPacketBacklog.length > DEBUG_PACKET_LIMIT) debugPacketBacklog.shift(); // Keep last 2000
if (debugWindow && !debugWindow.isDestroyed()) {
debugWindow.webContents.send('debug:packet', packet);
}
});
console.log('Paarrot Electron main process started');
console.log('Development mode:', isDev);
console.log('Platform:', process.platform);
+11
View File
@@ -185,6 +185,17 @@ contextBridge.exposeInMainWorld('electron', {
}
},
// Debug packet recorder
debug: {
openWindow: () => ipcRenderer.invoke('debug:open-window'),
send: (packet) => ipcRenderer.send('debug:packet', packet),
onPacket: (callback) => {
const handler = (_, data) => callback(data);
ipcRenderer.on('debug:packet', handler);
return () => ipcRenderer.removeListener('debug:packet', handler);
}
},
// Plugin management
plugins: {
getPath: () => ipcRenderer.invoke('plugin:get-path'),
+1120 -5
View File
File diff suppressed because it is too large Load Diff
+6 -2
View File
@@ -1,6 +1,6 @@
{
"name": "paarrot",
"version": "4.11.214",
"version": "4.11.223",
"description": "Paarrot - A Matrix client based on Cinny",
"homepage": "https://github.com/Paarrot/Paarrot-Desktop",
"repository": {
@@ -21,7 +21,9 @@
"build:win": "npm run build -- --win",
"postman:generate": "node scripts/generate-postman-collection.js",
"generate:update-manifest": "node scripts/generate-update-manifest.mjs",
"playground": "npm --prefix cinny run playground"
"test": "npm run test:unit && npm run test:e2e",
"test:unit": "vitest run",
"test:e2e": "playwright test"
},
"keywords": [],
"author": {
@@ -41,6 +43,7 @@
"devDependencies": {
"@actions/github": "9.1.1",
"@electron/rebuild": "4.2.0",
"@playwright/test": "1.64.1",
"concurrently": "10.0.3",
"cross-env": "10.1.0",
"electron": "43.1.0",
@@ -48,6 +51,7 @@
"node-fetch": "3.3.2",
"png2icons": "2.0.1",
"sharp": "0.35.3",
"vitest": "5.1.0",
"wait-on": "9.0.10"
},
"allowScripts": {
+26
View File
@@ -0,0 +1,26 @@
import { defineConfig } from '@playwright/test';
export default defineConfig({
testDir: './tests/e2e',
// Electron launch plus first paint is far slower than a page load.
timeout: 120_000,
expect: { timeout: 30_000 },
// One Electron process at a time: the app takes a single-instance lock and
// every test shares the same vite dev server.
workers: 1,
// The suite logs in to a live homeserver, where Synapse login rate limiting is a real flake.
retries: process.env.CI ? 1 : 0,
// An explicit reporter replaces the default, so list stays for the CI log.
reporter: [['list'], ['html']],
// A trace captures the login POST body, which contains the password. Pin it off rather than
// relying on the version default.
trace: 'off',
// cinny/vite.config.js binds 0.0.0.0 with fs.allow: ['..'], which is exposed on a shared
// CI runner, so pin the dev server to loopback. The flag has to reach vite itself:
// `npm run dev:vite -- --host` lands on sh's positional params, not on vite.
// localhost is also the URL electron/main.js loads, so the page keeps that origin.
webServer: {
command: 'sh -c "cd cinny && npm start -- --host localhost"',
url: 'http://localhost:38347',
},
});
+147
View File
@@ -0,0 +1,147 @@
import { test, expect, _electron } from '@playwright/test';
import fs from 'node:fs';
import os from 'node:os';
import path from 'node:path';
const HOMESERVER = process.env.E2E_HOMESERVER ?? 'ruv.wtf';
const USER = process.env.E2E_USER ?? 'giteaci';
const PASSWORD = process.env.E2E_PASSWORD;
let app;
let page;
let logs = [];
let profile;
let crashed = false;
// ServerPicker gives its input no name or test id, so position is the only handle on it;
// this breaks if the form ever gains a field before the ones below.
const serverInput = () => page.locator('input').first();
const usernameInput = () => page.locator('input[name="usernameInput"]');
const passwordInput = () => page.locator('input[name="passwordInput"]');
const submitButton = () => page.locator('button[type="submit"]');
async function expectLoginForm() {
await expect(serverInput()).toBeVisible();
await expect(usernameInput()).toBeVisible();
await expect(passwordInput()).toBeVisible();
await expect(submitButton()).toBeVisible();
}
async function chooseServer(server) {
await serverInput().fill(server);
// The server field commits on Enter, which re-runs discovery and reloads the auth flows.
await serverInput().press('Enter');
// fill() does not prove the value stuck; a cancelled debounce would keep matrix.org.
await expect(serverInput()).toHaveValue(server);
await expectLoginForm();
}
async function submitLogin(username, password) {
await usernameInput().fill(username);
await passwordInput().fill(password);
await submitButton().click();
}
test.beforeEach(async () => {
logs = [];
crashed = false;
if (!PASSWORD) {
throw new Error('E2E_PASSWORD is not set. Export it, or add it as the CI secret.');
}
// Fresh profile per run. electron/main.js takes a single-instance lock keyed to
// the user data dir, so a shared profile collides with a running Paarrot.
profile = fs.mkdtempSync(path.join(os.tmpdir(), 'paarrot-e2e-'));
app = await _electron.launch({ args: ['.', `--user-data-dir=${profile}`] });
app.on('console', (msg) => logs.push(`[main] ${msg.type()}: ${msg.text()}`));
page = await app.firstWindow();
// main.js opens DevTools in dev mode, and that window can be the first one registered.
while (page.url().startsWith('devtools://')) {
// Recorded so a hang here names which windows existed instead of reporting a bare timeout.
logs.push(`[window] ${page.url()}`);
page = app.windows().find((w) => !w.url().startsWith('devtools://'))
?? await new Promise((resolve) => app.once('window', resolve));
}
page.on('console', (msg) => logs.push(`[renderer] ${msg.type()}: ${msg.text()}`));
page.on('pageerror', (err) => logs.push(`[renderer] pageerror: ${err}`));
// crash is render-process-gone, so it does not fire on the MatrixError or the ServiceWorker error.
page.on('crash', () => {
crashed = true;
logs.push('[renderer] page crashed');
});
await chooseServer(HOMESERVER);
});
// Config-based screenshots do not fire for a page taken from app.firstWindow(), and console
// capture is not covered by config at all, so this hook stays manual.
test.afterEach(async ({}, testInfo) => {
if (testInfo.status !== testInfo.expectedStatus) {
// Console first: a failed launch has no app and no page, so this is the only artifact that
// path can produce, and it is empty by construction because no handler is attached before
// launch — the failure message in the report is the diagnosis there. A crashed page produces
// no screenshot; the crash line in the console names it.
await testInfo.attach('console.log', { body: logs.join('\n'), contentType: 'text/plain' });
if (page && !page.isClosed()) {
// screenshot() throws on a crashed page, which would mask the original failure.
const shot = await page.screenshot().catch(() => null);
if (shot) await testInfo.attach('failure.png', { body: shot, contentType: 'image/png' });
}
}
if (app) {
await app
.close()
// main.js preventDefault()s window close to minimise to tray, so close can hang.
.catch(() => app.process().kill('SIGTERM'));
}
// Reachable on launch failure, so the temp profile does not leak.
if (profile) fs.rmSync(profile, { recursive: true, force: true });
});
async function expectAuthenticated() {
// Login complete reloads into the client shell, which lands on the last active path
// (state/lastActivePath.ts) or the inbox, so assert a shell route rather than any URL.
await expect(page).toHaveURL(/#\/(inbox|home|room|space)/);
await expect
.poll(() => page.evaluate(() => JSON.parse(localStorage.getItem('currentSessionUserId') ?? 'null')))
.toBe(`@${USER}:${HOMESERVER}`);
// A truthy accessToken only proves a string exists, so prove it authenticates. Only the
// status is asserted, so a failure cannot put a live token into the CI log or the report.
await expect
.poll(async () => {
const token = await page.evaluate(() => JSON.parse(localStorage.getItem('matrixSessions') ?? '[]')[0]?.accessToken);
if (!token) return 0;
// /versions and /account 404 on ruv.wtf; /capabilities exists and requires a valid token.
const res = await fetch(`https://${HOMESERVER}/_matrix/client/v3/capabilities`, { headers: { Authorization: `Bearer ${token}` } });
return res.status;
})
.toBe(200);
}
test('test account can log in and reaches the authenticated app', async () => {
await submitLogin(USER, PASSWORD);
await expectAuthenticated();
});
test('failed login reports an error and keeps the renderer alive', async () => {
await submitLogin(USER, 'not-the-password');
// A rate-limited run renders LoginError.RateLimited instead of the wrong-password message,
// so accept both branches rather than asserting one exact string.
await expect(page.getByText(/Invalid Username or Password\.|rate-limited by server/)).toBeVisible();
// Asserted before the form check: on a crashed page the locator throws TargetClosedError,
// which names the wrong thing. Pageerrors go into the artifact but are not asserted — the
// failed login itself produces MatrixError, and dev mode produces a ServiceWorker registration
// error. No second login here: every run costs Synapse rc_login budget, and the re-login was
// the main flake source.
await expect(crashed).toBe(false);
await expect(usernameInput()).toBeVisible();
});
+33
View File
@@ -0,0 +1,33 @@
import { afterAll, beforeAll, expect, test } from 'vitest';
import PaarrotAPIServer from '../../electron/api-server.js';
const api = new PaarrotAPIServer(null);
let base;
beforeAll(async () => {
// Port 0 lets the OS pick a free port, so the test never collides with a running Paarrot.
await api.start(0);
base = `http://127.0.0.1:${api.server.address().port}`;
});
afterAll(async () => {
await api.stop();
});
test('GET /health reports the API server is up', async () => {
const res = await fetch(`${base}/health`);
expect(res.status).toBe(200);
expect(await res.json()).toEqual({ status: 'ok', app: 'Paarrot API', version: '1.0.0' });
});
test('unknown endpoint answers 404 with the endpoint list', async () => {
const res = await fetch(`${base}/not-an-endpoint`);
expect(res.status).toBe(404);
const body = await res.json();
expect(body.error).toBe('Endpoint not found');
expect(body.availableEndpoints).toContain('GET /health');
});
+8
View File
@@ -0,0 +1,8 @@
import { defineConfig } from 'vitest/config';
export default defineConfig({
test: {
// The default pattern would also pick up the Electron spec in tests/e2e.
include: ['tests/unit/**/*.test.js'],
},
});