Skip to content

armgit / kwant

Public Imported from GitHub
0

Your own team of AI bots in one self-hosted binary: spaces, every account you have, handoffs, approvals and routines. Open-source, self-hosted alternative to Grok Bot, Claude Duet and OpenAI dots. Rust + React.

CI: native file drop check in the fresh-machine job (#498)

Oleksandr Ivanchenkoc188cab23a05
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 8b01df4c..51884256 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -108,6 +108,23 @@ jobs:
env:
PW_CORE: ${{ runner.temp }}/pw/node_modules/playwright-core/index.mjs
run: python3 scripts/fresh_machine_test.py --kwnt target/debug/kwnt --browser "$(command -v google-chrome || command -v chromium)"
+ # 0.8.2: files dropped from Finder or Explorer must reach the chat. Real files go in through Chromium's own
+ # drag path (CDP Input.dispatchDragEvent), on the same debug kwnt, which serves the frontend-dist artifact.
+ # A JS dispatchEvent can't catch this bug (0.8.0 shipped with it green). Any failed case fails the job.
+ - name: Native file drop (bot, room, #general, @mention, /idea, side pane, Import)
+ timeout-minutes: 5
+ env:
+ PW_CORE: ${{ runner.temp }}/pw/node_modules/playwright-core/index.mjs
+ run: |
+ export CHROMIUM="$(command -v google-chrome || command -v chromium)"
+ node frontend/e2e/native-drop.mjs target/debug/kwnt 9682 "$RUNNER_TEMP/native-drop"
+ - name: Native file drop results
+ if: failure()
+ uses: actions/upload-artifact@v4
+ with:
+ name: native-drop
+ path: ${{ runner.temp }}/native-drop
+ retention-days: 7
rust:
name: rust
diff --git a/frontend/e2e/README.md b/frontend/e2e/README.md
new file mode 100644
index 00000000..1d994620
--- /dev/null
+++ b/frontend/e2e/README.md
@@ -0,0 +1,3 @@
+# Browser checks
+
+- `native-drop.mjs`: drops real files on the chat through Chromium's own drag path, against a real `kwnt serve` (bot chat, room, #general, @mention, /idea refusal, side pane, Import dialog). Runs in CI's `fresh-machine` job. By hand: `cd frontend && npm run build && cargo build --bin kwnt && node e2e/native-drop.mjs ../target/debug/kwnt` (needs `playwright-core` and a Chromium; `CHROMIUM=/path/to/chrome` picks one, `DROP=synthetic BROWSER=webkit` runs the page-made drag events in WebKit).