Commit Graph
4 Commits
  • fix(ui): keep stop outcomes with the initiating page
    Stopping a screen could lose its source row and later report a failure in another room, while unrelated actions erased browser-host restoration failures. The initiating page now retains stop results by publication with their room labels, and BrowserHosting owns its restoration condition. Reuse existing action and feedback owners. Public-entry regressions, hook and component tests, TypeScript, and controlled Chrome interleavings passed.
  • 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.
  • fix(channel): a hosted room keeps one host and outlives a failed close
    With one owner for the slot, two gaps the session's many writers hid can be
    closed in one place. A host registered over another now closes the one it
    replaces, and a restore that finds the slot taken after its store opened
    closes its own and leaves the room to that writer. A reconnect during a
    history install could otherwise leave an open store that nothing closed.
    
    The cleanup chain waits for closing to finish whatever each close returned.
    One rejected close used to leave the chain rejected, so hosting was never
    restored again in that session.
  • refactor(channel): BrowserHosting owns hosted rooms and their cleanup
    Step 6 of ADR-0015. The rooms this Browser hosts lived in two private fields
    of ChannelSession, hostedRooms and hostCleanup, written from the host_bound
    and host_input handlers, applyState, releaseHosts, restoreHosts,
    registerBrowserHost, backupOwner, installRoomHistory and closeConnection, and
    five sites extended the cleanup chain by hand. BrowserHosting in
    browser-hosting.ts now holds each open host and its binding, the chain of
    closing hosts that the next restore awaits, and the reason each stored room
    could not open, which it publishes to view.roomOpenFailures as its only
    writer.
    
    The session no longer holds hostedRooms, hostCleanup, restoreHosts,
    registerBrowserHost, browserStorage or setRoomOpenFailure. It keeps the
    connection, the request correlator, the view and the App link, and gives the
    owner six operations: view, socket, request, write, report and failures. It
    calls eight in return: host, bound, input, update, restore, register, replace
    and release. Every check after an await survives inside the owner against the
    same map entry, binding, socket and session predicate, and each sequence keeps
    its order of effects. The one reordering is in releaseHosts, where the hosts
    start closing just before the App link closes instead of just after; the two
    share no state.
    
    Behaviour is unchanged. tests/channel-session.test.ts passes 638 of 638 with
    no test edited. A new owner test shows that hosts released by an ended
    session finish closing before the next session opens the same room.