Skip to content

fix(threads): attach drafts dropdown to the composer - #704

Merged
nixuuu merged 2 commits into
devfrom
fix/threads-composer-drafts-tab
Nov 14, 2026
Merged

nixuuu merged 2 commits into
devfrom
fix/threads-composer-drafts-tab

Conversation

@nixuuu

@nixuuu nixuuu commented Nov 14, 2026 •

Copy link
Copy Markdown
Member

Drafts now appear as a counted tab attached to the composer's top edge, expanding into a compact dropdown. The tab exists only when another device has an unfinished draft for this composer's full target. Clicking a row takes it over; a nonempty composer offers Append draft or Replace local draft inline. Each row includes its preview, attachment count, source device, age and Discard draft action.

The modal, sidebar Open drafts entry, manual refresh actions and separate incoming-draft indicator are removed on web/desktop and mobile. Cross-thread discovery stays with sidebar draft markers, keeping this panel focused and avoiding navigation from a composer dropdown. Source move notices and pending-send recovery remain available.

Both clients reserve a fixed 32 px/point slot so arriving drafts never move the composer. Web uses the existing nonmodal top-layer popover; mobile anchors a nonmodal portal to the same edge. Both use existing motion tokens and respect reduced motion. The shared live cache finishes pagination up to the existing 100-draft limit so counts include later pages.

Related: #699

Validation:

  • bun install, gen:check, workspace typecheck, lint and format checks passed. Web typecheck and production build passed after the final popover adjustment.
  • 35 focused domain/gateway/linked-draft tests passed through check:tmp (172 assertions), with no leftover test directories.
  • Browser review passed at 1280 and 390 px in light and dark: empty tab hidden, 22 drafts across pages, stable composer position, joined borders, append/replace, attachment/citation preservation, discard and live disappearance. No page errors.
  • iOS and Android exports passed; both native fingerprints are unchanged from dev. Device checks remain blocked by scope.

Copy audit (§8): Open drafts, the explanatory modal sentence, empty state and Refresh drafts → Drafts with a count. Row previews replace the repeated take-over call to action; accessible row labels say Take over draft: …. Append draft and Replace local draft retain their explicit meaning; Delete draft → Discard draft matches the requested × action. Buttons use verbs and sentence case; the noun-only Drafts labels a disclosure. Errors explain the failure and retry action. No new glossary terms or decorative copy. Short and long drafts, attachment labels and device names were reviewed at desktop and phone widths in both themes.

@nixuuu
nixuuu marked this pull request as ready for review November 14, 2026 11:40
@nixuuu
nixuuu merged commit 1442553 into dev Nov 14, 2026
11 checks passed
@nixuuu
nixuuu deleted the fix/threads-composer-drafts-tab branch November 14, 2026 12:11
nixuuu added a commit that referenced this pull request Nov 15, 2026
The composer tray (queue, subagents, goal) is meant to slide 16 px under
the composer's top edge. Since #704 the composer always reserves an
empty 32 px strip above its box for the Drafts tab. With a tray above,
that strip sat between the two, so the tray ended 16 px above the
composer with square bottom corners and an empty band inside.

Fixes: #704

## Changes

- With a tray, the empty Drafts reserve folds to 0, so the tray attaches
to the composer again. A tray already sits above, so arriving drafts
move the tray, not the composer (the reserve still holds the composer in
place when there's no tray).
- With a tray and the Drafts tab both showing, the tray stands on its
own above the tab, fully rounded with a 4 px gap, instead of covering
the tab's top half.
- `Composer.svelte` owns this geometry with `:has()` rules on
`data-composer-tray`, `data-drafts-slot` and `data-drafts-tab`, so no
prop is threaded through `MessageComposer` and `ComposerBox`.

## Verification

- Bench stack (`scripts/bench/client-stack.ts`) in Chromium, dark and
light, at 1280 and 390 px, with a running turn and queued messages:
- tray only: the tray's bottom is 16 px below the composer's top edge
(overlap restored), with no gap;
- tray + Drafts tab (draft from a second browser context): the tray ends
4 px above the tab and the composer doesn't move (top 702/630 px before
and after queueing).
- `bun install`, `gen:check`, `typecheck`, `lint`, `format:check` and
the web build pass locally. CI (all 4 test shards) passes.
- Local `check:tmp`: 3166 pass, 2 fail, nothing left in the temp dir.
One failure is `Codex keeps full history when resuming across device
login and proxy connections`, which fails the same way on `origin/dev`
with the locally installed Codex CLI (unrelated to this CSS-only
change).
- No UI tests added.

## Copy audit (§8)

No visible text changed.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 5.5 <[email protected]>
nixuuu added a commit that referenced this pull request Nov 18, 2026
Remove the unused `draftSideThread` route parameter and its effect,
which triggered the React Hooks `set-state-in-effect` rule in Expo lint.
The former drafts overview was the only caller. The **New side thread**
menu item still opens the sheet directly.

Related: #704

## Verification

- Expo lint and oxlint passed on `ThreadScreen.tsx`.
- Mobile typecheck and diff checks passed.
- Repository-wide checks are left to CI.
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