Skip to content

fix(v1): preserve composer drafts and verify instant sends - #4662

Merged
benjaminshafii merged 8 commits into
devfrom
perf/v1-instant-send
Sep 9, 2026
Merged

benjaminshafii merged 8 commits into
devfrom
perf/v1-instant-send

Conversation

@benjaminshafii

Copy link
Copy Markdown
Member

Production fixes

Builds on the immediate-message implementation already merged in #4631; it does not duplicate that work.

  • Keep immutable submitted draft A separate from editable continuation B while a new conversation is created and sent, including attachment preparation and explicit failure recovery.
  • Do not classify a rejected send as a failed session transition; keep the error visible without permanently disabling the valid composer.
  • Bound desktop-loopback snapshot read retries so a transient read does not remain paused indefinitely. Retries are cancellable reads, preserve ownership, and do not resend prompts.
  • Preserve current admission-unknown, interruption, and queue protections from dev.

Performance proof

Final tested head: f5a009ef1e4214c399e6be05e819b69a33bde43c.
OPENWORK_WORLD_PLACE=local OPENWORK_EVAL_ENGINE=v1 OPENWORK_EVAL_MAX_WORKERS=1 pnpm evals:e2e workspace-new-task-hit-target --local

Passed: 1 test, 36/36 timing samples, 11/11 evidence assertion groups, 0 failures, 0 skips, 0 pending judgments. Placement: local (--local); isolated real Electron/v1 with a deterministic standalone model witness.

Metric Samples Required Observed max
New task to focused, editable composer 12 <500ms 103.1ms
First send to user row 12 <100ms 14.8ms
Existing-session send to user row 12 <100ms 24.2ms

Timing runs from trusted renderer input to two consecutive qualifying animation frames, excluding CDP roundtrip. Creation/prompt requests are held before engine forwarding for at least 1500ms. Every sample is retained; these are renderer-frame opportunities, not hardware pixel-presentation telemetry.

The existing journey is extended rather than adding a new spec file. It checks no empty-session creation on opening, single submission, continuation preservation, known-rejection/Restore behavior, navigation isolation, SSE-before-HTTP response, and exact-once messages/model calls across reload. Its required local placement is declared in the journey catalog. Most of the diff is fixture instrumentation and evidence diagnostics.

Additional checks

  • App typecheck: passed.
  • Focused native-session, composer-focus, and composer-state checks: 21 + 1 + 7 passed in separate invocations.
  • Journey selection/reporting checks: 12 passed.
  • Targeted strict TypeScript and browser callback checks: passed.

Final-head evidence is published below. Historical interrupted/red runs are not used as passing proof. This is a v1 local composer/performance slice, not certification of v2, live LLMs, hundreds of sessions, or the full safety baseline. No merge or release requested by this PR.

@vercel

vercel Bot commented Sep 9, 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 9, 2026 3:37am UTC
openwork-den Ready Ready Preview Sep 9, 2026 3:37am UTC
openwork-diagnostics Ready Ready Preview Sep 9, 2026 3:37am UTC
openwork-landing Ready Ready Preview, v0 Sep 9, 2026 3:37am UTC

@benjaminshafii

benjaminshafii commented Sep 9, 2026 •

Copy link
Copy Markdown
Member Author

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

Commit f5a009ef1e4214c399e6be05e819b69a33bde43c · selected evidence

Open review report

@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 (f5a009ef1e4214c399e6be05e819b69a33bde43c). Automated clearance satisfies the required-review gate only — a human still reviews and merges. Analysis run

@benjaminshafii
benjaminshafii merged commit bffb9b9 into dev Sep 9, 2026
27 checks passed
yomgui added a commit that referenced this pull request Sep 9, 2026
#4662 shows the submitted row at once for a new task while the editable
continuation stays in the composer; an existing chat still shows none.
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-den — f5a009ef Deployed Sep 9, 2026 by vercel[bot]
Preview – openwork-landing — f5a009ef Deployed Sep 9, 2026 by vercel[bot]
Preview – openwork-app — f5a009ef Deployed Sep 9, 2026 by vercel[bot]
Preview – openwork-diagnostics — f5a009ef Deployed Sep 9, 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