Skip to content

feat(navigation): verify editor selection mutations - #399

Closed
dubesinhower wants to merge 15 commits into
mixelpixx:mainfrom
dubesinhower:feat/verified-editor-selection
Closed

feat(navigation): verify editor selection mutations#399
dubesinhower wants to merge 15 commits into
mixelpixx:mainfrom
dubesinhower:feat/verified-editor-selection

Conversation

@dubesinhower

Copy link
Copy Markdown
Contributor

Navigation MVP slice N4

Adds semantic clear/add/remove selection operations for an exact KiCad editor context, with stable-KIID target validation and result-derived readback.

Why this belongs in the MVP

Navigation needs a safe way to express selection intent without exposing raw actions or treating a successful transport round trip as proof that KiCad changed state.

Dependency

Behavior

  • Uses typed ClearSelection, AddToSelection, and RemoveFromSelection commands only.
  • Requires an exact project/document/editor/sheet context; schematic instances are addressed by canonical KIID path.
  • Resolves every add/remove KIID in the explicit saved structure before sending a mutation.
  • Reads the exact selection before and after the command and requires the complete observed set to equal the requested transition.
  • Returns before/after stable object identities and explicit live readback evidence.
  • Refuses duplicate/empty IDs, stale/missing targets, wrong projects/documents/sheets, closed editors, unsupported commands/object decoding, and post-operation mismatch.

Intentionally unsupported here

  • Selection does not imply viewport reveal, centering, fitting, document activation, or cross-probing.
  • No raw RunAction API is exposed.

Verification

  • cargo fmt --all -- --check
  • cargo test -p konnect-ipc --test mock_server_test — 47 passed, 1 ignored
  • cargo test -p konnect-core editor_navigation --lib — 12 passed
  • cargo test -p konnect-core --lib — 943 passed, 9 ignored
  • cargo test --workspace --all-targets — passed (live/environment-only tests remained ignored)
  • cargo clippy --workspace --all-targets -- -D warnings
  • cargo clippy -p konnect-ipc --tests -- -D warnings after the final exact-list comparison tightening
  • xtask fix-doc-counts --check — 21 toolsets, 225 registered, 232 total
  • git diff --check

Hermetic transport tests exercise clear, add, and remove success; exact document headers; duplicate validation before transport; wrong/stale inherited context refusals; typed unsupported mapping; and a successful mutation response followed by unchanged selection, which returns readback_mismatch.

Remaining risks

  • KiCad 10's stable schematic protobuf cannot decode selected symbols, so symbol selection remains explicitly unsupported instead of unverifiable.
  • KiCad selection replies have no document header; bounded before/after GetOpenDocuments checks are the available freshness boundary and are not atomic.
  • No live endpoint was available, so real-GUI success is not claimed.

@neusse

neusse commented Sep 7, 2026

Copy link
Copy Markdown
Collaborator

Superseded by #493, which reconstructs this N4 change directly on the now-merged N3 baseline (#492 / current main). The replacement preserves the original implementation and @dubesinhower authorship, resolves the one current-main structured-error conflict without dropping either behavior, and has passed the full local gate. Closing this cumulative branch so review and CI follow the minimal sequential PR.

@neusse neusse closed this Sep 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status:waiting-on-dependency Next actor: the dependency owner — see linked blocking issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants