Skip to content

Commit fbae819

Browse files
SakShamJain8FrooodleEthanHealy01reecebrowne
authored
Fix/desktop open with tool access (Stirling-Tools#6056)
## Description Fixes Stirling-Tools#6029 - Additional selection in windows client no longer necessary ## Problem When opening PDF files in the Windows desktop client using "Open with", the file displays properly but users had to manually select it again in the workbench before any PDF tools (merge, compress, crop, compare, etc.) become functional. ## Root Cause Files opened via "Open with" were added to FileContext but **not selected** (missing `selectFiles: true`). Without selection, the file wasn't marked as active, preventing tool access. Additionally, `AppInitializer` was placed outside `ToolWorkflowProvider`, causing a context error. ## Solution ### Changes: 1. **frontend/src/desktop/hooks/useAppInitialization.ts** - Added `{ selectFiles: true }` when calling `addFiles()` - Files now immediately marked as active in FileContext 2. **frontend/src/core/components/AppProviders.tsx** - Moved `AppInitializer` inside `ToolWorkflowProvider` - Ensures context availability for initialization ## Testing - Open PDF via "Open with" on Windows - File now immediately usable with all tools - No manual reselection needed ## Screenshot <img width="1920" height="1080" alt="Screenshot (3)" src="https://github.com/user-attachments/assets/9ceacadf-eb12-42a6-86f9-bca6188bfbb9" /> --------- Co-authored-by: Anthony Stirling <77850077+Frooodle@users.noreply.github.com> Co-authored-by: EthanHealy01 <80844253+EthanHealy01@users.noreply.github.com> Co-authored-by: Reece Browne <74901996+reecebrowne@users.noreply.github.com>
1 parent ebab5a4 commit fbae819

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

frontend/src/desktop/hooks/useAppInitialization.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ export function useAppInitialization(): void {
5959
const filesArray = loadedFiles.map(entry => entry.file);
6060
const quickKeyToPath = new Map(loadedFiles.map(entry => [entry.quickKey, entry.filePath]));
6161

62-
const addedFiles = await addFiles(filesArray);
62+
const addedFiles = await addFiles(filesArray, { selectFiles: true });
6363
addedFiles.forEach(file => {
6464
const localFilePath = quickKeyToPath.get(file.quickKey);
6565
if (localFilePath) {

0 commit comments

Comments
 (0)