fix(desktop): keep inbox composer editable while loading - #5634
Closed
tellaho wants to merge 1 commit into
Closed
Conversation
Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
tellaho
force-pushed
the
tho/editable-idle-chat
branch
from
August 12, 2026 07:11
b20f243 to
9403a7f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
Screenshots/Demos
Before — the cold-loading composer had no editable field
After — Inbox accepts and preserves a draft while the feed loads