t3code icon indicating copy to clipboard operation
t3code copied to clipboard

[Bug]: Custom theme background image is hidden on the empty New thread screen until a turn starts

Open AymanKhan9 opened this issue 2 weeks ago • 1 comments

Before submitting

  • [x] I searched existing issues and did not find a duplicate.
  • [x] I included enough detail to reproduce or investigate the problem.

Area

apps/web

Steps to reproduce

  1. Publish a custom theme in <themesDir>/<themeId>.json with a background image file (<themesDir>/<themeId>.jpg / .png / .webp) and CSS following the built-in theme guide (t3_theme_read):
    [data-workspace-area="conversation"] {
      background: var(--theme-background-image) center / cover no-repeat;
    }
    
  2. Select that custom theme and open the New thread empty draft screen (e.g., on fresh app launch or clicking New thread / Start without a project so the centered composer and "What should we work on?" / project draft hero are shown).
  3. Observe the conversation background before sending a message, then send a message to start a turn.

Expected behavior

The custom theme background image applied to [data-workspace-area="conversation"] (or an ancestor pane when [data-workspace-area="conversation"] is made transparent) is visible immediately on the empty New thread screen, matching active threads.

Actual behavior

On the empty New thread screen (including on fresh app launch), an opaque canvas-colored layer covers the entire area below [data-chat-header], hiding var(--theme-background-image) until an agent turn starts. Once a turn starts, the background image suddenly appears.

Even if theme CSS places var(--theme-background-image) on an ancestor such as main:has([data-chat-composer-form]) (which becomes visible behind a translucent [data-chat-header]) and makes [data-workspace-area="conversation"] transparent, the opaque canvas-colored layer below [data-chat-header] still covers the entire New thread screen until a turn begins.

Root cause

In apps/web/src/components/ChatView.tsx, the conversation container ([data-workspace-area="conversation"]) already has bg-background and passes hideEmptyPlaceholder={isDraftHeroState || threadDetailLoading} to ThreadTimeline / MessagesTimeline.

In apps/web/src/components/chat/MessagesTimeline.tsx, when showsEmptyState && hideEmptyPlaceholder is true (which includes every empty New thread draft hero as well as thread-detail loading), MessagesTimeline renders:

<div className="h-full min-h-0 bg-background" data-timeline-loading="true" />

This full-height child <div> paints an opaque var(--background) directly on top of [data-workspace-area="conversation"], completely hiding any custom theme background / var(--theme-background-image) until the first timeline row mounts and replaces the placeholder with the transparent LegendList scroller.

Impact

Minor bug or occasional failure

Version or commit

main @ e7b1b88bef

Environment

Linux, T3 Code web & desktop (Electron)

AymanKhan9 avatar Nov 21 '26 02:11 AymanKhan9

Screenshots demonstrating the issue

Empty New thread screen (bug) Active thread (same theme)
Empty New thread screen showing opaque canvas below header hiding theme background Active thread showing the custom theme background image

On the New thread screenshot, the aurora background image is already loaded behind the translucent [data-chat-header] bar, while the opaque bg-background <div data-timeline-loading="true"> immediately below the header covers the entire "What should we work on?" area until a turn starts.

Fix opened in #40069.

AymanKhan9 avatar Nov 21 '26 02:11 AymanKhan9