Skip to content

✨ Add showPairingCode endpoint with remote access toggle#4096

Merged
guiyanakuang merged 1 commit intomainfrom
feat/issue-4095-show-pairing-code-endpoint
Mar 26, 2026
Merged

✨ Add showPairingCode endpoint with remote access toggle#4096
guiyanakuang merged 1 commit intomainfrom
feat/issue-4095-show-pairing-code-endpoint

Conversation

@guiyanakuang
Copy link
Copy Markdown
Member

Closes #4095

Summary

  • Add GET /sync/showPairingCode server endpoint that navigates the local app to the pairing code screen
  • Add enableRemoteShowPairingCode config toggle (default: true) to control whether unpaired devices can trigger the endpoint
  • Place the toggle on the pairing code screen so users can disable it after initial pairing
  • Implement full event chain: SyncHandlerSyncEvent.ShowPairingCodeSyncResolverSyncDeviceManagerSyncClientApi
  • Optimize pairing code screen spacing to ensure all content (including toggle) is visible without scrolling
  • Add i18n key allow_remote_show_pairing_code in all 10 languages

Changed files (36 files)

  • Config: AppConfig, DesktopAppConfig — new enableRemoteShowPairingCode property
  • Server: SyncRouting, DefaultServerModule, DesktopServerModule — new endpoint with config check
  • Token service: AppTokenApi, AppTokenService, DesktopAppTokenService, HeadlessAppTokenServiceshowPairingCode() + preShowPairingCode()
  • Sync chain: SyncHandler, SyncEvent, GeneralSyncHandler, MarketingSyncHandler, SyncResolver, SyncDeviceManager
  • Client API: SyncClientApishowPairingCode() request
  • UI: PairingCodeContentView — toggle switch + spacing optimization
  • DI: DesktopUiModule, DesktopNetworkModule — wiring
  • Error code: StandardErrorCode.REMOTE_SHOW_PAIRING_CODE_DISABLED
  • i18n: All 10 locale files
  • Test infra: TestAppConfig, TestConfigManager, TestAppTokenService, TestServerModule, TestInstance, SyncTest

@guiyanakuang guiyanakuang merged commit d6bd2ab into main Mar 26, 2026
2 checks passed
@guiyanakuang guiyanakuang deleted the feat/issue-4095-show-pairing-code-endpoint branch March 26, 2026 12:05
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.

Add showPairingCode endpoint with remote access toggle

1 participant