diff --git a/CHANGELOG.md b/CHANGELOG.md index ea80b92..d61b3a4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,7 +7,8 @@ - Preserve the previous memory download until the next file is accepted. - Add bounded queues (32 files per side), sending in both directions, per-file progress and results, queue removal, and incoming-file decline. -- Add explicit Disconnect; setup roles stay locked while connected. Disconnect +- Add explicit Disconnect and live Send/Receive navigation. The initial receiver + can use Send to add files without reconnecting. Disconnect aborts unfinished writes while preserving the last completed memory download. - Upgrade connection/session framing to v3 with per-file identifiers. Both peers must update; v2 codes are rejected before connection setup. diff --git a/README.md b/README.md index af75259..e7a5776 100644 --- a/README.md +++ b/README.md @@ -52,8 +52,9 @@ disk writes. To cancel an already active transfer, disconnect; cancelling only a active file is not supported. Completed memory downloads remain available after disconnect. Save a previous memory download before accepting another file; acceptance replaces it. **Reset** discards the memory download and returns to -setup. Send/Receive chooses who starts the connection and is locked during the -session. Both people can send using the session's file picker. +setup. Before connecting, Send/Receive chooses who starts the connection. Once +verified, these controls navigate to the sending and receiving sections without +reconnecting. The initial receiver can click **Send**, then **Add files to send**. Keep both tabs open. Switching browser tabs or apps does not explicitly cancel the session, although browsers and mobile operating systems can suspend pages. diff --git a/docs/ux-roadmap.md b/docs/ux-roadmap.md index a252045..7826a82 100644 --- a/docs/ux-roadmap.md +++ b/docs/ux-roadmap.md @@ -22,8 +22,8 @@ that compatibility path with protocol v3; both peers now need the current build. ## 2. Multiple files and transfers in either direction — implemented -Session ownership is independent of the initial Send/Receive setup choice. Setup -tabs stay locked while a session exists. Both people can select or drop multiple +Session ownership is independent of the initial Send/Receive setup choice. After +verification, Send/Receive navigates between sections while preserving the session. Both people can select or drop multiple files and add more while transferring. Each local queue is capped at 32 including its active outgoing file; a rolling list retains the last 50 results. diff --git a/scripts/browser-check.ts b/scripts/browser-check.ts index e74f04b..5381a39 100644 --- a/scripts/browser-check.ts +++ b/scripts/browser-check.ts @@ -274,7 +274,13 @@ try { input.files = files.files; input.dispatchEvent(new Event('change', { bubbles: true })); }); await evaluate(sender, () => window.__hellcon.element('button[aria-label="Remove remove-me.bin"]').click()); + await click(receiver, 'Send'); + assert.equal(await evaluate(receiver, () => document.activeElement?.getAttribute('aria-labelledby')), 'send-heading'); await evaluate(receiver, () => window.__hellcon.chooseFile(8193, 'return.bin')); + await click(receiver, 'Receive'); + assert.equal(await evaluate(receiver, () => document.activeElement?.getAttribute('aria-labelledby')), 'receive-heading'); + await click(sender, 'Receive'); + assert.equal(await evaluate(sender, () => document.activeElement?.getAttribute('aria-labelledby')), 'receive-heading'); await wait(sender, () => !!document.querySelector('.incoming')); await wait(receiver, () => !!document.querySelector('.incoming')); await click(receiver, 'Decline file'); @@ -291,9 +297,9 @@ try { assert.deepEqual(received, { length: size, valid: true }); await checkAccessibility(session, 'Bidirectional session'); } - assert.equal(await evaluate(sender, () => [...document.querySelectorAll('.tabs button')].every(button => (button as HTMLButtonElement).disabled)), true); + assert.equal(await evaluate(sender, () => [...document.querySelectorAll('.tabs button')].every(button => !(button as HTMLButtonElement).disabled)), true); assert.deepEqual(await evaluate(sender, () => [...document.querySelectorAll('.fp-row code')].map(e => e.textContent)), originalFingerprints); - console.log('PASS: simultaneous bidirectional transfers, multiple-file queue, removal, decline, exact bytes, and locked setup tabs.'); + console.log('PASS: simultaneous bidirectional transfers, multiple-file queue, removal, decline, exact bytes, and live Send/Receive navigation without reconnecting.'); await click(sender, 'Reset'); await click(receiver, 'Reset'); assert.equal(await evaluate(sender, () => window.__hellcon.element('[role=status]').textContent), 'Choose a file to start.'); diff --git a/src/App.vue b/src/App.vue index 24746ab..09d0915 100644 --- a/src/App.vue +++ b/src/App.vue @@ -4,6 +4,13 @@ import TransferPanel from './components/TransferPanel.vue'; const mode = ref<'send' | 'receive'>('send'); const sessionActive = ref(false); +const connected = ref(false); +const direction = ref<'send' | 'receive'>('send'); +const panel = ref | null>(null); +function navigate(next: 'send' | 'receive') { + if (connected.value) { direction.value = next; panel.value?.focusDirection(next); } + else if (!sessionActive.value) mode.value = next; +} const isLocal = location.protocol === 'file:'; const canDownloadApp = import.meta.env.PROD && !isLocal; @@ -20,12 +27,14 @@ const canDownloadApp = import.meta.env.PROD && !isLocal;

For large files in the downloaded local version, use desktop Chrome on the receiving machine and choose “Choose destination & receive to disk”.

-
- - +
+ +
- +

Connected — either person can send files. Send and Receive jump to those sections without interrupting transfers.

+

Finish connecting and verifying first. Then either person can send and receive.

+