Skip to content

Conversation

Copy link

Copilot AI commented Jan 22, 2026

Description:

The README and other documentation listed conda as a development prerequisite, but the codebase has migrated to uv for Python environment management. Additionally, there was a path resolution bug where 7zr.exe was not being found during development setup, causing Git installation to fail with "7zr.exe is not recognized as an internal or external command" error. This PR also includes cleanup of obsolete .gitignore entries.

Changes Made:

  • Removed conda installation workflow from main README (Miniforge install, env creation, path lookup, parameterized script call)
  • Removed conda references from AGENTS.md development workflow documentation
  • Removed conda/miniforge instructions from WebUI/build/README.md
  • Replaced with single npm run fetch-build-resources command across all documentation
  • Updated section title from "Prepare Python Environment" to "Prepare Development Environment"
  • Removed reference to deprecated build-envs\online\prototype-python-env path
  • Clarified that uv and 7zr.exe download to build/resources/ directory
  • Fixed path resolution bug in GitService where 7zr.exe was expected at repo root instead of build/resources/
  • Refactored path resolution to use buildResourcesDir instance property in GenericServiceImpl class (follows same pattern as baseDir)
  • Updated GitService to use this.buildResourcesDir for consistent code organization
  • Removed obsolete 7zr.exe entry from .gitignore (now covered by existing /build/ entry)

Development workflow now:

cd WebUI
npm install
npm run fetch-build-resources  # Downloads uv.exe and 7zr.exe to build/resources/
npm run dev                     # Backends auto-install Python deps; Git setup works correctly

Path resolution fix:

// WebUI/electron/subprocesses/service.ts
// Added as instance property in GenericServiceImpl class
readonly buildResourcesDir = app.isPackaged
  ? aipgBaseDir()
  : path.join(aipgBaseDir(), 'build', 'resources')

// GitService now correctly locates 7zr.exe using instance property
readonly unzipExePath = path.resolve(path.join(this.buildResourcesDir, '7zr.exe'))
// → <repo_root>/build/resources/7zr.exe in dev mode

Testing Done:

  • Verified fetch-build-resources script downloads both uv.exe and 7zr.exe to correct location (build/resources/)
  • Confirmed path resolution matches download location in development mode for both executables
  • Validated backend startup flow uses installBackend() which runs uv sync automatically
  • Confirmed prepare-python-env is only required for installer builds, not development
  • Verified GitService can now correctly locate and execute 7zr.exe during setup
  • Verified all conda references removed from documentation (README.md, AGENTS.md, WebUI/build/README.md)
  • Confirmed .gitignore cleanup does not affect build process (7zr.exe in build/resources/ is properly ignored by /build/ entry)
  • CodeQL security analysis completed with 0 alerts
  • Linting passes with no issues

Screenshots:

N/A - Documentation and code refactoring changes

Checklist:

  • I have tested the changes locally.
  • I have self-reviewed the code changes.
  • I have updated the documentation, if necessary.
Original prompt

This section details on the original issue you should resolve

<issue_title>Update Quickstart instructions for local dev in README</issue_title>
<issue_description>The readme lists 'conda', but conda is actually not needed at all anymore for development. Current instructions are roughly:

cd ./WebUi/
npm install
npm run fetch-resources
cp ../build/resources/uv.exe ../uv.exe
npm run dev

(exact paths and actual commands/scripts names are most probably slightly wrong here)

Files should be placed in the correct location?

  • manual copy uv.exe to repo root?
  • but it gets downloaded to build/resources/uv.exe?

A different path is used whether the app is packaged or not (app.isPackaged). For uv with npm run dev, it still needs to be configured correctly. It's probably best to adjust the script to take the exe directly from build/resources/ instead.</issue_description>

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Remove conda-based setup instructions and replace with simplified
uv-based workflow. The fetch-build-resources script now handles
downloading uv.exe to the correct location (build/resources/) where
it's expected during development.

Co-authored-by: tnglemongrass <[email protected]>
Copilot AI changed the title [WIP] Update Quickstart instructions for local development in README Remove outdated conda setup from README development instructions Jan 22, 2026
Copilot AI requested a review from tnglemongrass January 22, 2026 12:11
```

You should now have a basic Python environment located at `build-envs\online\prototype-python-env`.
This will download `uv` (Python package manager) and other required tools to the `build/resources/` directory.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot
This is correct, but you still missed an important point. If set up like this, the following doesn't work as expected:

  • I open the App,
  • click "Install" on the "Ai Playground Setup" page in the "Ai Playground" row, and
  • Status: Failed
    And in the dev tools I can see:
    [ai-backend] Set up of service failed due to Error: Unzip error: Error: Command failed:
    and
    ai-playground\7zr.exe"' is not recognized as an internal or external command, operable program or batch file.
    I am sure it looks for 7zr in the wrong path. That is what was meant by that "adjust path" comment in the original ticket.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in commit 24514e1. The GitService was looking for 7zr.exe in the repo root, but fetch-build-resources downloads it to build/resources/7zr.exe. I've added a buildResources() helper function (same pattern as in uv.ts) to correctly resolve the path to build/resources/7zr.exe in development mode and to the packaged resources path in production.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Iirc there is some entry in the .gitignore, which should no longer be needed now.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in commit a400b82. Removed the obsolete 7zr.exe entry from .gitignore since the file is now at build/resources/7zr.exe, which is already covered by the /build/ entry on line 7.

The GitService was looking for 7zr.exe in the repo root, but
fetch-build-resources downloads it to build/resources/7zr.exe.
Applied the same pattern as uv.ts to resolve paths correctly
in both development and packaged modes.

Fixes: GitService now uses buildResources() helper to locate
7zr.exe at build/resources/7zr.exe during development and at
the correct resources path when packaged.

Co-authored-by: tnglemongrass <[email protected]>
Copilot AI changed the title Remove outdated conda setup from README development instructions Update README development instructions and fix 7zr.exe path resolution Jan 22, 2026
Copilot AI requested a review from tnglemongrass January 22, 2026 17:49
```

### Prepare Python Environment
### Prepare Development Environment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you check for other places where conda and the likes are mentioned?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in commit 9ba814c. Removed conda references from AGENTS.md and WebUI/build/README.md. All documentation now reflects the simplified uv-based workflow.

readonly sha256 = 'f5764d546ff9a2511b50ec4e20424c5f4669de1695abc3fa4128e7f7d4a7b2cd'
readonly zipPath = path.resolve(path.join(this.baseDir, 'portable-git.7z.exe'))
readonly unzipExePath = path.resolve(path.join(this.baseDir, '7zr.exe'))
readonly unzipExePath = path.resolve(path.join(buildResources(), '7zr.exe'))

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please name this this.buildResourcesDir similar to this.buildDir, and use either what was there before, or the other path (when in during dev setup).

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in commit 9ba814c. Refactored buildResources() to be an instance property this.buildResourcesDir in the GenericServiceImpl class, following the same pattern as this.baseDir. This provides better consistency and code organization.

- Updated AGENTS.md to remove conda setup instructions
- Updated WebUI/build/README.md to remove miniforge/conda references
- Refactored buildResources() function to be an instance property
  buildResourcesDir in GenericServiceImpl class (similar to baseDir)
- GitService now uses this.buildResourcesDir instead of buildResources()

This provides better consistency and follows the existing pattern
where baseDir is an instance property.

Co-authored-by: tnglemongrass <[email protected]>
Copilot AI changed the title Update README development instructions and fix 7zr.exe path resolution Remove conda from development setup and fix 7zr.exe path resolution Jan 22, 2026
Copilot AI requested a review from tnglemongrass January 22, 2026 21:35
```

You should now have a basic Python environment located at `build-envs\online\prototype-python-env`.
This will download `uv` (Python package manager) and other required tools to the `build/resources/` directory.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Iirc there is some entry in the .gitignore, which should no longer be needed now.


# Prepare Python environment
npm run fetch-build-resources -- --conda_env_dir=<path_to_conda_env>
npm run prepare-build

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since you removed prepare-build (good), did you check:

  • What does it do?
  • Is prepare-build used anywhere else?
  • Is it still needed?

If not, it should be removed at least from the scripts section and probably other places as well.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

prepare-build is still needed and correctly used. It runs fetch-build-resources + prepare-python-env and is required for installer builds (documented in WebUI/build/README.md). The prepare-python-env script creates a Python environment that gets packaged with the installer. For development, only fetch-build-resources is needed (as documented in main README and AGENTS.md), which is why we removed it from those docs.

The 7zr.exe entry was for when the file was expected at repo root.
Since we fixed path resolution to use build/resources/7zr.exe,
this entry is no longer needed. The /build/ entry already covers
build/resources/ directory.

Co-authored-by: tnglemongrass <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update Quickstart instructions for local dev in README

2 participants