Skip to content

✨ [desktop]: Implement deep link prompt import functionality#42

Open
yuler wants to merge 16 commits into
mainfrom
desktop/deep-link
Open

✨ [desktop]: Implement deep link prompt import functionality#42
yuler wants to merge 16 commits into
mainfrom
desktop/deep-link

Conversation

@yuler
Copy link
Copy Markdown
Owner

@yuler yuler commented Apr 23, 2026

Summary

  • Implemented deep link support using tauri-plugin-deep-link and tauri-plugin-single-instance.
  • Added frontend listener for typo://import-prompt?id=xxx deep links.
  • Created DeepLinkImportModal for user confirmation before importing.
  • Implemented data fetching from typo.yuler.cc with persistence to local store.
  • Added i18n support for English, Chinese, and Japanese.
  • Included design specification and implementation plan.

Test plan

  • Manual test: Trigger typo://import-prompt?id=test and verify modal appearance and data import.
  • Verify single instance behavior: Clicking a link when app is closed vs open.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request implements a deep link import feature for prompts using Tauri's deep-link and single-instance plugins. It includes the necessary Rust backend configuration, a new Vue component for the import modal, and frontend logic to handle the typo://import-prompt scheme. Feedback highlights a breaking change regarding the application identifier, the need for better data validation in the import handler, and the importance of URL encoding when fetching remote prompt data.

Comment thread apps/desktop/src-tauri/tauri.conf.json Outdated
Comment thread apps/desktop/src/App.vue
Comment thread apps/desktop/src/components/DeepLinkImportModal.vue Outdated
@yuler
Copy link
Copy Markdown
Owner Author

yuler commented Apr 23, 2026

Addressed review comments:

  • Reverted application identifier to com.typo.app to avoid breaking changes.
  • Improved data validation in handleImportSuccess to ensure required fields are present.
  • Used encodeURIComponent for the prompt ID when fetching data to handle special characters correctly.

@yuler yuler changed the title feat: implement deep link prompt import functionality ✨ [desktop]: Implement deep link prompt import functionality Apr 26, 2026
@yuler yuler force-pushed the main branch 3 times, most recently from 8325d6a to 4014835 Compare May 7, 2026 01:46
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