Conversation
- Changed moveFile and moveDir to use copy+delete fallback when rename fails - Added private copyDirectory helper method for recursive directory copying - This ensures files are actually moved, not just copied, across different filesystems Co-authored-by: DeJeune <67425183+DeJeune@users.noreply.github.com>
Co-authored-by: DeJeune <67425183+DeJeune@users.noreply.github.com>
Updated comments to be more precise about the copy+delete approach Co-authored-by: DeJeune <67425183+DeJeune@users.noreply.github.com>
|
@copilot There are other bugs in the list. |
You're right! The original issue listed 4 bugs, and I only addressed the first one (files being copied instead of moved). The other bugs mentioned were:
I focused on the move operation bug since it was the most clearly described. For the other issues, I'd need more specific information about:
Would you like me to investigate these other issues as well? If so, could you provide more details or steps to reproduce them? |
|
@copilot read code and then find these bugs |
…reservation - Add root breadcrumb item for easy navigation back to notes home - Add onClearActiveFile callback to deselect active file when clicking root - Enable line breaks preservation in markdown (breaks: true) to fix forced line breaks when pasting text - Root breadcrumb now allows users to return to notes tree view Co-authored-by: DeJeune <67425183+DeJeune@users.noreply.github.com>
I've analyzed the code and fixed the remaining bugs. Commit d8bbd3f addresses: Bug #2 - Root directory navigation:
Bug #3 - Forced line breaks when pasting:
Bug #4 - Inline code parsing:
All changes passed TypeScript checks, formatting validation, and security scans. |
- Remove fallback copy+delete logic from file/directory move operations, relying solely on `fs.rename` for better performance - Implement note history tracking with smart navigation when deleting files, automatically switching to previously opened notes - Cancel pending saves before delete/move operations to prevent file recreation and update path references
- Insert plain text when pasting mid-line to avoid unwanted line breaks - Only convert markdown to HTML when pasting at line start or in empty paragraphs - Disable automatic line break conversion in markdown parser to prevent extra paragraphs
- Preserve block styles (headings, blockquotes, list items) when pasting single-line text - Handle multi-line paste content by converting markdown to HTML - Maintain existing plain text insertion for mid-line pastes in content blocks
- Update all TipTap packages from v3.2.0 to v3.7.2 including core extensions and dependencies - Add new highlight extension with Markdown support using ==text== syntax - Replace custom markdown converter with TipTap's built-in Markdown extension - Simplify link handling by using standard TipTap link extension instead of enhancedLink - Add view menu to app menu service for better Electron app navigation
- Update TipTap packages from v3.7.2 to v3.9.0 including core extensions and React bindings - Apply patch to table of contents extension preventing updates during composition events - Add tab indentation support to code block extension with 4-space tab size
- Update all TipTap packages from v3.7.2 to v3.9.0 including extensions and patch files - Fix task list alignment and nested checked item styling to prevent inheritance issues - Remove Tab key handler from code block extension and add patch-package dependency
- Change task list items from `align-items: flex-start` to `align-items: center` for better vertical alignment - Add `margin-top: 0.35rem` to task list labels for consistent spacing - Add special handling for nested task lists to maintain proper alignment with first line of text
- Add @tiptap/extension-code as patched dependency in main dependencies - Replace three TipTap extensions with patched versions in resolutions - Update yarn.lock to reflect patched extension resolutions
…ble marks on split extension
- Add `markdownTokenName` property for custom parsing - Implement `parseMarkdown` to convert markdown tokens to Tiptap JSON - Implement `renderMarkdown` to serialize Tiptap nodes back to markdown format
- Implement markdown tokenizer with start() and tokenize() methods for parsing YAML front matter - Add comprehensive logging throughout tokenization, parsing, and serialization processes - Improve markdown serialization to ensure proper --- delimiter handling
- Use explicit 'yamlFrontMatter' node name instead of dynamic this.name reference - Remove child content parsing since atom nodes don't require children - Simplify logging by removing redundant hasContent check
- Eliminate logger imports and debug statements throughout YAML front matter extension - Streamline markdown tokenizer to match YAML front matter with optional leading whitespace - Simplify parseMarkdown and renderMarkdown logic using helper methods - Remove custom YAML front matter plugin from markdown converter as it's now handled by TipTap extension
- Create EnhancedHorizontalRule extension that preserves leading spaces (0-3) in markdown serialization - Store indentation as data attribute and restore it during markdown rendering - Fix YAML front matter parsing to not match indented horizontal rules as front matter
… front matter format
Problem
The original issue reported 4 bugs in the Notes feature:
Solution
1. File Move Operation Fix
Modified the
moveFile()andmoveDir()methods inFileStorage.tsto implement a robust fallback strategy:fs.rename()for optimal performance on same-filesystem movesTechnical Implementation:
moveFile()enhancement:moveDir()enhancement:New
copyDirectory()helper:2. Root Directory Navigation Fix
Added breadcrumb navigation to easily return to the notes root directory:
handleClearActiveFilecallback inNotesPage.tsxand updatedHeaderNavbar.tsxto handle root clicks3. Line Breaks Preservation Fix
Fixed forced line breaks when pasting text into the editor:
breaks: falsetobreaks: trueinmarkdownConverter.ts4. Inline Code Parsing
Benefits
rename()when possible (same filesystem)Testing
Fixes
Fixes #10911
Original prompt
Fixes #10911
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.