Skip to content

fix(desktop): keep inbox composer editable while loading - #5634

Closed
tellaho wants to merge 1 commit into
mainfrom
tho/editable-idle-chat
Closed

fix(desktop): keep inbox composer editable while loading#5634
tellaho wants to merge 1 commit into
mainfrom
tho/editable-idle-chat

Conversation

@tellaho

@tellaho tellaho commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Category: fix
User Impact: Users can start writing an Inbox reply during initial loading without losing their draft when the conversation appears.

Problem: Inbox showed a composer-shaped skeleton during a cold feed load, so the reply field looked unavailable at the exact moment users were waiting. Solution: Render a lightweight editable composer with the existing loading spinner, persist its provisional draft locally, and atomically hand it to the selected Inbox conversation once the feed resolves.

File changes

desktop/src/features/home/ui/HomeLoadingState.tsx
Replaces the composer skeleton with the editable loading input and reused spinner, while retaining Inbox width measurement for automatic selection.

desktop/src/features/home/ui/HomeView.tsx
Keeps the loading view mounted until a provisional draft has safely transferred to the resolved conversation.

desktop/src/features/home/ui/LoadingInboxComposer.tsx
Adds the lightweight reply input that reads and writes the locally scoped provisional draft.

desktop/src/features/home/useInboxLoadingDraftHandoff.ts
Coordinates the transition from the loading draft to the canonical DM or thread draft after Inbox resolves its target.

desktop/src/features/messages/lib/useDrafts.ts
Adds atomic Inbox draft handoff, preserves existing local drafts by merging, and hides the internal provisional entry from the Drafts list.

desktop/src/features/messages/lib/useDrafts.test.mjs
Covers provisional draft migration, collision-safe merging, and internal draft visibility.

desktop/src/testing/e2eBridge.ts
Adds a configurable Inbox feed delay so the cold-loading state can be exercised deterministically.

desktop/tests/helpers/bridge.ts
Exposes the feed delay through the Playwright mock bridge options.

desktop/tests/e2e/messaging.spec.ts
Verifies the loading input is editable, survives a reload through local storage, and hands its text to the full Inbox composer.

Reproduction Steps

  1. Open Inbox in a wide desktop window while the feed is still loading.
  2. Confirm the reply field has a placeholder, accepts typing, and still shows the loading spinner.
  3. Reload before the feed resolves and confirm the draft returns from local storage.
  4. Let Inbox finish loading and confirm the same text appears in the selected conversation's full composer.

Screenshots/Demos

Before — the cold-loading composer had no editable field

Before

After — Inbox accepts and preserves a draft while the feed loads

Focused Inbox loading composer with an editable persisted draft and loading spinner

Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
@tellaho
tellaho force-pushed the tho/editable-idle-chat branch from b20f243 to 9403a7f Compare August 12, 2026 07:11
@tellaho tellaho changed the title keep chat composer editable while loading keep inbox composer editable while loading Aug 12, 2026
@tellaho tellaho changed the title keep inbox composer editable while loading fix(desktop): keep inbox composer editable while loading Aug 12, 2026
@tellaho tellaho closed this Aug 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant