Commit Graph
3 Commits
Author SHA1 Message Date
SchluffeandClaude Opus 5.5 b6b6e7c29b Lint and format with Biome, and retire used share codes
Biome formats and lints the TypeScript, the Vue templates and the CSS:
pnpm lint checks, pnpm format fixes. It keeps the existing style, single
quotes and 120 columns, and leaves the vendored logo alone. Besides its
recommended rules it looks for promises nobody awaits. Rules that only
flagged deliberate code are off: non-null assertions that state what the
code guarantees, CSS order where no two rules set the same property, and
fieldset for role="group". The one-time formatting pass mostly splits
long chains.

Promises that are deliberately not awaited are marked with void, none of
them can reject today. Buttons say type="button", the any for peer
messages and the checkbox switch keep their reasons in ignore comments.

The sender's code also counts as no longer valid once a transfer started:
that closes the trackers, so another receiver would wait for nothing,
yet the card still offered the code with Copy. The tracker transfer
tests check it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 18:46:33 +02:00
SchluffeandClaude Opus 5.5 2abd0b504d Own each transfer in a session and harden the protocol
Every operation (share, receive, manual offer or answer) now runs as one
session tied to an AbortSignal. Starting another ends it: its connections,
tracker sockets and timers close, and it can no longer touch the shared
security check, progress or incoming file. Finished, failed and cancelled
transfers close their connections, and the sender's tracker sockets close
once the download starts.

- A malformed or never-connecting tracker offer no longer blocks a share
- The receiver validates the file offer and rejects excess bytes and
  data beyond the flow control window; sw.js checks name and size too
- Failures show up in the card instead of disappearing into rejected
  promises: bad manual codes, unreachable trackers, lost connections
- Primary buttons and pink text meet 4.5:1 contrast, the STUN switch
  shows keyboard focus again, the tracker Copy button matches the others
- Split the core into src/core.ts, src/main.ts only mounts the app, which
  removes the main.ts <-> App.vue import cycle
- Bring back the Gitea source link, write the README
- Tests reuse one browser per worker with fresh contexts, fail on page
  errors, check cleanup after transfers, use a local fake STUN server
  and cover empty files, window boundaries, odd names, malformed
  messages, session replacement and the production build

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 16:04:14 +02:00
Schluffe 1bfeb9843a add missing ws.js and introduce save check for both sides 2026-10-22 23:29:55 +02:00