Skip to content

Messages thread stays blank when navigating back to a previous thread with browser Back/Forward #4782

Open

Description

@shafiktanbir

hey! noticed in #4777 (apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/program/messages/[partnerId]/page-client.tsx and apps/web/app/(ee)/partners.dub.co/(dashboard)/messages/[programSlug]/page.tsx) that openingThreadId is only updated inside click handlers and only cleared when !partnerId / !programSlug. if you click from thread A to thread B (openingThreadId becomes "B") and then press the browser Back button to return to thread A, partnerId changes back to "A" while openingThreadId stays "B", so showingOpenedThread (!openingThreadId || openingThreadId === partnerId) stays false and MessagesPanel gets messages={undefined}.

is that intentional or should layout.tsx also sync openingThreadId when partnerId / programSlug changes via route navigation? happy to open a quick PR if you want!

ss
Image

Activity

  1. linear commented on Oct 25, 2026

    @linear
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