Skip to content

Web deep-linked session pages can crash on initial render #21569

Description

@sjawhar

Description

Deep-linked web session pages can crash before session messages finish loading. The app lands on the error screen with TypeError: Cannot read properties of undefined (reading 'filter') from the built session bundle.

Root cause: packages/app/src/pages/session.tsx creates the messages memo before messagesReady, but still calls messagesReady() inside the memo body. On first render that can leave the downstream userMessages = messages().filter(...) path evaluating from an invalid state.

Plugins

No response

OpenCode version

0.0.0--202604082020 (reproduced on built local binary)

Steps to reproduce

  1. Build the local binary and run opencode serve.
  2. Open a deep-linked session route in the web UI (/<directory>/session/<id>).
  3. Observe the app error boundary instead of the session page.
  4. Error details show TypeError: Cannot read properties of undefined (reading 'filter').

Screenshot and/or share link

No response

Operating System

Ubuntu 24.04

Terminal

Ghostty

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

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