mirror of
https://github.com/HeyPuter/puter.git
synced 2026-11-23 14:17:06 +00:00
31f8936da22b5ae4a1854b4e1ddf8ec2e67dbcef
7503
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
31f8936da2 |
build(deps): bump undici from 7.30.1 to 7.30.2 (#4566)
Bumps [undici](https://github.com/nodejs/undici) from 7.30.1 to 7.30.2. - [Release notes](https://github.com/nodejs/undici/releases) - [Commits](https://github.com/nodejs/undici/compare/v7.30.1...v7.30.2) --- updated-dependencies: - dependency-name: undici dependency-version: 7.30.2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> |
||
|
|
aab559c9c1 |
chore(deps): bump zod from 4.4.3 to 4.6.7 (#4465)
Bumps [zod](https://github.com/colinhacks/zod) from 4.4.3 to 4.6.7. - [Release notes](https://github.com/colinhacks/zod/releases) - [Commits](https://github.com/colinhacks/zod/compare/v4.4.3...v4.6.7) --- updated-dependencies: - dependency-name: zod dependency-version: 4.6.7 dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> |
||
|
|
7f1d46028a |
chore(deps): bump fastify from 5.12.5 to 5.12.7 (#4464)
Bumps [fastify](https://github.com/fastify/fastify) from 5.12.5 to 5.12.7. - [Release notes](https://github.com/fastify/fastify/releases) - [Commits](https://github.com/fastify/fastify/compare/v5.12.5...v5.12.7) --- updated-dependencies: - dependency-name: fastify dependency-version: 5.12.7 dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> |
||
|
|
39d9482409 |
chore(deps): bump body-parser from 2.3.0 to 2.4.0 (#4463)
Bumps [body-parser](https://github.com/expressjs/body-parser) from 2.3.0 to 2.4.0. - [Release notes](https://github.com/expressjs/body-parser/releases) - [Changelog](https://github.com/expressjs/body-parser/blob/master/HISTORY.md) - [Commits](https://github.com/expressjs/body-parser/compare/v2.3.0...v2.4.0) --- updated-dependencies: - dependency-name: body-parser dependency-version: 2.4.0 dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> |
||
|
|
4a958b3ca1 |
fix(gui): desktop push status counts only Puter's devices and follows subscription changes (#4550)
* fix(gui): desktop push status counts only Puter's devices and follows subscription changes - fix(gui): desktop push status counts only Puter's own devices - fix(gui): the desktop keeps its push subscription when the browser replaces it - docs(gui): shorten push comments to one line - fix(gui): removed browsers stay off after a subscription change, and websites can reach Puter push - docs(puter-js): fit the desktop push request comment on one line - fix(gui): background push registration checks every earlier endpoint and waits out a 429 - fix(puter-js): inside the desktop, requestPermission leaves a held push grant to the desktop - fix(gui): a browser that stays off after being removed forgets its receipt - fix(gui): push status holds right after enable(), and a subscription change is picked up after a run in flight - fix(gui): an app's push grant counts whenever the app list can't be read * fix(puter.js): a held push grant is left to the desktop only when it says it answers push The desktop lists `push-permission` in `puter.gui_features` on the app iframe's URL. Without it the SDK settles a held `notifications:push` from its own check, so a desktop whose requestPermission handler has no held check shows no dialog for a grant the app already holds. * fix(gui): a held push grant isn't asked again beside other access, and never counts without an app uid requestPermission drops a push grant held for Puter's devices from the dialog and asks only for what is missing. The app list lookup answers no for a missing app uid, whatever the list says; an app the list leaves out still keeps its grant, since the list is capped and can trail a grant. * test(puter.js): e2e for a push grant the app already holds inside the desktop A held grant resolves true with no dialog, and a request for it beside access the app is missing shows only the missing access. --------- Co-authored-by: Daniel Salazar <daniel.salazar@puter.com> |
||
|
|
4653ff6dae |
fix(gui): a removed browser stays off, and launches reuse the page's push status (#4549)
* fix(gui): a browser removed from push stays off until its user turns it on
The silent registration on load and app launch no longer replaces a
subscription the user removed in Puter. When the server answers
push_device_removed, the browser's subscription and its receipt are
dropped and the browser is recorded as turned off, so later loads leave
it alone. Turning push on from Settings or a push dialog still replaces
the removed subscription.
* perf(gui): launches reuse the page's last push status
The built-in push client keeps the last registered status it read in
memory, for the same user and subscription. App launches and an app's
puter.notifications.status() answer from it instead of listing devices
again. It is dropped on enable(), disable(), an unregistered answer and
the worker's subscription-changed message, and the Notifications tab
and push dialogs still read fresh, so a new page load always asks the
server.
* fix(notifications): a background enable opens no sign-in, and a page keeps its last push on for five minutes
_enableWebPush takes { background } in place of { renewRemoved }: a call
without a click leaves a removed browser removed and sends its requests
without interactive sign-in.
The desktop's push client keeps the on that enable() read, so the next
cached status lists no devices, and asks the server again once that on is
five minutes old.
* fix(gui): the kept push on belongs to the user whose devices were listed, and a failed enable() keeps none
A status read or enable() that another user's sign-in overlapped keeps no
on, and an enable() that fails drops what a read begun meanwhile kept.
|
||
|
|
a5c7b427b8 |
fix(puter-js): a confirmed push subscription registers for another account without a new confirmation (#4548)
* fix(puter-js): a confirmed push subscription registers for another account without a new confirmation The server's verify and active subscribe answers can carry a receipt for the subscription. It is kept per worker scope and sent with the next announce of the same endpoint, so the Puter desktop registers the same browser for the next signed-in account without another confirmation push. The receipt is forgotten when the subscription is ended, replaced or removed, and when the app is turned off in Puter. A server without receipts behaves as before. * docs(puter-js): shorten a push helper comment * fix(notifications): keep receipts only in the Puter GUI and store the new one as soon as the server answers |
||
|
|
cd3600bae9 |
fix(fs): overwrite a file in place when a write spells its name in another case or normalization form (#4620)
* fix(fs): overwrite a file in place when a write spells its name in another case or normalization form * docs(fs): say a write needs overwrite off to get a new name beside a look-alike one |
||
|
|
2db55bd636 |
perf(share): read share owners from the entry owner column and backfill missing ones (#4598)
Maintain Release Merge PR / update-release-pr (push) Canceled after 0s
release-please / release-please (push) Canceled after 0s
Backend Tests / changes (push) Canceled after 0s
Backend Tests / typecheck (push) Canceled after 0s
Backend Tests / test shard 1/4 (push) Canceled after 0s
Backend Tests / test shard 2/4 (push) Canceled after 0s
Backend Tests / test shard 3/4 (push) Canceled after 0s
Backend Tests / test shard 4/4 (push) Canceled after 0s
Backend Tests / test (main) (push) Canceled after 0s
Backend Tests / coverage (push) Canceled after 0s
Notify HeyPuter / notify (push) Canceled after 0s
* perf(share): skip the legacy owner probe once a recorded share answers ownerHasShares ran its recorded-owner and legacy NULL-owner queries side by side, so the join to fsentries ran even when the first query already found a share. Run the legacy half only when the recorded half finds nothing; the answers stay the same. * perf(share): drop the NULL-owner fallbacks from owner and outbound reads ownerHasShares, listOutbound, countOutbound, the outbound apps summary and the team-row filter behind listByHolder/countByHolder each carried a second half for share rows written before entry_owner_user_id existed, matched by joining fsentries on a NULL owner. The column migration backfilled those rows from fsentries, so the joins only add work: each costs about min(owner's files, NULL-owner rows) per call. Every remaining read goes through entry_owner_user_id alone. Invite rows (no fsentry, no owner) are matched as before: they were never reachable through the joins. Self-contained so it can be reverted on its own. It assumes existing data has no share row that names an fsentry but has a NULL entry_owner_user_id; if any remain, they stop showing up in these reads. * fix(share): backfill the entry owner on share rows written without it The share reads now match on entry_owner_user_id alone. Add a migration for each engine that fills that column from fsentries on every row that names an entry but still has a NULL owner, so the backfill runs before the reads stop looking at NULL-owner rows and their answers don't depend on what existing data holds. Rows that name no entry (invites) keep a NULL owner, and a replay finds nothing to fill. * fix(share): record the entry owner when a claim names its entry applyPending can point a claimed invite at an entry, but left entry_owner_user_id NULL, so the row was missing from the owner's reads that now match on that column alone. Fill it from fsentries with the same subquery the upserts use. The share service claims without an entry today; the parameter stays for callers that pass one. * refactor(share): read the app from the data column directly Every caller of the app filter and the app expression passes the share row's own data column now, so the column argument goes. Also names the owner probe test after what it checks and puts back an unrelated line the earlier formatting pass had reflowed. * chore(share): drop the redundant MySQL and Postgres owner backfills MySQL and Postgres replay every migration file on boot, and mysql_mig_47 and postgres_mig_36 already end with the same owner backfill, so they re-run it on every boot. Only SQLite, which tracks a schema version and runs each file once, needs its own backfill migration (0103). * fix(share): list a team row for its members when no entry owner is recorded * refactor(share): claiming an invite leaves its entry and owner as written * test(db): run the share owner backfill against the full prior schema * fix(share): ship the owner backfill as its own MySQL and Postgres migration The backfill at the end of mysql_mig_47 and postgres_mig_36 replays on boot only when database.migrationPaths is set. A new file gives installs that apply migrations another way a step to run; a replay finds nothing to fill. |
||
|
|
36e2d199c8 |
fix(fs): refuse instead of replacing an entry whose name differs only by an emoji or accent (#4589)
* fix(fs): refuse instead of replacing an entry whose name differs only by an emoji or accent MySQL compares fsentries names and paths under collations that also fold accents and most emoji, so a lookup for one name could return a sibling with another, and writes then overwrote and renamed it. Path lookups now return only an entry whose stored path matches the requested one after NFC normalization and lower-casing; case-only and NFC/NFD spellings still resolve as before. Name-collision checks opt in to the folded match and treat it as taken by a different entry: write, mkdir, touch, rename, shortcut, move and copy dedupe when asked and otherwise answer 409, and never replace or return that entry. * fix(fs): leave a sibling's subtree alone when a folder its path folds onto is renamed or moved The subtree rewrite matches descendants with `path LIKE 'old/%'`, and LIKE compares under the path collation (ASCII case on SQLite). With a sibling folder whose path differs only that way, renaming or moving one folder also rewrote the paths below the other. When another row sits at such a path, the rewrite now follows parent links down from the moved folder instead. Without one, the rewrite is unchanged, after one indexed lookup. * fix(fs): resolve an entry whose stored path is spelled unlike its names, and heal that path on the first read Older rows can store a `path` whose spelling differs from the names on their parent chain in ways the path collation ignores. A lookup that finds such a row by its real spelling now confirms it through the parent chain, writes the path from the stored names, and returns it, so overwriting, touching or copying over it by name works and the next read takes the single indexed query again. The lineage walk now writes a row's path only when it differs byte for byte from the one its names give, and drops only those rows' cache keys, so a walk over rows that are already right issues no writes. Whether an entry found at a name is a different, folded name is decided by its own name and its path after that walk, not by a stale path column. With `foldedNames`, a row only the path collation matches still counts as holding the name. * fix(fs): match entry names under full case mapping Names are compared after upper- then lower-casing, with a dotted capital I taken as I, so a request in another case finds the stored entry for Greek final sigma (`οδος.txt` for `ΟΔΟΣ.txt`), German sharp s (`STRASSE.txt` for `Straße.txt`) and Turkish dotted I (`istanbul.txt` for `İstanbul.txt`). Accent, emoji, kana and width differences still make two names different. * fix(fs): name the existing entry when a folded name is already taken, and show why a confirmed replace failed `item_with_same_name_exists` from write, move and copy now carries the existing entry's own name in `entry_name` when it differs from the requested one only by accents or emoji, so the prompt names the file the folder shows. In the GUI, a replace confirmed from that prompt that still fails is reported with its error message and counts as not written, instead of rejecting out of `handle_same_name_exists` and leaving the caller waiting. * fix(webdav): answer MKCOL with 405 and COPY or MOVE with Overwrite: F with 412 on a folded name The existence checks before MKCOL, COPY and MOVE now see an entry whose name differs from the target only by accents or emoji, so those requests answer as for an existing target instead of reaching the filesystem and coming back as 409. * docs(fs): list the errors write, move and copy return when a name is taken `puter.fs.write()` gets an Errors section with `item_with_same_name_exists`, `cannot_overwrite_a_directory` and `conflict`, the last for a name that differs from an existing one only by accents or emoji. The move and copy pages say how they reject in that case. * fix(fs): walk the parent chain on the primary when a path lookup reads hard A lookup that asks for a try-hard read (the checks after a create or move hits the unique key) now also runs its parent-chain walk on the primary, and falls back to the primary for the entry it finds. Before, the walk read a replica, so a name the replica had not seen yet came back as missing and the mkdir or move surfaced the duplicate-key error as a 500 instead of a 409. Lookups without a try-hard read are unchanged. A try-hard lookup issues the same number of queries; its walk reads the primary instead of a replica. * fix(fs): treat a folder only the collation matches as missing instead of naming a file in it A name-collision lookup lets only the last segment of the path match a differently spelled name. When a folder above it matches only under the collation (`😁dir` for `😀dir`), the lookup reports no occupant, so a write, mkdir or touch there fails as for a missing folder: 404, or with `createMissingParents` a 409 that names the folder. Before, it reported the file inside the other folder and answered 409 naming that file. A folder whose stored path is spelled that way still counts as the same folder, so lookups built from stored paths find what they did before. A rename onto a name the unique key already holds now answers 409 when the lookup before it missed the occupant, instead of a 500. * fix(fs): name the existing entry when a rename's name is folded, and leave a copy onto itself out of the copy docs A rename refused because the folder holds a name that differs only by accents or emoji now names that entry in its 409, as write, move and copy do. A copy onto a folded spelling of the source's own name answers as a copy onto itself (400 with `overwrite`), so the copy page's paragraph on folded names now covers only items other than the source. * fix(fs): walk the parent chain on the primary only when a hard read found another spelling of the path |
||
|
|
8616b00f7b |
fix(gui): save a URL from showSaveFilePicker, and always answer the app when the save dialog closes (#4587)
* fix(gui): save a URL from showSaveFilePicker and always answer the picker The save picker downloads an http(s) URL itself, without cookies or a referrer, up to 100 MiB, and writes it where the user chose, in apps and on websites. A failed download shows an error. In apps, a save dialog that closes without saving (failed download, failed write, close button) answers fileSaveCancelled once instead of leaving the call pending. * fix(gui): answer the save picker with the save's real outcome when it closes mid-save Closing the save dialog while a URL is downloading stops the download, writes nothing and answers fileSaveCancelled, in apps and on websites. In apps, closing it once a write has started leaves the answer to the write: fileSaved if it lands, fileSaveCancelled if it fails, never both. A save that throws shows an error and answers fileSaveCancelled instead of leaving the dialog stuck, and a second Enter during a save is ignored. On an https desktop only https URLs are accepted, with a message saying so, since the browser blocks http downloads there. * fix(gui): retry signing a saved file once, and say so when the app can't get it The app save picker signs the written file for the app with one retry. If both tries fail, the user is told the file was saved but couldn't be passed back, and the app gets fileSaveCancelled. The picker's one-answer state (answered, closed, saving, writing) lives in helpers/savePickerAnswer.js so the website picker can share it. * fix(gui): answer the website save picker once, with the save's real outcome The website save picker runs one save at a time, so a second Enter is ignored. Closing it while a URL downloads stops the download, writes nothing and answers fileSaveCancelled; closing it once the write has started leaves the answer to the write, so the page hears fileSaved or fileSaveCancelled, never both. A failed download shows an error, answers fileSaveCancelled and closes the picker, as in apps, and so does a save that throws. A saved file that can't be signed is reported to the user and answered as cancelled. * fix(gui): show apostrophes in the save picker's failure messages |
||
|
|
873303a7c4 |
fix(events): offer a queued delivery only to connections that run its handler (#4590)
* fix(events): offer a queued delivery only to connections that run its handler A queue subscription with an events worker was sent to every connection of the app. A connection without the handler declined it at once, which moved it to the worker while the tab with the handler was still running it. puter.js now sends `events.handle` with the persistent subscriptions a connection runs a handler for, on connect and whenever that set changes. The server puts the connection in a room for each queue row it holds, and offers the row's deliveries only to that room. With nobody in it anywhere in the region, the delivery goes to the worker at once. A peer region handed such a delivery declines it straight back when none of its connections run the handler. Rows without a worker are still sent to the whole app room. * fix(events): probe the handler room only when the app has a connection in the region A queued delivery for a pair with no connection here goes to the worker on the same local lookup and presence read as before, with no request to the other nodes. * fix(events): probe a forwarded batch's handler rooms together, within one timeout A region receiving a batch now looks up every handler room its queued deliveries need before it sends any of them: each distinct room once, up to 16 at a time, all under one shared 500 ms deadline. A room not answered by then counts as empty, so its delivery is declined home with `no_handler` and never sent. Deliveries still go out in the batch's order, and a batch with no such delivery probes nothing. * fix(events): resend a handler announce refused for the call budget puter.js now sends `events.handle` with an ack and a 10 second timeout. When the server refuses it with `too_many_requests`, the client sends the current set again after 10 seconds, until one goes through or the connection is replaced. No answer, as from a server without the verb, and any other refusal are left alone. A connection that never had a persistent handler sends no announce; one that had sends an empty set when the last is removed. The rate limits page now says that announces count toward the acknowledgement budget. * docs(events): say when a client starts getting first try at queued events A client counts once the server has registered its handler, shortly after it connects or calls `onPersistent()`. Before then, an event for a subscription with an events worker goes to another client with the handler or to the worker. * fix(socket): settle a cluster room count on the first node that holds a socket A count ask now hears each node's answer as it arrives: the first node holding a socket answers it at once, every node saying none answers it once all have said so, and a node that never answers only decides it when no answering node holds one. The request sent is unchanged, so every node answers it as before. * fix(events): look up handler connections in the region's record, not every node Each connection that announces a handler is kept in a per-subscription sorted set in the region's Redis, scored by renewal: added after it joins the handler room, removed before it leaves or on disconnect, renewed every minute while it runs one, and counted only for three minutes after its last renewal. Handing out a queued delivery, and receiving a forwarded one, now check this node's sockets and then that set with one read, instead of asking every node in the region to count the room. A connection the set names but that is gone gets the delivery sent to an empty room, and the socket lease hands it to the worker as before. * fix(events): try the next region with the app open after one declines for want of a handler A queued delivery's region is picked by app presence, so the first region tried can have the app open without the handler. Its no_handler decline now hands the delivery to the next region with the app open that hasn't had it, and the worker runs it once none is left. A lease that lapses still goes to the worker. A decline now counts only when it comes from the region the current attempt went to (this region for a local attempt). The region goes into the entry in the same write as the attempt's lease, so a second decline from a region already tried can't take the next region's lease. An attempt made after a decline stamps its lease in its own field, which a server that doesn't make such attempts never reads, so it can't take that lease back either. |
||
|
|
11107f3108 |
fix(permissions,share): revoked team shares and removed links aren't read back from a lagging replica (#4554)
* fix(permissions): a revoked group grant isn't read back from a lagging replica * fix(share): links removed by trash or a move aren't read back from a lagging replica, in any region * test(permissions): start each test server in the file on an empty redis mock * fix(permissions): node deletes find just-made grants on the primary; add a group membership hook * fix(share): link revokes reach peer regions even when the local marker fails, and subtree retires read the primary * fix(permissions): read a group's members after the grant is deleted * fix(permissions): mark group members before a group grant is deleted The member read and the marker now come before the delete, so a failed member read leaves the grant in place for a retry and member reads are already on the primary when the row goes. Members are read again after the delete, best effort, to include someone who joined meanwhile. The node-delete path returns those members, so ShareService bumps the same list instead of reading each group again from a replica. readUserGroupPerms checks the marker without the unused base-key GET. * perf(share): trash and delete read grants from a replica unless the owner shared just now --------- Co-authored-by: Daniel Salazar <daniel.salazar@puter.com> |
||
|
|
2c3b69011f |
fix(puter-js): unshare lists refused pairs in failed and rejects when all were refused (#4557)
* fix(puter-js): unshare rejects when every revoke was refused
/share/revoke reports refused pairs in a 200 body, and unshare() only
read `revoked`, so a call where every pair was refused resolved as if it
had worked. It now rejects with the first pair's { message, code }, the
same way share() does; a call where some pairs went through still
resolves with { revoked }.
GUI tests drive the SDK's unshare against a refused body and check that
the share dialogs and Remove from Shared show the error and keep the
row. The unshare docs list the per-pair codes.
* fix(puter-js): unshare and share reject with the first refused pair that names a code
A pair the server could not complete carries no code and a generic message,
so it no longer comes ahead of a refusal that says what happened. Both
operations pick the error through one helper. The unshare docs describe which
pair's error is surfaced and the request-level rejections.
* fix(gui): share modal says how many items a person was removed from when some were refused
After removing someone from several items, the refreshed listing is compared
with the items the removal covered, and the status reports the count that
went through instead of all of them.
* test(gui): unshare fixture swaps XMLHttpRequest per call; alert mock cleared in hooks
* feat(puter-js): unshare resolves with the refused pairs; share is as it was
unshare resolves { revoked, failed }, with one failed entry per refused
recipient/item pair. A pair refused because the recipient or the item is gone
counts as nothing to withdraw: the call rejects only when every pair was
refused and at least one for another reason, with the first such refusal that
names a code. paths and recipients are typed and documented.
share() picks its rejection as before; the error choice lives in unshare.
* fix(gui): sharing dialogs report the items an unshare was refused for
The share modal counts refused items from the unshare result across every
run of a large selection, going on past a run refused whole, for removing a
person and for closing the link on several items. The share window and
Remove from Shared show the refusal when the call resolves with the pair
refused.
* fix(gui): sharing dialogs keep the unshare outcome on screen after the listing refresh
The share modal shows the partial count once its refresh has settled, for
removing a person and for closing the link, so a listing that fails for the
refused item does not replace it. The share window does the same when closing
the link.
* feat(puter-js): an unshare rejected for refused pairs lists them in failed; failed[].path is documented as the absolute path
* test(puter-js): API suite covers unshare's refused pairs
* fix(gui): share modal stops at a revoke request that failed and counts only refused items
---------
Co-authored-by: Daniel Salazar <daniel.salazar@puter.com>
|
||
|
|
eefc1f2f2e |
fix(auth): the session list leaves out expired sessions, and revoking one works (#4573)
* fix(auth): the session list leaves out expired sessions * test(auth): cover revoking expired sessions and their children * fix(auth): the session list follows what authentication accepts A token minted under a session that has expired is left out of the list along with that session. The check runs in listSessions with the rule authentication uses, so getByUserId returns expired rows again and the revoke callers need no option. * fix(auth): revoke-session answers 404 for another user's session Missing, already revoked and other users' rows now share one answer. * fix(auth): type the session list rows instead of casting them --------- Co-authored-by: Daniel Salazar <daniel.salazar@puter.com> |
||
|
|
7e093d2ba7 |
perf(puter-js): reading the user at load joins the boot lookup (#4574)
* perf(puter-js): reading the user at load joins the boot lookup * fix(puter-js): keep the token fallback to the user lookup resend The fallback bearer is opt-in on initXhr, so other requests and their replays send no bearer after sign-out, as before. A failed join (the lookup or the copy) falls back to sending the request. Adds tests for the legacy callback form and a resend after a network failure. * fix(puter-js): join the boot user lookup only at the same API origin A user lookup sent after setAPIOrigin() joined the boot /whoami still in flight for the old origin and resolved its user instead of asking the new one. The in-flight marker now records the origin too. * fix(puter-js): a joined user read signs in from the boot lookup's answer and leaves on its first retry - The boot lookup keeps one in-flight record (token, origin, user, refusal), made and cleared in cacheWhoami_. - getUser(), puter.getUser() and whoami() share one join. A refused boot lookup drives the sign-in from its own response, so the token is not sent again; a sign-out meanwhile fails with 401 and sends nothing. - The join ends when the boot lookup first has to retry, so the caller's own request goes out at once (new fetchUrl onRetry option). - The joined user is copied with a JSON round trip; initXhr is back to its previous signature. * fix(puter-js): whoami() keeps its refused-request error when it joined the boot lookup --------- Co-authored-by: Daniel Salazar <daniel.salazar@puter.com> |
||
|
|
bd7614372a | fix(peer): grant forgery bug and stale comment | ||
|
|
61b5aa4900 |
fix(fs): treat path-less entries found by uid or id as missing (#4611)
A uid or id lookup can return a legacy row with no path when its parent chain is broken. resolveNode now reports it as not found, so readdir, stat and the other uid-addressed routes answer 404 instead of crashing in the ACL check. |
||
|
|
a6e75b46cb |
fix(install): turn off plan gates in the Windows installer config (#4599)
install.sh writes "meteringEnforcement": { "subscriptions": false } into
config.json because a self-hosted install has no paid plans, so with the
gates on the OpenAI/Anthropic-compatible AI endpoints answer 402
subscription_required for every account. install.ps1 never got that
key, so a Windows install made with the README one-liner still has the
gates on. Write the same key from install.ps1.
|
||
|
|
dd32c7f9b2 |
fix(auth): a token whose lookup fails gets the outage error, not token_auth_failed (#4586)
The auth probe used to mark a token as failed whenever authenticate threw, so a database error while checking a valid token came back as 401 token_auth_failed, which clients read as "discard this token". The probe now records the thrown error on the request instead. Routes that require auth hand it to the error handler (503 db_unavailable with Retry-After for a database outage, a generic 500 otherwise); routes that don't require auth serve the request anonymously, as before. Only a token that authenticate reports invalid still gets 401 token_auth_failed. The periodic socket re-check likewise keeps a connection up when its lookup fails, instead of disconnecting it. |
||
|
|
aaa5c82236 |
Redirect /show/* to the dashboard and remove leftover desktop code (#4610)
* Redirect /show/* to the dashboard's Files tab /show/<path> redirects to /dashboard#files/<path> with its query intact, instead of booting the desktop and opening Explorer there. Also removes what only that route used: the shell's launch options, the launch_options GUI param, and the GUI service that ran them. * Remove the unused component window and Flexer Nothing opens UIComponentWindow or uses Flexer, and JustHTML was only the component window's default body. Also drops the attach() shim UIQRCode kept for component containers. * Remove translation keys left by removed features Drops 36 keys nothing references in every language: the keyboard shortcuts guide, desktop shortcuts, personalization, the toolbar's fullscreen, GitHub and refer entries, the referral strings, and the publishing option prompt. * Inline the toolbar height, which is always zero The toolbar is gone, so window.toolbar_height only added or subtracted zero in window sizing and placement. * Remove window edge snapping Dragging a window to a screen edge or corner no longer snaps it to half or a quarter of the screen. Double-clicking the head and the scale button still maximize. * Remove the window color theme service Nothing can set a window theme, so the GUI stops reading the saved theme file on boot and windows keep the default colors. puter.ui.on() still accepts themeChanged, which is never sent; its docs entry is removed. * Remove styles and icons nothing references Drops the stylesheet rules of the removed Settings window, launch menu, intro menu and a few other removed features, and 16 icons whose names appear nowhere in the GUI. * Remove more translation keys nothing references Drops 56 keys in every language that no GUI code, extension or backend message uses, such as the system information labels, the old 2FA setup and confirm-code steps, and the auth token copy dialog strings. * Remove the global menubar leftovers and more unused styles Nothing creates a global menubar, so the window code stops hiding, showing and removing one. Also drops stylesheet rules for classes nothing uses, including the old auth dialog, the responsive hidden-* and visible-* helpers, and two keyframes only those rules animated. |
||
|
|
8b68c103c5 |
fix(auth): mint under a full-access token without re-reading its session row, and look token rows up by uid through their indexes (#4588)
* fix(auth): mint under a full-access token from the row auth loaded, and look up token rows by uid with one index per column A token minted by a full-access token now parents to the session row that authentication already loaded and checked for the minting token, instead of reading it again by token uid. The same applies to the session a relay token is bound to. Tokens whose claims name no row of their own still look it up. findActiveByAccessTokenUid now queries access_token_uid first and the legacy uid only on a miss, each through its own index, instead of one OR across both columns. * fix(auth): send both access-token row lookups together, so a miss on the first costs no second round trip |
||
|
|
454f94fc54 |
fix(hosting): serve a launched public app's assets from its billing cookie without re-minting it (#4585)
Same-origin assets of a launched public app carry the launch token in the Referer. When that token's signature verifies and it names the same user and session as a valid public billing cookie (and, for an app token, the same app), the cookie identity is used directly: no re-authentication, no new cookie, no Set-Cookie. Any other combination resolves exactly as before. Responses that do set the public cookie now carry `Cache-Control: private`. |
||
|
|
8b7d380de1 |
fix(metering): a settle whose balance read fails still charges the allowance (#4584)
When the purchased-credit read or the near-allowance exact read fails while settling a metered call, the call is now settled against the month record it already has: the share that fits the monthly allowance is charged, and purchased credit is left untouched since its balance could not be read. Previously the whole settle was skipped, leaving the cost in the month total but in neither pool. Such settles skip the cached-balance update and overuse check, and raise one info alarm id with the amount credit would have covered. |
||
|
|
8052a4287e |
fix(auth): close a revoked access token's sockets on every node (#4583)
Access-token revocation is announced as outer.auth.access-token.revoked, so peer clusters evict the token's socket.io connections and realtime relay sessions as the revoking cluster does. Peer payloads without a string token_uid are ignored. |
||
|
|
f114b13306 |
perf(gui): boot keeps a same-session token and skips /get-gui-token when the page already answers it (#4591)
* perf(gui): keep the stored token when /get-gui-token returns one for the same session /get-gui-token signs a new string on every call, so every signed-in boot stored a token that differed from the one it held only in `iat` and passed it to puter.setAuthToken. That opened a second FS socket, re-sent /whoami and the cache timestamp, and every other open tab picked the new token up from storage and did the same. The boot now keeps the stored token when the returned one carries exactly the same claims apart from `iat`; any other difference replaces it as before. A kept token still starts the boot from an empty FS cache, as the swap did. A boot that keeps the persisted cache (no session cookie) now waits for the cache timestamp check before the first render, which it started before reading the user. * perf(gui): skip /get-gui-token at boot when the page already says what it would return Every signed-in boot waited on /get-gui-token before it read the user. The shell is rendered from the same session cookie that route reads, so it now carries `guiTokenDigest` in gui_params: a digest of the claims (minus `iat`) of the GUI token the cookie's session would get, or null when the request has no session cookie. A cookie that doesn't resolve to a user session leaves it out. The GUI skips the request when the digest matches its stored token (same session, user and token type), or when it is null (the route would refuse). It still asks when the parameter is missing, the digest names another session, nothing is stored, the page and the route are on different origins, or Navigation Timing doesn't show this page as freshly served for this load (a history navigation or restored tab can reuse a page rendered for an older cookie). |
||
|
|
ce70728eeb |
Remove the desktop's icons and right-click menu, and redirect /desktop (#4609)
* Remove the desktop's icons and right-click menu The desktop no longer lists the Desktop folder's items, and right-clicking its background opens no menu. It stays as the surface windows open on. Also removes what only the icons used: file drops and item drops on the desktop, rubber-band selection, auto arrange and saved icon positions, and their two keys in puter.js's GUI boot cache. Clicking the desktop clears the active item container so keyboard shortcuts stop acting on a window's items. * Redirect /desktop and /settings to the dashboard /desktop redirects to the root with its query intact, and /settings to the dashboard's Home tab. /desktop drops out of the OIDC return_to allowlist, sign-out returns to the root, and the auth cover page's logo links there. Also removes eight GUI globals nothing references. * Remove code paths that only ran for the desktop's item container The desktop is no longer an item container, so the Trash item that refresh_item_container added to it, the empty-folder message exemption, and the context menu parent check for it can't be reached. |
||
|
|
8518023b0b |
Remove more desktop-only features and entry points (#4607)
* Remove the desktop's Publish Website window The right-click menu on desktop folders and on an Explorer window's background no longer has a Publish as Website item. This removes UIWindowPublishWebsite, the publishAsWebsite helper that opened it, both menu items, the window's CSS, window.extractProtocol (only the window used it), and the dir_published_as_website and pick_name_for_website i18n keys. The dashboard keeps publishing websites through its own dialog. generateFileContextMenu no longer falls back to the removed window, so it offers Publish as Website only when the caller passes onPublishWebsite, which the dashboard's Files tab does. The website badge on desktop items and the backend hosting API are unchanged. * Remove the desktop's Hide Desktop Icons toggle The desktop's right-click menu no longer has a Hide/Show Desktop Icons item. Without the wallpaper, hiding the icons left an empty page. This removes the menu item, toggleDesktopIcons/hideDesktopIcons/ showDesktopIcons, the boot-time read of the saved setting, and the .desktop-icons-hidden CSS rule. puter.js's GUI boot cache no longer batch-fetches desktop_icons_hidden, menubar_style or user_preferences.clock_visible, which nothing reads anymore. Values already saved under those keys stay in KV, unread. Also drops the desktop's BroadcastChannel, whose message handler was empty and which nothing else referenced. * Remove the desktop's ?download= link handler Opening puter.com/?download=<url> or /desktop?download=<url> no longer asks to save that remote file to the Desktop. The parameter is ignored, and a root URL that carries it boots the dashboard like any other root URL instead of forcing the desktop. This removes the handler in UIDesktop, its UIWindowProgress import, the download entry in the GUI's dashboard routing, and the confirm_download_file_to_desktop, downloading, downloading_file, uploading_file and error_download_failed i18n keys only it used. The decision of whether a page load boots the dashboard moves from an inline block in initgui into helpers/bootsDashboard.js, so it is tested. * Stop granting Camera and Recorder Desktop access on desktop boot The desktop no longer grants Camera and Recorder write access to the user's Desktop folder the first time it loads. Those apps now ask through the normal permission prompt, as they already did for users who only used the dashboard. Grants already given stay in place. puter.js's GUI boot cache no longer batch-fetches the has_set_default_app_user_permissions flag that kept the grant to one run. Values already saved under it stay in KV, unread. * Redirect /@username links to the dashboard puter.com/@<username> no longer opens that user's Public folder on the desktop. The backend now redirects /@:username to /, so old links land on the dashboard instead of booting the desktop. This removes the GUI's /@ handler and the error_invalid_username i18n key only it used. error_user_or_path_not_found stays, since share links still use it. * Redirect /desktop/app links and stop opening share links on the desktop /desktop/app/<name> now redirects to /app/<name>, keeping its query string, so the app opens in the dashboard. The backend no longer serves an app shell there, OIDC sign-in no longer returns to it, and the GUI no longer strips a leading /desktop from its route segments. The rate-limits page lists only /app/<name>, the route the limit still applies to. /desktop?shared=<path> no longer opens the shared item on the desktop. The desktop ignores ?shared=: it doesn't ask a guest to sign in for it, doesn't switch to the account a share email names, and OIDC sign-in from /desktop doesn't carry it along. Share emails link to /?shared=, which the dashboard handles as before. Opening a share notification on the desktop still opens the item. * Remove the desktop's ?app=explorer link handler ?app=explorer[&path=<folder>] no longer boots the desktop and opens an Explorer window. ?app= is ignored and no longer forces the desktop, so a root URL that carries it opens the dashboard, and /app/<name>?app=... now launches its app in the dashboard instead of booting the desktop and launching nothing. * Stop ?puter.fullpage= from booting the desktop The root and /app/<name> with ?puter.fullpage= now open in the dashboard like a plain /app/<name>, with the app maximized. The dashboard always shows apps full page, so the parameter no longer overrides that. Iframe embeds and popups, which still boot the desktop, read it as before. bootsDashboard no longer takes the query string, since no parameter decides the interface anymore. |
||
|
|
33988ac84c |
Remove the desktop taskbar (#4605)
release-please / release-please (push) Canceled after 0s
Maintain Release Merge PR / update-release-pr (push) Canceled after 0s
Notify HeyPuter / notify (push) Canceled after 0s
Backend Tests / changes (push) Canceled after 0s
Backend Tests / typecheck (push) Canceled after 0s
Backend Tests / test shard 1/4 (push) Canceled after 0s
Backend Tests / test shard 2/4 (push) Canceled after 0s
Backend Tests / test shard 3/4 (push) Canceled after 0s
Backend Tests / test shard 4/4 (push) Canceled after 0s
Backend Tests / test (main) (push) Canceled after 0s
Backend Tests / coverage (push) Canceled after 0s
* Remove the desktop taskbar The desktop no longer has a taskbar. Windows on /desktop can't be minimized, since nothing could bring them back; the dashboard still minimizes into app tiles. The desktop and maximized windows use the full page height. Backend: POST /update-taskbar-items is removed, and /whoami and the login response no longer include taskbar_items. The user table's taskbar_items column stays until a migration drops it. puter.ui.createWindow() still accepts show_in_taskbar, which has no effect and is marked deprecated. * Keep desktop backdrops above ordinary windows A backdrop's z-index used to take the taskbar's as a floor, which kept modal dialogs on /desktop above every ordinary window, including ones focused after the dialog opened. Keep that floor on the desktop; the dashboard and fullpage mode stack as before. Also drops commented-out geometry that referenced window.taskbar_height, and a dashboard comment about the removed fullpage minimize rule. * Keep dropped desktop icons fully on screen, and fill the phone popover A desktop icon drop is accepted only where the whole item fits above the bottom edge. Phone popovers use the full viewport height. |
||
|
|
72de6e16b2 |
Remove the desktop wallpaper (#4604)
Maintain Release Merge PR / update-release-pr (push) Canceled after 0s
Backend Tests / changes (push) Canceled after 0s
Backend Tests / typecheck (push) Canceled after 0s
Backend Tests / test shard 1/4 (push) Canceled after 0s
Backend Tests / test shard 2/4 (push) Canceled after 0s
Backend Tests / test shard 3/4 (push) Canceled after 0s
Backend Tests / test shard 4/4 (push) Canceled after 0s
Backend Tests / test (main) (push) Canceled after 0s
Backend Tests / coverage (push) Canceled after 0s
Notify HeyPuter / notify (push) Canceled after 0s
release-please / release-please (push) Canceled after 0s
The desktop no longer shows a wallpaper. It shows the page's plain background color: white, or #1e1e1e in dark mode. The sign-in dialogs and account picker that opened over the wallpaper now open over that color too. This removes the default wallpaper image and its credit, its preload in both page shells, the "Set as Desktop Background" item on images' right-click menu, the GUI's set_desktop_background and refresh_desktop_background, and the set_as_background i18n key. Desktop icon labels were white with a shadow to read on the wallpaper; they now use the same gray as labels inside windows, and a light gray in dark mode. The backend drops POST /set-desktop-bg, and /whoami no longer returns desktop_bg_url, desktop_bg_color or desktop_bg_fit. The user table's desktop_bg_* columns stay; dropping them needs a migration. |
||
|
|
234994d3af |
Remove the desktop toolbar and nine desktop features, and use puter.js's color picker on the desktop (#4602)
* Remove the desktop's QR login button The desktop toolbar no longer shows a QR code that signs another device into the current session. This removes the toolbar button, its click handler, the UIWindowQR window (its only caller), the qr.svg icon, the window's CSS, and the four i18n keys only that window used. UIQRCode and the qrcode library stay, since 2FA setup still uses them. The ?auth_token= handler in initgui also stays, because the Playwright e2e harness signs in through it. * Remove the desktop's My Websites window The user menu no longer has a My Websites item. This removes the UIWindowMyWebsites window, its menu item, its CSS, the plug.svg icon only it used, and the i18n keys only it used. When publishing a website or worker hits the subdomain limit, the error now shows only the server's message, without the "Manage your subdomains" link that opened the window. The trash handlers keep fading the website badge on a trashed folder and no longer touch the window's rows. * Remove the desktop's Task Manager window The user menu no longer has a Task Manager item. This removes the UIWindowTaskManager window, its menu item, its CSS, the cog.svg icon only it used, and the i18n keys only it used, including the process_type_* and process_status_* keys it built at runtime. The process model in definitions.js, including END_SOFT and END_HARD, stays: windows still register processes, and a process still forwards an end signal to its children. * Remove the desktop's Change Desktop Background window The desktop's context menu no longer has a "Change Desktop Background…" item, or the separator above it. This removes the UIWindowDesktopBGSettings window, its CSS, the palette.svg icon only it used, and the i18n keys only it used. Desktop backgrounds still work: the saved background loads at boot, and an image's "Set as Desktop Background" item still applies and saves it through /set-desktop-bg. * Remove the desktop's Start menu The taskbar no longer has a Start button, so it begins at Explorer. This removes the Start item and its app popover (recent and recommended apps, search, tile context menu, and drag-to-taskbar), along with: - The taskbar's startup /get-launch-apps request and the desktop's app.opened socket handler, which only kept the menu's lists current - The Start popover's search, click and keyboard handlers in UIDesktop.js, keyboard.js, initgui.js and UITaskbarItem.js - The taskbar's handling of items dropped from outside it, and the UITaskbarItem append_to_taskbar option only that path used - The Start CSS, the start.svg icon, and the i18n keys only the menu used The dashboard's recently used apps still load, since the dashboard fetches its own list and launchApp.js still records launches. UITaskbar.test.js now covers the taskbar's item order and that it doesn't fetch launch apps. * Remove the desktop's Search window The desktop toolbar no longer has a Search button, and Ctrl/Cmd+F on the desktop no longer opens the Search window, so it falls through to the browser's find as it already did on the dashboard. This removes UIWindowSearch, the toolbar button and its handler, the window's keyboard handling (arrow keys, Enter, Escape) and click-outside close, its CSS, the search.svg and magnifier-outline.svg icons only it used, and the i18n keys only it used. The backend /search endpoint is unchanged. * Remove the desktop toolbar The desktop no longer has the toolbar at the top of the screen, so its Puter logo, guest Save Account button, and account menu are gone from the desktop. Log out, account switching, language, settings, and contact all remain on the dashboard. Removed: - The toolbar markup, its auto-hide logic and mouse tracking, its right-click menu, and the account menu with its click handlers - The modify-user-options-menu GUI extension, which only added a Developer item to that menu - UIWindowFeedback, the desktop's Contact Us window, which only the menu opened; the dashboard keeps its own contact dialog - Toolbar hooks elsewhere: the hide_toolbar() call on window maximize, pointer-events toggles during window and item drags, the click guard in initgui, the account-button toggle in helpers.js, and the avatar sync for the toolbar's profile image in TabAccount - The toolbar and feedback CSS, the toolbar's two KV keys from the puter.js GUI read cache, and the i18n keys only these used window.toolbar_height stays: it was already 0, so window and desktop layout are unchanged. The welcome window keeps its backdrop stacking. * Remove the desktop's Share window The right-click menu on desktop and Explorer items, and on items in open and save file dialogs, no longer has a Share item. This removes UIWindowShare, that menu item, the share-outline.svg icon only it used, its CSS, and the share_with and share_row_team i18n keys only it used. The Dashboard keeps sharing through UIShareModal. generateFileContextMenu no longer falls back to the removed window, so it offers Share only when the caller passes onShare, which the Dashboard's Files tab does. The share dialog layout classes the Blocked Senders window uses, and the recipient suggestion styles the share modal uses, stay. * Remove the desktop's Welcome window New desktop users no longer see the Welcome window on their first visit. This removes UIWindowWelcome, the first-visit check in UIDesktop that opened it, its CSS, the welcome_* i18n keys only it used, and the UIWindow backdrop_covers_toolbar option only it passed. has_seen_welcome_window is also dropped from the puter.js GUI boot read cache. Values already saved under that key stay in KV, unread. * Replace the desktop's color picker with puter.js's picker puter.ui.showColorPicker() inside Puter now opens puter.js's own <puter-color-picker>, the one it already shows on websites outside Puter, instead of the desktop's iro-based window. Apps get the same answer everywhere: a lowercase 6-digit hex string, or null when the user cancels. Inside Puter it used to resolve to an 8-digit hex with alpha, or undefined. This removes UIWindowColorPicker, UIColorPickerWidget, iro.min.js and its lib-list entries, and the select_color i18n key only that window used. The GUI loads puter.js from js.puter.com, so the IPC handler doesn't rely on this branch's component: it drops the alpha from an 8-digit default, leaves out a default that isn't a 3- or 6-digit hex, and removes the picker once it answers. <puter-color-picker> drops the alpha from an 8-digit default instead of failing to open, opens on its own color when the default isn't valid, and removes itself when Escape closes it. showColorPicker()'s type and docs now give the 6-digit return value and null on cancel. * Remove the desktop's Publish Worker window The right-click menu on .js files on the desktop and in Explorer, and in open and save file dialogs, no longer has a Publish as Worker item. This removes UIWindowPublishWorker, that menu item, its CSS, and the pick_name_for_worker i18n key only it used. The Dashboard keeps publishing workers through its own dialog. generateFileContextMenu no longer falls back to the removed window, so it offers Publish as Worker only when the caller passes onPublishWorker, which the Dashboard's Files tab does. * Add a Language setting to the dashboard's Account tab The desktop toolbar's account menu was the only place to change Puter's language, so removing the toolbar left no way to change it. The Account tab now has a Language card that shows the current language and opens a dialog listing every supported language by its own name. Saving a new one stores it on the account and reloads the page in it. changeLanguage() now returns false when the language can't be saved, so the dialog can show an error instead of doing nothing. The change_language key comes back in every locale, and language_save_failed is new. |
||
|
|
eef2d089a8 |
Remove the dashboard's Open Desktop card and the unused theme dialog (#4601)
* Remove the unused theme dialog and its translations UIWindowThemeDialog has had no importers since the settings window was removed, and the reset_colors, ui_colors and change_ui_colors strings are referenced only by it or by nothing at all. * Remove the Open Desktop card from the dashboard Home tab Drops the card's markup, styles, color tokens, and the open_desktop and open_desktop_hint strings, which nothing else uses. |
||
|
|
711ece5800 |
feat(gui): let a first-party page frame the custom domain dialog (#4581)
* feat(gui): let a first-party page frame the custom domain dialog `/embed/attach-custom-domain` joins the framed popups. On a signed-in page one label under the Puter origin, `puter.hosting.attach()` now shows the custom domain dialog in a frame over the page instead of a popup window. Apps, the desktop and every other website keep their current behavior. The frame covers the page with a transparent GUI page, so the dialog floats over it with its own scrim as it does on the desktop. The GUI serves only the framing page's own user, with no account check waiting, and otherwise reports `unavailable`, which leaves the page to open the popup as before. It runs the popup's action unchanged: the framing page is the requester the dialog names, and gets the same `customDomainAttached` answer. Escape is left to the dialog, which doesn't close while a request is in flight, and the frame allows `clipboard-write` for the DNS record copy buttons. A call made while the frame shows resolves null without replacing it, as a second call does on the desktop. * Update RecommendedAppsService.ts * fix(gui): let the framed custom domain dialog finish closing before it answers The answer removes the frame from the page, so the dialog's exit transition never showed. The framed action waits for the overlay to leave first, with the wait the feedback embed already had, now one shared helper. |
||
|
|
40ea3686da |
Merge pull request #4594 from HeyPuter/fix/chat-served-tier-pricing
Price native service tiers and served premium capacity |
||
|
|
db7ca8382b | Price native service tiers and served premium capacity | ||
|
|
0f2c325598 | Meter Responses usage before validating empty output | ||
|
|
ffcfb85749 | Validate voice changer models against the price table | ||
|
|
44bf99f808 |
Update recommended apps
release-please / release-please (push) Canceled after 0s
Backend Tests / changes (push) Canceled after 0s
Backend Tests / typecheck (push) Canceled after 0s
Backend Tests / test shard 1/4 (push) Canceled after 0s
Backend Tests / test shard 2/4 (push) Canceled after 0s
Backend Tests / test shard 3/4 (push) Canceled after 0s
Backend Tests / test shard 4/4 (push) Canceled after 0s
Backend Tests / test (main) (push) Canceled after 0s
Backend Tests / coverage (push) Canceled after 0s
Maintain Release Merge PR / update-release-pr (push) Canceled after 0s
Notify HeyPuter / notify (push) Canceled after 0s
|
||
|
|
d392b6857d | fix(dashboard): drop the repeated add-on credits remainder from the Usage tab | ||
|
|
d8c3e01dd9 |
fix(http): parse large JSON bodies in slices; store WebDAV uploads labeled as JSON (#4563)
Maintain Release Merge PR / update-release-pr (push) Canceled after 0s
Notify HeyPuter / notify (push) Canceled after 0s
release-please / release-please (push) Canceled after 0s
Backend Tests / changes (push) Canceled after 0s
Backend Tests / typecheck (push) Canceled after 0s
Backend Tests / test shard 1/4 (push) Canceled after 0s
Backend Tests / test shard 2/4 (push) Canceled after 0s
Backend Tests / test shard 3/4 (push) Canceled after 0s
Backend Tests / test shard 4/4 (push) Canceled after 0s
Backend Tests / test (main) (push) Canceled after 0s
Backend Tests / coverage (push) Canceled after 0s
JSON request bodies over 32 KiB are parsed in slices, with the event loop running between them, instead of in one JSON.parse call. Reading, limits, decompression, req.rawBody and the errors stay as express.json has them. Large bodies parse one at a time. Gemini TTS and video replies use the same parser, and their base64 is checked and decoded 1 MiB at a time. A profile picture is sized before its pattern runs, so one of several megabytes gets a 413. Body parsers skip the dav subdomain: a PUT labeled as JSON or form data was read by them and stored empty, or refused. puter.js sends auth_token as the first field of a driver call. A chat body over 50 MiB that opens with a valid token is accepted up to 128 MiB, as one with a header credential is. JSON in a charset other than UTF-8 is now limited to 1 MiB, and a body over 32 KiB nested deeper than 10,000 levels is refused. |
||
|
|
4bc679956f | fix(dashboard): label the Usage tab's credit bar "Monthly credits" | ||
|
|
b751f75467 |
fix(fs): keep a file readable when two overwrites create the same path at once (#4579)
Two writers that both start before the row exists each upload under their own object key. The second one found the first writer's row and updated its bucket and size while keeping the first writer's uuid, so the row could name an object that was never written under that key. The store now leaves a row untouched when an overwrite arrives with a different object key, and the service moves the uploaded bytes onto the row's key before updating it. The last writer wins and the uuid is stable. |
||
|
|
224b2f2367 |
fix(backend): null driver args, non-string chat model, and long app-stats uid lists no longer answer 500 (#4576)
- drivers: a null `args` in a driver call is treated as no arguments - ai-chat: a `model` that is not a string is answered as model not found (400) - apps: app stats split a long uid list across ClickHouse queries, which cap the size of one query parameter |
||
|
|
80bcc4ba14 |
feat(dashboard): show add-on credit as its own bar on the Usage tab (#4578)
The Usage tab told an account how much add-on credit it had left in a line of text under the monthly meter. It now gets a meter of its own there: a heading, how much of the credit bought has been spent, and a bar, with the line saying what is left and when it is used kept under it. An account that never had add-on credit sees the tab as before. |
||
|
|
f26201649a |
feat(gui): let a first-party page frame the deployment's top-up dialog (#4570)
* feat(gui): let a first-party page frame the deployment's top-up dialog
`/embed/top-up` joins the framed popups. Like the upgrade, it covers the
framing page with a transparent GUI page, serves only the page's own
user, and reports `unavailable` unless the deployment defines
`window.UITopUp` with `embeddable === true` and no account check is
waiting. It runs `new UITopUp({ onClose }).open()` and posts
`closed { toppedUp }` once the dialog closes. The frame's lifecycle is the
upgrade's, now shared by both.
`<puter-user-menu>` gets an Add credits item under Usage, shown only when
whoami reports `subscribed: true`. It frames the top-up on a page that can
frame the GUI, and otherwise opens the dashboard with `?topup=` in a new
tab, within the click. Hidden items are skipped by the menu's arrow keys.
`puter.ui.showTopUp_()` is internal; no public SDK method is added.
* fix(puter-js): show no usage-limit dialog over an open top-up
A call refused for funds while the framed top-up was open put the
usage-limit dialog in the top layer over it, covering the payment the
user was making to clear that refusal. The prompt now stays out of the
way while a top-up shows, as it does for the framed upgrade.
* fix(puter-js): leave Add credits out of the user menu for a team seat
whoami reports a seat as subscribed through its team's plan, so the menu
offered Add credits to an account that can't buy any: the dialog only
answers that the team pays. The item now stays hidden when whoami names a
team paying for the account, as the desktop's own menu already does.
* fix(puter-js): open the top-up tab on the page's own deployment
The tab the Add credits item falls back to went to puter.com whatever
GUI origin the page belongs to, so on another deployment it opened a
different one, signed in as whoever is signed in there. It now opens the
dashboard of the GUI origin, like the menu's Usage link beside it.
* fix(puter-js): return keyboard focus to the account button after Add credits
Choosing Add credits closed the menu with focus on the item it had just
hidden, and the frame restored focus to the menu's shadow host, which
can't take it, so a keyboard user was left on the page body once the
dialog closed. The menu now moves focus to its button first, and a
framed popup restores focus to the element inside a shadow root.
* docs(embed): say when the top-up dialog's open() resolves
It resolves after the account has loaded, not as soon as the dialog
shows.
* fix(puter-js): offer Add credits after an upgrade made on the page
The user menu showed Add credits by the whoami it loaded with the page.
A user who subscribed in the framed upgrade therefore found no Add
credits in the menu until a reload. A framed upgrade that reports a plan
now marks the page's cached whoami as subscribed, as a confirmed email
already is, and the menu reads it again each time it opens.
* fix(puter-js): let a top-up that failed to start be asked for again
showTopUp_ cleared its in-flight marker in a finally inside the async
function it stored. A failure before that function's first await, such
as building the dashboard address from an origin with no scheme, ran the
finally before the marker was set, so the marker kept the rejected
promise for good: every later call got the same rejection, and
topUpShowing_ went on suppressing the usage-limit dialog. The marker is
now cleared once the stored promise settles.
* fix(puter-js): keep requestUpgrade from framing the upgrade over an open top-up
The usage-limit dialog already stays away while the top-up shows, but a
page's own requestUpgrade() call, such as one in the handler of a call
refused mid-payment, still mounted the upgrade frame. Frames are single
per path, so it covered the top-up and the payment being typed in it,
and the two dialogs' own guard can't see across documents. The call now
waits for the top-up and resolves { upgraded: false } once it closes.
* fix(puter-js): offer Add credits after an upgrade when whoami was read again
The user menu keeps the whoami object it loaded and ignores a token set
again unchanged, but the SDK reads whoami into a new object each time a
token is set. A framed upgrade then marked the new object as subscribed
and the menu went on reading the old one, so Add credits stayed hidden
until a reload. The menu now reads the SDK's cached whoami when it is
the same account's.
* docs(embed): list the top-up tests among the checks to run
|
||
|
|
1550be358d |
fix(explorer): navigation, keyboard, drag-and-drop, realtime and layout fixes (#4569)
* fix(explorer): record typed address-bar paths in navigation history and canonicalize them Pressing Enter in the path input now pushes the destination onto the window's Back/Forward history like every other navigation, and resolves the entry first (trim, ~ and home-relative expansion, trailing or doubled slashes) so the window's path matches the form the rest of the GUI compares against. * fix(explorer): keep the address-bar input in step with the Shared view and the root The path input was only updated after a successful stat, so in views that are never statted it kept the previous folder's path and Enter navigated back there. * fix(explorer): drop the previous folder's identity when a folder fails to load A rejected stat was never handled, so the window kept the previous folder's uid, title and item count while showing the load error, and layout or sort changes were saved to the wrong folder. The window now clears them, and the failed request no longer surfaces as an unhandled rejection. * fix(explorer): release a window's selection listeners and history when it closes Each folder window left its rubber-band selection instance, a document mouseup handler and its navigation history behind after closing, so every later mouse press ran once per window ever opened. Windows that are not folders no longer bind the handler at all. * fix(explorer): anchor a Ctrl/Cmd rubber-band selection where the drag started The rectangle's origin was only recorded for unmodified drags, so adding to a selection drew it from the previous drag's start point or the top-left corner. * fix(explorer): keep arrow-key navigation on visible items and a valid anchor Arrow keys could land on a hidden dotfile and then stop moving, threw when the remembered anchor belonged to another window, and left the footer's selected count stale. * fix(explorer): ignore non-character keys in type-to-select Shift, arrows and Enter were appended to the search term by name, so typing a capital letter or typing right after navigating matched nothing. Hidden files are no longer matched, and the footer count follows the container the selection changed in. * fix(explorer): make the keyboard permanent-delete confirmation work in every language The confirmation compared the dialog's answer with the English button label, so in any other language confirming did nothing. * fix(explorer): paste once per Ctrl+V press The shortcut ran on both keydown and keyup, so releasing V before Ctrl pasted the clipboard twice. * fix(explorer): keep selection shortcuts working after navigating, and out of text fields Select All, Copy, Cut and Delete looked up the folder from the element last pressed, which is a removed item or a sidebar entry after navigating, so the shortcuts did nothing. Select All also skips hidden files, and Delete keys typed in a text field are left to the field. * fix(explorer): count only visible items in the footer and drop hidden files from the selection The item count included dotfiles that were not shown, and hiding hidden files left them selected, so a later Delete or Cut acted on files the user could not see. * fix(explorer): paste cut items after their folder is no longer displayed Paste resolved the cut paths to rows on screen, so cutting a file and then navigating the same window to the destination moved nothing and silently emptied the clipboard. Items without a row are now looked up and moved the same way. * fix(explorer): show a moved item once in its destination The tab that moves an item renders the row and also receives the move event, so the destination showed the item twice whenever the event arrived first. Both paths now replace any row the other already rendered. * fix(explorer): sort names the way the dashboard does, with a stable tie-break Folder windows and the desktop compared raw lowercase strings, so file10 came before file2 and accented names landed after z, and equal sizes, dates or types kept whatever order they arrived in. They now use the dashboard's comparator, so the same folder reads the same in both. * fix(explorer): keep the Trash window's states when Trash is emptied elsewhere Emptying Trash from another tab cleared the whole container, including its empty, error and loading elements, and left the item count stale. * fix(explorer): remove rows deleted elsewhere instead of hiding them A deletion from another tab or an app only faded the row out, so it still counted in the footer, in Select All and in keyboard actions. The row is now removed, and windows showing the deleted folder close even when its own row is not displayed anywhere. * fix(explorer): refresh size and date when a file is overwritten elsewhere An overwrite arrives as an update event, which only applied the name, icon and path, so the size and modified columns and sorting kept old values. * fix(explorer): download files whose names contain &, #, % or + The path went into the download URL unencoded, so the server received a truncated path and the download failed. * fix(explorer): allow moving into folders whose name starts with Trash The deleted-folder check matched any sibling of Trash sharing its prefix, so moving into a folder such as Trash-old was refused. * fix(explorer): end the extract operation when an archive is corrupt or has no files A corrupt zip threw before its error could be shown, and an archive with nothing to write or a failed upload never closed the progress window. A progress update arriving before the window existed also threw. * fix(explorer): follow renamed and moved folders in Back/Forward and on undo A window's navigation history kept the old path after a folder was renamed or moved, so Back led to a load error. Undoing a folder rename also left windows and items inside it on the renamed path, because the undo retargeted from the path it was restoring. * fix(explorer): keep one progress window per copy or move The progress timer is re-armed after every conflict dialog, and it opened a second window when one was already showing, leaving the first on screen for good. * fix(explorer): show file names once-escaped in move alerts The name was escaped before being passed to an alert that escapes its whole message, so names with &, quotes or angle brackets showed entity text. * fix(explorer): don't flash the empty-folder message while a folder refreshes Clearing the rows for a refresh showed the message until the listing came back, even for a folder full of items. * fix(explorer): accept drops into a window that covers a desktop folder A desktop folder hidden under a window still reacted to the drag and disabled the window as a drop target, so the drop was ignored. A drop that bailed out early also left every folder view disabled as a target until the next hover; targets are now restored when the drag ends. * fix(explorer): release each row's document click handler when the row is removed Every file row bound a click handler on document that was never unbound, so browsing folders grew the number of handlers run on every click and kept the removed rows alive. * fix(explorer): let Delete work on a file after its rename was cancelled Cancelling a rename with Escape, or leaving the editor without a change, left the item marked as being renamed, and the Delete shortcut skips such items. * fix(explorer): offer a download when no app can open a file The prompt called a translation import that is not a function, so opening a file with no suitable app threw and did nothing. * fix(explorer): use an item's current path and name in its context menu Cut, Copy, Download, Create Shortcut and the rename editor read the path and name captured when the row was created. After a rename made from another window or tab they acted on the old path, and closing the editor repainted the old name. * fix(explorer): offer Cut only where the item can be moved The item menu on the desktop and in folder windows offered Cut on trashed items and on shared items the user may not move, unlike the same menu built for the dashboard. * fix(explorer): give a folder named *.app a folder icon The app-shortcut branch ran before the directory branch, so such a folder was read as a file on every listing, failed, and showed the app icon. * fix(explorer): make New > JPEG Image create an actual JPEG The blank image was encoded with the canvas default, so the .jpg file held transparent PNG data. * fix(explorer): handle a drop onto a folder that is part of the dragged selection Dragging a selection onto one of its own selected folders also tried to move that folder into itself. On the desktop the drop also cleared the saved position of the target folder instead of the items that left the desktop. * fix(explorer): don't highlight a window as a drop target for its own items The check meant to skip the folder an item is already in compared the wrong path, so dragging inside a window outlined it although dropping there does nothing. * fix(explorer): keep desktop rearranging to the desktop itself Dropping an item from a window showing the Desktop folder onto the desktop background positioned the window's row absolutely and saved that position. * fix(explorer): empty Trash from its window in one request The Trash window's own Empty Trash sent one delete request per item and reported Trash as empty before any of them finished. It now runs the same single operation as the taskbar and desktop. * fix(explorer): label the root and Shared in the Back/Forward menus The long-press history menus showed an empty row for the root folder and a lowercase path segment for Shared, and the Forward menu's Home entry was not translated. * fix(explorer): keep sidebar labels translated and titled after reordering A reordered sidebar rendered the labels saved at the time of the drag, so they stayed in the old language, and every item's tooltip was empty. * fix(explorer): enable the Open dialog's button only for a selected file The button stayed enabled after navigating to another folder, and a rubber-band selection of folders alone enabled it, although clicking it then did nothing. * fix(explorer): show the slow-load message only for a load that is slow Once any folder took over a second to load, the spinner text switched to the slow-load message three seconds later even after the load finished, and every later load in that window opened with it. The text is also translated now. * fix(explorer): keep the current folder visible in a long breadcrumb A path too long for the bar was cut at its end, hiding the folder being viewed and its nearest parents. It is now cut at the root end. * fix(explorer): grey out the whole selected row in an unfocused details view Only the name lost its highlight when the window lost focus, leaving a grey pill inside a blue row. * fix(explorer): align the details header with its rows and mark it clickable The header ended 10px before the rows and the selection highlight, and its sortable column titles kept the default cursor. * fix(explorer): give the layout button a tooltip and a pointer cursor It was the only navbar control without either, so it did not read as clickable. * fix(explorer): remove the stray tooltip from the loading spinner The spinner's SVG carried an internal title that showed as a tooltip and was read out by screen readers. * fix(explorer): refuse uploads, copies and shortcuts into the Shared view Dropping files on Shared in the sidebar, or Ctrl/Alt-dropping items onto a window showing it, sent requests against a path that is not a directory and ended in an error or a stuck progress window. * fix(explorer): open an item's context menu where it was requested The menu is built after permission and app lookups, and it opened wherever the pointer had moved to by the time they finished. * fix(explorer): close a folder's window when the folder is deleted, however it was opened Windows opened by path, such as with Ctrl-click on a breadcrumb or sidebar entry, never received the marker used to find a deleted folder's windows, so they stayed open on a folder that no longer existed. |
||
|
|
8a15f09f48 |
Send one request, not four, after the account pick in the sign-in popup (#4564)
Maintain Release Merge PR / update-release-pr (push) Canceled after 0s
Notify HeyPuter / notify (push) Canceled after 0s
Backend Tests / changes (push) Canceled after 0s
Backend Tests / typecheck (push) Canceled after 0s
Backend Tests / test shard 1/4 (push) Canceled after 0s
Backend Tests / test shard 2/4 (push) Canceled after 0s
Backend Tests / test shard 3/4 (push) Canceled after 0s
Backend Tests / test shard 4/4 (push) Canceled after 0s
Backend Tests / test (main) (push) Canceled after 0s
Backend Tests / coverage (push) Canceled after 0s
release-please / release-please (push) Canceled after 0s
* Send one request, not four, after the account pick in the sign-in popup A sign-in popup exchanges for the opener's app token as soon as the user picks an account. postAuthActions now hands over that result when the opener origin and session token still match, and exchanges again otherwise. The relationship check is skipped when an account was picked, since the pick already decides both the second picker and consent. Signup in the popup is not a pick and still runs it. The /whoami read before the picker is reused only when the same user and session token are still in place, the exchange just accepted that session, no verification gate is pending, and the read is under a minute old. * Test picking a different account in the sign-in popup The popup has to read the picked account once and hand over a token for it, not for the account it opened with. The second-account helper moves to the shared e2e helpers so both specs that need one use the same copy. |
||
|
|
2084587885 |
fix(apps): list only the caller's own apps (#4562)
release-please / release-please (push) Canceled after 0s
Backend Tests / changes (push) Canceled after 0s
Backend Tests / typecheck (push) Canceled after 0s
Backend Tests / test shard 1/4 (push) Canceled after 0s
Backend Tests / test shard 2/4 (push) Canceled after 0s
Backend Tests / test shard 3/4 (push) Canceled after 0s
Backend Tests / test shard 4/4 (push) Canceled after 0s
Backend Tests / test (main) (push) Canceled after 0s
Backend Tests / coverage (push) Canceled after 0s
Maintain Release Merge PR / update-release-pr (push) Canceled after 0s
Notify HeyPuter / notify (push) Canceled after 0s
The `puter-apps` `select` method returned every app that was not protected unless the caller sent `predicate: ['user-can-edit']`. It now always scopes to the caller's own apps. The predicate is still accepted and no longer changes the result. Apps owned by someone else stay reachable by name or uid through `read` and `/query/app`. `AppStore.count` drops `visibleToUserId`, which only the unscoped listing used. |
||
|
|
222ffcfe39 | fix(dev-center): accept only a hostname for puter.domain and digits for puter.port; escape the saved app link (#4561) | ||
|
|
7494aa1cbc |
Reload a tab when another tab switches to a different account (#4560)
* Reload a tab when another tab switches to a different account Every tab shares one stored session token. A tab that sees a new token appear in storage adopted it whoever it was issued to, so after an account switch in one tab the others kept showing the previous account while sending requests as the new one. A tab now reads the user out of the stored token. A token for the account it already shows is adopted as before. A token for a different account reloads the tab, which comes back up as that account. A tab with no signed-in user, or a token whose user can't be read, behaves as before. * Store a new account's token only after its session cookie is set A tab that sees another account's token in storage reloads and signs in from the session cookie. update_auth_data() stored the token before it synced the cookie, so a tab that reloaded faster than the sync came back up as the previous account and stored that account's token again, which the switching tab then adopted under the new account. The token is now stored after the cookie sync, in the same task as the stored user. * Keep the new account's token when another tab stores one during the cookie sync update_auth_data() sets window.auth_token, then waits for the session cookie sync. A token another tab stored during that wait was adopted over it, so the tab finished the switch holding the previous account's token and saved it under the new account in logged_in_users. The token is set again once the sync has settled. * Create one visitor account for the account switch e2e tests Each test signed up its own visitor, and sign-ups are limited to 10 per 15 minutes, so a few runs in a row failed in setup. |