Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ What's new in ps5upload, written for humans.

## Unreleased

**Activity**
- **An upload still going after you closed the page shows as running when you come back (#954).** The upload itself always carried on, but Activity listed it as "Interrupted" next to a second, running copy. It now picks up the same entry.

## 12.6.36

**Play Together over the internet**
- **Friends joining from Firefox, a VPN or IPv6 are no longer turned away.** Their browser sends more connection details than the hub allowed per minute, so the hub closed the join and the page said it couldn't reach the hub. The hub now allows a realistic amount for every browser and for several devices behind one home connection, and the join page sends only the details the app can use.
- The hub answers its address with a trailing slash too, tells search crawlers to stay away, and counts which limit stopped a connection, so problems like this show up straight away.
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
12.6.35
12.6.36
4 changes: 2 additions & 2 deletions client/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "ps5upload-client",
"private": true,
"type": "module",
"version": "12.6.35",
"version": "12.6.36",
"description": "The all-in-one PS5 companion app.",
"homepage": "https://github.com/phantomptr/ps5upload",
"author": "PhantomPtr <phantomptr@gmail.com>",
Expand Down
30 changes: 15 additions & 15 deletions client/src-tauri/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion client/src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ps5upload-desktop"
version = "12.6.35"
version = "12.6.36"
description = "The all-in-one PS5 companion app."
license = "GPL-3.0-or-later"
edition = "2021"
Expand Down
2 changes: 1 addition & 1 deletion client/src-tauri/tauri.conf.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "https://schema.tauri.app/config/2",
"productName": "PS5Upload",
"version": "12.6.35",
"version": "12.6.36",
"identifier": "com.phantomptr.ps5upload",
"build": {
"beforeDevCommand": "npm run dev:vite",
Expand Down
50 changes: 50 additions & 0 deletions client/src/state/taskWiring.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,53 @@ describe("speedAndEta (#444)", () => {
expect(speedAndEta(5, 100, 0)).toEqual({});
});
});

describe("an upload picked back up after a reload (#954)", () => {
it("runs again in its earlier task instead of beside an Interrupted one", async () => {
const { installTaskWiring } = await import("./taskWiring");
const { interruptedAtLoad, useTaskStore } = await import("./tasks");
const { useUploadQueueStore } = await import("./uploadQueue");
installTaskWiring();

const item = {
id: "q-1",
addr: "192.168.0.2:9113",
sourcePath: "/games/Game",
sourceKind: "folder",
displayName: "Game",
resolvedDest: "/data/homebrew/Game",
status: "pending",
bytesSent: 0,
totalBytes: 100,
};
const set = (status: string, bytesSent = 0) =>
useUploadQueueStore.setState((s) => ({
items: [{ ...(s.items[0] ?? item), ...item, status, bytesSent } as never],
}));
set("pending");
set("running", 10);
const tasksFor = () =>
useTaskStore.getState().tasks.filter((t) => (t.payload as { queueItemId?: string })?.queueItemId === "q-1");
expect(tasksFor()).toHaveLength(1);
const first = tasksFor()[0];

// The page reloads: the upload's task is marked interrupted and the queue row waits for the
// engine to say whether its job is still going.
useTaskStore.setState((s) => ({
tasks: s.tasks.map((t) => {
if (t.id !== first.id) return t;
interruptedAtLoad.add(t.id);
return { ...t, status: "interrupted" as const, endedAtMs: t.updatedAtMs };
}),
}));
set("pending");
set("running", 50);

expect(tasksFor()).toHaveLength(1);
expect(tasksFor()[0].id).toBe(first.id);
expect(tasksFor()[0].status).toBe("running");

set("done", 100);
expect(tasksFor()[0].status).toBe("done");
});
});
16 changes: 15 additions & 1 deletion client/src/state/taskWiring.ts
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,21 @@ export function installTaskWiring() {
: item.sourceKind === "folder" || item.sourceKind === "game-folder"
? "upload-dir"
: "upload-file";
const id = useTaskStore.getState().registerTask({
// After a reload the queue picks its upload back up (reattachRunning); the task this
// start-up marked "Interrupted" for that item is the same upload, so it runs again
// instead of leaving an Interrupted row beside a new one (#954).
const tasks = useTaskStore.getState();
const earlier = tasks.tasks.find(
(t) =>
t.origin === "uploadQueue" &&
t.status === "interrupted" &&
(t.payload as { queueItemId?: string } | undefined)?.queueItemId === item.id,
);
if (earlier && tasks.reopenTask(earlier.id)) {
queueTaskIds.set(item.id, earlier.id);
continue;
}
const id = tasks.registerTask({
kind,
origin: "uploadQueue",
label:
Expand Down
Loading
Loading