Commit Graph

84 Commits

Author SHA1 Message Date
JohnBoulanger aaedee0dfa change naming convention for debounce to match others. (snake case) 2025-11-20 16:42:21 -05:00
JohnBoulanger 8fe3e2fff6 fix: debounce toolbar display after dragging a window 2025-11-20 13:00:04 -05:00
Hariz S. 7d78381fe1 Re-add direct download via URL parameter (#1914)
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
* Re-add direct download via URL parameter

* Add comments

* Confirm before downloading remote file

* Allow aborting remote downloads

* Preemptively add AbortController to fetch call
puter.net.fetch currently doesn't support it (yet!)

* Add filename to download dialog/progress dialogs
2025-11-07 23:32:06 -08:00
Hariz S. 2487251bb9 Improved public folder file links (#1687)
* Don't update URL when opening public files via direct URL

* Alert user when attempting to open a nonexistent file

* Fix toolbar autohide in public file urls

* Remove extraneous debug logs

* Properly define stat var in public folder URL handling

* Update window URL when focusing an app opened through file URL

* Localize error messages
2025-10-27 15:35:11 -07:00
Nariman Jelveh aca1292886 adjust usage table styling (#1759) 2025-10-15 18:49:12 -07:00
Nariman Jelveh 84a28b9637 Sidepanel (#1694)
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 / api-test (22.x) (push) Has been cancelled
* add AI side panel to UIDesktop

* integrated `UIAIChat` component into `UIDesktop` for AI interactions.
* added styles for AI side panel, including buttons and chat message formatting in style.css, enhancing user experience with AI features.

* add support for window-based side panels

* remove window resizing logic that is simply broken

* whitelisting added

* Add `showWindow` and `hideWindow` methods to Puter.js
2025-10-06 18:40:44 -07:00
Nariman Jelveh 5b09dbb1f5 Update UIDesktop.js (#1682)
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 / api-test (22.x) (push) Has been cancelled
2025-10-04 18:14:54 -07:00
Hariz 62f5cc54cf Fix bug with context menu positioning on page load (#1636)
* Fix bug with context menu positioning on page load

* Fix double context menu bug on mobile
2025-09-30 18:58:54 -07:00
Nariman Jelveh 6ee60f9c13 Closes #629 2025-09-30 18:27:33 -07:00
Hariz 3de3c21f66 Add context menu to apps in the start menu (#1487)
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 / api-test (22.x) (push) Has been cancelled
* Add context menu to apps in the start menu

* Start menu context menus: Close other menus

* More bugfixes for start menu context menus

* Start menu context menus: Add/remove from taskbar

* Bugfixes for adding to taskbar through start menu

* Highlight start menu icons when ctxmenu is opened

* Close context menus on start menu kbd navigation

* Reset start menu icon state when ctx menu closed

* Fix multiple start item context menus opening simultaneously

* Remove parent argument from start icon context menus
2025-09-20 18:52:14 -07:00
jelveh c0b03e147b add redundant readdir to cache the home dir 2025-09-18 21:03:28 -07:00
Nariman Jelveh 31fffb087d Refactor file system operations in GUI and puter.js to use eventual consistency (#1579)
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 (18.x) (push) Has been cancelled
test / test (20.x) (push) Has been cancelled
test / test (22.x) (push) Has been cancelled
* Refactor file system operations in GUI and puter.js to use eventual consistency for stat and readdir calls

This update modifies multiple instances of file system operations to include a consistency option set to 'eventual'. This change aims to improve performance and responsiveness by allowing for eventual consistency in file system interactions across various components, including helpers, UI elements, and IPC handling.

* Update cache expiration time for file system operations in readdir and stat to 1 hour

* feat: add network connectivity monitoring and cache purging

This update introduces a new feature that monitors network connectivity and purges the cache when the connection is lost. The implementation includes event listeners for online/offline changes and visibility changes to ensure cache consistency during network disruptions.

* clean up logs
2025-09-18 17:13:39 -07:00
Nariman Jelveh e37166dae0 Cache is king baby! Let's go 🚀 (#1574)
* Implement the first naive version of `readdir` cache

* Purge the entire cache on every single mutation

Right now we're going to use the very naive, but safe, approach to purge the entire cache whenever there is change in the user's fs. We're going to incrementally improve this; but for now, better safe than sorry!

* Add socket event listeners to flush cache on file system item changes

This update introduces event listeners for 'item.added', 'item.renamed', and 'item.moved' events, triggering a cache flush on each event to ensure data consistency in the file system module.

* increase exp time for the cache

* Update readdir.js

* Update index.js
2025-09-17 15:36:42 -07:00
KernelDeimos 7bc03fe17c perf: fix sequential kv gets for default apps 2025-09-12 19:33:43 -04:00
KernelDeimos 5d3863d473 style: user_preferences.default_apps
This snippet of code doesn't need to iterate over keys, it can iterate over
values instead. Also, this "let" can be a "const".
2025-09-12 19:23:24 -04:00
KernelDeimos 7d4c7bae20 dev: improve error message in UIDesktop
This error message in UIDesktop caused me confusion earlier because it
didn't provide any indication of where the error came from. This commit
adds a string behind the error to specify that it happened while trying
to launch an app.
2025-09-09 19:04:44 -04:00
Nariman Jelveh bd818d86be Revert "Fix mac setup bug (#1449)" (#1492)
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 (18.x) (push) Has been cancelled
test / test (20.x) (push) Has been cancelled
test / test (22.x) (push) Has been cancelled
This reverts commit dfcf234d47.
2025-09-07 16:08:40 -07:00
Pranav Agone dfcf234d47 Fix mac setup bug (#1449)
* fix(desktop): prevent horizontal scrolling by constraining window drag #710

* docs: Force add config.example.json for Mac Docker setup (#1427)

---------

Co-authored-by: Pranav Agone <pranavagone@Pranavs-MacBook-Air.local>
2025-09-07 16:08:21 -07:00
Nariman Jelveh a68f0edc41 Don't allow items to be dragged out of the viewport 2025-09-04 19:36:03 -07:00
jelveh bc4cb61331 add transaction for opening apps 2025-08-16 13:43:25 -07:00
jelveh 2ed16b8b43 add support for transactions 2025-08-16 13:15:04 -07:00
Karan Singh a15fdd0b6d dev: Replaced human-readable text with i18n keys (#1382)
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 (18.x) (push) Has been cancelled
test / test (20.x) (push) Has been cancelled
test / test (22.x) (push) Has been cancelled
* dev: Replaced human-readable text with i18n keys

* Add two missing keys in UIDesktop.js

* more i18n keys!

* add more keys

* Update UIWindow.js

---------

Co-authored-by: jelveh <nj@puter.com>
2025-07-29 17:57:18 -07:00
jelveh 261bfd1c03 Adjust taskbar items' height and width based on number of items in the taskbar 2025-07-24 12:06:38 -07:00
Nariman Jelveh bfd1f8faab Configurable taskbar position (#1372)
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 (18.x) (push) Has been cancelled
test / test (20.x) (push) Has been cancelled
test / test (22.x) (push) Has been cancelled
* feat(gui): Enhance taskbar functionality and positioning

- Implement dynamic taskbar position management with options for left, bottom, and right placements.
- Update desktop dimensions and window positioning based on taskbar position.
- Add context menu options for changing taskbar position on desktop devices.
- Ensure mobile devices always display the taskbar at the bottom.
- Introduce CSS styles for taskbar positioning and adjust desktop padding accordingly.

* feat(gui): Reinitialize tooltips based on taskbar position

- Implement dynamic tooltip positioning for taskbar items based on the current taskbar location (left, right, bottom).
- Ensure tooltips are destroyed and recreated when the taskbar position is updated, enhancing user experience and consistency.

* feat(gui): Improve taskbar and tooltip positioning

- Add support for dynamic tooltip positioning for the 'top' taskbar location.
- Adjust CSS styles for arrow tooltips to enhance visual alignment and positioning.
- Refine taskbar item positioning for left and right placements to ensure consistent appearance.

* Improve popover positioning based on taskbar location

- Improve `UIPopover` positioning logic to account for left and right taskbar placements.
- Adjust Y position of popovers to ensure they appear correctly below toolbars for left/right taskbars.
- Update CSS styles for arrow tooltips to enforce consistent positioning with !important declarations.

* Refactor context menu positioning logic in UITaskbarItem

- Introduce a helper function to dynamically calculate context menu position based on the taskbar's location (top, bottom, left, right).
- Ensure context menus are positioned correctly relative to the taskbar item, improving usability across different taskbar placements.

* Fix UITaskbar window height calculation for consistent positioning

- Adjust the height calculation for windows in the UITaskbar to remove an unnecessary offset, ensuring accurate window sizing relative to the toolbar height.
- This change improves the visual consistency of maximized windows across different taskbar placements.

* Enhance window snapping and positioning based on taskbar location

- Introduce a new function to calculate snap dimensions and positions dynamically based on the taskbar's location (left, right, bottom).
- Update window snapping logic to ensure windows are positioned correctly relative to the taskbar, improving usability and visual consistency.
- Adjust boundary checks for window placement to account for taskbar height and position, enhancing the overall user experience.

* Update default taskbar position to 'left' and adjust CSS padding for desktop layout

- Change the default taskbar position from 'bottom' to 'left' in UITaskbar.
- Modify CSS to increase left padding for desktop taskbar positioning, enhancing layout consistency.

* Improve CSS for desktop layout with height adjustments

- Update CSS styles for input fields and desktop taskbar to set height to 100vh, ensuring consistent full-page layout across different screen sizes.
- This change improves the visual consistency and usability of the interface.

* Improve desktop selectable interactivity and taskbar tooltip behavior

- Add functionality to mark the desktop as selectable active, improving user interaction with desktop elements.
- Update tooltip display logic to only show when the desktop is not in a selectable state, enhancing usability.
- Adjust CSS styles for desktop layout, ensuring consistent behavior and appearance when the desktop is active or inactive.

* Update default taskbar position logic for first-time and existing users

- Set the taskbar position to 'left' for first-time visitors and default to 'bottom' for returning users without a saved preference.
- This change improves the user experience by providing a more intuitive initial layout for new users while maintaining consistency for existing users.
2025-07-23 15:48:23 -07:00
jelveh 4ca7e852d8 fix toolbar showing scroll on disabling autohide 2025-07-05 09:41:00 -07:00
jelveh 62e786faa6 Do not activate toolbar when desktop selectable is active 2025-07-02 16:14:18 -07:00
jelveh 7285a27be4 Fix toolbar autohide/hide timing
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 (18.x) (push) Has been cancelled
test / test (20.x) (push) Has been cancelled
test / test (22.x) (push) Has been cancelled
2025-07-01 22:42:50 -07:00
Nariman Jelveh 2103374854 Dynamic toolbar: allow users to customize toolbar sticky (#1330)
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 (18.x) (push) Has been cancelled
test / test (20.x) (push) Has been cancelled
test / test (22.x) (push) Has been cancelled
* close #1329
2025-07-01 18:37:36 -07:00
Nariman Jelveh 485f9a6f14 Don't hide the toolbar on mobile and tablet (#1328)
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 (18.x) (push) Has been cancelled
test / test (20.x) (push) Has been cancelled
test / test (22.x) (push) Has been cancelled
2025-06-30 17:18:56 -07:00
jelveh 278bb29ee5 better coloring and delay 2025-06-30 07:01:16 -07:00
jelveh 0864be054c When a window is being dragged don't activate toolbar (duh!) 2025-06-29 19:36:03 -07:00
jelveh 40260a9fb2 full support for fullpage mode 2025-06-29 19:17:58 -07:00
jelveh 54ae9c1ca9 the first time toolbar is shown, keep it open until user hovers over it at least once 2025-06-29 16:57:24 -07:00
jelveh 3db99aa67b Puter will now support only one type of menubar, and that's the in-window type 2025-06-29 15:58:53 -07:00
jelveh 0895418f0c Improve the logic behind hiding the toolbar after clicks and other interactions 2025-06-29 15:18:20 -07:00
jelveh b0fdf1f63d Implement the basics of a dynamic toolbar
Dynamic toolbar will hide and show automatically depending on user actions and state of the app. This is to save screen real estate.
2025-06-29 14:21:40 -07:00
KernelDeimos 1a0718028b dev: migrate toolbar labels to i18n 2025-05-26 13:04:10 -04:00
jelveh a1b96b7130 Allow users to open Settings and specific tabs from a URL 2025-05-17 12:30:27 -07:00
KernelDeimos 29dbf3a517 dev: URLs to files in public directories
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 (18.x) (push) Has been cancelled
test / test (20.x) (push) Has been cancelled
test / test (22.x) (push) Has been cancelled
Already existing was the functionality to go to puter.local/@username to
access the Public folder belonging to "username". This commit adds the
ability for relative paths such as puter.local/@username/document.md to
access /username/Public/document.md in the suggested app for handling
".md" files.
2025-04-28 17:40:02 -04:00
hisham-maarraoui b0efff7a4f feat: show/hide desktop icons option in context menu
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 (18.x) (push) Has been cancelled
test / test (20.x) (push) Has been cancelled
test / test (22.x) (push) Has been cancelled
* feat: hide icons/show icons feature added to the right-click/secondary click menu on the desktop

* Fix: Changes made to the hide/show desktop icons feature after receiving feedback in the first pull request

* CSS rule added to static CSS file instead of being implemented dynamically
2025-03-21 16:23:17 -04:00
Saish Pawar 505e7abda2 fix: reposition clock to right (#1181) 2025-03-14 18:38:57 -04:00
KernelDeimos 5c50eb1f8b fix(gui): logo placement with no clock using margin
Docker Image CI / build-and-push-image (push) Waiting to run
Maintain Release Merge PR / update-release-pr (push) Waiting to run
release-please / release-please (push) Waiting to run
test / test (18.x) (push) Waiting to run
test / test (20.x) (push) Waiting to run
test / test (22.x) (push) Waiting to run
Flex isn't being used in the top bar correctly, which is causing
unpredictable issues when people implement new elements on the top bar.
The best solution for this is to use proper flex values but right now
it's important to get the layout back to normal for production so I'm
implementing this sub-par fix where we always include a spacer element.
2025-03-14 03:09:08 -04:00
Saish Pawar 672e2e70ad dev: moved current datetime to toolbar as a widget (#1172)
Docker Image CI / build-and-push-image (push) Waiting to run
Maintain Release Merge PR / update-release-pr (push) Waiting to run
release-please / release-please (push) Waiting to run
test / test (18.x) (push) Waiting to run
test / test (20.x) (push) Waiting to run
test / test (22.x) (push) Waiting to run
* move current datetime to toolbar as a widget

* revert interval to 1000ms
2025-03-13 13:28:57 -04:00
jelveh ae9f5efed0 send event after toolbar is ready and after account is saved
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 (18.x) (push) Has been cancelled
test / test (20.x) (push) Has been cancelled
test / test (22.x) (push) Has been cancelled
2025-02-28 10:28:40 -08:00
jelveh 6a184d52b4 Update copyright notice dates in license headers 2025-01-06 15:18:22 -08:00
jelveh ac8068a139 No need for params when passing params to Apps driver 2024-12-27 18:24:09 -08:00
jelveh d922c848ce request 64x64 icon sizes when opening apps 2024-12-23 06:17:16 -08:00
jelveh 453b7d9ac9 Enforce taskbar height 2024-12-17 09:13:43 -08:00
KernelDeimos f87769b445 fix: remove redundant notification query 2024-12-17 10:23:20 -05:00
jelveh a90beab0b1 show all taskbar items on mobile as well. 2024-12-14 19:18:56 -08:00