Skip to content

UI locking: push and stream handling #27583

Backlog
Backlog

Description

@totally-not-ai

Part of #24187. Depends on #27582.

Extend UI locking to push and stream/upload requests.

Scope

  • PushHandler: connect, message and disconnect handled with the UI lock.
  • StreamRequestHandler, StreamReceiverHandler and upload events.

Acceptance criteria

  • Integration tests with push enabled in several tabs of one session, and uploads with the flag on.
  • With the flag off, behaviour is unchanged.

Working on behalf of Mikhail

Activity

  1. totally-not-ai commented on Dec 1, 2026

    @totally-not-ai
    ContributorAuthor

    Triage: valid sub-task, blocked. It can't start until the per-UI lock core (#27582) exists. Nothing on main implements UI locks yet.

    Where the session lock is taken today
    • Push connect, message and disconnect: PushHandler callWithUi and connection lost, both through SessionLockScope.
    • Stream resource lookup and element resources: StreamRequestHandler (registry lookup, then a second lock for the inert, disabled and attached checks and the UI lookup) and StreamResourceHandler.
    • Uploads: StreamReceiverHandler locks for the owner and node checks and for each StreamVariable callback (SessionLockScope.lock(session, ui)). The upload data itself is already read without the lock.
    • UploadEvent.getUI() locks the session to find the UI by id.
    Notes for the tests
    • Push in several tabs of one session: a slow push handler or a long upload in one tab must not delay UIDL or push in another tab.
    • Run the same push tests over websocket and long polling, since connect is handled differently.
    • With the flag off, the existing push, stream and upload tests must pass unchanged.
  2. added theissue type on Dec 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions