Commit Graph

5137 Commits

Author SHA1 Message Date
Daniel Salazar ec412eaff6 feat: cleanup cache invalidation and pull out keys to be easily used in other places that need the same cache (#2515)
fix: tests
2026-02-19 15:07:04 -08:00
Neal Shah 78a4ccb9a4 make image models case insensitive for backwards compatibility reasons (#2512)
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-backend (24.x) (push) Has been cancelled
test / API tests (node env, api-test) (24.x) (push) Has been cancelled
test / puterjs (node env, vitest) (24.x) (push) Has been cancelled
2026-02-18 17:01:50 -05:00
Miika Kuisma 1ec2aec66c Dashboard: Files tab fixes (#2508)
* Fixed issues where file list wasn't scrollable on mobile device, and tap'n'hold on file opened wrong context menu.

* Fixes text color of selected row
- [x] Fixes path navigation button transitions
- [x] Fixes path navigation button colors
- [x] Hide AppData folder
- [x] Hide hidden files
2026-02-18 12:19:46 -08:00
KernelDeimos cecb63b372 fix(backend): ESM/CJS interop is sad
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-backend (24.x) (push) Has been cancelled
test / API tests (node env, api-test) (24.x) (push) Has been cancelled
test / puterjs (node env, vitest) (24.x) (push) Has been cancelled
Fix ESM/CJS interop issue in unit tests with a hack that checks the
class name as a string instead of just doing an `instanceof` check. This
is assuming that the "rewriter must be a PermissionRewriter" error I'm
seeing on GitHub is because there are two different "copies" of
PermissionWriter due to ESM/CJS interop issues. If this is not the case,
then you're not reading this commit message on `main`; if this commit is
on `main` then that's exactly what went down.
2026-02-17 22:19:52 -05:00
KernelDeimos 05cc4ad477 dev(puter.js): add support to request app dir
Add support for requesting access to the root directory of an app's
associated subdomain.
2026-02-17 22:19:52 -05:00
KernelDeimos bfff2d20f9 dev(backend): add /auth/request-app-root-dir
Add the ability to request an app's root directory. A permission
rewriter is provided so that apps may refer to a permission when
requesting this access without knowing the path of the app's root
directory.
2026-02-17 22:19:52 -05:00
KernelDeimos d21ed31d67 dev(backend): add debug mode for 403 responses 2026-02-17 22:19:52 -05:00
Daniel Salazar 5df1ca88ca feat: sonnet-4.6 support (#2506)
* feat: sonnet-4.6 support

* fix: tests
2026-02-17 12:10:50 -08:00
Miika Kuisma 9d598f7965 Files tab for dashboard view (#2331)
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-backend (24.x) (push) Has been cancelled
test / API tests (node env, api-test) (24.x) (push) Has been cancelled
test / puterjs (node env, vitest) (24.x) (push) Has been cancelled
* Dashboard - Added files tab with basic folder and files listing.

* clearing out some linter errors

* Removed Public folder for now

* Added "modified" column
Subfolder are listed before the files

* Dashboard - files tab: context menu basics

* Dashboard - Files tab: subfolders can be opened. Items can be opened from more-menu or by double clicking on them

* Dashboard - Files tab: use UIContentMenu instead of custom menu for "more menu"

* Dashboard - Files tab: Delete implemented, Trash folder added

* refactored context menu rendering

* Implemented UIItem context menu functionalities
Added path

* Rename files and folders

* Rename fix

* tweaks and fixes

* WIP: Multiple selection, drag and drop, trash folder improvements

* clean

* Files handling improvements

* empty trash fix

* grid view

* grid view improvements

* update icons
context menu for multiple items shows file counts such as: Delete (9)

* Path navifation buttons

* better way to get user's directories

* Added icons for various file types

* Use puter.kv instead of window.user_preferences

* sorting and column resizing

* documentation of the functions

* Style update. Dashboard colors now as CSS variables

* refactored restoring from trash and emptying trash with proper callbacks & refreshing

* select documents folder by default
style tweaking

* Drag to select files and folders

* dark mode

* style tweaks

* removed some dead code..

* Keyboard shortcuts (copied from UIWindow - untested & in progress)

* Add drag-and-drop file upload support to Dashboard

Implement native file drag-and-drop from local filesystem to Dashboard:
- Add dragster handlers for main content area, sidebar folders, and folder rows
- Create uploadFiles() method with progress modal and directory refresh
- Add visual feedback CSS for drop zones (highlight on hover)
- Fix subfolder drop detection to prevent duplicate uploads
- Add callback support to unzipItem/untarItem for directory refresh

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* style tweaks

* Fix cut/paste functionality in Dashboard

The cut operation was storing clipboard items as plain path strings, but
window.move_clipboard_items() looks for .item DOM elements which don't
exist in Dashboard (it uses .row elements). Added a Dashboard-specific
moveClipboardItems() method that calls puter.fs.move() directly with UIDs,
and updated cut to store objects with path and uid like copy does.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Add mobile phone layout optimizations for Dashboard

- Add responsive CSS for screens ≤480px with two-row file list layout
- Wrap item-size and item-modified in item-metadata div for mobile grid
- Hide directories sidebar on mobile (use breadcrumbs for navigation)
- Reorganize header with breadcrumbs on top row, nav buttons below
- Add single-tap to open folders on touch devices
- Fix context menu "Open" action in Dashboard by adding onOpen callback
- Hide column headers on mobile since metadata is shown per-item

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Add CSS variables to Dashboard bento elements for dark mode support

Replace hardcoded color values with CSS custom properties throughout
the bento card components to enable proper dark mode theming. Adds new
variables for icon shadows, fancy headers, gradients, and usage bars
with appropriate values for both light and dark color schemes.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Add spacebar image preview feature to Dashboard Files

Pressing spacebar on a selected image file now shows a full-size preview
popover centered over the files container. Features include:
- Toggle behavior: press spacebar again to close
- Auto-switch: selecting another file updates the preview
- Click outside to dismiss
- Works in both grid and list view

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Add floating action bar for multi-file selection in Dashboard Files

When 2+ files are selected, a floating action bar appears above the footer
with quick access buttons for common operations:
- Download, Cut, Copy, Delete for normal files
- Restore and Delete Permanently for items in Trash

The bar slides up with a smooth animation and disappears when clicking
the background to deselect. Includes mobile-responsive styling with
icon-only buttons on smaller screens.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Add mobile select mode for multi-file selection in Dashboard Files

On mobile devices, users can now tap a select button in the path actions
to enter select mode. In this mode, tapping files toggles their selection
instead of opening them, with checkboxes appearing next to each item.
The floating action bar appears with 1+ selected items (vs 2+ on desktop)
and includes a Done button to exit select mode.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Center empty directory message in Dashboard Files

Replace row-based layout with centered flex positioning for the
"No files in this directory" message, improving visual presentation.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Fixed issue where clicking on files background created blue dot (drag rectangle selection bug)

* Image preview size tweak

* Add URL-based routing to Dashboard with hash fragments

Enable shareable/bookmarkable URLs for Dashboard tabs and file paths.
The URL hash reflects current location (e.g., #files/username/Documents,
#usage, #account). Browser back/forward navigation now works for folder
navigation, and direct URL entry loads the correct tab and path.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* fixing draggable styles

* drag clone fixes

* Add smart column resizing and filename truncation to Dashboard Files

- Add middle-truncation for filenames preserving extensions (e.g., "longfile…name.txt")
- Double-click column resize handles to auto-fit content width
- Reset saved column widths to defaults if they don't fit smaller screens
- Apply truncation to both list and grid views

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Separated dashboard styles into dashboard.css and loading it dynamically only when navigating to /dashboard

* Files and folders can be dropped over path items in order to move them. This is useful when you want to move items into parent folders.

* Use custom context menu component for item-more menu on mobile devices

* Created callback system to undo_last_action so that dashboard file list would always refresh after undo operation

* gray update

* hovering folder while dragging items opens the folder

* Fixed issue with hover-dropping

* Fixed chained drag-over-folder-and-hover system

* dark mode tweak

* - [x] Right clicking on background of an empty folder doesn't trigger context menu
- [x] Right clicking on path should keep path item active
- [x] Sidebar folder don't have context menu
- [x] Drag item should be opaque so I can see through it
- [x] Transition animation issue when hovering path action buttons
- [x] Double clicking on column resizer: add padding
- [x] Load dashboard.css before loading the page content
- [x] Mobile: opening menu, clicking outside menu should close it
- [x] Mobile: on smaller screen there should be still two columns
- [x] Mobile: file name truncation in grid view doesn't work

* Added missing badges

* WIP has_worker

* display worker icon on the .js files which are workers

* Display worker badge on worker files, hovering badge shows worker URL.
Worker URL added to file properties modal.

* disable "publish as website" from context menu for folders that are already published

* Loading spinner for Files

* tweaks and fixes

* Files clean loading spinner

* Files: worker URL in the properties modal is clickable link

* use custom tooltip to display worker URL

* refactored renderDirectory

* Fix Sidebar folder highlighting

* add Beta badge on Files tab

* Implemeting socket based item updating

* Put newly added items into the position where they would land when list is sorted

* restore from trash refresh fix

* Revert "Revert "Adds worker badge to .js files which have been registered as workers. Hovering badge shows popover with worker URL. File properties modal also shows clickable worker URL. (#2462)""

This reverts commit c2750f2ca1.

* worker in stat

* update puterjs and frontend code to support returnWorkers in stat

* Better way of handling worker info

* Fixed issue where right clicking on background opened two instances of a context menu

* Fixes issue where while renaming a file, double clicking on word opened the file

* fixes issue where while dragging multiple items the top-most item was transparent resulting blurry mess

* when opening a folder, update view instantly

* Improved drag-to-select items

* Added feature where typing selects matching file items
Fixed issue where keyboard listener for file list was active when context menu was open

* Fixed issues with File -> New in context menu
Fixes issue where files-selection-actions menu didn't disappear after deleting items

* Improved drag to select behavior
Improved drag items
Improved worker badge handling

* Cancel zone for dragging items (when spring-loading subfolders)

* context menu's submenu tweak

* Fixed issue where resizing window didn't work (when using "Open in New Window" from context menu)

* Disabled buttons on .files-selection-actions while drag-to-select is happening

* Fixes issue where creating new items using right-clicking re-rendered the directory view

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Co-authored-by: ProgrammerIn-wonderland <3838shah@gmail.com>
2026-02-17 10:50:08 -08:00
Neal Shah 4279cd92df WebDAV don't fetch thumbs or associated apps (#2505)
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-backend (24.x) (push) Has been cancelled
test / API tests (node env, api-test) (24.x) (push) Has been cancelled
test / puterjs (node env, vitest) (24.x) (push) Has been cancelled
2026-02-17 01:53:59 -05:00
Neal Shah 2fe4ed50c3 WebDAV don't fetch subdomains (#2504) 2026-02-17 01:47:43 -05:00
Neal Shah 562671e498 add extra permission check for granted apps (#2503) 2026-02-17 01:29:54 -05:00
Daniel Salazar 00befdc192 fix: allow b64 srings without mime type for app icons (#2502) 2026-02-16 19:28:44 -08:00
Daniel Salazar 44bb5953b4 fix: app icon origin (#2500)
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-backend (24.x) (push) Has been cancelled
test / API tests (node env, api-test) (24.x) (push) Has been cancelled
test / puterjs (node env, vitest) (24.x) (push) Has been cancelled
* fix: app icon origin

* fix: app icon origin size
2026-02-16 12:35:30 -08:00
Daniel Salazar 32682e73eb perf: improve app open time (#2490)
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-backend (24.x) (push) Has been cancelled
test / API tests (node env, api-test) (24.x) (push) Has been cancelled
test / puterjs (node env, vitest) (24.x) (push) Has been cancelled
2026-02-16 11:00:32 -08:00
KernelDeimos d9167744ef patch(puterfs): limit directory depth to 35
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-backend (24.x) (push) Has been cancelled
test / API tests (node env, api-test) (24.x) (push) Has been cancelled
test / puterjs (node env, vitest) (24.x) (push) Has been cancelled
This is a temporary measure while we fix a production issue.
2026-02-13 20:53:56 -05:00
Neal Shah c87506c7d8 workers ai realias - to dot (#2493) 2026-02-13 16:40:10 -08:00
Neal Shah 0f97653b4c fix stat options when stat(path, options) (#2492) 2026-02-13 15:38:56 -08:00
Neal Shah a211aa04bc add more alises (#2491) 2026-02-13 13:46:42 -08:00
Neal Shah f65ab05b40 Add workers AI image model support (#2489) 2026-02-13 13:07:50 -08:00
Jatin Sharma 9a47bf16da Bundle docs CDN assets locally for full offline support (#2473)
* docs: bundle CDN assets locally for full offline support

* fix

* fix

* fix

* revert accidental package-lock.json changes

---------

Co-authored-by: Reynaldi Chernando <reynaldichernando@gmail.com>
2026-02-14 02:14:46 +07:00
Daniel Salazar 809d375854 fix: don't stream back bytes for icons (#2486)
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-backend (24.x) (push) Has been cancelled
test / API tests (node env, api-test) (24.x) (push) Has been cancelled
test / puterjs (node env, vitest) (24.x) (push) Has been cancelled
* decrease global check alerts

* fix: don't stream back bytes for icons
2026-02-12 23:34:37 -08:00
Daniel Salazar 4136cb1d24 fix: do not await for puter icon write in db (#2485) 2026-02-12 22:43:23 -08:00
jelveh f1a8fdb5c8 Trigger in-app upgrade flow for app env
Handle upgrade flow when running in the app environment by calling await puter.ui.requestUpgrade() in driverCall_. Added app-specific branches in two places where usage/insufficient-funds were previously handled only for web (which showed a web dialog). This ensures the in-app UI is used for upgrade requests and awaits the result.
2026-02-12 21:45:03 -08:00
jelveh b4c58c4f5c Update UITabUsage.js 2026-02-12 18:09:52 -08:00
jelveh 286895ff66 Disable publish worker UI badge updates
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-backend (24.x) (push) Has been cancelled
test / API tests (node env, api-test) (24.x) (push) Has been cancelled
test / puterjs (node env, vitest) (24.x) (push) Has been cancelled
Temporarily comment out code in UIWindowPublishWorker that updates item UI after publishing: hiding the lines that show the item website badge, show per-item website-url badges, and set the data-website_url attribute. This prevents the publish worker from automatically modifying those DOM elements/attributes (kept commented for potential rollback or debugging).
2026-02-12 16:45:23 -08:00
Neal Shah a23f272fd2 add sandboxing by default in god mode created workers (#2481)
* add sandboxing by default in god mode workers

* closes #2481

* Update UIWindowPublishWorker.js

* Add sandbox option to worker publish UI

Add a collapsible 'Advanced' section with a 'Sandboxed' checkbox (checked by default) to UIWindowPublishWorker. On publish the code reads the checkbox state and builds createOptions ({ sandbox: true } or { sandbox: false }) and passes it to puter.workers.create as an argument so workers can be created in sandboxed or non-sandboxed mode. Small UI styling and markup for the details/summary block included.

---------

Co-authored-by: jelveh <nj@puter.com>
2026-02-12 16:06:40 -08:00
Daniel Salazar 354ac314a9 feat: subdomain error redirect (#2483) 2026-02-12 15:39:18 -08:00
Daniel Salazar 1292148b41 fix: app-icons protocol (#2480) 2026-02-12 13:47:23 -08:00
jelveh 9991d58613 Refine 'listing-rejected' email copy 2026-02-12 12:49:13 -08:00
Daniel Salazar 8a6d07ec1f fix: app icon again (#2478) 2026-02-12 12:07:03 -08:00
Daniel Salazar bfd8a4e16d fix: app icons saving (#2477) 2026-02-12 11:55:27 -08:00
Neal Shah 36b1499819 Ns/workers in stat attempt 2 (#2476)
* worker in stat

* add returnWorkers to stat

* workers in readdir
2026-02-12 10:45:22 -08:00
Neal Shah b209a94a80 dedup image models (#2475) 2026-02-12 10:39:23 -08:00
Het Savani 5cd731db3d feat(start-menu): add "Add to Desktop" option for all apps (#2386)
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-backend (24.x) (push) Has been cancelled
test / API tests (node env, api-test) (24.x) (push) Has been cancelled
test / puterjs (node env, vitest) (24.x) (push) Has been cancelled
2026-02-11 21:59:14 -08:00
Daniel Salazar 1d22ab5fb7 cleanup: remove thumbnail service for client side thumbnails (#2468)
* cleanup: remove thumbnail service for client side thumbnails

* fix: emit thumbnail create event and not just use raw data

* fix: broken test
2026-02-11 17:12:47 -08:00
jelveh cbab7a30e2 Emit user signup success event
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-backend (24.x) (push) Has been cancelled
test / API tests (node env, api-test) (24.x) (push) Has been cancelled
test / puterjs (node env, vitest) (24.x) (push) Has been cancelled
2026-02-11 16:53:31 -08:00
Daniel Salazar d7a3f61902 fix: false alarm from openrouter (#2470) 2026-02-11 16:49:42 -08:00
Neal Shah d024fdda0d Add cache tokens for grok 3 mini fast (#2469) 2026-02-11 16:49:12 -08:00
jelveh 292603af96 Merge branch 'main' of https://github.com/HeyPuter/puter 2026-02-11 15:14:02 -08:00
jelveh c2750f2ca1 Revert "Adds worker badge to .js files which have been registered as workers. Hovering badge shows popover with worker URL. File properties modal also shows clickable worker URL. (#2462)"
This reverts commit 50e2d275bc.
2026-02-11 15:13:56 -08:00
Daniel Salazar 0a594bdfc3 fix: metering alerts for missing costs (#2466) 2026-02-11 15:03:23 -08:00
Neal Shah 81c88c1434 add extra model details, update grok models (#2465) 2026-02-11 13:55:20 -08:00
Daniel Salazar afeac494ac feat: remove file cache service (#2464) 2026-02-11 12:57:10 -08:00
Miika Kuisma 50e2d275bc Adds worker badge to .js files which have been registered as workers. Hovering badge shows popover with worker URL. File properties modal also shows clickable worker URL. (#2462) 2026-02-11 12:02:10 -08:00
Daniel Salazar 512986880b feat: app icons in subdomain (#2461)
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-backend (24.x) (push) Has been cancelled
test / API tests (node env, api-test) (24.x) (push) Has been cancelled
test / puterjs (node env, vitest) (24.x) (push) Has been cancelled
* feat: app icons in subdomain

* fix: imports

* fix: icon location
2026-02-10 19:04:15 -08:00
Neal Shah 56ee3d23df Ns/web dav range fixes (#2459)
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-backend (24.x) (push) Has been cancelled
test / API tests (node env, api-test) (24.x) (push) Has been cancelled
test / puterjs (node env, vitest) (24.x) (push) Has been cancelled
* better calculation for ContentLength

* lets try that again
2026-02-10 16:11:01 -08:00
Neal Shah 4f84decdec fix tool call blank content (#2458) 2026-02-10 14:14:27 -08:00
Neal Shah e55829623f Revert "allow empty message (#2455)" (#2457)
This reverts commit 7880ade5d7.
2026-02-10 14:01:31 -08:00
Daniel Salazar 5e8ce3a021 fix: decrease large error log from wrong model (#2456)
* [PUT-471] feat: estimate and bill input for gemini imgaes :dev:

* fix: decrease large error log from wrong model
2026-02-10 13:36:35 -08:00