diff options
| author | Christophe Besson <cbesson@gmail.com> | 2026-09-16 17:47:00 +0200 |
|---|---|---|
| committer | Christophe Besson <cbesson@gmail.com> | 2026-09-16 17:47:00 +0200 |
| commit | c35f3a73eb68cdd7c4179cded3d1ead63ec5a033 (patch) | |
| tree | eabf5919a19646d5410adfe0e184cc608e1a9c48 /packages/meshbay-hub/src/meshbay_hub/static/playlist-menu.js | |
| parent | 3d4080e9a1b79e99428a80391e224ea73cf4274d (diff) | |
| download | meshbay-c35f3a73eb68cdd7c4179cded3d1ead63ec5a033.tar.gz | |
playlists: refuse a body no frame can carry, and say which one
A DataChannel send() throws above the max-message-size the node advertises
(aiortc: 65536), so the 1 MB body cap was unreachable and each body push
swallowed the difference in a bare catch. Cap at 62 KB after sealing, name
the playlist in the sync result, keep syncing the rest.
Measured: 1000 tracks seal to 53 276 bytes, so the ceiling is ~1200.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Diffstat (limited to 'packages/meshbay-hub/src/meshbay_hub/static/playlist-menu.js')
| -rw-r--r-- | packages/meshbay-hub/src/meshbay_hub/static/playlist-menu.js | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/packages/meshbay-hub/src/meshbay_hub/static/playlist-menu.js b/packages/meshbay-hub/src/meshbay_hub/static/playlist-menu.js index e2fb3f9..70c105d 100644 --- a/packages/meshbay-hub/src/meshbay_hub/static/playlist-menu.js +++ b/packages/meshbay-hub/src/meshbay_hub/static/playlist-menu.js @@ -197,11 +197,18 @@ function PlaylistMenuButton({ userId, lists, reload, onPlayQueue, onSync, cached // playlist subkey existed — and an AES handle is non-extractable, so // there is nothing to derive it from. One sign-in with the passphrase // fixes it for good; a code on screen does not say that. - say(r && r.ok - ? `${t('playlists.synced')} (${r.pushed || 0}↑ ${r.pulled || 0}↓)` - : (why === 'no_key' - ? t('playlists.err_no_key') - : `${t('playlists.sync_failed')}: ${why}`)); + // A playlist too large to send is reported ahead of the totals. The + // sync itself worked — everything else moved — so `ok` is true, and + // saying "synced" while one playlist silently stayed behind would be + // the lie this whole report exists to stop. + const big = (r && r.tooLarge) || []; + say(big.length + ? t('playlists.err_too_large', { name: big[0], n: 1000 }) + : (r && r.ok + ? `${t('playlists.synced')} (${r.pushed || 0}↑ ${r.pulled || 0}↓)` + : (why === 'no_key' + ? t('playlists.err_no_key') + : `${t('playlists.sync_failed')}: ${why}`))); }, }, ]); |