Skip to content

Commit ed5ef1f

Browse files
committed
feat: implement input injection module with IPC handlers and permission management
- Add input injection functionality using @nut-tree-fork/nut-js for mouse and keyboard control. - Create IPC handlers for managing input injection, including enabling, disabling, and emergency stop. - Implement permission management for accessibility and screen capture on macOS. - Develop a React hook for managing input injection state and events in the renderer. - Ensure proper handling of screen size updates and batch event injection for performance.
1 parent e059992 commit ed5ef1f

25 files changed

Lines changed: 5115 additions & 26 deletions

.claude/settings.local.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,11 @@
161161
"Bash(pnpm --filter web test)",
162162
"Bash(pnpm --filter web lint:*)",
163163
"Bash(xargs -I {} bash -c 'echo \"\"=== {} ===\"\" && wc -l {}')",
164-
"Bash(node scripts/generate-pwa-icons.mjs:*)"
164+
"Bash(node scripts/generate-pwa-icons.mjs:*)",
165+
"Bash(npm search:*)",
166+
"Bash(npm view:*)",
167+
"Bash(pnpm --filter @pairux/desktop test -- --run)",
168+
"Bash(pnpm --filter @pairux/web test -- --run)"
165169
],
166170
"deny": ["Bash(npm *)", "Bash(npx *)"],
167171
"additionalDirectories": [

.githooks/pre-commit

Lines changed: 23 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -48,28 +48,43 @@ if [ -z "$STAGED_FILES" ]; then
4848
exit 0
4949
fi
5050

51-
# 0. Format staged files (auto-fix)
51+
# 0. Format and fix staged files (auto-fix)
5252
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
53-
echo "📋 Formatting staged files"
53+
echo "📋 Formatting and fixing staged files"
5454
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
5555

56-
# Get staged files that Prettier can format
56+
# Get staged files that can be processed
57+
LINT_FILES=$(echo "$STAGED_FILES" | grep -E '\.(js|jsx|ts|tsx)$' || true)
5758
PRETTIER_FILES=$(echo "$STAGED_FILES" | grep -E '\.(js|jsx|ts|tsx|json|md|css|scss|html|yaml|yml)$' || true)
5859

60+
# Run ESLint --fix on JS/TS files
61+
if [ -n "$LINT_FILES" ]; then
62+
echo "Running ESLint --fix on staged files..."
63+
echo "$LINT_FILES" | xargs pnpm eslint --fix || true
64+
65+
# Re-stage the fixed files
66+
echo "$LINT_FILES" | xargs git add
67+
68+
echo "${GREEN}✅ ESLint fix complete${NC}"
69+
else
70+
echo "No lintable files staged."
71+
fi
72+
73+
# Run Prettier on formattable files
5974
if [ -n "$PRETTIER_FILES" ]; then
60-
# Format the files
75+
echo "Running Prettier on staged files..."
6176
echo "$PRETTIER_FILES" | xargs pnpm prettier --write
62-
77+
6378
# Re-stage the formatted files
6479
echo "$PRETTIER_FILES" | xargs git add
65-
66-
echo "${GREEN}Formatting complete${NC}"
80+
81+
echo "${GREEN}Prettier formatting complete${NC}"
6782
else
6883
echo "No formattable files staged."
6984
fi
7085
echo ""
7186

72-
# 1. Linting
87+
# 1. Linting (verify all issues are fixed)
7388
run_check "ESLint" "pnpm lint"
7489

7590
# 2. Run tests

apps/desktop/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
"clean": "rm -rf dist out node_modules"
2121
},
2222
"dependencies": {
23+
"@nut-tree-fork/nut-js": "^4.2.6",
2324
"@radix-ui/react-label": "^2.1.8",
2425
"@radix-ui/react-slot": "^1.2.4",
2526
"@supabase/supabase-js": "^2.47.0",

apps/desktop/public/favicon.svg

Lines changed: 1 addition & 0 deletions
Loading

apps/desktop/public/logo.svg

Lines changed: 1 addition & 0 deletions
Loading

0 commit comments

Comments
 (0)