Skip to content

fix(threads): keep turn input before early work - #692

Merged
nixuuu merged 1 commit into
devfrom
fix/turn-input-before-work
Nov 14, 2026
Merged

nixuuu merged 1 commit into
devfrom
fix/turn-input-before-work

Conversation

@nixuuu

@nixuuu nixuuu commented Nov 14, 2026

Copy link
Copy Markdown
Member

When a connector notice arrives before the provider echoes a message, the web/desktop feed replaces the turn-input placeholder at the echo's later sequence position. Its entire work fold can then appear above the user's message, including messages with attachments.

Place the echoed input immediately after its turn's start, before its work. Keep the echo's item identity and the sequence positions of steers, background work and notices. The same derivation repairs existing saved histories after reload. Inputs containing only attachments or quotes also retain their placeholder while their echo is unavailable.

Gateway inspection confirmed that admission already persists the input and binds attachments atomically before dispatch; the draft path uses that same admission. Event seq correctly records arrival order and remains unchanged. Mobile already renders the persisted turn input before its body and excludes the initial echo from that body.

The bug reproduces on current dev, including #673, #687, #689, #690 and the merged drafts stack. #670 introduced the connector acknowledgement before Codex turn/start, exposing the timeline's assumption that the input echo was the first element. #672 retained that assumption.

Fixes: #670

Validation:

  • Added PostgreSQL/gRPC gateway regression: upload a PNG and Markdown file, send the message, publish an early connector notice and commentary, then publish the input echo. The test failed on the original dev feed (input row 3, work row 1).
  • Covers echoes with and without client IDs, placeholder replacement, open/closed work folds, steer chronology, completion, a fresh sequenced history subscription, and the mobile turn/body derivation. Both new cases and 27 existing feed checks pass under check:tmp; nothing remains in the test temp directory.
  • nice install, gen:check, typecheck, lint, format:check and web build pass with temp files under /var/tmp. Full suite left to CI because the shared 12-CPU host reached load 12.41 during verification.
  • No browser/device visual run; the change affects timeline derivation, with no component, styling or UI-copy changes. Copy audit: no changed UI text.

@nixuuu
nixuuu merged commit 2724849 into dev Nov 14, 2026
9 checks passed
@nixuuu
nixuuu deleted the fix/turn-input-before-work branch November 14, 2026 08:37
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