Skip to content

Bug: Home hides Draft badges for nonempty literal code text #3583

Closed

Description

@yannickmonney

P3 · confirmed UI defect. Source 44e0dcf254975286c0e9dea443b5cd1ca6b23347; tested only on isolated localhost:3071.

A nonempty plain-text chat draft consisting of code-like text such as <Button /> has no Draft badge in Home. The same conversation with ordinary unsent note displays the badge after leaving it. The literal draft remains in the composer when reopened, so this finding is about discoverability, not lost message content.

Reproduction:

  1. Create a chat and send a message to the local mock provider.
  2. Type ordinary unsent note without sending, then click New chat. The previous row says Draft.
  3. Reopen that chat, replace its draft with <Button />, and click New chat again.
  4. The previous chat row has no Draft label. Reopening still shows <Button /> in the composer.

Local DOM readback: chatLinks: ['Local audit baseline: reply briefly2mChat'], draft: '<Button />'. A direct current-source regression returns false from hasDraft for this string; an ordinary-text control passes.

Root cause: hasDraft strips <[^>]*> indiscriminately even though chat composer drafts are plain text. Task comment drafts use the same reader. This must distinguish rich-editor markup from actual plaintext content.

Acceptance: preserve empty rich-editor detection while plain-text <Button />, <tag> and similar nonempty drafts show the badge. Verify leave/reopen and reload, with ordinary-text/empty-draft controls. Do not change or strip the stored draft itself.

Deduplication: searched repository issue inventory and GitHub for draft badge and literal HTML draft; only unrelated closed #1488 matched.

Evidence retained in audit notes: tale-100-findings/draft-code-badge.png and primary-probes/draft-boundaries.test.tsx / .log. No screen-reader audio test was performed.

Activity

  1. added a commit that references this issue on Oct 4, 2026
    96d3428
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

    bugservice: platform

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions