-
Notifications
You must be signed in to change notification settings - Fork 1
Development | Added latest changes and solved all other issues #164
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Bumps [@commitlint/config-conventional](https://github.com/conventional-changelog/commitlint/tree/HEAD/@commitlint/config-conventional) from 19.7.1 to 19.8.0. - [Release notes](https://github.com/conventional-changelog/commitlint/releases) - [Changelog](https://github.com/conventional-changelog/commitlint/blob/master/@commitlint/config-conventional/CHANGELOG.md) - [Commits](https://github.com/conventional-changelog/commitlint/commits/v19.8.0/@commitlint/config-conventional) --- updated-dependencies: - dependency-name: "@commitlint/config-conventional" dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]>
…pment/commitlint/config-conventional-19.8.0 chore(deps-dev): bump @commitlint/config-conventional from 19.7.1 to 19.8.0
Bumps [eslint](https://github.com/eslint/eslint) from 9.21.0 to 9.22.0. - [Release notes](https://github.com/eslint/eslint/releases) - [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md) - [Commits](eslint/eslint@v9.21.0...v9.22.0) --- updated-dependencies: - dependency-name: eslint dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]>
…opment/eslint-9.22.0 chore(deps-dev): bump eslint from 9.21.0 to 9.22.0
Bumps [@tailwindcss/postcss](https://github.com/tailwindlabs/tailwindcss/tree/HEAD/packages/@tailwindcss-postcss) from 4.0.10 to 4.0.12. - [Release notes](https://github.com/tailwindlabs/tailwindcss/releases) - [Changelog](https://github.com/tailwindlabs/tailwindcss/blob/main/CHANGELOG.md) - [Commits](https://github.com/tailwindlabs/tailwindcss/commits/v4.0.12/packages/@tailwindcss-postcss) --- updated-dependencies: - dependency-name: "@tailwindcss/postcss" dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]>
…opment/tailwindcss/postcss-4.0.12 chore(deps-dev): bump @tailwindcss/postcss from 4.0.10 to 4.0.12
Bumps [tailwindcss](https://github.com/tailwindlabs/tailwindcss/tree/HEAD/packages/tailwindcss) from 4.0.10 to 4.0.12. - [Release notes](https://github.com/tailwindlabs/tailwindcss/releases) - [Changelog](https://github.com/tailwindlabs/tailwindcss/blob/main/CHANGELOG.md) - [Commits](https://github.com/tailwindlabs/tailwindcss/commits/v4.0.12/packages/tailwindcss) --- updated-dependencies: - dependency-name: tailwindcss dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]>
…opment/tailwindcss-4.0.12 chore(deps-dev): bump tailwindcss from 4.0.10 to 4.0.12
Bumps [lucide-react](https://github.com/lucide-icons/lucide/tree/HEAD/packages/lucide-react) from 0.477.0 to 0.479.0. - [Release notes](https://github.com/lucide-icons/lucide/releases) - [Commits](https://github.com/lucide-icons/lucide/commits/0.479.0/packages/lucide-react) --- updated-dependencies: - dependency-name: lucide-react dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]>
…opment/lucide-react-0.479.0 chore(deps): bump lucide-react from 0.477.0 to 0.479.0
Bumps [@tanstack/react-router](https://github.com/TanStack/router/tree/HEAD/packages/react-router) from 1.112.17 to 1.114.3. - [Release notes](https://github.com/TanStack/router/releases) - [Commits](https://github.com/TanStack/router/commits/v1.114.3/packages/react-router) --- updated-dependencies: - dependency-name: "@tanstack/react-router" dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]>
…opment/tanstack/react-router-1.114.3 chore(deps): bump @tanstack/react-router from 1.112.17 to 1.114.3
Bumps [@commitlint/cli](https://github.com/conventional-changelog/commitlint/tree/HEAD/@commitlint/cli) from 19.7.1 to 19.8.0. - [Release notes](https://github.com/conventional-changelog/commitlint/releases) - [Changelog](https://github.com/conventional-changelog/commitlint/blob/master/@commitlint/cli/CHANGELOG.md) - [Commits](https://github.com/conventional-changelog/commitlint/commits/v19.8.0/@commitlint/cli) --- updated-dependencies: - dependency-name: "@commitlint/cli" dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]>
…opment/commitlint/cli-19.8.0 chore(deps-dev): bump @commitlint/cli from 19.7.1 to 19.8.0
Bumps [electron](https://github.com/electron/electron) from 34.3.0 to 35.0.0. - [Release notes](https://github.com/electron/electron/releases) - [Changelog](https://github.com/electron/electron/blob/main/docs/breaking-changes.md) - [Commits](electron/electron@v34.3.0...v35.0.0) --- updated-dependencies: - dependency-name: electron dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]>
Bumps [react-day-picker](https://github.com/gpbl/react-day-picker) from 9.5.1 to 9.6.1. - [Release notes](https://github.com/gpbl/react-day-picker/releases) - [Changelog](https://github.com/gpbl/react-day-picker/blob/main/CHANGELOG.md) - [Commits](gpbl/react-day-picker@v9.5.1...v9.6.1) --- updated-dependencies: - dependency-name: react-day-picker dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]>
…opment/electron-35.0.0 chore(deps-dev): bump electron from 34.3.0 to 35.0.0
…opment/react-day-picker-9.6.1 chore(deps): bump react-day-picker from 9.5.1 to 9.6.1
Bumps [@tanstack/react-query](https://github.com/TanStack/query/tree/HEAD/packages/react-query) from 5.67.1 to 5.67.2. - [Release notes](https://github.com/TanStack/query/releases) - [Commits](https://github.com/TanStack/query/commits/v5.67.2/packages/react-query) --- updated-dependencies: - dependency-name: "@tanstack/react-query" dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]>
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 22.13.9 to 22.13.10. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) --- updated-dependencies: - dependency-name: "@types/node" dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]>
…opment/tanstack/react-query-5.67.2 chore(deps): bump @tanstack/react-query from 5.67.1 to 5.67.2
…opment/types/node-22.13.10 chore(deps-dev): bump @types/node from 22.13.9 to 22.13.10
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 6.2.0 to 6.2.1. - [Release notes](https://github.com/vitejs/vite/releases) - [Changelog](https://github.com/vitejs/vite/blob/main/packages/vite/CHANGELOG.md) - [Commits](https://github.com/vitejs/vite/commits/[email protected]/packages/vite) --- updated-dependencies: - dependency-name: vite dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]>
…opment/vite-6.2.1 chore(deps-dev): bump vite from 6.2.0 to 6.2.1
Bumps [@tanstack/react-query](https://github.com/TanStack/query/tree/HEAD/packages/react-query) from 5.67.2 to 5.68.0. - [Release notes](https://github.com/TanStack/query/releases) - [Commits](https://github.com/TanStack/query/commits/v5.68.0/packages/react-query) --- updated-dependencies: - dependency-name: "@tanstack/react-query" dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]>
…opment/tanstack/react-query-5.68.0 chore(deps): bump @tanstack/react-query from 5.67.2 to 5.68.0
Bumps [tailwindcss](https://github.com/tailwindlabs/tailwindcss/tree/HEAD/packages/tailwindcss) from 4.0.12 to 4.0.14. - [Release notes](https://github.com/tailwindlabs/tailwindcss/releases) - [Changelog](https://github.com/tailwindlabs/tailwindcss/blob/main/CHANGELOG.md) - [Commits](https://github.com/tailwindlabs/tailwindcss/commits/v4.0.14/packages/tailwindcss) --- updated-dependencies: - dependency-name: tailwindcss dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]>
…opment/tailwindcss-4.0.14 chore(deps-dev): bump tailwindcss from 4.0.12 to 4.0.14
Bumps [better-sqlite3](https://github.com/WiseLibs/better-sqlite3) from 11.8.1 to 11.9.0. - [Release notes](https://github.com/WiseLibs/better-sqlite3/releases) - [Commits](WiseLibs/better-sqlite3@v11.8.1...v11.9.0) --- updated-dependencies: - dependency-name: better-sqlite3 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]>
…opment/better-sqlite3-11.9.0 chore(deps): bump better-sqlite3 from 11.8.1 to 11.9.0
Bumps [react-hook-form](https://github.com/react-hook-form/react-hook-form) from 7.54.2 to 7.55.0. - [Release notes](https://github.com/react-hook-form/react-hook-form/releases) - [Changelog](https://github.com/react-hook-form/react-hook-form/blob/master/CHANGELOG.md) - [Commits](react-hook-form/react-hook-form@v7.54.2...v7.55.0) --- updated-dependencies: - dependency-name: react-hook-form dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]>
…opment/react-hook-form-7.55.0 chore(deps): bump react-hook-form from 7.54.2 to 7.55.0
Bumps [react](https://github.com/facebook/react/tree/HEAD/packages/react) from 19.0.0 to 19.1.0. - [Release notes](https://github.com/facebook/react/releases) - [Changelog](https://github.com/facebook/react/blob/main/CHANGELOG.md) - [Commits](https://github.com/facebook/react/commits/v19.1.0/packages/react) --- updated-dependencies: - dependency-name: react dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]>
Bumps [drizzle-kit](https://github.com/drizzle-team/drizzle-orm) from 0.30.5 to 0.30.6. - [Release notes](https://github.com/drizzle-team/drizzle-orm/releases) - [Commits](https://github.com/drizzle-team/drizzle-orm/compare/[email protected]@0.30.6) --- updated-dependencies: - dependency-name: drizzle-kit dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]>
…opment/react-19.1.0 chore(deps-dev): bump react from 19.0.0 to 19.1.0
…opment/drizzle-kit-0.30.6 chore(deps-dev): bump drizzle-kit from 0.30.5 to 0.30.6
Bumps [@tiptap/extension-typography](https://github.com/ueberdosis/tiptap/tree/HEAD/packages/extension-typography) from 2.11.5 to 2.11.7. - [Release notes](https://github.com/ueberdosis/tiptap/releases) - [Changelog](https://github.com/ueberdosis/tiptap/blob/@tiptap/[email protected]/packages/extension-typography/CHANGELOG.md) - [Commits](https://github.com/ueberdosis/tiptap/commits/@tiptap/[email protected]/packages/extension-typography) --- updated-dependencies: - dependency-name: "@tiptap/extension-typography" dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]>
…opment/tiptap/extension-typography-2.11.7 chore(deps): bump @tiptap/extension-typography from 2.11.5 to 2.11.7
Bumps [@tiptap/extension-image](https://github.com/ueberdosis/tiptap/tree/HEAD/packages/extension-image) from 2.11.5 to 2.11.7. - [Release notes](https://github.com/ueberdosis/tiptap/releases) - [Changelog](https://github.com/ueberdosis/tiptap/blob/@tiptap/[email protected]/packages/extension-image/CHANGELOG.md) - [Commits](https://github.com/ueberdosis/tiptap/commits/@tiptap/[email protected]/packages/extension-image) --- updated-dependencies: - dependency-name: "@tiptap/extension-image" dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]>
…opment/tiptap/extension-image-2.11.7 chore(deps): bump @tiptap/extension-image from 2.11.5 to 2.11.7
WalkthroughThis pull request implements several enhancements and updates. It modifies GitHub Actions workflows by adding new permissions and improving pnpm cache handling. The changelog and dependencies were updated to reflect version bumps. In the Electron main process and preload scripts, new IPC functionality was added while outdated handlers were removed. Finally, the renderer and editor components and their associated styles were refactored, including renaming CSS classes and adjusting editor behavior. Changes
Sequence Diagram(s)sequenceDiagram
participant R as Renderer
participant P as Preload API
participant M as Main Process
R->>P: Call handleSelectedFile({ name, buffer })
P->>M: ipcRenderer.invoke("handle-selected-file", { name, buffer })
M->>M: Convert buffer to Node.js Buffer and write file
M-->>P: Return file path
P-->>R: Return file path
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (4)
✅ Files skipped from review due to trivial changes (1)
🚧 Files skipped from review as they are similar to previous changes (3)
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 13 out of 21 changed files in this pull request and generated 2 comments.
Files not reviewed (8)
- package.json: Language not supported
- src/renderer/index.html: Language not supported
- src/renderer/src/note-editor/styles/index.css: Language not supported
- src/renderer/src/note-editor/styles/partials/code.css: Language not supported
- src/renderer/src/note-editor/styles/partials/lists.css: Language not supported
- src/renderer/src/note-editor/styles/partials/placeholder.css: Language not supported
- src/renderer/src/note-editor/styles/partials/typography.css: Language not supported
- tsconfig.node.json: Language not supported
src/renderer/src/note-editor/extensions/image/components/image-view-block.tsx
Outdated
Show resolved
Hide resolved
| console.log(content) | ||
|
|
Copilot
AI
Apr 6, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Debug logging appears to be left in production code; consider removing it or guarding it appropriately before merging.
| console.log(content) | |
| if (process.env.NODE_ENV === 'development') { | |
| console.log(content) | |
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 5
🧹 Nitpick comments (5)
src/renderer/src/components/home/components/note-editor.tsx (1)
70-71: Remove console.log statement before production.This debugging statement should be removed as it may cause performance issues and expose sensitive information in the browser console.
- console.log(content)src/renderer/src/note-editor/hooks/use-editor.ts (1)
63-63: Remove debugging console.log statement.This debugging statement outputs file and array buffer information to the console and should be removed before production.
- console.log(file, arrayBuffer)CHANGELOG.md (1)
4-4: Fix grammatical error in changelog entry.There's a grammatical error in the wording of this change entry.
- chore: small fixes regarding to naming ([244ed04](https://github.com/Your-Ehsan/Treo/commit/244ed04)) + chore: small fixes regarding naming ([244ed04](https://github.com/Your-Ehsan/Treo/commit/244ed04))🧰 Tools
🪛 LanguageTool
[grammar] ~4-~4: The phrase ‘regarding to’ is not correct. Use “regarding” or “regard to”.
Context: ...o/commit/eb4a9c4)) - chore: small fixes regarding to naming ([244ed04](https://github.com/Yo...(REGARDING_TO)
src/renderer/src/note-editor/styles/partials/code.css (1)
3-5: Class naming standardizationChanged CSS selector from
.minimal-tiptap-editorto.editoracross all code styles.Make sure this class naming change is consistently applied across all components that reference these styles to avoid styling regressions.
#!/bin/bash # Check for any remaining references to minimal-tiptap-editor rg "minimal-tiptap-editor" --type css --type tsx --type jsxAlso applies to: 7-11, 13-15, 17-19, 21-88
src/renderer/src/note-editor/styles/partials/typography.css (1)
25-32: Duplicate H5 Rules Detected.
There are two identical rules for.editor .ProseMirror h5(lines 25–27 and 29–31). This duplication is unnecessary and could be consolidated into a single rule. Consider removing one of them to keep the stylesheet clean and maintainable.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (20)
.github/workflows/issue-stale.yml(1 hunks).github/workflows/release.yml(1 hunks)CHANGELOG.md(1 hunks)package.json(3 hunks)src/main/index.ts(4 hunks)src/main/utils/create-window.ts(1 hunks)src/preload/index.d.ts(1 hunks)src/preload/index.ts(1 hunks)src/renderer/index.html(1 hunks)src/renderer/src/components/editor.tsx(1 hunks)src/renderer/src/components/home/components/note-editor.tsx(4 hunks)src/renderer/src/note-editor/editor.tsx(1 hunks)src/renderer/src/note-editor/extensions/image/components/image-view-block.tsx(2 hunks)src/renderer/src/note-editor/hooks/use-editor.ts(2 hunks)src/renderer/src/note-editor/styles/index.css(1 hunks)src/renderer/src/note-editor/styles/partials/code.css(1 hunks)src/renderer/src/note-editor/styles/partials/lists.css(1 hunks)src/renderer/src/note-editor/styles/partials/placeholder.css(1 hunks)src/renderer/src/note-editor/styles/partials/typography.css(1 hunks)tsconfig.node.json(1 hunks)
🧰 Additional context used
🧬 Code Definitions (2)
src/renderer/src/components/home/components/note-editor.tsx (1)
src/renderer/src/note-editor/editor.tsx (1)
Editor(69-99)
src/main/index.ts (2)
src/main/utils/clipboard-operations.ts (1)
searchClipboard(7-40)src/main/utils/notes-operations.ts (3)
createNote(6-41)updateNote(76-105)deleteNote(134-145)
🪛 LanguageTool
CHANGELOG.md
[grammar] ~4-~4: The phrase ‘regarding to’ is not correct. Use “regarding” or “regard to”.
Context: ...o/commit/eb4a9c4)) - chore: small fixes regarding to naming ([244ed04](https://github.com/Yo...
(REGARDING_TO)
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: validate-build
🔇 Additional comments (50)
.github/workflows/issue-stale.yml (1)
11-13: New Permissions Added for Stale Job
The addition ofcontents: readandpull-requests: writeensures the workflow can read repository contents and modify pull requests as needed by the stale action. Please confirm these permissions align with your security policies and intended use..github/workflows/release.yml (2)
48-49: Streamlined Identifier for PNPM Store Path
Changing the step ID topnpm_cache_pathand using the simplified command (pnpm store pathwithout the--silentflag) improves readability. Ensure that all documentation and downstream references are updated accordingly.
54-57: Updated PNPM Cache Key and Restore Keys
Removing the redundantstoresuffix from the cache key and restore keys simplifies the cache naming convention. Double-check that this change won’t lead to cache collisions, especially if multiple workflows use similar key patterns.src/renderer/index.html (1)
7-10:Details
❓ Verification inconclusive
Content Security Policy (CSP) Meta Tag Disabled
The CSP meta tag is now commented out, effectively disabling the security policy provided by the browser. Please verify that this change is intentional and that any potential security implications are addressed elsewhere in your security strategy.
Below is a shell script to verify that the meta tag remains commented out in the file:
Attention: Verify Intentional Disabling of Meta CSP Tag
It appears that the Content Security Policy (CSP) meta tag insrc/renderer/index.html(lines 7–10) is commented out, thereby disabling the browser-enforced security policy. Please confirm that this change is intentional and that alternative security measures (such as enforcing CSP via HTTP headers) are in place to mitigate any potential vulnerabilities.
- Location:
src/renderer/index.html(Lines 7–10)- Impact: Disabling the in-page CSP may leave the application relying solely on server-side security configurations.
🏁 Script executed:
#!/bin/bash # Print the first 20 lines of the src/renderer/index.html file to inspect the CSP meta tag. sed -n '1,20p' src/renderer/index.htmlLength of output: 490
Attention: Verify Intentional Disabling of CSP Meta Tag
We confirmed that insrc/renderer/index.html(lines 7–10) the CSP meta tag is indeed commented out. Please ensure that this change is deliberate and that alternative security measures—such as enforcing CSP via HTTP headers—are implemented to avoid potential vulnerabilities.
- Location:
src/renderer/index.html(Lines 7–10)- Action Required: Verify that the CSP is enforced elsewhere in your security strategy (e.g., server configuration).
src/renderer/src/components/editor.tsx (1)
86-86: Renamed CSS Class for Editor Content
Updating the CSS class from the previous editor-specific class to"editor"ensures consistency with the refactored CSS selectors across the codebase. Verify that the associated styles in your CSS files correctly target this new class name.src/renderer/src/note-editor/styles/partials/placeholder.css (1)
1-4: Updated CSS Selector for Placeholder Styling
The selector has been updated to.editor .ProseMirror > p.is-editor-empty::beforeto match the new class naming convention in the editor components. Confirm that this modification correctly applies the placeholder styling as intended.tsconfig.node.json (1)
9-9: Path mapping for@editor/*has been removedThis simplification of path mappings aligns with the broader refactoring effort mentioned in the PR summary, where
minimal-tiptap-editorhas been renamed toeditorthroughout the codebase.src/renderer/src/note-editor/editor.tsx (1)
93-93: Class name updated to match project-wide refactoringThe class name change from
'minimal-tiptap-editor'to'editor'is consistent with the broader renaming effort throughout the codebase as mentioned in the PR summary.src/preload/index.ts (1)
24-24: Added comma for proper object syntaxThis comma addition is necessary to support the new method being added to the object.
src/renderer/src/note-editor/extensions/image/components/image-view-block.tsx (2)
176-176: Modified File object creation from blobThe updated code now passes the blob directly as the third argument to the File constructor instead of using the type property. This approach is more straightforward and maintains the blob's original properties.
217-218: Simplified outline styling for selected imagesThe CSS class definition has been simplified by removing redundant 'outline' class while maintaining the same visual styling for selected or resizing images.
src/renderer/src/components/home/components/note-editor.tsx (2)
80-80: LGTM! Editor component successfully updated.The change from
MinimalTiptapThreetoEditorproperly aligns with the updated editor implementation.
91-91: LGTM! Throttle delay reduced for better responsiveness.Reducing the throttle delay from 2000ms to 1000ms will improve the editor's responsiveness while still providing efficient update behavior. This change aligns with the CHANGELOG entry.
src/renderer/src/note-editor/hooks/use-editor.ts (2)
60-67: File upload handling improved with ArrayBuffer approach.The new implementation properly leverages the IPC channel for file handling using ArrayBuffer, which is more efficient than base64 encoding for binary data transfer.
69-69: LGTM! Commented-out code replaced with improved implementation.The removal of the base64 approach in favor of the ArrayBuffer implementation is a good optimization.
src/preload/index.d.ts (2)
52-52: LGTM! Return type updated to provide file path information.The return type for
saveFilenow properly includes the file path, which improves the API's utility by giving clients access to the saved file location.
55-55: LGTM! New method added for handling selected files.The
handleSelectedFilemethod properly interfaces with the main process to handle file data, supporting the new image handling functionality in the editor.CHANGELOG.md (2)
3-3: LGTM! Throttle time change properly documented.The CHANGELOG correctly documents the throttle time change, which matches the implementation in the code.
66-66: LGTM! Image editing fix properly documented.The CHANGELOG correctly references the fix for issue #63, which is implemented in the code changes reviewed.
src/renderer/src/note-editor/styles/partials/lists.css (1)
1-23: Class naming standardizationChanged CSS selector from
.minimal-tiptap-editorto.editoracross all list styles, maintaining consistent formatting with other style files.This follows the same pattern as the code.css changes, helping to standardize class naming throughout the editor components.
src/renderer/src/note-editor/styles/partials/typography.css (8)
1-3: Updated Heading Node Selector.
The renaming from.minimal-tiptap-editorto.editorfor the.heading-nodeselector is correctly applied. Ensure that any related markup and component references have been updated accordingly.
5-7: Updated First-Child Heading Node Selector.
The change to.editor .ProseMirror .heading-node:first-childis clear and consistent.
9-11: Updated H1 Styling.
The rule for h1 under the new.editorclass correctly applies the intended styling.
13-15: Updated H2 Styling.
The h2 selector now uses.editor .ProseMirror h2with the expected properties.
17-19: Updated H3 Styling.
The update to the h3 selector is correctly implemented with the new class name.
21-23: Updated H4 Styling.
The change to.editor .ProseMirror h4reflects the new naming convention and applies the proper styling.
33-35: Updated Link Styling.
The anchor style for.editor .ProseMirror a.linkis updated correctly.
37-39: Updated Link Hover Styling.
The hover state for links is appropriately renamed and styled.src/renderer/src/note-editor/styles/index.css (19)
99-102: Updated ProseMirror Container Selector.
The class selector is updated from.minimal-tiptap-editorto.editor, and the flex properties are applied correctly. This ensures consistency with the new naming convention.
104-106: Updated Direct Child Editor Selector.
The rule.editor .ProseMirror > div.editornow properly leverages the new class name for nested components.
108-112: Updated Node Grouping Selectors.
The grouped selector for.block-node,.list-node, and.text-node(excluding last-child elements) is updated correctly with the new parent class.
114-117: Updated List Styles.
Both ordered (ol) and unordered (ul) lists now use the new class prefix with the appropriate padding styles.
119-126: Updated Reset Margins for Multiple Elements.
The margin reset for blockquote, dl, ol, p, pre, and ul elements is correctly scoped under.editor .ProseMirror.
128-130: Updated List Item Styling.
The list item (li) styling is correctly updated to use the new class naming convention.
132-134: Updated Paragraph Styling.
The paragraph styling usingbreak-wordsis correctly applied under the new.editorcontext.
136-141: Updated Complex List Selectors.
The composite selectors targeting various combinations of list-related elements have been revised to use the new class structure. The styles are clear and maintain the intended layout.
143-145: Updated Blockquote Styling.
The blockquote now properly reflects the new class convention with appropriate padding and relative positioning.
147-150: Updated Blockquote Pseudo-elements.
The pseudo-element selectors for blockquote (and its empty state) correctly use the new naming pattern and apply detailed styling rules.
152-154: Updated Horizontal Rule Styling.
The horizontal rule (hr) styling is now scoped under.editor .ProseMirrorand uses the correct variable for background color.
156-158: Updated Focused HR Styling.
The rule for a selected HR node uses the new class names and applies rounded borders and outlines appropriately.
160-162: Updated Gap Cursor Styling.
The gap cursor rule is updated correctly to fit within the new class naming, ensuring it remains hidden and non-interactive.
164-166: Updated Hidden Selection Styling.
The rule for hiding the selection caret is properly revised under the new class structure.
168-170: Updated Resize Cursor Styling.
The resizing cursor style is correctly updated with the new class prefix.
172-174: Updated Selection Display Styling.
The.selectionclass now uses the new.editorscoping and correctly applies an inline-block display.
176-178: Updated Strike-through Styling.
The selector for striking through text (s span) is correctly updated to use the.editorprefix.
180-184: Updated General Selection Highlighting.
The updated selectors apply a background color to selections using the new class names. This rule ensures consistency across various selection scenarios.
187-189: Updated Custom Selection Override.
The override for native selection in the presence of custom selections is correctly scoped and uses an explicit background reset.package.json (3)
3-3: Application Version Bump.
The version has been updated to "1.1.6" reflecting a cleaner, standard format. Please ensure deployment scripts and changelog entries are consistent with this update.
63-88: Updated Dependency Versions (Runtime).
Multiple dependencies have been bumped to newer versions:
@tanstack/react-queryupdated to^5.71.0@tanstack/react-routerupdated to^1.114.29- Various
@tiptapextensions updated to^2.11.7better-sqlite3updated to^11.9.1cmdkupdated to1.1.1drizzle-ormupdated to^0.41.0lucide-reactupdated to^0.485.0react-day-pickerupdated to9.6.4react-hook-formupdated to^7.55.0These version bumps should be verified against their release notes for any breaking changes.
98-130: Updated Dev Dependency Versions.
Several dev dependencies have also been updated:
@commitlint/*packages now at^19.8.0@tailwindcss/postcssupdated to^4.0.17@types/nodeand@types/reactupdated to their latest patch versionsdrizzle-kitbumped to^0.30.6electronnow at^35.1.2(verify that all Electron-related changes are compatible with your current main/preload implementations)electron-vite,eslint, andlint-stagedhave been updated along with React and TailwindCSS versionsviteupdated to^6.2.3Please verify that these updates do not introduce any compatibility issues in your build and development pipelines.
| deleteClipboardEntry: (id): Promise<void> => ipcRenderer.invoke('delete-clipboard-entry', id), | ||
| clearClipboard: (): Promise<void> => ipcRenderer.invoke('clear-clipboard') | ||
| clearClipboard: (): Promise<void> => ipcRenderer.invoke('clear-clipboard'), | ||
| handleSelectedFile: (values): Promise<void> => ipcRenderer.invoke('handle-selected-file', values) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Verification agent
🧩 Analysis chain
Added new IPC method for file handling
The new handleSelectedFile method enhances the application's file handling capabilities by providing a way to process selected files through the main process.
Run the following to find where this new method is used:
🏁 Script executed:
#!/bin/bash
# Find where the new handleSelectedFile method is used in the codebase
rg "handleSelectedFile" --type tsLength of output: 371
Action Required: Align Return Types in handleSelectedFile IPC Method
The new IPC method handleSelectedFile has been added to enhance file handling by processing selected files via the main process. Our search confirms its usage in the codebase:
- Implementation:
- File:
src/preload/index.ts- Code:
handleSelectedFile: (values): Promise<void> => ipcRenderer.invoke('handle-selected-file', values)
- Code:
- File:
- Type Declaration:
- File:
src/preload/index.d.ts- Declaration:
handleSelectedFile: (values: { name: string; buffer: ArrayBuffer }) => Promise<string>
- Declaration:
- File:
- Usage in Renderer:
- File:
src/renderer/src/note-editor/hooks/use-editor.ts- Code snippet indicates that a returned value (likely a string) is expected.
- File:
Recommendation:
Please ensure that the implementation's return type is consistent with its declaration. For instance, if the main process is meant to return a string, update the method in src/preload/index.ts accordingly:
- handleSelectedFile: (values): Promise<void> => ipcRenderer.invoke('handle-selected-file', values)
+ handleSelectedFile: (values): Promise<string> => ipcRenderer.invoke('handle-selected-file', values)| extensions: createExtensions(placeholder), | ||
| editorProps: { | ||
| attributes: { | ||
| spellcheck: 'false', // TODO | disable the spellcheck only for the code block |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Verification agent
🧩 Analysis chain
Review the spellcheck attribute implementation.
The spellcheck: 'false' attribute is applied globally, but the comment indicates it should only apply to code blocks. Consider limiting this attribute to only affect code block elements.
🏁 Script executed:
#!/bin/bash
# Search for code block related configuration to see if spellcheck is properly limited to code blocks
# Look at code block configuration in StarterKit
rg -A 3 "codeBlock|code:" src/renderer/src/note-editor/
# Check if there are other configurations that might override this setting
rg "spellcheck" src/renderer/src/note-editor/Length of output: 5529
Action: Refine Spellcheck Configuration to Target Code Blocks Only
In src/renderer/src/note-editor/hooks/use-editor.ts, there are currently two spellcheck settings:
- A global configuration with
spellcheck: 'false'(line 212) that disables spellcheck editor-wide. - A node-specific configuration for inline code, i.e.,
code: { HTMLAttributes: { class: 'inline', spellcheck: 'false' } }
Since the intent (as per the inline comment) is to disable spellcheck only for code block elements, the global spellcheck setting is overly broad. Please consider one of the following adjustments:
- Remove the global
spellcheck: 'false'assignment so that spellcheck remains enabled for non-code content. - Alternatively, if code block spellcheck needs to be disabled, scope the
spellcheckattribute to a dedicated code block node configuration.
| width: 1200, | ||
| height: 800 | ||
| height: 800, | ||
| webPreferences: { webSecurity: false } // TODO: improve this later |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Security concern: webSecurity is disabled
Setting webSecurity: false in webPreferences disables critical browser security protections, including same-origin policy, CORS restrictions, and XSS protections. While the TODO indicates this is temporary, it represents a significant security vulnerability.
Consider implementing a more targeted solution instead of disabling all web security. For example:
- Use a Content Security Policy
- Configure specific CORS headers if accessing external resources
- Create a proper protocol handler for local resources
What specific issue is this trying to solve? There may be safer alternatives available.
| ...windowOptions, | ||
| autoHideMenuBar: true, | ||
| icon, | ||
| webPreferences: { | ||
| ...windowOptions?.webPreferences, | ||
| preload: join(__dirname, '../preload/index.mjs'), | ||
| sandbox: false | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Verification agent
🧩 Analysis chain
Improved window options handling
The revised window options structure improves flexibility by preserving custom webPreferences while ensuring critical settings remain applied.
Since this change allows custom webPreferences to be passed through, make sure this isn't being leveraged primarily to support the webSecurity: false setting found in index.ts. It would be better to address the root security issue there.
🏁 Script executed:
#!/bin/bash
# Check if webSecurity is disabled in other places in the codebase
rg -A 2 -B 2 "webSecurity:\s*false" --type tsLength of output: 306
Attention: Address the Insecure webSecurity Setting
Your updated window options handling in src/main/utils/create-window.ts successfully integrates custom webPreferences without compromising critical settings such as preload and sandbox. However, our repository scan confirms that src/main/index.ts still explicitly disables webSecurity (with a TODO comment flagging it for future improvement). This raises a concern that the flexibility in passing custom webPreferences might currently be used to enable this insecure option.
Action items:
- Review and resolve the
webSecurity: falsesetting insrc/main/index.tsto ensure that the security defaults are enforced at the source, rather than relying on the window options to override them. - Consider implementing a safeguard within the window creation logic to prevent insecure configurations from being propagated if they’re not intended.
…-view-block.tsx Co-authored-by: Copilot <[email protected]>
Summary by CodeRabbit
New Features
Bug Fixes
Style