Skip to content

Preserve chosen editor focus when initial autofocus is delayed - #201

Merged
mvalancy merged 1 commit into
devfrom
fix/editor-focus-intent-20261027
Oct 27, 2026
Merged

mvalancy merged 1 commit into
devfrom
fix/editor-focus-intent-20261027

Conversation

@mvalancy

Copy link
Copy Markdown
Member

When quick edit opens and its first animation frame is delayed, initial autofocus can move from the selected status-note field to the title while typing. The note is lost into the title and Add stays disabled. Deferred autofocus now preserves an already focused dialog field or a deliberate focus change elsewhere, while retaining normal first-field focus and keyboard trapping. Fixes #200; unblocks the observed failures in #195 and #197.

The regression renders the actual portaled quick editor with a controlled animation-frame queue. On the unmodified hook, both focus-preservation cases fail and four normal-focus/keyboard/unmount controls pass. With the correction all six pass, including unchanged title and a note-only metadata commit. No retries, sleeps or longer action timeouts were added.

Base: dev 97dc8849db8f257ffa88ab790c4452a8022eeaa6; initial frozen head 367e8228748670a790b93c8d94cad7804d4a9bc9. Clean install and initial build/types passed. The initial lint failure on the fixture's DOM callback type is corrected with an explicit local type. Final build/types/lint/full-web/harness, real desktop/phone persona workflows, independent review and exact-head CI are pending. Original failed CI and deterministic negative controls are retained.

This changes no authentication policy or dependency. The lesson/index records the incident and its limits; hosted acceptance and full LOD completion remain separate.

@github-actions

Copy link
Copy Markdown

🧪 Comprehensive Test Suite

  • Unit suites (Node 22.18.0 & 24.x) — core, web, server, mcp-server: ✅ passed
  • Installer & deploy config: ✅ passed

Full-stack smoke gate runs in the CI workflow.

@mvalancy

Copy link
Copy Markdown
Member Author

Frozen head 367e8228748670a790b93c8d94cad7804d4a9bc9 is independently reviewed with no findings. Node 22.18.0 clean install, build (4), types (5), lint (4), 341 web unit cases and 171 harness cases passed. Actual headed persona workflows passed 6/6 in 1.9m with one worker and zero retries, covering 360/390/768/1280/1440 widths, persisted status notes, navigation and reload. Owned cases deleted their task/graph fixtures.

The browser runtime was frozen throughout; the only concurrent fixture change replaced a test-only TypeScript callback alias and added the incident documents. Runtime useModalA11y bytes stayed unchanged. Final committed build/types/lint/full-web/harness were rerun after that fixture correction. The original two-case negative control and initial lint failure remain recorded.

CI 40584709399 remains pending; Node 22/24 + installer checks 40584709580 passed. No integration claim yet.

@mvalancy

Copy link
Copy Markdown
Member Author

Dev integration preflight: exact reviewed/tested head 367e8228748670a790b93c8d94cad7804d4a9bc9, live dev 97dc8849db8f257ffa88ab790c4452a8022eeaa6, clean worktree. Independent review found no issues. Local clean install/build/types/lint, 341 web tests, 171 harness tests and six actual persona workflows passed. No dependencies changed; the existing two moderate Router entries are addressed separately by #198.

Final CI 40584709399 and Node 22/24 + installer checks 40584709580 passed. Actual smoke log: 6 smoke, 44 new-user, 27 mobile, 3 effects, 3 performance, zero failed/flaky/skipped required cases; real-Neo4j contract passed. Main/nightly production job is inapplicable.

Proceeding with the standing-authorized exact-head admin merge into dev, not a non-author GitHub approval. Protections and main remain unchanged. Parent/tree verification and final post-merge branch CI are required before #200 closeout.

@mvalancy
mvalancy marked this pull request as ready for review October 27, 2026 21:41
@mvalancy
mvalancy merged commit 9076d46 into dev Oct 27, 2026
16 checks passed
@mvalancy

Copy link
Copy Markdown
Member Author

Integrated through the standing administrative dev-only authorization; independent agent review was used and is not represented as a non-author GitHub approval.

Verified remote dev merge 9076d460c7ea8cdffba5af72f68449264c3035d3 has parents 97dc8849db8f257ffa88ab790c4452a8022eeaa6 and reviewed head 367e8228748670a790b93c8d94cad7804d4a9bc9. Complete tree 44d2738d78ec5128f5a1e2784469e6ca63c2d16e equals the reviewed source tree. Main remains 775362eace0723c57b7ba3c7936645c9d0d36cb4.

Post-merge CI 40588871284 and Comprehensive 40588871695 succeeded. Actual browser results: smoke 6, new-user 44 (732.2s), mobile 27, living effects 3, performance 3; no required skipped/flaky cases. Supported-Node unit jobs and installer/deploy-config passed; the main-only production-stack job is intentionally inapplicable to dev.

The regression proved delayed initial focus cannot steal focus already chosen inside or outside the editor; old hook failed two cases while four controls passed. Corrected local component 6/6 and real personas 6/6 passed. Closing #200 for the verified dev fix; this is not a main promotion or live deployment. Owned fixtures remain isolated while the related stack is still under test; the original localhost app and other agents’ worktrees are untouched.

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