Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
ea0a7d9
feat: whole-project harness coverage; fix Steam+L3 chord wipe, stale …
nickyyOO Aug 23, 2026
f4f68ba
feat: cover skins/color, SteamHidSource, mouse hook, fonts; opt-in du…
nickyyOO Aug 23, 2026
01d1e63
feat: cover tray helpers/menu/battery, watchers, key sound, cursor ct…
nickyyOO Aug 24, 2026
aabf60e
chore: restructure tests into per-module subdirs; pin sc settings in …
nickyyOO Aug 24, 2026
e2ebc50
test: drop duplicate smoke/L3-caps cases and dead patch line
nickyyOO Aug 24, 2026
af170fc
chore: pre-commit clean — ruff-format all ref-diff files, pyright-tig…
nickyyOO Aug 24, 2026
ab8a1eb
ci: pre-commit gate via mise; SHA-pin all actions in test workflow
nickyyOO Aug 24, 2026
672facb
ci: python 3.12 via mise (jdx/mise-action), pin uv 0.9.9
nickyyOO Aug 24, 2026
c44dd9c
fix: reapply drain_input_work extraction + pointer-copy fix lost in r…
nickyyOO Aug 24, 2026
da8ccf0
ci: fold pre-commit gate into tests.yml, drop duplicate test workflow…
nickyyOO Aug 24, 2026
86a51c7
refactor: rename test harness sc_runner/SceneRunner -> osk_sim/OskSim…
nickyyOO Aug 24, 2026
d4f60a7
ci: fetch full history so pre-commit can diff origin/main..HEAD
nickyyOO Aug 24, 2026
4340e35
style: ruff-format split-layout test line (CI gate)
nickyyOO Aug 24, 2026
2f9e091
ci: move pre-commit gate to its own ubuntu job
nickyyOO Aug 24, 2026
5b5a567
fix: hermetic skin-selection test (fake Steam themes, no live-install…
nickyyOO Aug 24, 2026
66823fa
ci: install runtime deps in lint job so basedpyright resolves imports
nickyyOO Aug 24, 2026
7503372
ci: fix requirements paths in lint job (root requirements.txt)
nickyyOO Aug 24, 2026
fe50bd7
ci: install cairo/girepository headers so PyGObject builds on the lin…
nickyyOO Aug 24, 2026
8e8c417
ci: run pre-commit job on windows too — matches the platform the code…
nickyyOO Aug 24, 2026
0f762fc
ci: silence reportMissingImports — missing deps are caught by the pyt…
nickyyOO Aug 24, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,10 @@ jobs:
# Full history so build.py can read the latest tag for the exe version.
fetch-depth: 0

- name: Set up mise
uses: jdx/mise-action@3c2e0cf82a5b2e5249f0d3635a4d83d0ae861518 # v4.2.5
# mise provides python 3.12 (see mise.toml); action caches installs.
- uses: jdx/mise-action@3c2e0cf82a5b2e5249f0d3635a4d83d0ae861518 # v4.2.5
with:
cache: true

- name: Install dependencies
run: python -m pip install --upgrade pip && python -m pip install --prefer-binary -r requirements.txt
Expand Down
18 changes: 18 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,30 @@ permissions:
pull-requests: write

jobs:
lint:
# Platform-neutral gates (ruff, ruff-format, basedpyright, hygiene)
# on the cheap runner; pytest keeps its own Windows job below.
name: pre-commit
runs-on: windows-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
# Full history so pre-commit can diff origin/main..HEAD.
fetch-depth: 0
- uses: jdx/mise-action@3c2e0cf82a5b2e5249f0d3635a4d83d0ae861518 # v4.2.5
- name: Pre-commit (origin/main..HEAD)
run: mise exec -- pre-commit run -av --from-ref origin/main --to-ref HEAD

tests:
name: tests
runs-on: windows-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
# Full history so pre-commit can diff origin/main..HEAD.
fetch-depth: 0
- name: Set up mise
id: setup-mise
uses: jdx/mise-action@3c2e0cf82a5b2e5249f0d3635a4d83d0ae861518 # v4.2.5
Expand Down
22 changes: 22 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,28 @@ Quitting from the tray never dispatches the `/0` restore; if the appid
changed another way, relaunch and open/close the keyboard once (or alt-tab)
to make Steam re-evaluate.

## Testing

The OSK has a headless UI-test harness (an input-pipeline simulator (OskSim)) that
drives the real input pipeline — controller frame parsing, the pad/click
state machines, hold-to-repeat cadence and the variant-row defer model —
with a virtual clock, recording every key/mouse injection at the OS
boundary. No display, Steam, or controller required:

```sh
cd windows
python -m pytest tests -q # whole suite (fast, headless)
python -m pytest tests/test_diacritic_hold.py -q # one layer-2 module
```

Layers: pure state-machine tests (`test_nav_cursor`), synthetic-input
injection through `ControllerManager` + the shared drain loop
(`tests/osk_sim.py`, used by `test_typing_flow`, `test_diacritic_hold`,
`test_pad_pointer`). CI runs the same suite on every push via
`.github/workflows/test.yml` (JUnit XML artifact). Known OS-level
injection quirks on real hardware (pynput/SendInput desync) are out of
scope for this harness — those need a physical device.

## Development Notes

This project was built through AI-assisted development: a human set the
Expand Down
151 changes: 68 additions & 83 deletions mise.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 2 additions & 3 deletions mise.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
[tools]
python = "3.12"
prek = "0.4.13"
ruff = "0.16.3"
"github:DetachHead/basedpyright" = "1.39.10"
uv = "0.9.9"
"pipx:pre-commit" = "4.6.2"
6 changes: 4 additions & 2 deletions pyrightconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
"root": "windows"
}
],
"include": ["windows"],
"include": [
"windows"
],
"reportMissingTypeStubs": "none",
"reportMissingParameterType": "none",
"reportUnknownMemberType": "none",
Expand All @@ -25,6 +27,6 @@
"reportUnusedVariable": "none",
"reportPrivateUsage": "none",
"reportUnusedImport": "none",
"reportMissingImports": "warning",
"reportMissingImports": "none",
"reportGeneralTypeIssues": "none"
}
3 changes: 2 additions & 1 deletion ruff.toml
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,5 @@ ignore = [

[lint.per-file-ignores]
# Tests may use bare asserts and fixtures with unused params.
"tests/*.py" = ["B017"]
# (** crosses the per-module subdirs: tests/<module>/<name>.py)
"tests/**/*.py" = ["B017"]
Loading