Skip to content

refactor: clarify plugin API names with deprecated compatibility aliases - #15

Merged
heoblitz merged 1 commit into
toss:mainfrom
daniel-l2:refactor/naming-cleanup
Sep 29, 2026
Merged

heoblitz merged 1 commit into
toss:mainfrom
daniel-l2:refactor/naming-cleanup

Conversation

@daniel-l2

Copy link
Copy Markdown
Contributor

Summary

The plugin protocol is named NectoPluginable, while NectoHandler collects handler registrations rather than handling requests itself. Rename them to NectoPlugin and NectoRegistrar, rename the cancellation message to NectoPluginCancellation, and pair capture install(reporting:) with uninstall().

Keep all four old public entry points as deprecated aliases or a forwarding method, with rename diagnostics. Update every adopter, the device-plugin generator template, and English/Korean documentation. An external SDK consumer fixture checks legacy protocol conformance, NectoHandler.Out, both capture entry points, and the unchanged cancellation JSON shape. JSON keys, plugin.cancel, and manifest schemas are unchanged; no removal version is scheduled for the compatibility aliases.

Also normalize four internal identifiers to American spelling: the settings-row property, the design-gallery parameter, and two test names. Correct the capture comment's plugin reference to reporter.

Rechecked against main 0650f1b, including the newly added Control plugin and renamed built-in plugins. The previous review's DefaultEventsPlugin observation is obsolete; it is already NectoEventsPlugin. The gallery parameter was an additional spelling occurrence missing from that review.

Changelog

Clarify plugin SDK names while retaining deprecated source-compatible names for existing adopters.

Test Plan

  • script/test swift: 160 root tests, 267 Mac tests, and 2 external SDK consumer tests passed. All four legacy API names emit the expected rename warnings.
  • script/test web: type checks, 29 Vitest tests, 13 generator tests, and panel asset checks passed.
  • node --test script/tests/create-plugin.test.mjs: 12 passed.
  • yarn docs:build and node --check docs/design/gallery.js: passed.
  • script/build: web packages, both Swift packages, and the macOS app built successfully. Its simulator selection parsed the parenthesized device name as an ID, so the ExampleApp step failed before building. Re-running xcodebuild -project Necto.xcodeproj -scheme ExampleApp -configuration Debug -destination 'id=ADCDB781-969E-4B62-8520-D1C3EB6DCE4B' -derivedDataPath Build build succeeded. The macOS app was launched and its process remained running.
  • Native integration tests: all 28 passed after copying the same staged sources and built panels to /tmp and running xcodebuild -project Necto.xcodeproj -scheme NectoAppTests -destination "platform=macOS,arch=arm64" -derivedDataPath Build/Tests test there. The initial script/test native could not load its test bundle under Documents; moving only build output exposed fixture read permission errors. Relocating both source fixtures and build output resolved these local access failures without source changes.
  • git diff --check: passed. Old type names remain only in compatibility declarations and the explicit legacy-consumer fixture.

Environment: Xcode 26.0.1, macOS 26.6.2, iOS 26.0 simulator. Simulator E2E and physical USB testing were not run. App launch is a smoke check, not a visual or end-to-end connection check.

@heoblitz heoblitz left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

nice work! thank you.

@heoblitz
heoblitz merged commit 8abe589 into toss:main Sep 29, 2026
5 checks passed
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.

2 participants