Skip to content

fix(composer): wait for image readiness before showing sent text - #4652

Merged
reachjalil merged 1 commit into
devfrom
fix/image-ready-before-send
Sep 8, 2026
Merged

reachjalil merged 1 commit into
devfrom
fix/image-ready-before-send

Conversation

@reachjalil

Copy link
Copy Markdown
Member

Summary

  • Keep attachment-bearing drafts in the composer until compression and upload finish, rather than showing an optimistic text message during preparation.
  • Block duplicate sends and keyboard queueing during preparation, retain drafts on preparation failure, and preserve newer edits.
  • Apply the same behavior to new-task handoff. Text-only messages still send immediately.
  • Extend the existing attachment upload journey for existing chats and new tasks.

Verification — Incomplete

  • Passed: pnpm --filter @openwork/app exec bun test --isolate ./tests/composer-focus-continuity.test.tsx (exit 0; 1 passed, 0 failed; 67 assertions), rerun on head a6f6106 after rebase.
  • Passed: git diff --check.
  • Failed: pnpm evals:check-browser (exit 1; diagnostics include DesktopShotSurface.workspaceId and implicit parameter types across eval tooling). Not classified as pre-existing without a clean control.
  • Deferred: pnpm evals:e2e attachment-upload-loading-state. Remote infrastructure was not provisioned; no runtime placement or published journey evidence is claimed. Required CI remains unchanged.

Manual reproduction

  1. Attach a large image and type a message in an existing conversation or new task.
  2. Send while attachment preparation is slow. Text and image should remain in the composer with the upload indicator, without a user message appearing yet.
  3. Press Enter and Cmd/Ctrl+Enter during preparation: no duplicate submission or queued message should appear.
  4. Once preparation finishes, the composer clears and the complete message appears.
  5. If preparation fails, the draft remains available to retry.

@vercel

vercel Bot commented Sep 8, 2026 •

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
openwork-app Ready Ready Preview Sep 8, 2026 10:37pm UTC
openwork-den Ready Ready Preview Sep 8, 2026 10:37pm UTC
openwork-diagnostics Ready Ready Preview Sep 8, 2026 10:37pm UTC
openwork-landing Ready Ready Preview, v0 Sep 8, 2026 10:37pm UTC

@diff-warden diff-warden Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Warden security clearance: clear. No blocking findings (security or desktop↔den sync) in this diff (a6f61060f4f7b539641d856d6ff5a705ff277ad4). Automated clearance satisfies the required-review gate only — a human still reviews and merges. Analysis run

@github-actions

github-actions Bot commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Passed · 1/1 tests · 2/2 assertions · 0 images

Commit a6f61060f4f7b539641d856d6ff5a705ff277ad4 · selected evidence

Open review report

@reachjalil
reachjalil merged commit be2be81 into dev Sep 8, 2026
27 checks passed
yomgui added a commit that referenced this pull request Sep 9, 2026
A new task keeps its attachment draft visible until the session composer
has prepared the upload (#4652), but #4662 stopped clearing whenever a
handoff snapshot was present, so the sent draft lingered in the composer.
Clear the continuation after preparation when it still mirrors the
submitted snapshot; edits made in the meantime are preserved.

This branch was successfully deployed

4 active deployments
Preview – openwork-app — a6f61060 Deployed Sep 8, 2026 by vercel[bot]
Preview – openwork-den — a6f61060 Deployed Sep 8, 2026 by vercel[bot]
Preview – openwork-landing — a6f61060 Deployed Sep 8, 2026 by vercel[bot]
Preview – openwork-diagnostics — a6f61060 Deployed Sep 8, 2026 by vercel[bot]
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