Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
4aa19ab
Initial plan
Copilot Sep 5, 2025
2e791a1
Initial plan: Implement hardened IPC communication system
Copilot Sep 5, 2025
c73ea7e
Implement complete hardened IPC communication system
Copilot Sep 5, 2025
4452b58
fix: Align code style with repository standards - Part 1 (Constants, …
Copilot Sep 5, 2025
4175e8b
feat(ipc): hardened sessioned JSON-RPC IPC (WebSocket + NamedPipe) (#1)
Copilot Sep 5, 2025
61a9563
Add IPC support and navigation state management
primeinc Sep 5, 2025
29e6a93
Implement IPC framework and enhance group action logic
primeinc Sep 6, 2025
cf2713b
Merge copilot/fix-2641895d (working IPC implementation) into feature/…
primeinc Sep 6, 2025
022672b
Enhance IPC testing and improve error handling
primeinc Sep 6, 2025
154ba9f
Implement ephemeral port and token management
primeinc Sep 6, 2025
d64fe04
Refactor IPC token handling and rendezvous file management
primeinc Sep 6, 2025
1039fa4
Enhance IPC support with multi-client and named pipes
primeinc Sep 6, 2025
f5ed262
Refactor IPC testing and communication services
primeinc Sep 6, 2025
08b870c
Fix GitHub workflows for fork
primeinc Sep 6, 2025
00fbe1b
Fix XAML formatting in SettingsDialog and IpcPage
primeinc Sep 6, 2025
fd5749b
Update SDK version to 9 in global.json
primeinc Sep 6, 2025
aa1411b
Merge branch 'feature/ipc-hardened-final' of https://github.com/prime…
primeinc Sep 7, 2025
44c865d
Refactor code for readability and clarity
primeinc Sep 7, 2025
dbc3381
Fix fork CI to only run on PRs targeting main, not on pushes
primeinc Sep 7, 2025
02e4975
Fix fork CI build by using proper MSBuild restore
primeinc Sep 7, 2025
e25ce52
Revert ci.yml to upstream - fork should only use ci-fork.yml
primeinc Sep 7, 2025
8a095e9
Fix fork CI - implement proper test job with packaging and Interactio…
primeinc Sep 7, 2025
c7d3b02
Add auto-fix XAML formatting to fork CI with write permissions
primeinc Sep 7, 2025
ed6d04f
Enhance error handling and improve path validation
primeinc Sep 7, 2025
5ac6e35
Refactor WebSocketClient and improve error handling
primeinc Sep 7, 2025
09a5e43
Optimize communication queues and path validation
primeinc Sep 7, 2025
abb3b7a
Add configurable polling interval and improve cache logic
primeinc Sep 7, 2025
fd24e11
Add tests for handling invalid paths in IPC client
primeinc Sep 7, 2025
f26f8dc
Update SDK version and improve file handling logic
primeinc Sep 7, 2025
4e2e21a
Enhance IPC subsystem and update documentation
primeinc Sep 7, 2025
5c33d68
Refactor and optimize IPC and path validation logic
primeinc Sep 8, 2025
4ec9993
Add selection change handling and clean up code
primeinc Sep 8, 2025
0c1dd0e
Optimize regex patterns and improve resource management
primeinc Sep 8, 2025
41ccf49
Update ci-fork.yml for concurrency and permissions
primeinc Sep 8, 2025
48a169e
Delete .claude/settings.local.json
primeinc Sep 8, 2025
0ccbb76
Update command set and improve path validation
primeinc Sep 8, 2025
0a993b5
Enhance error handling and code maintainability
primeinc Sep 8, 2025
dc1d81d
Refactor IPC action handling and enhance testing
primeinc Sep 8, 2025
c6ecc1e
Enhance error handling and improve UI feedback
primeinc Sep 8, 2025
807c3e6
Update SDK, refactor IPC handling, and clean up code
primeinc Sep 8, 2025
9b8a480
Add overflow protection and improve documentation
primeinc Sep 8, 2025
389b2d1
Enhance security and improve focus handling
primeinc Sep 8, 2025
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
23 changes: 23 additions & 0 deletions .claude/settings.local.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"permissions": {
"allow": [
"mcp__sequential-thinking__sequentialthinking",
"Bash(git add:*)",
"Bash(git push:*)",
"mcp__context7__resolve-library-id",
"mcp__context7__get-library-docs",
"Bash(pip install:*)",
"Bash(python scripts/ipc_test.py:*)",
"Bash(find:*)",
"Bash(python:*)",
"Bash(powershell:*)",
"Bash(gh pr list:*)",
"Bash(gh pr checks:*)",
"Bash(gh run view:*)",
"Bash(gh api graphql:*)",
"Bash(gh pr view:*)"
],
"deny": [],
"ask": []
}
}
66 changes: 66 additions & 0 deletions .github/workflows/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# GitHub Workflows for Fork

## Available Workflows

### 1. `ci-fork.yml` (Simplified CI)
- **Purpose**: Basic build validation without requiring secrets
- **Triggers**: Push to main/feature/fix branches, Pull Requests
- **What it does**:
- Builds the solution in Debug and Release modes
- Runs tests (continues on error)
- Uploads build artifacts
- Checks code formatting
- Runs code analysis

### 2. `ci.yml` (Original CI)
- **Purpose**: Full CI with all checks
- **Note**: Modified to work with `primeinc` fork
- **Requirements**: Some jobs may need secrets configured

## Setting Up Secrets (Optional)

If you want to run the full CI/CD workflows, you'll need to configure these secrets in your repository settings:

### For Sideload builds:
- `SIDELOAD_PUBLISHER_SECRET`
- `BING_MAPS_SECRET`
- `SENTRY_SECRET`
- `GH_OAUTH_CLIENT_ID`

### For Store builds:
- `STORE_PUBLISHER_SECRET`
- `AZURE_TENANT_ID`
- `AZURE_CLIENT_ID`
- `AZURE_CLIENT_SECRET`

### For Code Signing:
- `SIGNING_ACCOUNT_NAME`
- `SIGNING_PROFILE_NAME`

## Disabling Workflows

If you don't need certain workflows, you can disable them:

1. Go to Actions tab in your repository
2. Click on the workflow you want to disable
3. Click "..." menu → "Disable workflow"

## Recommended Setup for Fork

1. Use `ci-fork.yml` for basic build validation
2. Disable CD workflows unless you plan to deploy
3. Disable `format-xaml.yml` unless you have the bot configured

## Troubleshooting

### Build Fails with Missing Secrets
- Use `ci-fork.yml` instead which doesn't require secrets
- Or add placeholder values for the required secrets

### Tests Fail
- Tests are set to `continue-on-error: true` in fork CI
- Check test output for actual issues

### Workflow Not Running
- Check if the branch/path triggers match your changes
- Ensure workflows are enabled in your fork's Actions settings
221 changes: 221 additions & 0 deletions .github/workflows/ci-fork.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,221 @@
# Simplified CI for Fork
# This workflow runs basic build validation without requiring secrets

name: Fork CI

on:
pull_request:
branches:
- main
paths-ignore:
- 'assets/**'
- 'builds/**'
- 'docs/**'
- '*.md'

# Auto-cancel previous runs when a new commit is pushed to the same PR
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

permissions:
contents: write # Allow pushing formatting fixes
pull-requests: write # Allow PR comments

env:
SOLUTION_PATH: '${{ github.workspace }}\Files.slnx'
PACKAGE_PROJECT_PATH: '${{ github.workspace }}\src\Files.App (Package)\Files.Package.wapproj'
PACKAGE_PROJECT_DIR: '${{ github.workspace }}\src\Files.App (Package)'
APPX_PACKAGE_DIR: '${{ github.workspace }}\artifacts\AppxPackages'
APPX_SELFSIGNED_CERT_PATH: '${{ github.workspace }}\.github\workflows\FilesApp_SelfSigned.pfx'
ARTIFACTS_STAGING_DIR: '${{ github.workspace }}\artifacts'
AUTOMATED_TESTS_ASSEMBLY_DIR: '${{ github.workspace }}\artifacts\TestsAssembly'
AUTOMATED_TESTS_PROJECT_DIR: '${{ github.workspace }}\tests\Files.InteractionTests'
AUTOMATED_TESTS_PROJECT_PATH: '${{ github.workspace }}\tests\Files.InteractionTests\Files.InteractionTests.csproj'
WINAPPDRIVER_EXE86_PATH: 'C:\Program Files (x86)\Windows Application Driver\WinAppDriver.exe'

jobs:
check-and-fix-formatting:
runs-on: windows-latest

steps:
- name: Checkout PR head
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
fetch-depth: 2
token: ${{ github.token }}

- name: Setup .NET
uses: actions/setup-dotnet@v4

- name: Install XamlStyler.Console
run: 'dotnet tool install --global XamlStyler.Console'

- name: Check and fix XAML formatting
id: format-xaml
shell: pwsh
run: |
$changedFiles = (git diff --diff-filter=d --name-only HEAD~1) -split "\n" | Where-Object {$_ -like "*.xaml"}
$hasChanges = $false
foreach ($file in $changedFiles)
{
Write-Host "Checking: $file"
xstyler -f $file
if (git diff --name-only $file) {
$hasChanges = $true
Write-Host " ✓ Fixed formatting"
}
}
if ($hasChanges) {
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add *.xaml
git commit -m "Auto-fix XAML formatting [skip ci]"
git push
echo "::notice::XAML files were auto-formatted and committed"
} else {
echo "::notice::All XAML files are properly formatted"
}

build:
needs: [check-and-fix-formatting]
runs-on: windows-latest

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'

- name: Setup MSBuild
uses: microsoft/setup-msbuild@v2
- name: Setup NuGet
uses: NuGet/setup-nuget@v2

- name: Restore Files
shell: pwsh
run: |
msbuild $env:SOLUTION_PATH `
-t:Restore `
-p:Platform=x64 `
-p:Configuration=Release `
-p:PublishReadyToRun=true `
-v:quiet

- name: Create self signed cert
run: ./.github/scripts/Generate-SelfCertPfx.ps1 -Destination "$env:APPX_SELFSIGNED_CERT_PATH"

- name: Build & package Files
run: |
msbuild `
$env:PACKAGE_PROJECT_PATH `
-t:Build `
-t:_GenerateAppxPackage `
-p:Configuration=Release `
-p:Platform=x64 `
-p:AppxBundlePlatforms=x64 `
-p:AppxBundle=Always `
-p:UapAppxPackageBuildMode=SideloadOnly `
-p:AppxPackageDir=$env:APPX_PACKAGE_DIR `
-p:AppxPackageSigningEnabled=true `
-p:PackageCertificateKeyFile=$env:APPX_SELFSIGNED_CERT_PATH `
-p:PackageCertificatePassword="" `
-p:PackageCertificateThumbprint="" `
-v:quiet

- name: Build interaction tests
run: |
msbuild $env:AUTOMATED_TESTS_PROJECT_PATH `
-t:Build `
-p:Configuration=Release `
-p:Platform=x64 `
-v:quiet

- name: Copy tests to artifacts
shell: pwsh
run: |
Copy-Item `
-Path "$env:AUTOMATED_TESTS_PROJECT_DIR\bin" `
-Destination "$env:AUTOMATED_TESTS_ASSEMBLY_DIR" -Recurse

- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: 'Fork-Package-Release-x64'
path: ${{ env.ARTIFACTS_STAGING_DIR }}
retention-days: 7

test:
needs: [build]
runs-on: windows-latest

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'

- name: Download artifacts
uses: actions/download-artifact@v4
with:
name: 'Fork-Package-Release-x64'
path: ${{ env.ARTIFACTS_STAGING_DIR }}

- name: Install Files
shell: powershell
run: |
Set-Location "$env:APPX_PACKAGE_DIR"
$AppxPackageBundleDir = Get-ChildItem -Filter Files.Package_*_Test -Name
Set-Location $AppxPackageBundleDir
./Install.ps1 -Force

- name: Set display resolution
run: Set-DisplayResolution -Width 1920 -Height 1080 -Force

- name: Start WinAppDriver
shell: pwsh
run: Start-Process -FilePath "$env:WINAPPDRIVER_EXE86_PATH"

- name: Run interaction tests
uses: nick-fields/retry@v3
with:
timeout_minutes: 15
max_attempts: 2
shell: pwsh
command: |
dotnet test `
$env:AUTOMATED_TESTS_ASSEMBLY_DIR\**\Files.InteractionTests.dll `
--logger "console;verbosity=detailed"

code-quality:
runs-on: windows-latest

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'

- name: Check Format
run: |
dotnet format --verify-no-changes --verbosity diagnostic
continue-on-error: true

- name: Run Code Analysis
run: |
dotnet build $env:SOLUTION_PATH `
/p:RunAnalyzersDuringBuild=true `
/p:Configuration=Release `
/p:Platform=x64 `
/p:TreatWarningsAsErrors=false
continue-on-error: true
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -409,3 +409,4 @@ FodyWeavers.xsd
*.sln.iml
.idea/
src/Files.App/Assets/FilesOpenDialog/Files.App.Launcher.exe.sha256
.claude/
Loading
Loading