Repository navigation
Feat/av conferences new - #17
Open
MasterK0927 wants to merge 90 commits into
Open
MasterK0927 wants to merge 90 commits into
MasterK0927 wants to merge 90 commits into
Conversation
…ols and signal handling
… speaker detection, and UI components for participant interaction
… handling, role management, and UI state management
Feat/av conferences new
…ndling for replies, and add toggle for switching thread to normal
…hreads with improved BFS implementation
Feat/216 reply to a message
Collaborator
|
@MasterK0927 Please clarify what should we do with this PR. |
The one-shot startCapture() console logs from the last commit are easy to miss: they print once at call start, and every console paste so far has started mid-call, well past that point in scrollback. Moved the same information into the stats panel instead — it already polls once a second and stays open, so a single screenshot now shows whether voice/filmstrip capture actually started, without hunting for a specific line in a huge log dump.
logs.txt pinned this down exactly: "filmstrip worker error: undefined"
fires immediately on startCapture(), right out of
@lightningrodlabs/signals-media's own createInlineFilmstripWorker().
That helper builds a `type: "module"` Worker from a Blob URL and
revokes the URL synchronously right after construction. Module workers
fetch their script asynchronously (unlike classic workers), so the URL
is gone before the fetch resolves and the worker fires a bare error
event with no message. voiceWorkletModuleUrl() in the same file
deliberately does NOT revoke early for exactly this reason ("addModule
may fetch it later") — createInlineFilmstripWorker() just missed the
same fix.
Worked around it by building the worker through Vite's own `?worker`
import of the package's ./filmstrip-worker subpath instead of the
library's Blob-URL helper — a real worker asset, no revoked-URL race.
…in calls ConferenceJoined always called the WebRTC-only initiateConnections() whenever a peer joined, with no transport check. On the Holochain transport that stamped connectionStatus values like "init-sent" on the participant that nothing on that transport ever clears, so the "Connecting" badge stuck permanently over an otherwise-live filmstrip feed. Skip that call entirely for Holochain-transport rooms: signalsMediaStreams already re-derives its send targets from participant.hasJoined on every tick, so nothing else needs to happen when a peer joins.
…t key sign_turn_challenge takes only a 32-byte nonce from the caller and builds "k2-turn-cred-v1" || nonce || dna hash core || agent key core itself, so it can't be used to sign arbitrary data. Uses sign_raw because sign msgpack- encodes its input, which the external credential issuer can't verify.
When VITE_TURN_ISSUER_URL is set, fetch a nonce, sign it via sign_turn_challenge, and exchange the proof for a coturn credential that is added to every new peer connection. Refreshed before WebRTC init and on the call heartbeat when under 5 minutes remain. The WebRTC transport option only appears once a credential is in hand, so a failed fetch keeps calls on the Holochain transport.
This was referenced Oct 6, 2026
feat(turn): short-lived TURN credentials for WebRTC calls
Brings in the Holochain 0.7 upgrade. AV-side code ported to the new APIs: conference/reply entry and link arms re-added to develop's 0.7 validate(), message-reply link validators take TypedAction, tests import @holochain-open-dev/tryorama, and reply hydration reads author/timestamp from the action header (@holochain/client 0.21).
webkitgtk is marked broken on darwin in the pinned nixpkgs, so nix develop failed to evaluate on macOS.
When built with VOLLA_DEVICE_AUTH_URL, the app enables tauri-plugin-holochain's hc-auth flow: a device key held in lair is registered with hc-auth-server, the conductor joins through relay2's authenticated bootstrap and relay once an operator approves it, and a notice shows the device code while it waits or is refused. Pending devices are rechecked by restarting the conductor with fresh auth material. Without the variable, networking is unchanged. sign_turn_challenge now signs volla-turn-cred-v2 || nonce || device with that device key, so the TURN issuer can check the same approval. Credential requests wait for approval and back off after a failure instead of retrying every heartbeat. The release workflow passes VOLLA_DEVICE_AUTH_URL and VITE_TURN_ISSUER_URL from repository variables.
Recheck admission only when the user asks, so registration no longer restarts the conductor under the UI's first zome call and a waiting device keeps working locally. Open the main window early only when the conductor runtime is actually up; the plugin state alone exists before boot finishes. Bump kitsune2_transport_iroh to 0.5.1. In 0.5.0 every space join re-inserted the home relay without its bearer token, so the authenticated relay denied all reconnects.
feat(admission): gate network and TURN access on device approval
fix(admission): report a blocked device as denied
fix(profiles): wrap profiles zome inputs for main-0.7
lastBackgroundTime starts at 0, so the first visibilitychange to visible without an earlier hidden event looked like a long Doze and reloaded the page. On desktop this happens when the window opens on another Space or behind other windows, and the reload ends any call in progress.
fix(layout): only reload after a real background period
The first zome call after connecting can fail for transient reasons: the device admission restart swaps the conductor while the call is in flight ("K2 Space ... does not exist"), or init() is still running on a slow first launch ("blocking this zome call for longer than 30 seconds"). Either way the app showed Failed to connect and never recovered. Retry the ping a few times before giving up.
fix(startup): retry the first relay cell call
A missed invite used to be deleted after 60 seconds, so the callee had no way into a call that was still running. Keep it as missed and show a Join banner while the call is still active. A call whose participants crashed or reloaded kept its active-call link and blocked new calls in that conversation for up to four hours. While a conversation is open, ask the listed participants whether they are in the call. Only apps that really are in it answer. After two checks in a row with no answer, end_abandoned_conference marks the call inactive, and the conversation gets an ended log so the call no longer shows as ongoing. The new signals and zome functions are coordinator-only, so the DNA hash does not change.
fix(calls): let missed calls be joined and clear abandoned ones
Take the sender of CallPresenceQuery and CallPresenceReply from call_info().provenance instead of a field in the payload, accept a reply only from an agent that was actually asked, and only reuse a started log whose author is its initiator when posting the ended log for an abandoned call. Without this a member could fake replies to keep a dead call active, or forge a started log to change who the ended entry names.
fix(calls): trust only the real sender of presence signals
Validation used to accept any change to conference records and call links from anyone in the conversation, so a member could end a call they had no part in, either through end_abandoned_conference or with a modified client. Calls are now protected in the integrity zome: - the ActiveCalls link lists the call's members (the creator and the invitees) in its tag; only the creator can create it and only a listed member can delete it - room participant links can only be added or removed by the agent they point to - conference and participant records, and the links that index them, can only be created by their own agent, and updates cannot change their identity fields The coordinator follows the same rules: removing the active call link and ending an abandoned call only act for members, and ending a call only removes the caller's own room link. This changes the DNA hash.
Conference and participant updates were accepted from any member as long as the identity fields stayed the same, so anyone could rewrite another member's role or the conference host. A conference can now only be updated by its creator and a participant record only by that participant, and roles can no longer change through updates. Reads use the original records, so the role and host writes the coordinator made for other agents never had an effect; they are dropped rather than rejected. The room id is now derived from the DNA, the creator and the creation time, and validation checks it, so nobody can create a second conference under someone else's room.
fix(calls): only call members can end a call
This branch had an error being deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes holochain-apps/volla-messages#181
TODO: