Open
Conversation
7sg56
requested changes
Mar 16, 2026
Owner
7sg56
left a comment
There was a problem hiding this comment.
Discard the settings and translation i18n changes rest seems fine
Owner
There was a problem hiding this comment.
Why is settings file modified for note pinning ?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Here is a summary of all the changes made to the note-taking app to implement the "Pin to Top" feature:
useAppStore.ts
)
State Added: Introduced a pinnedFiles array to safely store the absolute file paths / IDs of pinned notes.
Pin Action: Created a
togglePinFile(fileId)
action that adds or removes notes from the pinned list.
Local Persistence: Integrated localStorage (cinder-pinned-files) so your pinned files load reliably every time you restart the app.
Global File Lookup Resolution: Rewrote the core
findFile
engine. It dynamically intercepts missing files and rebuilds them based purely on their path; this safely ensures files pinned from outside your current workspace can still be seamlessly opened.
2. Context Menu System (
contextMenu.ts
)
Action Wiring: Updated the
StoreActions
type to accept new
togglePinFile
and
isPinned
helper logic.
UI Insertion: Injected "Pin" and "Unpin" toggle options dynamically into two core locations: File context menus (right-clicking inside your sidebar tree) and Tab context menus (right-clicking actively opened tabs at the top of the editor).
3. Editor Tabs (
EditorTabs.tsx
)
Tab Realignment: Added dynamic sorting logic that forces pinned files to magnetically align to the left side of your open tabs bar.
Visual Feedback: Implemented a responsive icon (via lucide-react) next to the names of pinned tabs to mark them clearly.
Out-of-Bounds Parsing: Inserted an intelligent layout fallback that accurately displays titles for tabs opened off of pinned files lacking strict active workspace trees.
4. File Explorer Structure (
FileExplorer.tsx
)
Unified Visibility: Added a persistent, static "Pinned" section pinned exclusively to the highest echelon of the file explorer sidebar.
Workspace Filtering: Organized everything seamlessly—if you have both pinned notes and generic workspace notes, they're gracefully separated by bolded "PINNED" and "FILES" subtitle headers, taking dynamic search results properly into account.
5. File Tree Rendering (
FileTreeItem.tsx
)
Interactive Connectivity: Added
togglePinFile
and
isPinned
definitions specifically into the context menu initialization payload for all tree items.
Inline Pin Icon: Crafted and injected a beautifully minimal SVG pin that rests cleanly at the far right (ml-auto) corner of specifically pinned file lines, adapting automatically to your hover/active highlight colors.
Related issue 32
Fixes #
Checklist