Skip to content

fix(puter.js): give assignment to defaultGUIOrigin precedence#2540

Draft
KernelDeimos wants to merge 1 commit intomainfrom
eric/262O1_default-gui-origin-override
Draft

fix(puter.js): give assignment to defaultGUIOrigin precedence#2540
KernelDeimos wants to merge 1 commit intomainfrom
eric/262O1_default-gui-origin-override

Conversation

@KernelDeimos
Copy link
Contributor

This change gives precedence to the assignment of defaultGUIOrigin over global values typically set by the bundler. This is helpful when testing puter.js behavior in third-party sites with a locally running instance of Puter, where this value can be incorrect.

In the following code snippet, the behavior before this change is the output "default gui origin? https://puter.com". After this change, the output is "default gui origin? https://example.com" as expected.

puter.defaultGUIOrigin = 'https://example.com';
console.log('default gui origin?', puter.defaultGUIOrigin);

This change gives precedence to the assignment of `defaultGUIOrigin`
over global values typically set by the bundler. This is helpful when
testing puter.js behavior in third-party sites with a locally running
instance of Puter, where this value can be incorrect.

In the following code snippet, the behavior before this change is the
output "default gui origin? https://puter.com". After this change, the
output is "default gui origin? https://example.com" as expected.

```javascript
puter.defaultGUIOrigin = 'https://example.com';
console.log('default gui origin?', puter.defaultGUIOrigin);
```
@KernelDeimos KernelDeimos marked this pull request as draft February 27, 2026 17:42
@KernelDeimos
Copy link
Contributor Author

Set this to draft to avoid confusion. This is an idea for a change we could make to make testing easier, and is a "fix" because I think the current behavior would be unexpected, but it is not a fix for a bug related to anything currently being investigated.

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.

1 participant