Skip to content

Conversation

@somebody1234
Copy link
Contributor

@somebody1234 somebody1234 commented Nov 18, 2025

Pull Request Description

  • Close https://github.com/enso-org/cloud-v2/issues/2197
    • Add the ability to run a project
  • Also add "Asset Preview" sidebar tab:
    • For projects, shows content of Main.enso
    • For text files, shows text content
    • For media (images, videos, audio) uses img, video, and audio respectively.
      • However, this functionality is hidden behind a button click because some media (e.g. videos) may be very large, so we do not want to unconditionally download media

Important Notes

None

Checklist

Please ensure that the following checklist has been satisfied before submitting the PR:

  • The documentation has been updated, if necessary.
  • Screenshots/screencasts have been attached, if there are any visual changes. For interactive or animated visual changes, a screencast is preferred.
  • All code follows the
    Scala,
    Java,
    TypeScript,
    and
    Rust
    style guides. In case you are using a language not listed above, follow the Rust style guide.
  • Unit tests have been written where possible.
  • If meaningful changes were made to logic or tests affecting Enso Cloud integration in the libraries,
    or the Snowflake database integration, a run of the Extra Tests has been scheduled.
    • If applicable, it is suggested to paste a link to a successful run of the Extra Tests.

@PabloBuchu
Copy link
Contributor

  1. Ok so electron build properly against my env but the headless seems still be calling production. Always ends up with NotAuthorizedError: Please log in first despite ~/.enso/credentials file. So I guess its calling prod api and gets 401
  2. On prod. Authenticated properly. still got executable not found. we sure this is set properly for macos?
const directories: readonly (readonly string[])[] = [
    // Check executable path
    ...(executablePath ? [[executablePath, 'resources', 'enso', 'dist', '*', 'bin']] : []),
    // Check enso/dist/*/bin/enso
    [workDir, 'enso', 'dist', '*', 'bin'],
    // Check built-distribution/enso/dist/*/bin/enso
    [workDir, 'built-distribution', 'enso', 'dist', '*', 'bin'],
    // Check built-distribution/*/*/bin/enso
    [workDir, 'built-distribution', '*', '*', 'bin'],
 ]

the relative path is ./dist/ide/mac-arm64/Enso.app/Contents/MacOS/Enso but main is /Applications/Enso.app/Contents/MacOS

also is this is case sensitive?

case 'darwin':
    case 'linux':
    default: {
      return ['enso']
    }

@somebody1234 somebody1234 marked this pull request as ready for review December 2, 2025 13:33
@PabloBuchu
Copy link
Contributor

  1. When project is not in state suitable for run we throw
[ERROR] [2025-12-02T15:11:49.962Z] Could not open project 'FooBar': unknown error.
[ERROR] [2025-12-02T15:11:49.963Z] Error starting hybrid project 'FooBar': NetworkError: Could not open project 'FooBar': unknown error.
    at _RemoteBackend.throw (file:///Users/macbooki.org/projects/enso/dist/ide/mac-arm64/Enso.app/Contents/Resources/app.asar/index.mjs:88365:11)
    at _RemoteBackend.setHybridOpenInProgress (file:///Users/macbooki.org/projects/enso/dist/ide/mac-arm64/Enso.app/Contents/Resources/app.asar/index.mjs:92906:30)
    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
    at async runHybridProjectByUrl (file:///Users/macbooki.org/projects/enso/dist/ide/mac-arm64/Enso.app/Contents/Resources/app.asar/index.mjs:90080:35)
    at async App2.run (file:///Users/macbooki.org/projects/enso/dist/ide/mac-arm64/Enso.app/Contents/Resources/app.asar/index.mjs:118126:11)
    at async file:///Users/macbooki.org/projects/enso/dist/ide/mac-arm64/Enso.app/Contents/Resources/app.asar/index.mjs:118152:1 {
  status: 400
}

Is it something we can handle easily or should be put as improvement?

case 'audio':
case 'video': {
const blob = await response.blob()
const url = URL.createObjectURL(blob)
Copy link
Contributor

Choose a reason for hiding this comment

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

Could we create the blob outside query, next to a place when we set revoke?

}
})()

function checkExecutables(...segments: readonly string[]): Path | undefined {
Copy link
Contributor

Choose a reason for hiding this comment

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

This logic could be tested, with some mock for accessSync

Copy link
Contributor

@vitvakatu vitvakatu left a comment

Choose a reason for hiding this comment

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

I think these changes break electron app building in Bazel, but I don’t have a problem with that. I have a problem with leftover .env files in app/gui. If they are no longer used — they should be cleaned up. Also duplication of config.ts must be resolved, we can’t have two identical files.

Comment on lines 1 to 5
/**
* @file This file defines a global environemnt config that can be used throughout the app.
* It is included directly into index.html and kept as a separate built artifact, so that
* we can easily replace its contents in a separate build postprocessing step in `BUILD.bazel`.
*/
Copy link
Contributor

Choose a reason for hiding this comment

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

I have the same question.

@somebody1234
Copy link
Contributor Author

thanks for the comments, much appreciated.

@vitvakatu unfortunately i think config.ts is required in GUI:

  • we need to override the config in playwright tests - because common/ is pre-built, it means we cannot override environment variables in common itself (without rebuilding all of common before tests (and then rebulding after to avoid causing issues with actual prod builds))
    • this is because Vite replaces constants, which we do also need because they won't be present on end-users' machines
  • the config.ts are no longer identical, although still quite hacky, and cleaner/more elegant solutions would be greatly appreciated.
    • afaict, we can't have the same file serve both roles because, once built, import.meta.env are replaced - there is no way to override it.
    • process.env does not work as an override for web specifically either, as it is not present on web builds

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI: No changelog needed Do not require a changelog entry for this PR. g-electron GUI: electron application specific x-new-feature Type: new feature request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants