Skip to content

Bug: Export-chat dialog renders an invalid nested <button> (hydration error) and message selection is non-functional #1973

Closed

Description

@yannickmonney

What happened?

Opening the chat Export dialog logs a React hydration error, and the per-message selection is unusable: “Deselect all” is a no-op and individual message checkboxes cannot be toggled. Export-everything still works (Download Markdown/PDF), but a user cannot export a subset of messages.

Steps to reproduce

  1. Open a chat thread with at least one message.
  2. Header More actions → Export. (Console immediately logs the hydration error.)
  3. Click Deselect all — the counter stays “2 of 2 messages selected”, the label never flips to “Select all”, and both checkboxes stay checked. Clicking a single message checkbox is intercepted.

Expected behavior

Opening the dialog produces no console error; “Deselect all” sets the counter to “0 of N” and unchecks every row (label flips to “Select all”); individual checkboxes toggle independently.

Affected service

Platform (web app)

Version or commit

b4180755d

Browser and OS

Headless Chrome (Playwright) on macOS

Relevant log output / evidence

In HTML, <button> cannot be a descendant of <button>. This will cause a hydration error.
<button> cannot contain a nested <button>.

Root cause. app/features/chat/components/export-chat-dialog.tsx:286-311: each message row is an outer <button type="button"> that wraps a Radix <Checkbox> (line 293), which itself renders a <button role="checkbox"> — a button nested in a button (invalid HTML). The selection malfunction is the functional consequence (the wrapping pointer-events-none + the empty-set “effective selection” falling back to “all selected”).

Suggested fix. Replace the outer row <button> with a non-button clickable (<div role="button"> or a <label htmlFor> driving the checkbox), and ensure “deselect all” distinguishes “explicitly none” from “default all”. Verified live at commit b4180755d.


Filed by an automated manual-QA sweep against a local hermetic stack (commit b4180755d, mode-A mock LLM, headless Chrome). Reproduced live before filing.

Activity

  1. added
    priority: medium
    bug
    service: platform
    automated
    on Jun 23, 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

    automatedbugpriority: mediumservice: platform

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions