Skip to content

fix: force packaged Electron userData onto Dripnex (#572) - #573

Merged
tomymaritano merged 2 commits into
developfrom
cursor/packaged-userdata-dripnex-b625
Aug 22, 2026
Merged

fix: force packaged Electron userData onto Dripnex (#572)#573
tomymaritano merged 2 commits into
developfrom
cursor/packaged-userdata-dripnex-b625

Conversation

@tomymaritano

@tomymaritano tomymaritano commented Aug 22, 2026

Copy link
Copy Markdown
Collaborator

Summary

Packaged Linux 0.16.1 still wrote plugins/DB/logs under ~/.config/@dripnex/desktop because Electron app.getPath('userData') follows package.json name @dripnex/desktop. #567 only aligned CLI resolveUserDataRoot. This PR sets the Electron app name and userData to productName Dripnex before createDataPaths, so the packaged app and dripnex-plugin share one folder.

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update

Related Issues

Closes #572

What changed

  1. RuntimeapplyProductUserData() runs before Sentry and requestSingleInstanceLock. It calls app.setName('Dripnex') and app.setPath('userData', resolveUserDataRoot()) unless Chromium already has --user-data-dir (e2e).
  2. Package metadata — root productName: "Dripnex" plus electron-builder extraMetadata.productName so packaged package.json does not rely on the scoped npm name for app.getName().
  3. No silent migrate — existing @dripnex/desktop with dripnex.db or plugins/ stays put via pickUserDataRoot. Fresh installs use ~/.config/Dripnex / %APPDATA%/Dripnex / ~/Library/Application Support/Dripnex.
  4. Docsdocs/plugins/install-path.md records the packaged-app contract.

No marketplace. No iOS. No release cut.

Checklist

  • I've read CONTRIBUTING.md
  • Targeted tests pass (@dripnex/storage-core 29, @dripnex/plugin-cli 19) and desktop/storage-core typecheck
  • Full pnpm test / pnpm build (not required for this path-only change)
  • PR targets develop branch (not main)

Test plan

  • Unit: resolveElectronUserData names the app Dripnex, defaults to the packaged folder on Linux/Windows/macOS, keeps an existing scoped folder that already has dripnex.db, honors DRIPNEX_DATA_DIR, leaves --user-data-dir alone
  • Packaged Linux log dataDir is ~/.config/Dripnex on a fresh machine
  • CLI dripnex-plugin and the packaged app resolve the same plugins dir
  • e2e --user-data-dir / DRIPNEX_DATA_DIR still isolate tests
Open in Web Open in Cursor 

Summary by CodeRabbit

  • New Features

    • Rebranded the desktop app as Dripnex.
    • Improved shared data-folder handling between the desktop app and CLI.
    • Added support for explicitly configured custom user-data directories.
    • Preserved existing application data across supported configurations.
  • Documentation

    • Updated installation guidance for user-data directory resolution.
  • Tests

    • Added coverage for platform-specific paths, custom directories, and application naming.

Packaged Linux followed package.json name @dripnex/desktop. Set the
Electron app name and userData from resolveUserDataRoot before
createDataPaths so CLI and the app share ~/.config/Dripnex.

Co-authored-by:  Tomás Maritano <tomymaritano@gmail.com>
@coderabbitai

coderabbitai Bot commented Aug 22, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 91c1b17e-80bf-425a-a932-f6c95f2ad3f1

📥 Commits

Reviewing files that changed from the base of the PR and between f904bfb and 94ffbc5.

📒 Files selected for processing (7)
  • apps/desktop/package.json
  • apps/desktop/src/main/applyUserData.ts
  • apps/desktop/src/main/index.ts
  • docs/plugins/install-path.md
  • packages/storage-core/src/data/DataPaths.ts
  • packages/storage-core/src/data/index.ts
  • packages/storage-core/tests/data-paths.test.ts

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The change standardizes the Electron product name as Dripnex, resolves shared user-data paths, preserves explicit Chromium paths, and applies the configuration during desktop startup. Tests cover platform paths, existing data, environment overrides, and command-line overrides.

Changes

User-data initialization

Layer / File(s) Summary
Electron user-data resolution and validation
packages/storage-core/src/data/DataPaths.ts, packages/storage-core/src/data/index.ts, packages/storage-core/tests/data-paths.test.ts
The storage core adds Dripnex naming, Electron user-data resolution, explicit --user-data-dir detection, public exports, and platform-specific tests.
Desktop startup integration
apps/desktop/package.json, apps/desktop/src/main/applyUserData.ts, apps/desktop/src/main/index.ts, docs/plugins/install-path.md
The desktop package sets the Dripnex product name. Startup applies the resolved application name and user-data path before Sentry initialization. Documentation describes the same path rules and overrides.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Merge Risk: ⚪ Minimal · up to 94ffb

The PR aligns packaged app and CLI data locations while preserving explicit test and environment overrides; no actionable merge-blocking risk remains beyond normal checks and review.

Sequence Diagram(s)

sequenceDiagram
  participant DesktopMain
  participant applyProductUserData
  participant resolveElectronUserData
  participant ElectronApp
  DesktopMain->>applyProductUserData: initialize before Sentry
  applyProductUserData->>ElectronApp: read current userData and process arguments
  applyProductUserData->>resolveElectronUserData: resolve Dripnex configuration
  resolveElectronUserData-->>applyProductUserData: name, userData, setUserDataPath
  applyProductUserData->>ElectronApp: set application name
  applyProductUserData->>ElectronApp: conditionally set userData path
Loading
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 60.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 5 functions across 5 files. (2 skipped: 2 unsupported.) Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies the fix to packaged Electron user-data paths and matches the primary change.
Linked Issues check ✅ Passed The changes address issue #572 by aligning packaged Electron storage with Dripnex paths, preserving overrides, and adding relevant tests.
Out of Scope Changes check ✅ Passed The changes remain within issue #572 scope and support the packaged Electron user-data path fix.
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch cursor/packaged-userdata-dripnex-b625

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added dependencies Pull requests that update a dependency file app:desktop package:storage size/M labels Aug 22, 2026
@tomymaritano
tomymaritano marked this pull request as ready for review August 22, 2026 19:17
@tomymaritano
tomymaritano merged commit b7438c2 into develop Aug 22, 2026
19 of 20 checks passed
@tomymaritano
tomymaritano deleted the cursor/packaged-userdata-dripnex-b625 branch August 22, 2026 20:00
@github-actions

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 0.17.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Packaged 0.16.1 Linux still uses ~/.config/@dripnex/desktop, not Dripnex

2 participants