-
Notifications
You must be signed in to change notification settings - Fork 5
feat: Add dApp browser with wallet API injection for desktop app #89
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
132b762
feat: Add desktop dApp browser with separate window and wallet API in…
WiktorStarczewski 3f9198a
feat: Add desktop dApp confirmation modal for secure approval UI
WiktorStarczewski 4d9716c
docs: add desktop development section to CLAUDE.md
WiktorStarczewski af159b4
fix: desktop dApp connection and cleanup debug logging
WiktorStarczewski 6b60cbe
chore: add DMG layout configuration for macOS
WiktorStarczewski 0003088
ci: add GitHub Actions workflow for desktop builds
WiktorStarczewski 3628e3a
fix: address CodeQL security warnings
WiktorStarczewski a7cc202
ci: add explicit permissions to all workflows
WiktorStarczewski File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,134 @@ | ||
| name: Build Desktop Apps | ||
|
|
||
| on: | ||
| # Build on version tags (e.g., v1.0.0, v1.2.3) | ||
| push: | ||
| tags: | ||
| - 'v*' | ||
|
|
||
| # Also allow manual trigger from Actions tab | ||
| workflow_dispatch: | ||
|
|
||
| # Minimal permissions for security | ||
| permissions: | ||
| contents: read | ||
| actions: write # Required for artifact cleanup | ||
|
|
||
| # Cancel in-progress runs for the same branch | ||
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.ref }} | ||
| cancel-in-progress: true | ||
|
|
||
| jobs: | ||
| build: | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| include: | ||
| - platform: macos-latest | ||
| target: universal-apple-darwin | ||
| name: macOS | ||
| - platform: windows-latest | ||
| target: x86_64-pc-windows-msvc | ||
| name: Windows | ||
|
|
||
| runs-on: ${{ matrix.platform }} | ||
| name: Build (${{ matrix.name }}) | ||
|
|
||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Setup Node.js | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: 22 | ||
| cache: 'yarn' | ||
|
|
||
| - name: Install Rust | ||
| uses: dtolnay/rust-toolchain@stable | ||
| with: | ||
| targets: ${{ matrix.target }} | ||
|
|
||
| - name: Install dependencies (macOS) | ||
| if: matrix.platform == 'macos-latest' | ||
| run: | | ||
| rustup target add aarch64-apple-darwin x86_64-apple-darwin | ||
|
|
||
| - name: Install dependencies | ||
| run: yarn install --frozen-lockfile | ||
|
|
||
| - name: Build Tauri app | ||
| uses: tauri-apps/tauri-action@v0 | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| with: | ||
| args: ${{ matrix.platform == 'macos-latest' && '--target universal-apple-darwin' || '' }} | ||
|
|
||
| - name: Upload macOS artifacts | ||
| if: matrix.platform == 'macos-latest' | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: miden-wallet-macos-${{ github.ref_name }} | ||
| path: | | ||
| src-tauri/target/universal-apple-darwin/release/bundle/dmg/*.dmg | ||
| src-tauri/target/universal-apple-darwin/release/bundle/macos/*.app | ||
| retention-days: 30 | ||
| if-no-files-found: error | ||
|
|
||
| - name: Upload Windows artifacts | ||
| if: matrix.platform == 'windows-latest' | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: miden-wallet-windows-${{ github.ref_name }} | ||
| path: | | ||
| src-tauri/target/release/bundle/msi/*.msi | ||
| src-tauri/target/release/bundle/nsis/*.exe | ||
| retention-days: 30 | ||
| if-no-files-found: error | ||
|
|
||
| # Cleanup old artifacts, keep only last 10 builds per platform | ||
| cleanup: | ||
| runs-on: ubuntu-latest | ||
| needs: build | ||
| steps: | ||
| - name: Delete old artifacts | ||
| uses: actions/github-script@v7 | ||
| with: | ||
| script: | | ||
| const { data: artifacts } = await github.rest.actions.listArtifactsForRepo({ | ||
| owner: context.repo.owner, | ||
| repo: context.repo.repo, | ||
| per_page: 100 | ||
| }); | ||
|
|
||
| // Group by prefix (miden-wallet-macos or miden-wallet-windows) | ||
| const groups = {}; | ||
| for (const artifact of artifacts.artifacts) { | ||
| const prefix = artifact.name.startsWith('miden-wallet-macos') ? 'macos' | ||
| : artifact.name.startsWith('miden-wallet-windows') ? 'windows' | ||
| : null; | ||
| if (prefix) { | ||
| if (!groups[prefix]) groups[prefix] = []; | ||
| groups[prefix].push(artifact); | ||
| } | ||
| } | ||
|
|
||
| // For each group, keep only the 10 most recent | ||
| for (const [prefix, items] of Object.entries(groups)) { | ||
| // Sort by created_at descending | ||
| items.sort((a, b) => new Date(b.created_at) - new Date(a.created_at)); | ||
|
|
||
| // Delete everything after the first 10 | ||
| const toDelete = items.slice(10); | ||
| for (const artifact of toDelete) { | ||
| console.log(`Deleting old artifact: ${artifact.name} (${artifact.id})`); | ||
| await github.rest.actions.deleteArtifact({ | ||
| owner: context.repo.owner, | ||
| repo: context.repo.repo, | ||
| artifact_id: artifact.id | ||
| }); | ||
| } | ||
| } | ||
|
|
||
| console.log(`Cleanup complete. Kept 10 most recent builds per platform.`); | ||
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -8,6 +8,9 @@ on: | |
| - 'dev' | ||
| - 'next' | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| ci: | ||
| uses: ./.github/workflows/ci.yml | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,6 +5,9 @@ on: | |
| branches: | ||
| - 'main' | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| ci: | ||
| uses: ./.github/workflows/ci.yml | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.