Skip to content

Commit c3f1ca9

Browse files
authored
Merge pull request #6 from TheNotelyApp/export_import
Export import
2 parents 7730d5f + dc32965 commit c3f1ca9

24 files changed

Lines changed: 1916 additions & 36 deletions
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve Notely
4+
title: '[Bug] '
5+
labels: bug
6+
assignees: ''
7+
8+
---
9+
10+
### Description
11+
A clear and concise description of what the bug is.
12+
13+
### Steps to Reproduce
14+
Steps to reproduce the behavior:
15+
1. Go to '...'
16+
2. Click on '...'
17+
3. Scroll down to '...'
18+
4. See error
19+
20+
### Expected Behavior
21+
A clear and concise description of what you expected to happen.
22+
23+
### Screenshots / Videos
24+
If applicable, add screenshots or recordings to help explain your problem.
25+
26+
### System Info
27+
- App Version:
28+
- OS Platform:
29+
- Theme:
30+
- Browser/Electron Environment:
31+
32+
### Additional Context
33+
Add any other context about the problem here.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea/enhancement for Notely
4+
title: '[Enhancement] '
5+
labels: enhancement
6+
assignees: ''
7+
8+
---
9+
10+
### Describe the Feature
11+
A clear and concise description of what the feature is and what problem it solves.
12+
13+
### Proposed Solution
14+
Describe the solution or behavior you'd like to see.
15+
16+
### Alternative Solutions Considered
17+
Describe any alternative solutions or features you've considered.
18+
19+
### Additional Context
20+
Add any other context, mockup screenshots, or design thoughts here.

.github/pull_request_template.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
### Description
2+
Provide a brief summary of the changes made, the goal of this pull request, and any relevant issue links (e.g. `Closes #123`).
3+
4+
### Types of Changes
5+
- [ ] Bug fix (non-breaking change which fixes an issue)
6+
- [ ] New feature (non-breaking change which adds functionality)
7+
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
8+
- [ ] Documentation update
9+
- [ ] Code refactoring / Styling update
10+
11+
### Checklist
12+
- [ ] Code compiles and runs locally without errors.
13+
- [ ] Follows existing style and patterns of the codebase.
14+
- [ ] Added/updated tests to cover my changes.
15+
- [ ] All new and existing tests passed.
16+
- [ ] Documentation updated (if applicable).
17+
18+
### Verification/Screenshots
19+
Provide verification steps, console output logs, or screenshots/videos of UI changes to demonstrate the fix/feature working.

CHANGELOG.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,23 @@ All notable documentation and user-facing behavior changes are tracked in this f
88

99
### Added
1010

11-
- Added `Ctrl+Tab` (next tab) and `Ctrl+Shift+Tab` (previous tab) shortcuts to navigate between open notes.
11+
- Added **Export / Import Note Package** feature (`File → Export / Import Note Package`).
12+
- Exports a selection of notes — including all linked images, Excalidraw diagrams, Draw.io files, screenshots, and thumbnails — into a single encrypted `.note` bundle.
13+
- Bundles are AES-256 encrypted and SHA-256 integrity-hashed; tampered files are detected on import.
14+
- Import unpacks the bundle into the current workspace, restoring all assets and resolving filename collisions via embedded metadata.
15+
- Default export path and filename (`{rootFolder}.note`) are pre-filled from the last-used export location.
16+
- Dedicated **Export/Import modal** with a scrollable, compact note-selection list supporting Select All/Deselect All; fixed-height dialog that does not shift when switching between the Export and Import tabs.
17+
- Added `src/tests/utils/notePackage.test.js` — unit tests covering dependency scanning, path sanitization (leading-slash screenshot paths), crypto, and regex parsing.
18+
19+
### Fixed
20+
21+
- Fixed split-view scroll sync sluggishness and lock-fighting between the raw editor and the preview panel.
22+
- Replaced the `activeScrollSource` string-based lock with a generation counter (`lockGen`) and an 80 ms timeout, preventing programmatic `scrollTop` changes from bouncing back into the opposite panel's sync handler.
23+
- Fixed `.note` export failing with `EPERM: operation not permitted, copyfile` when notes contained screenshots stored as `/media/images/…` paths; leading slashes are now stripped before OS path resolution.
24+
- Fixed `.note` export `mkdir` crash caused by absolute note file paths being passed to `path.join(stagingDir, absPath)`; paths are now normalised to workspace-relative via `path.relative(notesRoot, absolutePath)`.
25+
- Fixed destination directory not being created automatically when the user accepts the default export path without browsing.
26+
27+
1228
- Added a **Copy Link Path** context menu option to open tabs and landing items to easily copy workspace-relative paths.
1329
- Added support for custom action buttons (e.g. "Undo") inside notification toasts.
1430
- Added a **Copy | Navigate** hover popover for links in Markdown Previews, while preventing accidental direct click navigation.

README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,10 @@ Notely is built with Electron + React and is designed for project notes, meeting
6767
- Copy note link paths relative to the current workspace root from right-click context menus on tabs and dashboard document list items.
6868
- Dismiss notification toasts immediately with a close button, and undo/redo applied markdown quick fixes or validation suggestions.
6969
- Hover over links in Markdown Previews to display a transient popover containing Copy Link and Navigate options, while direct clicks on links are prevented to avoid accidental navigation.
70+
- **Export/Import Note Packages** (`.note` files) via **File → Export / Import Note Package** to share self-contained, encrypted bundles of notes with all linked media, Excalidraw diagrams, Draw.io files, and screenshots.
71+
- Bundles are AES-256 encrypted and SHA-256 integrity-checked so recipients can trust authenticity.
72+
- A dedicated **Export/Import modal** lets you select which notes to include, pre-fills the save path and filename from your last export location, and handles naming collisions on import automatically.
73+
- Importing unpacks directly into the current workspace with full dependency restoration.
7074

7175
## Getting Started
7276

@@ -201,6 +205,14 @@ Planned additions and improvements for upcoming iterations:
201205
- OCR-assisted alt text suggestions for inserted images.
202206
- Command palette automation macros for repeated authoring tasks.
203207

208+
## Contributing and Reporting Issues
209+
210+
We welcome feedback, bug reports, and feature requests!
211+
212+
- **In-App Reporting:** Open **Help -> Report Bug / Feedback** (or search in the Command Palette) to access the built-in issue reporting form, which automatically collects system details and opens a pre-populated issue draft on GitHub.
213+
- **Manual Reports:** Go directly to our [GitHub Issues](https://github.com/TheNotelyApp/Notely/issues) page to open a new issue.
214+
- **Templates:** Use the pre-configured issue templates (Bug report or Feature request) when submitting reports. When opening a Pull Request, please follow the PR template checklist.
215+
204216
## License and ownership
205217

206218
This repository is maintained for Notely use.

THIRD_PARTY_NOTICES.txt

Lines changed: 62 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
THIRD-PARTY SOFTWARE NOTICES AND INFORMATION
22

33
Notely incorporates components from the projects listed below.
4-
This file was generated automatically on 2026-07-17 by
4+
This file was generated automatically on 2026-07-18 by
55
scripts/generate-notices.cjs. Do not edit by hand.
66

7-
Total third-party packages: 390
7+
Total third-party packages: 392
88

99
================================================================================
1010

@@ -9594,6 +9594,37 @@ Apache License
95949594

95959595
--------------------------------------------------------------------------------
95969596

9597+
pend@1.2.0
9598+
License: MIT
9599+
Author: Andrew Kelley <superjoe30@gmail.com>
9600+
Homepage: git://github.com/andrewrk/node-pend.git
9601+
9602+
The MIT License (Expat)
9603+
9604+
Copyright (c) 2014 Andrew Kelley
9605+
9606+
Permission is hereby granted, free of charge, to any person
9607+
obtaining a copy of this software and associated documentation files
9608+
(the "Software"), to deal in the Software without restriction,
9609+
including without limitation the rights to use, copy, modify, merge,
9610+
publish, distribute, sublicense, and/or sell copies of the Software,
9611+
and to permit persons to whom the Software is furnished to do so,
9612+
subject to the following conditions:
9613+
9614+
The above copyright notice and this permission notice shall be
9615+
included in all copies or substantial portions of the Software.
9616+
9617+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
9618+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
9619+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
9620+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
9621+
BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
9622+
ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
9623+
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
9624+
SOFTWARE.
9625+
9626+
--------------------------------------------------------------------------------
9627+
95979628
perfect-freehand@1.2.0
95989629
License: MIT
95999630
Author: Steve Ruiz
@@ -13058,6 +13089,35 @@ IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
1305813089

1305913090
--------------------------------------------------------------------------------
1306013091

13092+
yauzl@3.4.0
13093+
License: MIT
13094+
Author: Josh Wolfe <thejoshwolfe@gmail.com>
13095+
Homepage: https://github.com/thejoshwolfe/yauzl
13096+
13097+
The MIT License (MIT)
13098+
13099+
Copyright (c) 2014 Josh Wolfe
13100+
13101+
Permission is hereby granted, free of charge, to any person obtaining a copy
13102+
of this software and associated documentation files (the "Software"), to deal
13103+
in the Software without restriction, including without limitation the rights
13104+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13105+
copies of the Software, and to permit persons to whom the Software is
13106+
furnished to do so, subject to the following conditions:
13107+
13108+
The above copyright notice and this permission notice shall be included in all
13109+
copies or substantial portions of the Software.
13110+
13111+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
13112+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
13113+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
13114+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
13115+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
13116+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
13117+
SOFTWARE.
13118+
13119+
--------------------------------------------------------------------------------
13120+
1306113121
yazl@3.3.1
1306213122
License: MIT
1306313123
Author: Josh Wolfe <thejoshwolfe@gmail.com>

docs/export-import.md

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
# Export / Import Note Package
2+
3+
Notely can package one or more notes — together with all their linked assets — into a single portable `.note` file that can be shared with other Notely users and imported directly into any workspace.
4+
5+
## Opening the dialog
6+
7+
Go to **File → Export / Import Note Package** (or use the app menu from the landing screen).
8+
9+
The dialog has two tabs:
10+
11+
| Tab | Purpose |
12+
|---|---|
13+
| **Export Package** | Bundle selected notes into a `.note` file |
14+
| **Import Package** | Unpack a `.note` file into the current workspace |
15+
16+
## Exporting
17+
18+
1. **Select notes** — the list shows every `.md` file in the current workspace. Use **Select All / Deselect All** or click individual rows. The list scrolls when the workspace is large.
19+
2. **Save location** — defaults to the last-used export path with the filename `{workspaceName}.note`. Click **Browse** to choose a different destination.
20+
3. **Password (Optional)** — set a password to restrict who can import the package. If set, a salted SHA-256 hash of the password is saved securely inside the encrypted metadata.
21+
4. Click **Export Package**.
22+
23+
### What gets bundled
24+
25+
| Asset type | Where it lives | Included |
26+
|---|---|---|
27+
| Markdown files | anywhere in the workspace ||
28+
| Images / screenshots | `media/images/` ||
29+
| Excalidraw diagrams | `.notes-app/excali-diagrams/` ||
30+
| Draw.io diagrams + thumbnails | `media/draw.io/` ||
31+
| Package metadata | `metadata.json` inside bundle | ✅ auto-generated |
32+
33+
Assets that are locked, missing, or inaccessible at export time are silently skipped; the note itself is still exported.
34+
35+
### Security
36+
37+
- The bundle is **AES-256 encrypted** using a shared app-level key so it is not readable by generic ZIP tools.
38+
- Every file in the bundle is **SHA-256 hashed** and the hashes are stored in `metadata.json`. On import, Notely verifies each hash and rejects tampered packages.
39+
- If protected by a password, the manifest contains a salted `SHA-256` password signature. Unlocking verification occurs securely in memory during the import sequence before files are written.
40+
41+
## Importing
42+
43+
1. Switch to the **Import Package** tab.
44+
2. Click **Browse** and pick a `.note` file.
45+
3. Click **Import Package**.
46+
4. **Password Prompts**: If the package is password-protected, the app will display a password field. Enter the correct password and click **Import Package** again to proceed.
47+
48+
Notely will:
49+
50+
- Decrypt and verify the integrity of the bundle.
51+
- Authenticate the password if password protection was configured.
52+
- Copy notes into the workspace root (or appropriate subfolder).
53+
- Restore all media assets to their original relative paths.
54+
- Resolve filename collisions automatically so existing files are never overwritten.
55+
- Reload the workspace document list so imported notes appear immediately.
56+
57+
## Troubleshooting
58+
59+
| Symptom | Likely cause | Fix |
60+
|---|---|---|
61+
| "Export failed: EPERM" | Destination folder is inside an OneDrive-synced path being actively synced | Wait a moment and retry, or choose a local (non-OneDrive) folder |
62+
| "Import failed: integrity check" | The `.note` file was modified or corrupted in transit | Request a fresh export from the sender |
63+
| "Incorrect password" or prompt stays | The password supplied does not match the package hash | Confirm the password with the package creator |
64+
| Notes appear in workspace root instead of a subfolder | Package was exported from a flat workspace | Expected — the import mirrors the original layout |

docs/index.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,7 @@ features:
4040
- icon: 🔄
4141
title: P2P Sync
4242
details: Sync notes across devices over your local network using encrypted peer-to-peer pairing — no cloud required.
43+
- icon: 📦
44+
title: Export / Import Note Packages
45+
details: Bundle notes with all linked assets into an encrypted, integrity-checked `.note` file. Share with others and import directly into any Notely workspace.
4346
---

electron/lib/core/appMenu.cjs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,10 @@ function buildAppMenuTemplate(win, context = {}) {
9898
accelerator: "CmdOrCtrl+Shift+E",
9999
click: () => sendMenuAction(win, "export-pdf")
100100
},
101+
{
102+
label: "Export/Import Note Package",
103+
click: () => sendMenuAction(win, "open-export-import")
104+
},
101105
{ type: "separator" },
102106
{
103107
label: "Rename Note",
@@ -139,6 +143,11 @@ function buildAppMenuTemplate(win, context = {}) {
139143
submenu: openRecentSubmenu
140144
},
141145
{ type: "separator" },
146+
{
147+
label: "Export/Import Note Package",
148+
click: () => sendMenuAction(win, "open-export-import")
149+
},
150+
{ type: "separator" },
142151
{
143152
label: `Move ${currentFolderLabel} to Removed`,
144153
accelerator: "CmdOrCtrl+Shift+Delete",
@@ -642,6 +651,11 @@ function buildAppMenuTemplate(win, context = {}) {
642651
click: () => sendMenuAction(win, "open-shortcuts")
643652
},
644653
{ type: "separator" },
654+
{
655+
label: "Report Bug / Feedback",
656+
click: () => sendMenuAction(win, "open-feedback")
657+
},
658+
{ type: "separator" },
645659
{
646660
label: "Check for Updates",
647661
click: () => sendMenuAction(win, "check-for-updates")

0 commit comments

Comments
 (0)