Commit Graph
14 Commits
Author SHA1 Message Date
Nariman Jelveh e6cedde732 Add resilient PDF thumbnails to GUI uploads (#3809)
* Add resilient PDF thumbnails to GUI uploads

* Keep GUI image thumbnails working with SDKs lacking the callback context

The desktop loads puter.js from js.puter.com by default, and the SDK
there predates the thumbnail callback context, so passing the PDF
generator made every image upload lose its thumbnail until the SDK
deploys. Fall back to the SDK's bundled image generator whenever the
running SDK passes no usable context, and cover both paths in the unit
and browser tests.

* Ignore preparation failures that land after an upload is cancelled

Cancelling during preparation already rejects the upload and fires the
abort callback. If the step that was in flight then fails, such as a
dropped directory that cannot be read, the error callback also fired and
the GUI showed an upload error for an upload the user had just
cancelled. Skip error reporting once preparation has been aborted.

* Give each PDF thumbnail worker four seconds

The per-PDF budget covers downloading PDF.js as well as rendering, and
the first PDF of a session on a slower connection ran out of time
before its assets had even loaded. Four seconds fits that first load on
ordinary connections while staying under the five-second batch cap, so
one stuck PDF still leaves the rest of the batch a chance.
2026-09-06 13:51:02 -07:00
Nariman Jelveh b55782f066 GUI: add npm start --server=<domain> to run the GUI against a remote backend (#3481)
- npm start --server=puter.com (or -- --server=...) skips the local backend
  and serves the bundled GUI locally, pointed at the remote server's API.
  Bare domains resolve to https://api.<domain>; full origins are used
  verbatim. gui_origin points at the remote origin so /whoarewe, login,
  anti-csrf, socket.io, and builtin apps hit the real backend (CORS-open).
- --extensions=<dir>[;<dir>...] bundles out-of-tree GUI extension
  directories (sugar for PUTER_GUI_EXTENSION_PATHS). Their imports resolve
  as if the files lived in src/gui/src/extensions, with the extension's own
  files taking precedence, and bare imports fall back to the repo-root
  node_modules.
- Fix the bit-rotted dev-server: Express 5 wildcard routes, pass gui()
  params (previously called with none), inject the service_script shim,
  load bundle.min.js + bundle.min.css in prod mode, serve /sdk, and
  properly await the webpack build (it previously resolved immediately).
2026-07-30 16:29:54 -07:00
Daniel Salazar 11e057557d fix: eslint autofixable errors (#2002)
Docker Image CI / build-and-push-image (push) Has been cancelled
Maintain Release Merge PR / update-release-pr (push) Has been cancelled
release-please / release-please (push) Has been cancelled
test / test (20.x) (push) Has been cancelled
test / test (22.x) (push) Has been cancelled
test / backend (node env, api-test) (22.x) (push) Has been cancelled
test / puterjs (browser env, playwright) (22.x) (push) Has been cancelled
test / puterjs (node env, vitest) (22.x) (push) Has been cancelled
2025-11-21 13:22:19 -08:00
jelveh 6a184d52b4 Update copyright notice dates in license headers 2025-01-06 15:18:22 -08:00
jelveh 4da9f525da delete components that aren't used 2024-12-30 20:39:51 -08:00
KernelDeimos b5535ae3ca dev: add dev2 env 2024-10-19 18:22:09 -04:00
KernelDeimos 4910838ab1 fix: webpack error reporting + unintentional whitespace changes 2024-09-03 14:44:51 -04:00
KernelDeimos ed7d6dcbfb fix: dist 2024-09-02 21:30:22 -04:00
KernelDeimos 4b8910169a fix: add env to EmitPlugin config 2024-08-30 15:24:01 -07:00
KernelDeimos 8ad435a0ea dev: bundle gui in dev 2024-08-30 15:24:01 -07:00
KernelDeimos 5b1924f312 chore: remove duplicate headers 2024-07-10 16:53:54 -04:00
Nariman Jelveh 00eabd7b10 remove duplicate and/or incorrect license headers 2024-07-09 13:50:20 -07:00
KernelDeimos bda4aed2e8 chore: add missing license headers 2024-07-09 04:10:33 -04:00
KernelDeimos a43cab0c93 refactor: move puter gui to workspace 2024-07-07 17:12:55 -04:00