Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@Omcodes23
Copy link

Fix: Enable godmode for dev-center to open worker files in editor

Fixes #2218

Problem

The DEV Center was unable to open worker files in the text editor. When users clicked on a worker's file path in the DEV Center, the editor would open with an empty file instead of displaying the worker's code.

Root Cause

The issue was identified in the file opening flow:

  1. workers.js uses puter.ui.launchApp() with the file_paths parameter to open worker files in the editor
  2. ExecService.js requires the calling app to have godmode=1 permissions to use the file_paths parameter
  3. The dev-center app was configured with godmode=0 in the database

Without godmode permissions, the file_paths parameter was silently ignored, causing the editor to launch without any file loaded.

Solution

  • Added database migration 0044_dev-center-godmode.sql to set godmode=1 for the dev-center app
  • Updated SqliteDatabaseAccessService.js to include the new migration in the migration sequence

Changes

  • src/backend/src/services/database/sqlite_setup/0044_dev-center-godmode.sql (new file)
  • src/backend/src/services/database/SqliteDatabaseAccessService.js (modified)

Testing

After this change:

  • Users can click on a worker's file path in the DEV Center
  • The editor will open with the correct worker file content loaded
  • The file path parameter is properly processed due to godmode permissions

Fixes HeyPuter#2218

The DEV Center was unable to open worker files in the text editor because
it lacked godmode permissions. The file_paths parameter in puter.ui.launchApp
requires the calling app to have godmode=1 in order to work.

Changes:
- Added database migration 0044_dev-center-godmode.sql to set godmode=1
  for the dev-center app (uid: app-0b37f054-07d4-4627-8765-11bd23e889d4)
- Updated SqliteDatabaseAccessService.js to include the new migration

This allows DEV Center to successfully pass file paths when launching the
editor app, fixing the issue where clicking on a worker file path resulted
in an empty editor window.
@CLAassistant
Copy link

CLAassistant commented Dec 26, 2025

CLA assistant check
All committers have signed the CLA.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

DEV Center cannot open the worker file

2 participants