Commit Graph
352 Commits
  • fix(watch): choose usable tracks and retain writer backpressure
    Use existing player duration and browser codec support for automatic indexed-track previews, and retain explicit webpage selection. Give source-window notices their intrinsic height. Carry writer delivery separately from ordinary Core effects so expiry does not bypass its queue.
  • refactor(core): centralize state changes and persistence outcomes
    Keep channel time explicit, room binding transitions owned by their records, and shared limits checked against Core. Persist the actual changes before delivery, preserving expiry and the original requester on failure. Include the verified receiving-route, cache-clear, tooltip and native appearance corrections from this integration phase.
  • fix(diagnostics): a sample is the report's state, and the history keeps what happened
    Corrections from review of the always-on history.
    
    A repeated measurement, and what a live owner says of itself for a report,
    is recorded through debugSample: it is the state of the report being made
    and does not enter the history, and outside a report it is kept only under
    the developer's probes. The raw statistics sample, the playback, channel
    and audio snapshots and the encoding pool's sample go that way. A track's
    state beside each statistics sample was recorded as an event twice per
    producer on every poll, with its settings; it is a sample now, and a
    track's own events stay events. Making a report no longer adds to the
    history it reads.
    
    A candidate error keeps the server that refused and the code; the local
    address and port are kept only for a developer.
    
    The App's history starts where its service starts, which the desktop
    binary and the Android runtime both enter; the Android entry never reached
    the installation in the desktop binary.
    
    A pair's facts are kept in the order their stages last happened, so a pair
    that disconnected and connected again ends on connected.
  • fix(core): an outcome says only what its turn did
    Corrections to the typed outcome of an authority turn, from review.
    
    A member's request for its room's writer is carried in the commit as the
    writer's connection and the event. It was the turn's last effect with a
    flag saying so, which the hub popped by position: with the writer's session
    offline nothing was delivered and the pop took another event or found none.
    
    A summary is reported as changed only when the output was applied; an
    output the binding had already passed is acknowledged and changes nothing.
    A removal forwarded to an online writer reports nothing durable: the header
    changes when the writer's answer arrives, and that turn saves it.
    
    A refusal carries no code of its own, since its scoped answer is already
    among the effects and nothing read the copy.
    
    The authority copies itself before fewer turns: not for a join by a
    personal credential, which is admitted as its stored user or refused and
    writes no user record, and not for a turn its session state will refuse.
  • fix(core): projection work between inputs keeps the channel's clock
    Taking the time of a turn as an argument removed the room host's stored
    clock, and with it the one thing that field was: the channel's clock as of
    the authority's last input. Route deadlines are set in that clock. A peer
    turn does not come through the authority, so finish_peer was given the
    writer's own time, and a writer whose clock runs ahead could expire a live
    preparation when a deleted message's attachment reconciled the projection.
    
    The room host keeps that clock again, named for what it is, written by
    dispatch alone. finish and finish_peer read it and take no time from their
    caller, so a caller can no longer supply a different one; the WASM binding,
    the stored room host and the tests follow. Channel's entries still take the
    turn's time as an argument.
  • feat(diagnostics): history is always recorded, and only active probes wait for a developer
    A person had to turn recording on before a problem for its report to say
    what led up to it, and nobody does that before a problem. Recording is
    now passive and always on: the page and the App keep a bounded history in
    memory (8,192 events or 8 MiB), and a report is exported on demand. There
    is no recording switch for a person any more.
    
    The page's diagnostic control is one button that downloads the report, and
    the App launcher's is one button that downloads the App report. The
    launcher state no longer carries a debug field, the route that enabled App
    recording is gone, and the App no longer adds a debug flag to the pages it
    opens. The App installs its recorder at its start, before anything can
    log; the Server binary does not, so it is unchanged. Every guard that kept
    an event from being recorded is removed, and audio capture and capture
    frame counters always count.
    
    What stays off by default is the work that costs something of its own:
    the page's per-frame gap loop and console echo, which `?debug=1` starts,
    and the App's window-loop lateness probe and shutdown progress lines,
    which `PIIK_DIAGNOSTIC_PROBES=1` starts. Reports say whether probes ran
    instead of whether recording was on. The copy describes the report in all
    five languages, and keys and the visual kind that lost their last user are
    removed.
    
    Tests now assert that history is recorded with nothing switched on, that
    the probes run only with the developer's flag, and keep every assertion on
    bounds, secret filtering and report contents.
  • feat(diagnostics): the App's report can always be made, and holds how each connection stands
    The App refused a report unless recording had been switched on before
    the problem, in every new process. So the one report that would say
    which path a connection took, and how its preparation ended, was the
    one nobody had.
    
    The recorder now keeps, for each pair this process has known, the last
    fact of each stage: whether a preparation ran, what the two mappings
    were read as, how it ended, its check counts, which path was selected,
    how the pair closed. These are the reviewed values the history already
    used, with no address, port or identifier; the newest 256 pairs are
    kept and nothing is formatted or hashed until a report is made. A
    report writes them as `connections.json`, each pair under the alias
    both sides share, beside the build and the history.
    
    The export answers whether or not history is recorded, from the
    launcher and from the terminal. The launcher shows the report and the
    switch side by side. Recording the history stays the person's choice.
  • refactor(core): an authority turn returns its typed outcome
    Authority::handle now returns Handled: the effects to deliver and an Outcome
    that each branch writes from its own result. A rejection carries its code and
    room. A committed turn names the durable record it changed (the acting user,
    the header, or a summary a host committed), the hosted room creation or
    deletion its storage owner must finish, and whether its last event is a
    request for the room writer. Admission reports a new user or renewed owner
    credential, the channel reports profile and domain changes, and the host
    branches report directory changes. For a change that is undone when it cannot
    be saved, the Core hands back the authority from before the turn.
    
    The Server hub saves, undoes or keeps what the outcome tells it, so
    changes_metadata, the hub's command matching, the inference from the last
    event and the stripping of deferred replies are gone, along with
    Event::Deferred. A completion without a request ID now exists only for a
    failure. In hosted mode the Core leaves the creation or pending deletion
    answer to the hosting owner instead of emitting a reply for the hub to remove.
    Hosted room creation decides whether to keep a reservation from a typed
    OpenRoomError::MayExist instead of matching error strings, with the codes sent
    to clients unchanged.
    
    Tests that asserted the removed prediction or the internal deferred event now
    assert the same behaviour through the outcome or through a reply with a
    request ID.
  • refactor(core): the time of a turn is an argument, not stored state
    Channel and RoomAuthority each kept a stored clock: Channel.now was written
    by some Authority entries and read later by reconciliation, host input,
    forwarding and host sync, and RoomAuthority.now kept the last dispatch's
    time for the later finish and finish_peer calls. Entries that did not write
    it judged repair and admission deadlines against an older turn's clock, and
    nothing in the types showed which ones.
    
    Both fields are gone. Channel::reconcile, reconcile_transports, host_input,
    forward_room, sync_hosts, register_host, stop_host, accept_host,
    unsupported_host_input and remove_room take now, and every Authority entry
    that reaches them passes its own, including set_service_endpoint and
    failed_room_delete, which now take it explicitly. RoomHost::finish and
    finish_peer take now: StoredRoomHost passes the dispatched input's time and
    its peer turn's time, the Browser binding and its room host pass the same,
    and the Server passes its own clock. Tests that assigned the stored clock
    pass the argument instead. RequestContext.now, HostInput.now and the wire
    are unchanged.
  • test(app): expect unchanged page catalogs to stay quiet
    The native window fixture still expected a repeated catalog after closing an empty, unselected opener and reselecting the same child video. Assert the surviving WebView, selected media lifetime and complete catalog are unchanged, and require the specific empty queue outcome. Real candidate loss and final closure must still emit their existing events.
    
    This corrects the assertion reached in hosted Windows run 46167682687. That run remains failed; the corrected GUI fixture and previously skipped input check require a new isolated run. Production code is unchanged.
  • feat(watch): simplify video selection and preserve playback intent
    Start from one address and select a page video with one action. Keep resource ordering across direct, DASH and indexed offers, and keep each resource with its supported playback methods. Automatic viewers try the site before eligible sharer bytes; an explicit route stays selected. A room refusal ends the attempt rather than retrying a different source.
    
    Share, cancel and stop use a stable control footprint. End actions suppress native popover activation while preserving keyboard focus. The existing picker remains available for manual source and track choices. Update the English and Chinese flow descriptions.
    
    Built on reviewed queue changes 3378bca2 and f8ed4c1c, corrected through independent source-identity and operation-lifecycle regressions. The integrated Web suite passes 2631 tests; Windows compilation and 31 pure tests pass. Chrome at 390 and 820 verifies the combined workflow, keyboard focus and retry. Final TypeScript checks pass after matching the shared optional event signature. Native GUI and real-site acceptance remain separate.
  • fix(watch): tell the room a webpage's catalog only when it changed
    The bridge reports its candidates on every batch of document changes, and
    the host told the room each time: a catalog with a source read from every
    view, sent over the App link, and a render of the whole room page. The
    comparison now sits with the catalog's owner on the host, which knows the
    page's address and the limit on candidates: the bridge-side comparison is
    undone because, as Codex showed, it lost an address change of a page whose
    video sits in a frame, and a child's report refused for capacity.
  • feat(diagnostics): measure the native window loop after debug starts
    Renderer frame timing cannot see WebView2 work that blocks the host window thread. Send at most one timing probe through the existing Tao event loop and aggregate its queue delay there into the opt-in App report. The sampler shares the existing service lifetime and adds no window or network data.
    
    Summaries include the actual observation window, sample count, maximum delay and counts at 16, 50 and 100 ms. Existing Windows App compilation and deterministic threshold checks pass; independent review confirms bounded admission and cancellation ownership. Actual native-window delay injection and shutdown remain runtime acceptance, not established by the pure test.
  • fix(app): move windows from the host instead of CSS drag regions
    The App's whole window stalled in ordinary use. WebView2 recomputes a page's
    CSS drag regions in the embedding process, on the window thread, after each
    layout change, and answers pointer moves over a region from there. With the
    top bar marked app-region: drag, a posted event reached the window thread up
    to 217 ms late on maximize, 85 ms late on opening or closing a popover and
    505 ms late while the pointer moved along the bar; with no drag region it was
    never late, and the page's own frames showed nothing in either case. Others
    report the same path: WebView2Feedback 5798, and a sampled trace of another
    wry application that puts the window thread in Controller::UpdateDraggableRegions.
    
    The page's top bar, the standalone caption and the permission prompt now ask
    the host on a press, and the host starts the system's own move of the window
    (the first press moves, the second maximizes), as Tauri's drag regions do. No
    page uses app-region any more, and WebView2's non-client region support is
    turned off for every WebView, so that a site's own style cannot hold the
    window thread either.
    
    Measured in the App built from this tree with a real pointer: no late event
    in any of those phases, also with chat text selected and with a page that
    sets a drag region itself; a press and a move on the room's name, on the bar
    and on a detached panel's caption moves the window, a double click maximizes
    and restores, a drag from the maximized state restores and moves, and a
    control in the bar still takes its click. Not exercised: the permission
    prompt's heading. Lost with the regions: the system menu on a right click of
    the bar, and moving the window by touch.
  • fix(app): return unsupported for unknown page resource methods
    Treat the nested action as a request-method discriminator. Fold an unfamiliar
    string into the existing unsupported operation before looking up a page or
    starting I/O. Preserve its request ID and keep malformed known requests on
    the invalid-request path.
    
    The real App request parser reproduces the previous invalid-request result
    on the baseline and passes with the correction. Missing and numeric actions
    and a known read missing its resource ID remain invalid. The exact Windows
    Server library test passes; no App process or new recovery state is added.
  • test(app): cover every page resource request action
    Extend the existing App boundary fixture with metadata and byte reads, alongside
    inspection and cancellation. One local declaration supplies the exhaustive
    ResourceRequest match and the actual control_request checks.
    
    Windows Server capture-feature compilation and the exact parser test pass.
    Unfamiliar actions and malformed known reads keep their correlated invalid
    request result; unknown outer request kinds keep the existing unsupported path.
  • fix(server): keep local operator access with long data paths
    Use a private temporary alias when the Unix socket pathname cannot fit its
    platform address. Bind and connect resolve independent aliases to the same
    socket in the private operator directory, then release the alias. The listener
    continues to own the real socket and the existing peer-UID check.
    
    Basis: the reproduced 124-byte startup failure and the short-path technique in
    Fuchsia ascendd's ShortPathLink implementation. Validated the real Linux module
    and a rebuilt Server with a 158-byte socket path: HTTP, owner-link, normal
    session shutdown and preservation of the data files passed. macOS is untested.
    
    Reference: https://fuchsia.googlesource.com/fuchsia/+/d9f9b329008b22729e11ceb4a66ed4965908d5ae/src/connectivity/overnet/lib/ascendd/src/lib.rs
  • feat(protocol)!: use product versions for Domain and App admission
    Declare major and minor once at admission and preserve each session's numbers
    beside its signing key. Equal majors admit different minors; incompatible
    majors reject before consuming launch authority and identify the older side.
    App discovery, Native readiness and Web diagnostics keep that direction.
    
    Resolve build identity before compilation. Browser values and displayed version
    share the same build input; the Node SDK reads its actual WASM version. Remove
    the two private wire identifiers without aliases for obsolete internal builds.
    
    Basis: the accepted compatibility rule in Versioning and ADR-0017. Validated
    Core, Web/WASM, Windows reader and App discovery controls. Real packaged SDK
    3.0 and 3.1 each completed signed conversation and private-room history against
    the other Linux Server minor. Browser/App mixed-artifact acceptance remains open.
  • fix(nat): diversify documented STUN destination ports
    Use documented Cloudflare, Google and Nextcloud endpoints on three different ports. Two serial same-socket controls returned Native-compatible XOR mappings within the existing observation deadline. Independent campus and carrier peer acceptance remains open; this does not replace the sequential preparation strategy.
  • feat(protocol)!: separate App creation inputs and extensible readers
    Create room policies at the authenticated writer from allocated IDs and user
    settings. Confirm typed opened results; cancel reservations only on a definite
    settings rejection. Ignore harmless App extensions without retiring unrelated
    requests, while keeping stored rows strict at their consuming boundary.
    
    Let text participants select a conversation snapshot at Join, and repair an
    unsupported host turn through the existing synchronization owner. This replaces
    the private App open request and result shape; matching internal artifacts are
    required until the first public contract is frozen.
    
    Basis: ADR-0017 and the interface extension contract; same-connection App,
    SQLite/WASM, signed history and standalone Server controls. Combined Web tests,
    focused Native tests, and TypeScript checks passed after correcting obsolete
    fixtures. The affected App storage-collision integration cases were not rerun.
  • feat(protocol): unify Domain outcomes and selected history parts
    All Domain terminal results use one correlated reply carrier; observer notifications cannot settle waiters. Hosted storage keeps its internal completion until commit, and unknown registration outcomes do not cancel possibly committed rooms. History requests select inline images before page budgeting and replies report actual coverage, so text-only consumers save transfer without erasing cached images. The exact staged tree passed complete Core SQLite checks (341 plus one release-only ignore), fresh-WASM Web checks (2567 tests), Windows Native and Server builds and 17 runtime controls. Chrome IndexedDB controls separately verified selective paging and clearing. Private aliases and extra capability flags were not retained.
  • fix(app): keep permission decisions visible with long content
    Give the trusted permission view enough initial height for ordinary copy and let the request body scroll independently of its decision buttons. Chrome rendering of the real template at 440x280 passed long-origin/file-name and keyboard controls. Actual WebView2 window acceptance remains part of the platform gate.
  • feat(protocol): distinguish signed outcomes from observer notices
    Read authenticated address and request/record/notice role before concrete kind. Unknown commands return unsupported; unknown requester records settle only their own operation as unconfirmed; notices never settle a waiter. Keep original signed payload forwarding and current writer/binding/read-floor authority. Independent review corrected body-object validation and unknown-outcome presentation. The exact staged tree passed fresh-WASM Web checks (2563 tests), complete Core SQLite tests (339 plus one intentionally ignored), capture-enabled Native/Server compilation and five signed runtime controls. This replaces the private room-carriage shape without an old-reader adapter.
  • refactor(capture): route pause through the existing edit owner
    Pause uses the same capture lease and producer checks as title and direct-limit edits. Remove the separate PauseCapture message, bridge and duplicated Native validation. The real App control socket and Native retained-video replacement control passed with synthetic source I/O, including stale-lease rejection and the original room reply.
  • fix(backup): preserve uncertainty after a lost site restore response
    Share the existing room-restore HTTP outcome classification with site restore. Lost or invalid responses retain the original credentials and expose the existing reconnect entry instead of treating a possibly committed operation as rejected. Pre-handoff unavailable responses are explicit conflicts; handed-off result loss remains unknown. Forty scoped adapter/session/presentation tests and TypeScript checks passed with mocked external I/O; no real database restore was performed.
  • test(chat): construct the ordering receipt from the stored message type
    The integrated Server run exposed a stale hand-written confirmed fixture without reactions. Construct the valid signed result using Core types; retain the real dual-reader turn-order assertion. The corrected fixture and signed WebSocket history, hosted restart and failed-write retry controls passed.
  • refactor(chat): confirm the complete stored message in one record
    The signed send receipt now carries the existing stored message and reaction revision. Remove its extra reaction snapshot record, preserve newer reactions when merging history and expose the same complete result to Node retries. The real WASM build, Core conversation/SQLite controls and 746 focused Web tests passed; Browser acceptance fixtures now inspect the current single history page shape. No historical private wire adapter is retained.
  • refactor(capture): carry one request value to the native driver
    App constructs CaptureOptions once after decoding. Session and peer mailbox forward it unchanged; the driver still checks scope and replacement ownership before resolving AudioScope. Existing no-capture, capture-enabled Native and App WebSocket paths passed 71 tests with two physical-audio cases left ignored. No wire, store or runtime quality policy changes.
  • fix(input): reserve stop chords before voice shortcut registration
    The shared Browser and App validators reject the Ctrl+Alt F1-F11 family before OS registration. Restore invalid saved bindings per slot so valid siblings and explicit clearing survive. The selected stop key still owns only its existing platform variants. Browser recording/preferences checks passed 27 cases; the production App configure rejection passed without requesting an OS shortcut. Existing Windows four-variant CI evidence is unchanged.
  • fix(audio): publish the current mixer before confirming capture
    A replacement capture acknowledgment enabled Browser controls before the current mixer snapshot, briefly exposing the previous source settings. Emit the already-committed mixer state first on the same ordered App WebSocket. The Browser retains the publication mixer and receives the new selection only after its acknowledgment. A delayed-frame fixture reproduces the old state and passes with the new producer order; affected Web tests and Windows capture checking pass. No wire schema or PCM behavior changed.
  • test(webview): load the source fixture through its real HTTP entry
    The first native run timed out before any video candidate was observed. Serve the same local synthetic page through loopback HTTP on an owned runtime so the test follows the production website entry. Drop cancels and joins that server even on unwind. Retain resource, readiness and window cleanup assertions plus a small discovery event trace on timeout. Windows capture-enabled test compilation passed; the exact runtime test must be rerun.
  • test(native): exercise webpage resource resets on the isolated desktop
    Extend the existing WebView lifecycle gate with actual page discovery, original-page selection, emptied readiness, recovery and fresh lifetime retirement. The fixture uses only synthetic canvas frames. Add a separate opt-in macOS job for the fixed standalone NAT survey source, using Rust 1.91, both architectures, ad hoc signature checks and offline help. A combined dispatch selects only those platform tasks; standalone tool selection skips product validation. Windows test compilation and workflow static checks passed; runtime results remain pending.
  • fix(watch): refresh webpage readiness when its resource empties
    A paused Native webpage could empty its video without a waiting event, leaving the viewer showing the previous ready state until a later poll. Forward the actual emptied event and resample at the existing viewer owner. Keep it distinct from waiting, which has owner clock semantics. Advance private App control to 28 because older readers reject the new event. Chrome reproduces the stale state and observes immediate preparation and recovery after correction; related Web tests and Windows capture-enabled Rust checks pass. Packaged GUI and physical playback remain separate.
  • feat(profiles): represent unnamed members across room surfaces
    Use an empty stored name for unnamed members and one localized formatter for guest labels and same-list duplicates. Full member IDs retain authority; archived empty names remain distinct from unknown live profiles. Reuse the profile editor for an owner-controlled optional nickname prompt and remember dismissal per site and member. The current private Domain 55 phase carries the setting; existing stored headers default it off. Core, Browser, SDK and archive controls passed, including an actual two-browser hosted-room skip and reentry check.
  • feat(rooms): clear hosted media without removing conversation
    The selected host clears its owned image renditions and managed local file cache while retaining text, members, policy, metadata and saved downloads. Writer commits publish a signed cutoff so delayed pages cannot restore cleared thumbnails; newer messages and selected original files survive. Native hosts also cover dormant local databases and report post-commit compaction separately. Reuse the existing More menu, dialog and inline confirmation. Private Domain protocol 55 includes the new record. SQLite, IndexedDB, Native dormant-room and live dual-browser checks passed; physical-device acceptance is separate.
  • refactor(backup): keep exports owned by their response lifetime
    Remove the additional per-site export slot. Each response already owns its ZIP worker and snapshot until read completion or cancellation. Preserve that cleanup and independent room upload cancellation, without making one large download block other exports. Five affected actual Server checks pass.