Skip to content

Conversation

@devin-ai-integration
Copy link
Contributor

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

…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 <[email protected]>
@devin-ai-integration
Copy link
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR that start with 'DevinAI' or '@devin'.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

@netlify
Copy link

netlify bot commented Dec 23, 2025

Deploy Preview for hyprnote failed.

Name Link
🔨 Latest commit 02179a2
🔍 Latest deploy log https://app.netlify.com/projects/hyprnote/deploys/694a3363f5f5b8000886a19d

@netlify
Copy link

netlify bot commented Dec 23, 2025

Deploy Preview for hyprnote-storybook failed.

Name Link
🔨 Latest commit 02179a2
🔍 Latest deploy log https://app.netlify.com/projects/hyprnote-storybook/deploys/694a336339fa7b000823bc21

@devin-ai-integration
Copy link
Contributor Author

Devin is archived and cannot be woken up. Please unarchive Devin if you want to continue using it.

Copy link
Contributor

yujonglee commented Dec 23, 2025


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • merge - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

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.

@graphite-app
Copy link
Contributor

graphite-app bot commented Dec 23, 2025

Merge activity

  • Dec 23, 7:22 AM UTC: yujonglee added this pull request to the Graphite merge queue.
  • Dec 23, 7:22 AM UTC: CI is running for this pull request on a draft pull request (#2494) due to your merge queue CI optimization settings.
  • Dec 23, 7:23 AM UTC: Merged by the Graphite merge queue via draft PR: #2494.

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)
@graphite-app graphite-app bot closed this Dec 23, 2025
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