Skip to content

Route unhandled editor commands to embedders - #176

Open
yvos wants to merge 2 commits into
nodes-app:mainfrom
yvos:nofray/unhandled-commands
Open

Route unhandled editor commands to embedders#176
yvos wants to merge 2 commits into
nodes-app:mainfrom
yvos:nofray/unhandled-commands

Conversation

@yvos

@yvos yvos commented Sep 3, 2026

Copy link
Copy Markdown

Summary

  • Add a small public command enum for Escape, Tab, and Shift-Tab.
  • Add an optional synchronous Bool-returning host callback.
  • Route inline previews first, list indentation and outdentation second, and the host exactly once afterward.
  • Preserve AppKit fallback when the host declines and use the same fallback contract in raw-source mode.
  • Share Tab list handling between command routing and text insertion while preserving maximum-depth consumption.
  • Forward top-level Backtab, code-block Tab, and disabled-helper Tab after the engine declines them.

This is the command-routing half of #173.

Validation

  • UnhandledCommandTests: 14 tests passed, including two parameterized host-result cases.
  • Full suite: 484 tests in 69 suites passed.
  • Demo reports host-visible commands and consumes Escape as an example.

yvos added 2 commits September 3, 2026 20:26
Give inline previews and list editing first refusal, then offer Escape, Tab, and Shift-Tab to the host exactly once before preserving AppKit fallback.
Treat top-level Backtab and disabled or code-context Tab as unhandled while retaining engine ownership for nested outdent and maximum-depth Tab.
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