Skip to content

Comments

Miika/put 500#2487

Open
miikakuisma wants to merge 6 commits intomainfrom
miika/put-500
Open

Miika/put 500#2487
miikakuisma wants to merge 6 commits intomainfrom
miika/put-500

Conversation

@miikakuisma
Copy link
Collaborator

@miikakuisma miikakuisma commented Feb 13, 2026

Add worker badge on worker JS files and list Worker URL in file properties modal.

Fixes #2429

@miikakuisma miikakuisma requested a review from jelveh February 13, 2026 08:37
Copy link
Collaborator

@ProgrammerIn-wonderland ProgrammerIn-wonderland left a comment

Choose a reason for hiding this comment

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

Mostly good! But there is one unnecessary call to puter.workers.list() that I'd rather have replaced with a stat

options.sort_container_after_append = (options.sort_container_after_append !== undefined ? options.sort_container_after_append : false);
const is_shared_with_me = (options.path !== `/${window.user.username}` && !options.path.startsWith(`/${window.user.username}/`));

const workers = await puter.workers.list();
Copy link
Collaborator

Choose a reason for hiding this comment

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

shouldn't use puter.workers.list() for one file, as it fetches all workers. You should ideally just use the same fsentry for this information (.workers array) but if you don't have access to that information and must fetch a singular file's workers, use await puter.fs.stat({path: "~/Desktop/New Worker.js", returnWorkers: true})

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.

Add workers attached info

2 participants