Skip to content

YC (S26) | Open Computer History | Continuously record your company computer work, map your workflows, help you find work worth automating, and power your agents' context

release app fix payment issue

Louis Beaumont88d877169794
diff --git a/.github/workflows/release-app.yml b/.github/workflows/release-app.yml
index 23be82935..1f6e38cfa 100644
--- a/.github/workflows/release-app.yml
+++ b/.github/workflows/release-app.yml
@@ -121,6 +121,19 @@ jobs:
runs-on: ${{ matrix.platform }}
steps:
+ - name: Enable Git long paths on Windows
+ if: matrix.tauri-args == '--target x86_64-pc-windows-msvc'
+ shell: powershell
+ run: |
+ Write-Host "Enabling git core.longpaths..."
+ git config --system core.longpaths true
+ # Verify the setting
+ $longpaths = git config --system --get core.longpaths
+ Write-Host "core.longpaths is set to: $longpaths"
+ if ($longpaths -ne "true") {
+ throw "Failed to enable git long paths"
+ }
+
- uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.commit_hash || github.ref }}
@@ -287,24 +300,30 @@ jobs:
# Create LLVM directory with proper permissions
$llvmPath = "C:\Program Files\LLVM"
if (!(Test-Path $llvmPath)) {
- sudo mkdir -Force $llvmPath
- sudo chmod 777 $llvmPath
+ New-Item -ItemType Directory -Force -Path $llvmPath | Out-Null
+ $acl = Get-Acl $llvmPath
+ $rule = New-Object System.Security.AccessControl.FileSystemAccessRule("Users","FullControl","Allow")
+ $acl.SetAccessRule($rule)
+ Set-Acl $llvmPath $acl
}
- # Download LLVM installer
- $installerPath = "$env:TEMP\LLVM-10.0.0-win64.exe"
- Invoke-WebRequest -Uri "https://github.com/llvm/llvm-project/releases/download/llvmorg-10.0.0/LLVM-10.0.0-win64.exe" -OutFile $installerPath
-
- # Run installer silently
- Start-Process -FilePath $installerPath -ArgumentList "/S /D=$llvmPath" -Wait
-
- # Clean up
+ # Download and install LLVM
+ $installerUrl = "https://github.com/llvm/llvm-project/releases/download/llvmorg-10.0.0/LLVM-10.0.0-win64.exe"
+ $installerPath = Join-Path $env:TEMP "LLVM-10.0.0-win64.exe"
+
+ Write-Host "Downloading LLVM installer..."
+ Invoke-WebRequest -Uri $installerUrl -OutFile $installerPath
+
+ Write-Host "Installing LLVM..."
+ Start-Process -FilePath $installerPath -ArgumentList "/S","/D=$llvmPath" -Wait -NoNewWindow
+
Remove-Item $installerPath -Force
-
+
# Verify installation
if (!(Test-Path "$llvmPath\bin\clang.exe")) {
- throw "LLVM installation failed"
+ throw "LLVM installation failed - clang.exe not found"
}
+ Write-Host "LLVM installation completed successfully"
- name: Install wget on Windows
if: matrix.tauri-args == '--target x86_64-pc-windows-msvc'
@@ -378,29 +397,32 @@ jobs:
if: matrix.tauri-args == '--target x86_64-pc-windows-msvc'
shell: powershell
run: |
- # Ensure target directory exists
+ # Create target directory
$mkl_dir = "screenpipe-app-tauri/src-tauri/mkl"
- mkdir -Force $mkl_dir
-
- # Copy from temp directory if it exists, otherwise try pip install
- $temp_mkl = "C:/temp_mkl_setup"
- if (Test-Path "$temp_mkl/*.dll") {
- Write-Host "found existing dlls in temp dir, copying..."
- Get-ChildItem -Path $temp_mkl -Recurse -Filter *.dll | Copy-Item -Destination $mkl_dir -Force
- } else {
- Write-Host "no existing dlls found, trying pip install..."
- mkdir omp
- python -m ensurepip --upgrade
- python -m pip install intel-openmp --target omp
- Get-ChildItem -Path ./omp -Recurse -Filter *.dll | Copy-Item -Destination $mkl_dir -Force
+ New-Item -ItemType Directory -Force -Path $mkl_dir | Out-Null
+
+ # Install and copy Intel OpenMP
+ python -m pip install --upgrade pip
+ $temp_dir = "temp_omp"
+ New-Item -ItemType Directory -Force -Path $temp_dir | Out-Null
+
+ Write-Host "Installing Intel OpenMP..."
+ python -m pip install intel-openmp --target $temp_dir
+
+ Write-Host "Copying DLL files..."
+ Get-ChildItem -Path $temp_dir -Recurse -Filter "*.dll" | ForEach-Object {
+ Write-Host "Copying $_"
+ Copy-Item $_.FullName -Destination $mkl_dir -Force
}
-
+
# Verify DLLs were copied
- $dll_count = (Get-ChildItem -Path $mkl_dir -Filter *.dll).Count
- Write-Host "found $dll_count dlls in target directory"
+ $dll_count = (Get-ChildItem -Path $mkl_dir -Filter "*.dll").Count
+ Write-Host "Found $dll_count DLLs in target directory"
if ($dll_count -eq 0) {
throw "No DLLs found in target directory!"
}
+
+ Remove-Item -Path $temp_dir -Recurse -Force
- name: Build
uses: tauri-apps/[email protected]
@@ -435,7 +457,7 @@ jobs:
with:
args: ${{ matrix.tauri-args }}
projectPath: "./screenpipe-app-tauri"
- tauriScript: bunx tauri -v
+ tauriScript: bunx tauri -vvv
retryAttempts: 3
# - name: Get version from Cargo.toml
@@ -472,6 +494,8 @@ jobs:
api-key: ${{ secrets.CN_API_KEY }}
path: ./screenpipe-app-tauri/src-tauri
+
+
retry-win:
needs: publish-tauri
if: ${{ always() && contains(needs.publish-tauri.result, 'failure') }}
diff --git a/screenpipe-app-tauri/components/pipe-store.tsx b/screenpipe-app-tauri/components/pipe-store.tsx
index 13cd3c09a..ca90d555b 100644
--- a/screenpipe-app-tauri/components/pipe-store.tsx
+++ b/screenpipe-app-tauri/components/pipe-store.tsx
@@ -1044,14 +1044,30 @@ const PipeStore: React.FC = () => {
const handlePipePurchase = async (pipe: Pipe, requiredCredits: number) => {
try {
- // Start a Supabase transaction using RPC
const { data, error } = await supabase.rpc("purchase_pipe", {
v_user_id: user?.id,
p_pipe_id: pipe.id,
p_credits_spent: requiredCredits,
});
- if (error) throw error;
+ if (error) {
+ console.error("purchase error:", error);
+ toast({
+ title: "purchase failed",
+ description: error.message,
+ variant: "destructive",
+ });
+ return false;
+ }
+
+ if (!data) {
+ toast({
+ title: "purchase failed",
+ description: "unknown error occurred",
+ variant: "destructive",
+ });
+ return false;
+ }
// Update local user credits state
if (user?.credits) {
@@ -1064,10 +1080,11 @@ const PipeStore: React.FC = () => {
});
return true;
+
} catch (error) {
console.error("purchase failed:", error);
toast({
- title: "purchase failed",
+ title: "purchase failed",
description: "please try again or contact support",
variant: "destructive",
});
diff --git a/screenpipe-app-tauri/src-tauri/Cargo.toml b/screenpipe-app-tauri/src-tauri/Cargo.toml
index c30ab3327..6b80b0ef6 100644
--- a/screenpipe-app-tauri/src-tauri/Cargo.toml
+++ b/screenpipe-app-tauri/src-tauri/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "screenpipe-app"
-version = "0.19.3"
+version = "0.19.4"
description = ""
authors = ["you"]
license = ""
diff --git a/screenpipe-app-tauri/src-tauri/src/commands.rs b/screenpipe-app-tauri/src-tauri/src/commands.rs
index 32c6b1d21..da7f7288d 100644
--- a/screenpipe-app-tauri/src-tauri/src/commands.rs
+++ b/screenpipe-app-tauri/src-tauri/src/commands.rs
@@ -2,7 +2,7 @@ use crate::get_data_dir;
use serde::Serialize;
use serde_json::Value;
use tauri::Manager;
-use tracing::info;
+use tracing::{info, error};
#[tauri::command]
pub fn set_tray_unhealth_icon(app_handle: tauri::AppHandle<tauri::Wry>) {
@@ -288,12 +288,13 @@ pub async fn open_pipe_window(
) -> Result<(), String> {
// Close existing window if it exists
if let Some(existing_window) = app_handle.get_webview_window(&title) {
- let _ = existing_window.destroy();
- // Give it a moment to properly close
+ if let Err(e) = existing_window.destroy() {
+ error!("failed to destroy existing window: {}", e);
+ }
tokio::time::sleep(tokio::time::Duration::from_millis(100)).await;
}
- let window = tauri::WebviewWindowBuilder::new(
+ let window = match tauri::WebviewWindowBuilder::new(
&app_handle,
&title,
tauri::WebviewUrl::External(format!("http://localhost:{}", port).parse().unwrap()),
@@ -302,15 +303,26 @@ pub async fn open_pipe_window(
.inner_size(800.0, 600.0)
.always_on_top(true)
.visible_on_all_workspaces(true)
- .build()
- .map_err(|e| e.to_string())?;
+ .build() {
+ Ok(window) => window,
+ Err(e) => {
+ error!("failed to create window: {}", e);
+ return Err(format!("failed to create window: {}", e));
+ }
+ };
- // Force focus and show
- let _ = window.set_focus();
- let _ = window.show();
+ // Only try to manipulate window if creation succeeded
+ if let Err(e) = window.set_focus() {
+ error!("failed to set window focus: {}", e);
+ }
+ if let Err(e) = window.show() {
+ error!("failed to show window: {}", e);
+ }
#[cfg(target_os = "macos")]
- let _ = app_handle.set_activation_policy(tauri::ActivationPolicy::Accessory);
+ if let Err(e) = app_handle.set_activation_policy(tauri::ActivationPolicy::Accessory) {
+ error!("failed to set activation policy: {}", e);
+ }
Ok(())
}