Skip to content

Rename the composer ToolbarButton type prop, and drop two dead send props #271

Description

@HMarzban

Problem

The composer ToolbarButton takes a prop named type, but it is not the HTML button type. It is the TipTap node or mark name that editor.isActive checks: editor?.isActive(type || '') (apps/webapp/src/components/chatroom/components/MessageComposer/components/ui/Button.tsx:8-9, :39). The composer ToolbarButton never passes type on, so the shared button falls back to its default type="button" (apps/webapp/src/components/ui/Button.tsx:119, :130).

The send button passes type="submit", and the same fallback applies, so it renders type="button". It passes no editor, so no active check runs either (apps/webapp/src/components/chatroom/components/MessageComposer/components/Actions/ActionButtons/ComposerPrimaryAction.tsx:74). No form wraps the composer. The line before it, disabled={!canSend}, sits inside the if (canSend) branch, so it is always false (:62, :73).

A reader expects type="submit" to submit a form. The name does not say what the prop does.

The chatroom docs describe the dead prop as live: "ComposerPrimaryAction reads disabled={!canSend}" (apps/webapp/src/components/chatroom/CLAUDE.md:73).

Acceptance criteria

  • The prop that holds the node or mark name has a name that says so, for example activeName. Every caller of the composer ToolbarButton is updated.
  • The send button no longer passes type="submit" or disabled={!canSend}.
  • apps/webapp/src/components/chatroom/CLAUDE.md no longer says the send button reads disabled={!canSend}.
  • No format button changes its active state.
  • bun run typecheck passes.

Agent Brief

Category: enhancement
Summary: Rename the type prop of the composer ToolbarButton so it says it holds a node or mark name. Remove two props that do nothing.

Current behavior:
type on the composer ToolbarButton is a TipTap node or mark name for editor.isActive. The send button passes type="submit" and an always-false disabled.

Desired behavior:
The prop name says it holds a node or mark name. The dead props are gone. The rendered HTML and the behavior do not change.

Key interfaces:

  • The composer ToolbarButton props.
  • ComposerPrimaryAction — its send branch.
  • BoldButton and the other format buttons — they pass a node or mark name.

Out of scope

Notes

The evidence is a code trace on 14ab7f9c1.

Activity

  1. added a commit that references this issue on Sep 22, 2026
    7570f5d
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

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions