Skip to content

Block second LLM load for multi-tab. #18

Open

Description

@erikh2000

Here is the use case for what currently happens:

  1. User opens a Decent App in a browser tab and it loads an LLM.
  2. User opens a Decent App in a second browser tab.
  3. The second tab attempts to load an LLM and probably fails due to lack of resources.

What we want to happen instead:

  1. User opens a Decent App in a browser tab and it loads an LLM.
  2. User opens a Decent App in a second browser tab.
  3. The second tab doesn't try to load the LLM. Instead the ModelDeviceProblemsDialog is shown.

The ModelDeviceProblemsDialog should show a non-blocking problem like "Another browser tab has already loaded an LLM. You should close the other tab if you want to continue."

Implementation hints:

  • In decent-portal, create a new "src/messaging" folder and a file "crossTabUtil.ts". Write some code in there for sending messages between tabs, probably using PostMessage().
  • predictModelDeviceProblems() in "models/modelUtil.ts" should detect and return the problem described above.

@eduardoworrel

Activity

  1. erikh2000 commented on Aug 31, 2025

    @erikh2000
    ContributorAuthor

    BTW, later, we can do something better, and allow one tab to provide inference for multiple tabs, maybe using the messaging code for this feature.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions