Commit Graph
189 Commits
Author SHA1 Message Date
sanapachandClaude Opus 5.5 8606f08a36 Add visualization protocol v3 and the VFD panel preset
Scripts now receive the spectrum, channel levels, sample rate and track,
queue and transport details; may return #{ commands, state } to keep state
between frames (with dt and frame, reset on reload and on opening); can draw
thin braille dots and lines (clipped to the area); and can set bold, dim,
italic, underline or reversed on any command. v2 scripts keep working.

The bundled "VFD panel" preset uses all of it for a vacuum-fluorescent hi-fi
front panel in a thin style: segment counter, peak level meter, 25-band
analyzer with peak hold, tone fans, routing diagram and transport lamps,
with a power-on segment test, a counter search on track changes and an
OVER lamp.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-20 23:48:13 +02:00
sanapachandClaude Opus 5.5 aabca327b2 Measure a third-octave spectrum and channel levels for visualizations
The analyzer now keeps a full-rate mono PCM history and per-window left/right
RMS and peaks. The FFT and all ballistics run on the reader side when a
snapshot is taken, so the audio callback only appends samples: 31 bands with
exact base-2 edges that partition the FFT bins, an ~85 ms window that follows
the sample rate, time-based attack/fall/peak hold, and silence only after the
PCM counter has stalled for longer than a few device callbacks.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-20 23:48:13 +02:00
Aleksandr Bogomiakov 038f0979af Release Furumi 0.5.0 with published FRID podcast crates v0.5.0 2026-11-20 14:17:49 +00:00
ab 81f422b244 Merge pull request 'Публичные подкасты в TUI: «Поделиться», поиск с типом podcast и «Подписаться» из карточки (MR-T3)' (#4) from sanapach/furumi-tui:podcasts/discovery into federation 2026-11-20 14:11:11 +00:00
ab 7659313dc2 Merge pull request 'Подкасты в TUI на контракте FRID: подписки, воспроизведение, прогресс, синхронизация устройств v4 (MR-T2)' (#3) from sanapach/furumi-tui:podcasts/tui into federation 2026-11-20 14:11:09 +00:00
ab 44d0bb5abe Merge pull request 'Порядок вкладок 1–6 с Podcasts на 4 и миграция keymap (MR-T1)' (#2) from sanapach/furumi-tui:podcasts/tab-order into federation 2026-11-20 14:11:00 +00:00
sanapachandClaude Opus 5.5 59d6a1fe24 Point frid deps at the fork branch
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-20 15:13:15 +02:00
sanapachandClaude Opus 5.5 409188b9a9 Publish podcast cards only after the first device sync
A device restarted with a "share" decision that another device of its
group revoked meanwhile sent that card again: the first reconciler pass
called sync_shares from the stale registers before device sync ran.
Until DeviceSync says the registers are current (a sync exchange with a
v4 device of the group after the store was attached, or no such device
to wait for), passes now only unpublish cards the local registers no
longer share and never call sync_shares.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-20 15:13:07 +02:00
sanapachandClaude Opus 5.5 ce5697ce1d Document held-back revocation and quitting during a revocation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-20 15:13:07 +02:00
sanapachandClaude Opus 5.5 adfe809a40 Wait for in-flight revocations and track them with federation off
Share-off and unsubscribe now take a revocation ticket on the UI thread
before the write starts and ask for the immediate pass from the blocking
task once the write succeeded, so quitting right after Shift+F (before the
write's event was handled) still waits for the tombstone. With the
federation off or not started yet, a podcast that was shared counts as
possibly not revoked: the reconciler keeps it in the Off reports until the
overlay runs, the side panel says the card may not be revoked yet, and the
quit-time flush logs a warning.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-20 15:13:07 +02:00
sanapachandClaude Opus 5.5 d6962eba47 Keep public artwork whose path only looks random
Public podcast hosts and CDNs name artwork and pages by UUIDs and
content hashes, so the random-looking path rule dropped the artwork of
most public podcasts. Artwork and links now follow the query and host
rules only; a member feed's artwork is still left out with its feed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-20 15:13:07 +02:00
sanapachandClaude Opus 5.5 43e0696531 Drop share confirmations whose decision was not written
A confirmation is recorded as pending before the share decision is
written and covers the next newer decision. When the write failed (the
podcast was unsubscribed by a sync meanwhile, a database error), the
pending entry stayed and later covered a decision taken on another
device that this user never saw. Put the previous entry back on failure,
and drop pending entries left in the file by a call that never finished.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-20 15:13:07 +02:00
sanapachandClaude Opus 5.5 405f8ae6d3 Hold back unconfirmed private-looking cards before syncing
FRID's sync_shares keeps publishing a card whose feed URLs this device
already publishes, even without the privacy confirmation. A device that
missed an intermediate share-off would go on publishing a private-looking
URL nobody confirmed for the new decision. share_plan now leaves such a
podcast out of the states, so sync_shares revokes the old card, and
reports it as held back itself.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-20 15:13:07 +02:00
sanapachandClaude Opus 5.5 3ddf7995e8 Document prompt revocation and moved-feed subscriptions
README, ARCHITECTURE, CHANGELOG and AGENTS describe the immediate
revocation and quit-time wait, decision-bound confirmations, the card
URL filter, devices that left the group, the separate bounded podcast
search, and which direction of a moved feed the search mark covers.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-20 15:13:07 +02:00
sanapachandClaude Opus 5.5 17ed8bfcd4 Scroll the podcast card exactly to its end
The card and the share dialog measure their word-wrapped height the
way it is rendered (ratatui's rendered-line-info), and scroll keys stop
at the last line instead of running past it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-20 15:13:07 +02:00
sanapachandClaude Opus 5.5 fd6827126f Recognize subscriptions under a feed's newer address
Subscribing to an older address whose feed announces a newer one this
device already follows (itunes:new-feed-url without a redirect) reports
the existing subscription instead of adding a second one, and a card
whose feed moved to a followed address reads «Уже подписан» once its
episodes were read.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-20 15:13:07 +02:00
sanapachandClaude Opus 5.5 744d56e06b Leave private-looking artwork and links out of cards
The share dialog shows the feed URLs only, so a card no longer carries
an artwork or web page URL that looks like it holds an access key, and
a member feed's card carries neither.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-20 15:13:07 +02:00
sanapachandClaude Opus 5.5 7add66920d Bind share confirmations to the share decision
A privacy confirmation now covers the share decision it was given for,
not only the URLs: sharing turned off, or turned on again after a
revocation, on any trusted device drops it, so this device asks again
before it publishes a feed URL that looks private.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-20 15:13:07 +02:00
sanapachandClaude Opus 5.5 1137670229 Revoke podcast cards promptly and report unrevoked ones
Turning sharing off or unsubscribing runs a reconciler pass right away,
and quitting waits up to 4 s for it. The Podcasts tab tells a private
podcast whose card from this device is still live, failed revocations
are reported without ids, the overlay peer count stays current, and the
reconciler loop is tested against a loopback overlay.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-20 15:13:07 +02:00
sanapachandClaude Opus 5.5 a51f5552e3 Search public podcasts apart from the music search
Federated music results no longer wait for the discovery overlay: the
podcast search runs as its own task, bounded at 15 s including the
overlay's bootstrap, and arrives as its own event.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-20 15:13:07 +02:00
sanapachandClaude Opus 5.5 d38144fe45 Document finding public podcasts and bump to 0.5.0
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-20 15:13:07 +02:00
sanapachandClaude Opus 5.5 160237b5a5 Test subscribing from a public podcast card
Cover the merge order of podcast hits, alias resolution, the feed
preview, subscribing from a card (same podcast id as by URL, never a
claimed URL, forged ids refused) and an end-to-end run: a stranger's
node finds a shared card over loopback overlay nodes, subscribes
privately, refreshes from a local feed server and keeps the
subscription after the publisher stops sharing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-20 15:13:07 +02:00
sanapachandClaude Opus 5.5 e038f282c2 Find public podcasts in search and subscribe from their cards
Federated search also queries the podcast discovery overlay and lists
the podcast entries of merge_search_results after the music results,
marked [podcast], with the publishing devices or "subscribed" (also
through a feed alias resolved off the UI thread). Enter opens the card:
the publishers' claims, the origin feed URL, unverified moved-feed
claims, an optional episode preview read from the feed itself, and
«Подписаться», which subscribes privately with the origin URL only.
«Уже подписан» opens the podcast in the Podcasts tab instead.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-20 15:13:07 +02:00
sanapachandClaude Opus 5.5 25a9f2b0ec Subscribe to a parsed feed URL
Split refresh::subscribe into input parsing and subscribe_url, so a
public card's origin URL can be subscribed to exactly as given, and let
the feed parser be reused for previews.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-20 15:13:07 +02:00
sanapachandClaude Opus 5.5 6d225531a5 Document sharing podcasts in the federation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-20 15:13:07 +02:00
sanapachandClaude Opus 5.5 8f4e58d8af Add a share toggle to the Podcasts tab
Shift+F in the podcasts context shares the selected or opened podcast
through PodcastStore::set_shared (a synced decision) or makes it private
again. A feed URL that looks private is confirmed first in a dialog that
lists the warnings in Russian. The reconciler runs after share and
unsubscribe actions, received podcast operations, feed refreshes, overlay
restarts and periodically; the list and side panel show the shared and
published state and publication errors.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-20 15:13:07 +02:00
sanapachandClaude Opus 5.5 8c90035fa2 Reconcile own podcast publications with the share registers
podcasts::publication builds one PodcastShareState per subscription (cards
from the catalog for shared podcasts only, the device-local privacy
confirmation) and hands them to PodcastDht::sync_shares, which publishes
what is shared and tombstones the rest. Without a readable store every own
card is revoked. Privacy confirmations live in a 0600 JSON file next to
podcasts.sqlite3 and cover exactly the confirmed URLs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-20 15:13:07 +02:00
sanapachandClaude Opus 5.5 c453b0a52f Run the podcast discovery overlay in the federation node
The node serves FRID's podcast_dht overlay next to the similarity overlay
(cache federation/podcast-dht.sqlite3), runs its maintenance, hands peer
capability manifests to note_peer_capabilities and advertises podcast_dht
only while the overlay runs. A cache that cannot be opened is logged and
only turns discovery off. The running overlay is exposed through a watch
channel for the publication reconciler.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-20 15:13:07 +02:00
sanapachandClaude Opus 5.5 ea7cdc4b7f Point frid deps at the fork branch
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-20 15:12:14 +02:00
sanapachandClaude Opus 5.5 c7e6a3672d Test that an older Jam guest cannot drop the host's episodes
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-20 01:51:02 +02:00
sanapachandClaude Opus 5.5 e0624ab7f4 Document what an older device's takeover does to a podcast queue
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 22:15:09 +02:00
sanapachandClaude Opus 5.5 2806e679ac Leave out placeholders an older device echoes back as music
A device below sync v4 mirrors the redacted queue it gets with its own
types, which drop PlaybackTrack::source, so each "Private item" becomes
a bare music item. When it takes playback over (Play on it, a
paused-startup claim, automatic failover) or sends a command, it
announces those items, and this device adopted unplayable fake tracks
and passed them on to every v4 peer. States from such devices are now
cleaned on receipt, with a status message once per change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 22:15:09 +02:00
sanapachandClaude Opus 5.5 d03a3300f1 Resume dropping prototype feed validators after an interrupted start
The prototype import commits inside PodcastStore::open and the imported
validators were dropped afterwards, once. A start that stopped in
between left them for good. A marker next to the store, written before
the import and removed once every podcast was handled, makes the step
run again at the next start. The imported failure count is recorded
again as it was, so the back-off is kept.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 22:12:24 +02:00
sanapachandClaude Opus 5.5 42ecc310fc End a sizeless episode stream where it ends when only the feed knew its length
A stream without a file size whose decoder cannot measure its duration
only has the feed's itunes:duration, which is often longer than the
audio. Treat that duration as a hint: a clean close past 80 % of it is
the end. A duration the decoder measured keeps the strict completion
window. The interrupted message for a stream that cannot seek now says
to start over or mark the episode played instead of "press play".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 22:11:33 +02:00
sanapachandClaude Opus 5.5 96e615bf1d Refuse an episode seek without leaving the effect early
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 21:56:12 +02:00
sanapachandClaude Opus 5.5 34c096a36b Bound a whole feed fetch and test the fetch limits
A slow server could hold one of the four refresh slots for 60 s per
redirect hop. A feed or cover fetch now has an overall deadline (120 s).
Tests cover feeds over the size cap with and without Content-Length
(error recorded with back-off, catalog kept), the redirect cap, a
redirect loop, a non-http redirect, a hanging server, and covers (not an
image, over the cap, written atomically). The test server can stall.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 21:53:44 +02:00
sanapachandClaude Opus 5.5 268ea915da Keep podcast store work in sync handlers off Tokio workers
The device-sync stream handlers exported and merged podcast snapshot
sections and operations synchronously on a Tokio worker. While a large
feed refresh held the store (up to about half a second), the worker's
other tasks (feed checks, streams, art) waited. Run that work in
block_in_place on the multi-thread runtime, and say so in ARCHITECTURE.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 21:52:05 +02:00
sanapachandClaude Opus 5.5 e0da2ddf2b Move a feed to its permanent address behind a temporary redirect
A 301 to a new host followed by a 302 (CDN, tracker) never moved the
feed, because only all-permanent chains counted; every check then went
through the old address without validators and re-applied the whole
feed. The target of the leading permanent hops is now recorded as the
new fetch URL (the old one becomes an alias); the document is still
parsed against the URL that served it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 21:50:44 +02:00
sanapachandClaude Opus 5.5 fe373e4169 Parse imported prototype feeds on their first check
The prototype import keeps the prototype's ETag and Last-Modified, but
the prototype stored no seasons, episode numbers or types, and GUID-less
episodes stay provisional until the feed is parsed again. The first check
was answered 304 and a feed that no longer changes was never parsed.
Drop the imported validators right after the migration so the first
check downloads and applies the feed. Contract gap for the FRID import.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 21:49:16 +02:00
sanapachandClaude Opus 5.5 42f22f0fea Document lost connections, cancellation and seeks of episodes
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 21:47:41 +02:00
sanapachandClaude Opus 5.5 2989747162 Stop broken episode streams instead of completing them
- The stream reader records whether the decoder stopped on a read error
  and whether the server announced the file size. An episode whose
  connection was lost (stall, expired URL) or whose sizeless stream
  closed early is no longer completed at its full duration: the last
  position is saved, playback stops on the episode and the queue does
  not move on (playback::played_to_the_end).
- Streams are cancelled by the player's source generation: a superseded
  start stops connecting or reading up to its resume offset, and a read
  blocked inside the audio callback returns within 100 ms instead of up
  to 30 s. The player no longer reports the end of a superseded source.
- A pause or resume pressed while an episode connects is applied when
  its source arrives (Controller::expect_source).
- Seeks report their result (PlayerEvent::Seeked); an episode's seek is
  saved only when the audio moved, and seeks while connecting or in a
  stream without Range support are refused with a message.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 21:47:41 +02:00
sanapachandClaude Opus 5.5 8d87fe3959 Keep older devices hearing from a podcast queue owner
A device below sync v4 got no playback snapshot while the queue held an
episode, so its engine never heard the owner's heartbeat and took
playback over by automatic failover after two minutes; this device then
adopted its queue and the episodes were gone. Send such peers the
coordination envelope with the queue redacted like for Jam: every
episode becomes an opaque "Private item", nothing is stripped, and their
commands stay refused while the queue has episodes.

This departs from FRID PLAYBACK_PROTOCOL.md rule 1 ("send None") and is
reported as a contract gap.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 21:40:07 +02:00
sanapachandClaude Opus 5.5 70df945ada Keep podcast URLs out of the personal-sync debug log
Podcast operations and playback commands with episodes carry feed and
audio URLs that may hold private tokens; the Logs tab shows this crate's
debug output. Log only their kind.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 21:39:19 +02:00
sanapachandClaude Opus 5.5 a79f0a0e95 Save a seek from a controlling device as an explicit episode action
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 21:03:55 +02:00
sanapachandClaude Opus 5.5 c6d7848ba4 Document podcast sync between devices and release 0.4.0
README explains that podcast state is private by default, syncs only
between trusted devices and streams audio from the publisher, plus
handoff, Jam and older devices. ARCHITECTURE, AGENTS and the changelog
describe protocol v4, version gating, the podcast store bridge and the
invariants (no numeric ids for episodes, versions only from the device
itself).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 21:02:45 +02:00
sanapachandClaude Opus 5.5 a92e12f322 Hand off podcast queues to v4 devices and keep episodes private in Jam
Queue items now cross the wire with their explicit source: episodes as
PlaybackSource::PodcastEpisode, received ones as TrackItem episodes, and
the source mode filter never drops them. A handoff carries the episode,
position and pause; an episode that becomes current at position 0
resumes from its saved position. A podcast queue is not handed to a
device below v4 (it needs an update), and playback commands from such a
device are ignored while the queue has episodes. Controlling a v4 device
may queue episodes.

Jam hosts publish redacted snapshots, so guests see numbered private
placeholders. Guest commands that add episodes are dropped; their
placeholders are mapped back to the host's episodes, and changes that
drop or duplicate them, or seek in them, are refused. A guest leaving a
Jam drops the placeholders.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 21:00:39 +02:00
sanapachandClaude Opus 5.5 79372e00fc Sync podcast state with devices on protocol v4
This client now announces device-sync protocol 4. Podcast operations
are applied to the podcast store, kept in the log and relayed; those
that arrive before the store opens wait in sync_podcast_pending.
Snapshots carry the podcast sections, bounded by the shared limits and
by the line budget of each message, and are merged after the operations.
Operations, snapshot sections and playback state that need v4 are only
sent to peers that reported v4. Periodic progress checkpoints are
coalesced in the log, and the Podcasts tab reloads after changes from
other devices.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 20:54:16 +02:00
sanapachandClaude Opus 5.5 4c3edbcd12 Store peer protocol versions as the peers report them
A device_profile_set and the pending pairing row used to store this
build's own protocol constant for another device, which would defeat
version gating. Self-reports (hello, pairing, the sender's own entry of a
devices list, its own profile announcement) now replace the stored
version and relayed profiles only raise it. Invites and profile
announcements carry the version, and the first start of a new version
announces it in the log.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 20:44:14 +02:00
sanapachandClaude Opus 5.5 e7713269f2 Use the shared device-sync wire types
The private copies of the device-sync wire types are replaced by
music_dht::device_sync. Golden tests keep the furumi-tui 0.3.x types
verbatim and check that v3 messages serialize byte for byte the same.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 20:41:11 +02:00
sanapachandClaude Opus 5.5 253583b139 Complete episodes after a seek into their last seconds
The progress tracker's observation step is now a pure method with tests
for listening time (jumps and pauses do not count), pause saves, the
checkpoint interval and one-time completion. A seek no longer marks the
playback completed by itself, so seeking into the last seconds still
sends complete_session on the next tick. The episode list render test
covers the live position of the playing episode.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 20:30:11 +02:00