feat: add path2 plugin for centralized path resolution with dev isolation#2486
Closed
devin-ai-integration[bot] wants to merge 1 commit intomainfrom
Closed
feat: add path2 plugin for centralized path resolution with dev isolation#2486devin-ai-integration[bot] wants to merge 1 commit intomainfrom
devin-ai-integration[bot] wants to merge 1 commit intomainfrom
Conversation
…tion - Create path2 plugin that returns app_data_dir in dev (com.hyprnote.dev) and data_dir/hyprnote in production - Add TypeScript bindings via tauri-specta - Remove leftover plugins/db directory and @hypr/plugin-db references - Integrate plugin into desktop app Co-Authored-By: yujonglee <yujonglee.dev@gmail.com>
Contributor
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
❌ Deploy Preview for hyprnote failed.
|
❌ Deploy Preview for hyprnote-storybook failed.
|
yujonglee
approved these changes
Dec 23, 2025
Contributor
Author
|
Devin is archived and cannot be woken up. Please unarchive Devin if you want to continue using it. |
Contributor
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
This was referenced Dec 23, 2025
Contributor
Merge activity
|
Closed
graphite-app bot
pushed a commit
that referenced
this pull request
Dec 23, 2025
…tion (#2486) # feat: add path2 plugin for centralized path resolution with dev isolation ## Summary This PR introduces a new `path2` plugin that centralizes path resolution logic for Hyprnote. The key behavior is dev environment isolation: in debug builds, the plugin returns `app_data_dir` (which resolves to `com.hyprnote.dev`), while in release builds it returns `data_dir/hyprnote` (shared across staging/nightly/stable). The plugin provides both Rust and TypeScript APIs: - Rust: `app.path2().base()` - TypeScript: `import { commands } from "@hypr/plugin-path2"; commands.base()` Also cleans up orphaned `@hypr/plugin-db` references from `packages/tiptap` and `packages/utils`. ## Review & Testing Checklist for Human - [ ] **Verify `cfg!(debug_assertions)` is the correct mechanism for dev detection** - This is a compile-time check, meaning the path logic is baked in at build time. Confirm this matches the intended behavior (staging/nightly/stable builds should all use release mode). - [ ] **Check that `@hypr/plugin-db` removal doesn't break anything** - The PR removes this dependency from `packages/tiptap/package.json` and `packages/utils/package.json`. Verify no code in these packages actually imports from `@hypr/plugin-db`. - [ ] **Review the `create_dir_all` side effect in `base()`** - The function creates the directory if it doesn't exist. Confirm this is acceptable behavior for a path resolution function. - [ ] **Test the plugin in the running desktop app** - Run `ONBOARDING=0 pnpm -F desktop tauri dev` and verify the path resolution works correctly. Check that data is written to the expected location. ### Notes - Link to Devin run: https://app.devin.ai/sessions/6893a63da49c44f28ee5e560ebcd4b15 - Requested by: yujonglee (@yujonglee)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

feat: add path2 plugin for centralized path resolution with dev isolation
Summary
This PR introduces a new
path2plugin that centralizes path resolution logic for Hyprnote. The key behavior is dev environment isolation: in debug builds, the plugin returnsapp_data_dir(which resolves tocom.hyprnote.dev), while in release builds it returnsdata_dir/hyprnote(shared across staging/nightly/stable).The plugin provides both Rust and TypeScript APIs:
app.path2().base()import { commands } from "@hypr/plugin-path2"; commands.base()Also cleans up orphaned
@hypr/plugin-dbreferences frompackages/tiptapandpackages/utils.Review & Testing Checklist for Human
Verify
cfg!(debug_assertions)is the correct mechanism for dev detection - This is a compile-time check, meaning the path logic is baked in at build time. Confirm this matches the intended behavior (staging/nightly/stable builds should all use release mode).Check that
@hypr/plugin-dbremoval doesn't break anything - The PR removes this dependency frompackages/tiptap/package.jsonandpackages/utils/package.json. Verify no code in these packages actually imports from@hypr/plugin-db.Review the
create_dir_allside effect inbase()- The function creates the directory if it doesn't exist. Confirm this is acceptable behavior for a path resolution function.Test the plugin in the running desktop app - Run
ONBOARDING=0 pnpm -F desktop tauri devand verify the path resolution works correctly. Check that data is written to the expected location.Notes