I have made it possible to switch tabs by pressing `Cmd+1` and up to number 9. Can also switch tab in either direction by using `Option+Cmd+Left-arrow` or `Option+Cmd+Right-arrow`
Furthermore, it's now possible to select multiple files by pressing command while clicking. Makes it much easier to move multiple files together rather than having to move one file at a time. #dev
I need to debug the preview overlay for tabs. I have now experienced multiple times, where the overlay is positioned incorrectly. It's supposed to be right below the hovered tab, but this is not always the case. It's a very unpredictable bug that happens rarely, but still very annoying. Especially because once it happens, it does not go away unless relaunching the app.
I expect the reason to be the `GeometryReader` not calculating the position correctly.
View quoted note →
Frederik Handberg
npub1nj0c...2gqz
23 🇩🇰 Studying for a degree in Software Engineering while building fun projects and working freelance as a News Photographer 📷
I share my software projects, photos and videos from my work as a news photographer, and progress updates as I learn to sew garments.
Basically, I just write about my hobbies.
frederikhandberg.com
For my notes app, I should make it possible to relocate multiple files instead of having to move one file at a time.
It should be possible to command+click files to select multiple.
Once multiple files are selected, clicking and dragging to relocate should also be possible.
Basically, exactly like it works in Finder. #dev
Sometimes #Claude has a tendency to mix #UIKit and #AppKit.
I experience quite often that it writes some code using methods from UIKit that just does not exist in AppKit...
Files and folders can now be relocated by drag and drop.
Would be cool to have an animation that shows the files being moved from one folder to another. Something I could work on in the future...
**TODO:** Currently the user must drop directly over a folder to relocate. Instead, dragging over a folder’s contents should highlight the parent folder’s background and allow the user to drop the dragged file or folder to relocate it.
#dev #macOS #Swift #SwiftUI #AppKit
It's a beautiful day with blue sky and the sun is shining ☀️
Today will be about implementing a solution to monitor changes to the filesystem. More specifically, my notes app needs to be able to know when the user modifies their Space vault from outside the app.
Currently, the app will not update the list of files if the user manipulates the vault through Finder.
E.g., if the user renames or deletes files in their Space vault. _(the vault is just the root folder containing all the files and directories in the Space)_
From the research I've done, it seems like `DispatchSourceFileSystemObject` is what I need to be using.
#dev #macOS #Swift #SwiftUI #AppKit
Today will be about implementing a solution to monitor changes to the filesystem. More specifically, my notes app needs to be able to know when the user modifies their Space vault from outside the app.
Currently, the app will not update the list of files if the user manipulates the vault through Finder.
E.g., if the user renames or deletes files in their Space vault. _(the vault is just the root folder containing all the files and directories in the Space)_
From the research I've done, it seems like `DispatchSourceFileSystemObject` is what I need to be using.

Apple Developer Documentation
DispatchSourceFileSystemObject | Apple Developer Documentation
A dispatch source that monitors events associated with a file descriptor.
I'm having a re-rendering issue in SwiftUI.
- I have two windows open with the same Space in each.
- I then change the name of the space in `LaunchView`.
Now, only the frontmost window will be automatically updated to display the new name of the Space. However, the window behind does **NOT** update unless I hover above the button displaying the name.
I have tried the `.id()` approach, but that didn't work. It's a minor problem, but it's still driving me crazy.
Using `@Observable` in the ViewModel should take care of re-rendering the necessary parts in the UI. I just don't understand why it only works in the frontmost window...
It's funny how sometimes when asking a complex question to Claude, it will go in an infinite loop.
It's like:
- "Wait, that won't work"
- "Actual Fix:"
- "Actually, that's not the right approach either."
- "Actually, let me check the actual update flow more carefully:"
- "The ACTUAL problem:"
And then it ends with: "Let me try a different approach - add logging:"
Please Claude, just tell me to add print statements before you start rambling off... It's wasting my weekly limit 😭
I have now finished implementing support for adding and removing note documents as bookmarks.
The user can simply right-click a note and then select the option called 'Bookmark'.
Bookmarks are saved locally on the user's device in a file called `bookmarks.json` located in the hidden folder `.space/`.
Also, I have worked on making a small preview overlay that appears when hovering notes. It's not quite done yet. Still need to work on the UI of it, but I think it's pretty nice. #dev #AppKit #SwiftUI #macOS
I’m starting to get a pretty good understanding of the limitations and quirks/bugs in SwiftUI and AppKit, and of ways to workaround these issues. It makes developing native apps with SwiftUI and AppKit a lot more fun.
I don't understand why liquid glass buttons are so boring on macOS 26 compared to iOS. They are just static without any cool effect when clicking them... :(
Been thinking about integrating them into my notes app, but I don't even see why I would want to. This is probably not an easy task, but I wonder if it's possible to modify the `.glass` effect on SwiftUI buttons.
Otherwise, maybe I could go completely custom and use the `.glassEffect()` modifier on my own buttons. But the animation will not be easy to accomplish - it's what makes the buttons so engaging to click on iOS.
I have now implemented functionality to save and remove bookmarks. Simply right-click on a note document, and the context menu will show a ‘Bookmark’ button.
Bookmarks are stored in a local file called `bookmarks.json` located in the hidden folder `.space/`.
**Next task:** Display list of bookmarks in the UI.
I was wrong… It had nothing to do with switching to `NSWindowController` from `WindowGroup`.
I just didn’t realize my SwiftUI `CommandGroup` was messing up my close shortcut for the AppKit window. I thought they wouldn’t work with the AppKit approach, but apparently they still do.
Now `Cmd+W` will close the selected tab while using `Cmd+Shift+W` will close the focused window.
View quoted note →
Well, turns out I also needed to replace my `LaunchView` from being initialized with SwiftUI's `WindowGroup` to an AppKit approach using `NSWindowController`.
Now I have full control with AppKit and can easily choose when to open and close the window 😌 #dev
View quoted note →
I'm happy that I made the switch to AppKit for the window management. Even though it's not as fun to work with, it's just so much more reliable than SwiftUI if you want to do something more complex.
View quoted note →
I tried using `UserDefaults` to save the IDs of open windows, so that when terminating the app and then re-launching, the app would open the same windows again.
But apparently, this is not as easy as I thought - at least not when using #SwiftUI.
I'm moving to an #AppKit approach instead to handle my window management... #dev
LLMs like Claude are cheap. Especially considering the value they bring me and many other developers.
But I do wonder how long the prices are going to stay like that… 😬
By window management I mean supporting multiple independent windows to be open at the same time.
I want to enable a different Space to be open in each window, or the same Space…
Currently, all windows are linked, so if you switch Space in one window, the same change will happen in all the others.
It’s not intentional though, I think it must be some default behavior in AppKit. #dev
View quoted note →
Attempted to implement advanced window management for my notes app this afternoon, but gotta admit, I’m just too tired to think clearly.
I’ve done a lot of work to get the functionality working to create and switch Spaces.
Made a little menu to view all Spaces and switch between them.
Seems to work really well.
Tomorrow will be about implementing window management. #dev
GN Nostr 💤
I hope to get the `app_state.db` completely up and running today, but it’s going to require a bit of work.
I need to implement the following:
- Create and update Spaces
- Switch between current Space
- Pull recently opened Spaces in chronological order to make a list in UI
- Reopen the latest Space when launching app
Most of the tasks also require building the UI.
Maybe I can even start working on `cache.db` today as well, but it’s more important to get a really solid solution implemented for `app_state.db`.
I did the database queries yesterday using the Swift package called `GRDB`:
View quoted note →
GitHub
GitHub - groue/GRDB.swift: A toolkit for SQLite databases, with a focus on application development
A toolkit for SQLite databases, with a focus on application development - groue/GRDB.swift
After having used a bunch of LLM models, this is my conclusion:
- Gemini 3 Thinking for brainstorming
- Claude Sonnet 4.5 for programming
View quoted note →