Skip to content

fix(quick-tools): keep search input stable and recover popup typing - #7503

Merged
M4n5ter merged 2 commits into
apache:mainfrom
MicroGery:codex/quick-tools-input-stability
Dec 1, 2026
Merged

M4n5ter merged 2 commits into
apache:mainfrom
MicroGery:codex/quick-tools-input-stability

Conversation

@MicroGery

Copy link
Copy Markdown
Contributor

Summary

Entering a Quick Tools scope recreated the search field just to change its placeholder. Keep the existing field instead, update its placeholder and accessibility label in place, and preserve the query and selected row when returning to the previous scope.

On macOS, buffered keyboard events could remain stranded after autofocus completed or was abandoned. Completing that transition now resumes the queue, and replay sends native events to their originating window instead of the surface's main window. This retains the event-window focus handling merged in #7489.

Also keep selection on the actual row when the same tool appears in both Recommended and Tools. Previously, looking up its key alone jumped to the first occurrence.

Refs #7489.

Verification

Rebased onto origin/main at fff1643197. Rust compilation and tests run on an Apple Silicon Mac mini; the local machine runs only lightweight Node/Git checks.

Passed on the rebased revision c5bd636fdf:

  • 5 workbench interaction tests: cargo test --locked -p maka-workbench --lib launcher_ (3) and cargo test --locked -p maka-workbench --lib tests::quick_ (2).
  • Native AppKit checks with NSH_INPUT_QUEUE_CHECK_ONLY, NSH_INPUT_RESTYLE_CHECK_ONLY, and NSH_POPUP_KEYMAP_CHECK_ONLY, using the nsh-platform-macos native test binary with --no-default-features --features js.
  • The existing terminal regression pending_focus_fence_holds_editing_shortcuts_paste_and_reports_stranded_text.
  • All 23 quick-tools Node tests.
  • All 31 CI-script cases, split between 30 on the Mac mini and the Git-metadata-dependent scheduled-event case in the local checkout. The Mini uses a source snapshot without .git.
  • Fresh UI declaration generation and TypeScript checking of the real workbench sources and fixtures.
  • Root workspace Rust formatting and the changed NSH Rust files; pinned Biome checks; migration-lock and i18n checks; commit-hook ASF header checks; git diff --check.

Representative behavior-check output:

tests::launcher_keeps_the_search_field_and_updates_its_hint_when_switching_tools ... ok
queued input: popup replacement preserves typing and scoped navigation
popup keymap: scoped Up/Down follow event window and respect input scope

The complete workspace/native suites were not run. macOS debug linking emits the existing non-fatal __eh_frame section too large warning.

The regressions exercise the real Launcher component and native AppKit event delivery. Before the fixes, the stable-input test observed a different input node after entering a tool, the duplicate-row test selected the earlier occurrence, and the native popup test lost the typed character after replacing the input. These are behavioral tests, not source-text assertions.

Physical-keyboard verification of the rebased app is not included. The earlier source revision was built on the Mac mini and installed locally for interactive testing; that installation is not evidence for this rebased revision.

AI use

  • No generative tool made a substantive contribution
  • Generative tooling made a substantive contribution

Codex assisted with diagnosis, implementation, regression tests, and this description. The commit carries Generated-by: Codex; preserve it in the squash commit.

Checklist

  • Tests cover the change and fail without it
  • Format, typecheck and the affected suites pass locally (Rust checks on Mac mini)

Does this PR entail a breaking change or persisted-data migration?

  • Yes
  • No

Does this PR entail a change in behavior?

  • Yes — described under Summary above
  • No

Keep the search field across tool navigation, release held keys when autofocus settles, replay events to their originating window, and preserve duplicate result selection. Cover the behavior with Launcher and native AppKit regressions.

Generated-by: Codex
@github-actions github-actions Bot added the effort/M Under 500 readable lines label Dec 1, 2026
@MicroGery
MicroGery requested a review from M4n5ter December 1, 2026 14:44
…sktop keys

Sync the reused QuickLauncher field when a single-edit/pasted prefix enters a tool with rest === query(), wait for pending autofocus in flush_pending and drain desktop AppKit keys once autofocus settles so abandoned autofocus cannot strand subsequent keys, fail explicitly if NSH_INPUT_QUEUE_CHECK_ONLY runs without feature js, rename the macos-nsh stage to input-queue, and expand Launcher and AppKit regressions.

@M4n5ter M4n5ter left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Followed up with fixes for reused prefix input sync, settling desktop AppKit keys when autofocus ends/abandons, explicit feature-js guard in native check routing, and expanded Launcher/AppKit regressions. LGTM.

@M4n5ter
M4n5ter merged commit 85848ea into apache:main Dec 1, 2026
1 check passed
jay23606 added a commit to jay23606/maka that referenced this pull request Dec 1, 2026
…pache#7503)

Keep the QuickLauncher search field across tool navigation (and sync the reused field when a single-edit/pasted prefix enters a tool with rest === query()), wait for pending autofocus in macOS flush_pending and drain settled desktop keys when autofocus completes or is abandoned, replay held native events to their originating window, preserve duplicate Recommended/Tools row selection, and cover the behavior with Launcher and native AppKit regressions.

Generated-by: Codex
M4n5ter pushed a commit that referenced this pull request Dec 3, 2026
…ations (#7531)

Carry forward the CI repairs on Jack's branch and clean up follow-up regressions:\n\n- Fix the missing ACP ModelChoice.provider_id test fixture and format markdown-toc.test.mjs with Biome.\n- Update stale test expectations for NSH drag-lift selection events, desktop Google Gemini -> Antigravity connection flow, folded Bot turn layout settlement, archived Read page newlines, iOS Room recovery New Chat locator, and Agent replay/stack sizing.\n- Retain plaintext reasoning normalization policy on reused Responses wire prefixes via a shared wire::install helper.\n- Restore light-theme iOS pressed glass action contrast (#D9E8F2, 4.57:1) and narrow HostListNotices offline state from a single snapshot.\n- Keep macOS popup autofocus pending until first-frame show and resolve AppKit field editor ownership in keymap::editing.\n- Isolate Markdown TOC native list scroll state per turn inside TocHeadingList (covering docked, compact-pinned, and section lists) and drop the obsolete syncedTurn reuse branch.\n- Decode saved eval batch CellRecord outcomes via serde_json::Value so arbitrary_precision feature unification preserves numeric fields inside tagged enums.\n- Restore the resident-pressure model.has_wire_prefix() assertion in Agent driver wire prefix reuse tests.\n\nRefs #7443, #7488, #7395, #7499, #7503, #7504, #7505, #7456, #7515.\n\nCo-authored-by: jackwener <jakevingoo@gmail.com>\nCo-authored-by: M4n5ter <m4n5terrr@gmail.com>\nGenerated-by: Claude Code (Claude Opus 5.5)\nGenerated-by: Maka (OpenAI)\nGenerated-by: OpenAI Codex\nGenerated-by: Maka (Gemini 4 Neon)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

effort/M Under 500 readable lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants