Skip to content

Preserve composer focus during same-task refreshes - #4108

Merged
reachjalil merged 1 commit into
devfrom
fix/composer-focus-continuity
Aug 26, 2026
Merged

reachjalil merged 1 commit into
devfrom
fix/composer-focus-continuity

Conversation

@reachjalil

Copy link
Copy Markdown
Member

Summary

  • keep an already-rendered current task interactive while its snapshot refreshes in the background
  • preserve the existing switching state for initial loads and actual task changes
  • add transition-level regression coverage plus a desktop scenario that continues typing without refocusing

Root cause

Every snapshot refetch was classified as a task switch, including completion updates for the task already on screen. That temporarily made the composer non-editable, blurred the editor, and then restored editability without restoring focus.

Verification

  • bun test --isolate tests/session-transition-controller.test.ts — 3 passed
  • app TypeScript check — passed
  • exact-head desktop E2E at 19fecb38428ce5f3383bf076e9f21d291b779070 — 1 passed, 0 failed, 0 skipped; 2 assertion claims passed

@vercel

vercel Bot commented Aug 26, 2026 •

Copy link
Copy Markdown
Contributor

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

Project Deployment Actions Updated (UTC)
openwork-app Ready Ready Preview Aug 26, 2026 4:36am
openwork-den Ready Ready Preview Aug 26, 2026 4:36am
openwork-den-worker-proxy Ready Ready Preview Aug 26, 2026 4:36am
openwork-diagnostics Ready Ready Preview Aug 26, 2026 4:36am
openwork-landing Ready Ready Preview, v0 Aug 26, 2026 4:36am

@reachjalil

Copy link
Copy Markdown
Member Author

Test evidence — same-session-refresh-preserves-composer-focus-and-uninterrupted-typing — 0/0 screenshots passed · 2 assertions

✅ 0/0 screenshots passed · 2 assertions · 2 expectations passed · 0 failed · 0 pending

screenshots not uploaded (no BLOB_READ_WRITE_TOKEN)

ℹ️ ASSERTION — 1. A same-session completion refresh preserves composer focus and editability

The active Lexical editor remained focused and contenteditable after its session snapshot refreshed.

  • ✅ PASS A same-session completion refresh preserves composer focus and editability — The active Lexical editor remained focused and contenteditable after its session snapshot refreshed.

ℹ️ ASSERTION — 2. The existing draft remains intact and typing continues without another click

The composer preserved “Keep this draft while the task finishes” and accepted the suffix immediately after refresh.

  • ✅ PASS The existing draft remains intact and typing continues without another click — The composer preserved “Keep this draft while the task finishes” and accepted the suffix immediately after refresh.

Test run created 2026-08-26T04:35:12.445Z · Source: evals/results/test-runs/2026-08-26T04-35-12-445Z-same-session-refresh-preserves-composer-focus-and-uninterrupted-typing/test-run.json · Repro: pnpm --dir evals artifacts:publish -- --pr 4108 --test-run 2026-08-26T04-35-12-445Z-same-session-refresh-preserves-composer-focus-and-uninterrupted-typing

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

@reachjalil
reachjalil merged commit fa9724b into dev Aug 26, 2026
18 checks passed
@reachjalil
reachjalil deleted the fix/composer-focus-continuity branch August 26, 2026 05:33

This branch was successfully deployed

5 active deployments
Preview – openwork-den-worker-proxy — 19fecb38 Deployed Aug 26, 2026 by vercel[bot]
Preview – openwork-landing — 19fecb38 Deployed Aug 26, 2026 by vercel[bot]
Preview – openwork-den — 19fecb38 Deployed Aug 26, 2026 by vercel[bot]
Preview – openwork-app — 19fecb38 Deployed Aug 26, 2026 by vercel[bot]
Preview – openwork-diagnostics — 19fecb38 Deployed Aug 26, 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