From b9c03a76379536f833b9bd7695e2950869ddddef Mon Sep 17 00:00:00 2001 From: Jonathan van Rij Date: Fri, 30 Oct 2026 11:27:44 +0100 Subject: [PATCH] before the great git rework --- README.md | 7 +- .../HelderServices/Project/NotesService.swift | 28 ------ Sources/HelderUI/Editor/EditorColumn.swift | 2 +- Sources/HelderUI/Overlays/NoteOverlay.swift | 45 --------- Sources/HelderUI/Overlays/OverlayHost.swift | 4 - .../HelderUI/Overlays/ShortcutsOverlay.swift | 2 - Sources/HelderUI/Shell/AppDelegate.swift | 2 +- Sources/HelderUI/Shell/Command.swift | 9 +- Sources/HelderUI/Shell/HelderScene.swift | 2 - Sources/HelderUI/Shell/KeyRouter.swift | 5 - Sources/HelderUI/Shell/TitleBarView.swift | 4 +- Sources/HelderUI/Shell/WindowBridge.swift | 2 +- Sources/HelderUI/State/NoteStore.swift | 66 ------------- Sources/HelderUI/State/OverlayStore.swift | 4 +- .../State/WorkspaceModel+Commands.swift | 12 +-- .../State/WorkspaceModel+Lifecycle.swift | 14 +-- .../State/WorkspaceModel+Refresh.swift | 7 +- Sources/HelderUI/State/WorkspaceModel.swift | 11 +-- .../HelderUI/State/WorkspaceServices.swift | 5 +- .../Project/ProjectServicesTests.swift | 9 -- .../Overlays/NoteStoreTests.swift | 99 ------------------- .../Overlays/OverlayListTests.swift | 7 +- .../HelderUITests/Shell/KeyRouterTests.swift | 9 +- .../HelderUITests/State/CleanCopyTests.swift | 4 +- .../State/OverlayStoreTests.swift | 12 +-- .../State/WorkspaceCloseTests.swift | 21 ---- .../State/WorkspaceModelTests.swift | 31 +----- .../Support/Fakes/FakeNotes.swift | 33 ------- .../Support/WorkspaceHarness.swift | 7 +- docs/architecture.md | 16 +-- docs/behaviour.md | 4 +- docs/design/README.md | 19 +--- docs/guide/claude-code.md | 3 +- docs/guide/clean-copy.md | 5 +- docs/guide/configuration.md | 6 +- docs/guide/file-view.md | 3 +- docs/guide/git-commit-form.md | 2 +- docs/guide/index.md | 1 - docs/guide/keyboard-shortcuts.md | 11 +-- docs/guide/layout.md | 2 +- docs/guide/notes.md | 72 -------------- docs/guide/notifications.md | 7 +- docs/guide/pass-on-to-agent.md | 1 - docs/guide/title-bar.md | 15 ++- docs/plak.md | 2 +- 45 files changed, 70 insertions(+), 562 deletions(-) delete mode 100644 Sources/HelderServices/Project/NotesService.swift delete mode 100644 Sources/HelderUI/Overlays/NoteOverlay.swift delete mode 100644 Sources/HelderUI/State/NoteStore.swift delete mode 100644 Tests/HelderUITests/Overlays/NoteStoreTests.swift delete mode 100644 Tests/HelderUITests/Support/Fakes/FakeNotes.swift delete mode 100644 docs/guide/notes.md diff --git a/README.md b/README.md index ee4f53b..ad606b5 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ One project per window, four columns: - **Editor**: one open file under a bar with its path, unsaved dot and change counts; changed lines marked in the live code, Diff opens a full-screen side-by-side view; Preview renders Markdown; ⌘-click on a PHP class shows its definition and uses. - **Agent**: Claude Code over a plain shell. "Pass on" pastes a reference (and the selected code) into the agent's composer without sending it. -Plus ⌘F search (this file, the project, file names), a per-project note (`.notes.txt`), recent files and recent projects, and a watcher that keeps git, the tree and open files in step with what the agent writes. +Plus ⌘F search (this file, the project, file names), recent files and recent projects, and a watcher that keeps git, the tree and open files in step with what the agent writes. ## Keyboard @@ -40,8 +40,7 @@ Plus ⌘F search (this file, the project, file names), a per-project note (`.not | ⌘S / ⌘W | Save / close the open file (asks about unsaved edits) | | ⌘C | Focus the commit message (copies when something is selected) | | ⌘↵ / ⇧↵ in the message | Commit the staged files | -| ⌘P | Push; with the note open, pass the whole note to the agent | -| ⌘N | Project note | +| ⌘P | Push | | ⌘R | Re-read git, the tree and the open file from disk | | ⌘G / ⌘L / ⌘. | Source Control column / fluid columns / hidden files | | ⌘A | Select all in the focused pane; in the code pane, the whole file | @@ -49,7 +48,7 @@ Plus ⌘F search (this file, the project, file names), a per-project note (`.not | Esc | Close the overlay | | ? | Keyboard shortcuts | -Closing a window, switching project or quitting (⌘Q) first asks about every unsaved file; a cancel keeps everything open. Then the note and session are written and both terminals end. A terminal whose process exited restarts on the next key press; right-click in a terminal gives Copy (with a selection) and Paste. +Closing a window, switching project or quitting (⌘Q) first asks about every unsaved file; a cancel keeps everything open. Then the session is written and both terminals end. A terminal whose process exited restarts on the next key press; right-click in a terminal gives Copy (with a selection) and Paste. ## Testing diff --git a/Sources/HelderServices/Project/NotesService.swift b/Sources/HelderServices/Project/NotesService.swift deleted file mode 100644 index fcc1ec0..0000000 --- a/Sources/HelderServices/Project/NotesService.swift +++ /dev/null @@ -1,28 +0,0 @@ -import Foundation - -public protocol NotesServicing: Sendable { - /// The note's text; "" when the project has none yet. - func read() async -> String - func write(_ text: String) async throws -} - -/// The note is a plain `.notes.txt` in the project root, not JSON and not in `.helder/`, -/// so it stays readable and editable outside Helder. -public struct NotesService: NotesServicing { - public static let fileName = ".notes.txt" - public let root: URL - - public init(root: URL) { - self.root = root - } - - private var url: URL { root.appendingPathComponent(Self.fileName) } - - public func read() async -> String { - (try? String(contentsOf: url, encoding: .utf8)) ?? "" - } - - public func write(_ text: String) async throws { - try Data(text.utf8).write(to: url, options: .atomic) - } -} diff --git a/Sources/HelderUI/Editor/EditorColumn.swift b/Sources/HelderUI/Editor/EditorColumn.swift index e07ab4f..0d66955 100644 --- a/Sources/HelderUI/Editor/EditorColumn.swift +++ b/Sources/HelderUI/Editor/EditorColumn.swift @@ -47,7 +47,7 @@ private struct EditorWorkspace: View { /// What the column shows with no file open: only what works without one. struct EditorEmptyState: View { private let keys: [(String, String)] = [ - ("Open folder", "⌘O"), ("Recent projects", "⇧⌘O"), ("Search files & content", "⌘F"), ("Project note", "⌘N"), + ("Open folder", "⌘O"), ("Recent projects", "⇧⌘O"), ("Search files & content", "⌘F"), ] var body: some View { diff --git a/Sources/HelderUI/Overlays/NoteOverlay.swift b/Sources/HelderUI/Overlays/NoteOverlay.swift deleted file mode 100644 index f0c464e..0000000 --- a/Sources/HelderUI/Overlays/NoteOverlay.swift +++ /dev/null @@ -1,45 +0,0 @@ -import SwiftUI - -/// ⌘N: the project's plain-text note. Closing it in any way saves it. -struct NoteOverlay: View { - let note: NoteStore - var onPassOn: () -> Void - var onClose: () -> Void - - var body: some View { - OverlayShell(.sized(width: 780), onDismiss: onClose) { - VStack(spacing: 0) { - OverlayHeader(systemImage: "note.text", title: "Note", detail: NoteStore.fileName) { - Button(action: onPassOn) { - HStack(spacing: 8) { - Text("To the agent") - Keycap("⌘P", style: .onAmber, small: true) - } - } - .buttonStyle(.primary) - } - OverlayTextEditor(text: Binding(get: { note.text }, set: { note.text = $0 }), - placeholder: "Anything you want to keep next to this project…", onKey: handle) - .frame(maxWidth: .infinity, maxHeight: .infinity) - Text("saved on focus loss · \(note.characterCount) characters") - .typeRole(Typography.meta) - .foregroundStyle(Palette.text4) - .padding(.horizontal, 20) - .frame(maxWidth: .infinity, alignment: .leading) - .frame(height: 34) - .hairline(.top) - } - .frame(maxHeight: .infinity) - } - .onDisappear { Task { await note.save() } } - } - - private func handle(_ key: OverlayKey) -> Bool { - switch key { - case .commandP: onPassOn() - case .escape: onClose() - default: return false - } - return true - } -} diff --git a/Sources/HelderUI/Overlays/OverlayHost.swift b/Sources/HelderUI/Overlays/OverlayHost.swift index 6a11259..cf42979 100644 --- a/Sources/HelderUI/Overlays/OverlayHost.swift +++ b/Sources/HelderUI/Overlays/OverlayHost.swift @@ -32,10 +32,6 @@ public struct OverlayHost: View { } case .shortcuts: ShortcutsOverlay(onClose: dismiss) - case .note: - if let note = model.note { - NoteOverlay(note: note, onPassOn: { model.perform(.passNote) }, onClose: dismiss) - } case .cleanCopy: if let cleanCopy = model.cleanCopy { CleanCopyOverlay(store: cleanCopy, onCopy: { model.perform(.copyCleanCopy) }, onClose: dismiss) diff --git a/Sources/HelderUI/Overlays/ShortcutsOverlay.swift b/Sources/HelderUI/Overlays/ShortcutsOverlay.swift index ec23737..7bb1bb8 100644 --- a/Sources/HelderUI/Overlays/ShortcutsOverlay.swift +++ b/Sources/HelderUI/Overlays/ShortcutsOverlay.swift @@ -28,8 +28,6 @@ public enum ShortcutCatalog { ]), ShortcutGroup(title: "Agent", rows: [ ShortcutRow(keys: ["⌘", "→"], label: "Pass the selection to the agent"), - ShortcutRow(keys: ["⌘", "N"], label: "Open the project note"), - ShortcutRow(keys: ["⌘", "P"], label: "Pass on the whole note"), ]), ShortcutGroup(title: "Git", rows: [ ShortcutRow(keys: ["⌘", "C"], label: "Focus the commit message"), diff --git a/Sources/HelderUI/Shell/AppDelegate.swift b/Sources/HelderUI/Shell/AppDelegate.swift index fbda739..2557ab9 100644 --- a/Sources/HelderUI/Shell/AppDelegate.swift +++ b/Sources/HelderUI/Shell/AppDelegate.swift @@ -32,7 +32,7 @@ public final class AppDelegate: NSObject, NSApplicationDelegate { false } - /// ⌘Q asks about unsaved files in every window first, and writes each note and session before quitting. + /// ⌘Q asks about unsaved files in every window first, and writes each session before quitting. public func applicationShouldTerminate(_ sender: NSApplication) -> NSApplication.TerminateReply { let models = WorkspaceRegistry.models guard !models.isEmpty else { return .terminateNow } diff --git a/Sources/HelderUI/Shell/Command.swift b/Sources/HelderUI/Shell/Command.swift index f6033ed..ad7a419 100644 --- a/Sources/HelderUI/Shell/Command.swift +++ b/Sources/HelderUI/Shell/Command.swift @@ -47,8 +47,6 @@ public enum Command: Equatable, Sendable { /// ⌘F; the seed is the first line of the current selection. case showSearch(seed: String) - /// ⌘N - case showNote /// `?` case showShortcuts /// ⇧⌘O: the other recent projects. @@ -57,7 +55,7 @@ public enum Command: Equatable, Sendable { case showRecentFiles(initialSelection: Int) /// Right-click or ⌘→ on a row; `anchor` is in window coordinates. case showContextMenu(ContextTarget, anchor: CGPoint) - /// Esc: closes the one open overlay, with its own close behaviour (the note saves, Diff restores the mode). + /// Esc: closes the one open overlay, with its own close behaviour (Diff restores the mode). case dismissOverlay /// The confirm overlay's yes. case confirmPending @@ -119,11 +117,6 @@ public enum Command: Equatable, Sendable { /// ⌘C without a selection, outside a terminal case focusCommitMessage - // MARK: Note - - /// ⌘P while the note is open. - case passNote - // MARK: Clean copy /// The clean-copy popup's Copy and ⌘↩: copies its text and closes it. diff --git a/Sources/HelderUI/Shell/HelderScene.swift b/Sources/HelderUI/Shell/HelderScene.swift index 8373907..fea3c41 100644 --- a/Sources/HelderUI/Shell/HelderScene.swift +++ b/Sources/HelderUI/Shell/HelderScene.swift @@ -90,8 +90,6 @@ struct HelderCommands: Commands { Divider() Button("Search") { workspace?.perform(.showSearch(seed: "")) } .keyboardShortcut("f", modifiers: .command) - Button("Project Note") { workspace?.perform(.showNote) } - .keyboardShortcut("n", modifiers: .command) Button("Keyboard Shortcuts") { workspace?.perform(.showShortcuts) } Divider() Button("Actual Size") { workspace?.perform(.zoom(.reset)) } diff --git a/Sources/HelderUI/Shell/KeyRouter.swift b/Sources/HelderUI/Shell/KeyRouter.swift index 8fbf11f..27f3ff4 100644 --- a/Sources/HelderUI/Shell/KeyRouter.swift +++ b/Sources/HelderUI/Shell/KeyRouter.swift @@ -76,7 +76,6 @@ public struct KeyContext: Equatable, Sendable { /// The overlay kinds the router tells apart. public enum OverlayKind: Equatable, Sendable { case none - case note /// The full-screen Diff: the workspace shortcuts keep working over it. `busy` while its own /// menu or pass-on prompt is open; those then own every key. case diff(busy: Bool) @@ -86,7 +85,6 @@ public enum OverlayKind: Equatable, Sendable { public init(_ overlay: Overlay, diffBusy: Bool = false) { switch overlay { case .none: self = .none - case .note: self = .note case .diff: self = .diff(busy: diffBusy) default: self = .other } @@ -116,8 +114,6 @@ public enum KeyRouter { case .none: break case .diff: if press == .cmd(.character("a")) { return .pass } - case .note: - return press == .cmd(.character("p")) ? .perform(.passNote) : .pass case .other: return .pass } @@ -177,7 +173,6 @@ public enum KeyRouter { switch c { case "f": return .perform(.showSearch(seed: context.searchSeed)) case "p": return .perform(.push) - case "n": return .perform(.showNote) case "s": return .perform(.save) case "m": return .perform(.cycleMode) case "w": return .perform(.closeFileOrWindow) diff --git a/Sources/HelderUI/Shell/TitleBarView.swift b/Sources/HelderUI/Shell/TitleBarView.swift index 500d40b..e023e95 100644 --- a/Sources/HelderUI/Shell/TitleBarView.swift +++ b/Sources/HelderUI/Shell/TitleBarView.swift @@ -131,7 +131,7 @@ private struct PaneToggles: View { } } -/// Search ⌘F · Fluid ⌘L · Hidden ⌘. · Note ⌘N, then `?`. Search and Note are actions; Fluid and Hidden toggle. +/// Search ⌘F · Fluid ⌘L · Hidden ⌘., then `?`. Search is an action; Fluid and Hidden toggle. /// While Helder reads aloud, a Stop toggle leads the group; switching it off stops the reading. private struct TitleToolbar: View { let model: WorkspaceModel @@ -154,8 +154,6 @@ private struct TitleToolbar: View { : Tooltip.stated("Hidden files: ", "hidden", " — dotfiles are excluded from the tree and the search. Click to show them.")) { model.perform(.toggleHidden) }, - GroupItem("Note", keys: "⌘N", kind: .action, - tip: Text("Project note (.notes.txt) — kept next to this project.")) { model.perform(.showNote) }, ], tipEdge: .trailing) ToolbarIconButton("?") { model.perform(.showShortcuts) } .tip("Keyboard shortcuts.", edge: .trailing) diff --git a/Sources/HelderUI/Shell/WindowBridge.swift b/Sources/HelderUI/Shell/WindowBridge.swift index e9901c8..3065512 100644 --- a/Sources/HelderUI/Shell/WindowBridge.swift +++ b/Sources/HelderUI/Shell/WindowBridge.swift @@ -74,7 +74,7 @@ final class WindowCoordinator: NSObject { window.delegate = closeGuard } - /// The first close only asks: unsaved files prompt, the note and session are written, then the window closes. + /// The first close only asks: unsaved files prompt, the session is written, then the window closes. private func shouldClose(_ window: NSWindow) -> Bool { if closeApproved { return true } guard !isAskingToClose else { return false } diff --git a/Sources/HelderUI/State/NoteStore.swift b/Sources/HelderUI/State/NoteStore.swift deleted file mode 100644 index 9fd65e8..0000000 --- a/Sources/HelderUI/State/NoteStore.swift +++ /dev/null @@ -1,66 +0,0 @@ -import Foundation -import HelderServices -import Observation - -@Observable -@MainActor -public final class NoteStore { - public static let fileName = NotesService.fileName - - public var text = "" - /// What is on disk, so a save without edits does not touch the file and wake the watcher. - public private(set) var savedText = "" - - /// Raises a toast; the model wires it to `ToastStore`. - @ObservationIgnored public var notify: ((String, String?) -> Void)? - @ObservationIgnored private let notes: NotesServicing - - public init(notes: NotesServicing) { - self.notes = notes - } - - public var isDirty: Bool { text != savedText } - - public var characterCount: Int { text.count } - - public func load() async { - let loaded = await notes.read() - text = loaded - savedText = loaded - } - - /// Picks up an outside edit of the note file; unsaved typing always wins. - public func reloadIfClean() async { - guard !isDirty else { return } - let loaded = await notes.read() - guard !isDirty, loaded != savedText else { return } - text = loaded - savedText = loaded - } - - /// Saves when the text changed; called on window blur, on close and when the overlay closes. - /// Returns false when the write failed. - @discardableResult - public func save() async -> Bool { - guard isDirty else { return true } - let snapshot = text - // Marked saved before the write, so a second blur during the write does not write again. - let previous = savedText - savedText = snapshot - do { - try await notes.write(snapshot) - return true - } catch { - if savedText == snapshot { savedText = previous } - Log.error("notes", "save failed: \(error.localizedDescription)") - notify?("Save failed", Self.fileName) - return false - } - } - - /// The trimmed note for ⌘P, or nil when it is empty. - public var passableText: String? { - let trimmed = text.trimmingCharacters(in: .whitespacesAndNewlines) - return trimmed.isEmpty ? nil : trimmed - } -} diff --git a/Sources/HelderUI/State/OverlayStore.swift b/Sources/HelderUI/State/OverlayStore.swift index bc697da..5085164 100644 --- a/Sources/HelderUI/State/OverlayStore.swift +++ b/Sources/HelderUI/State/OverlayStore.swift @@ -88,8 +88,6 @@ public enum Overlay: Equatable { case search(seed: String) /// `?`: the keyboard reference. case shortcuts - /// ⌘N: the project note. - case note /// Text the agent wrote to `.clean-copy`, to edit and copy. case cleanCopy case diff(DiffOverlayRequest) @@ -110,7 +108,7 @@ public enum Overlay: Equatable { public final class OverlayStore { public private(set) var current = Overlay.none /// Called with the old and new overlay on every change, however it happened, so closing - /// behaviour (the note saves, the Diff restores the mode) runs even when another overlay takes over. + /// behaviour (the Diff restores the mode) runs even when another overlay takes over. @ObservationIgnored public var onChange: ((_ old: Overlay, _ new: Overlay) -> Void)? public init() {} diff --git a/Sources/HelderUI/State/WorkspaceModel+Commands.swift b/Sources/HelderUI/State/WorkspaceModel+Commands.swift index 7e39b76..160afb2 100644 --- a/Sources/HelderUI/State/WorkspaceModel+Commands.swift +++ b/Sources/HelderUI/State/WorkspaceModel+Commands.swift @@ -8,8 +8,6 @@ extension WorkspaceModel { func overlayChanged(from old: Overlay, to new: Overlay) { switch old { - case .note: - if let note { track { await note.save() } } case .diff: editor?.closeDiff() default: @@ -103,7 +101,7 @@ extension WorkspaceModel { } } - // MARK: Editor and the note + // MARK: Editor func passSelection(_ info: TextSelectionInfo?) { guard let editor, let path = editor.activePath else { return } @@ -115,14 +113,6 @@ extension WorkspaceModel { } } - /// ⌘P with the note open: the whole note goes to the agent, and the note closes so the text is seen landing. - func passNote() { - guard let note, let text = note.passableText else { return } - terminal.insertIntoAgent(text: text) - overlay.dismiss() - toasts.show("Note passed to agent", detail: NoteStore.fileName) - } - func editorSelectionFirstLine() -> String { guard let editor, let path = editor.activePath, let selection = editor.selection, selection.path == path else { return "" } let lines = editor.text(for: path).split(separator: "\n", omittingEmptySubsequences: false) diff --git a/Sources/HelderUI/State/WorkspaceModel+Lifecycle.swift b/Sources/HelderUI/State/WorkspaceModel+Lifecycle.swift index 92c374d..772a0c8 100644 --- a/Sources/HelderUI/State/WorkspaceModel+Lifecycle.swift +++ b/Sources/HelderUI/State/WorkspaceModel+Lifecycle.swift @@ -17,11 +17,10 @@ extension WorkspaceModel { isReady = true } - /// Asks about every unsaved file, then writes the note and the session. + /// Asks about every unsaved file, then writes the session. /// False when the user cancelled: the window or project must stay. public func prepareToClose() async -> Bool { if let editor, !(await editor.resolveUnsaved()) { return false } - await note?.save() await editor?.persist() return true } @@ -66,9 +65,6 @@ extension WorkspaceModel { wire(editor, symbols: services.symbols) self.editor = editor - let note = NoteStore(notes: services.notes) - note.notify = notify - self.note = note cleanCopy = CleanCopyStore(files: services.files) terminal = TerminalStore(projectRoot: root.path) wireTerminal() @@ -101,12 +97,11 @@ extension WorkspaceModel { recentProjects = await app.recentProjects.list() guard generation == current else { return } launcher = LauncherList(recents: recentProjects, excluding: root.path) - let sourceControl = sourceControl, explorer = explorer, note = note, editor = editor, cleanCopy = cleanCopy + let sourceControl = sourceControl, explorer = explorer, editor = editor, cleanCopy = cleanCopy async let git: Void = sourceControl?.refresh() ?? () async let tree: Void = explorer?.reload() ?? () - async let loaded: Void = note?.load() ?? () async let baseline: Void = cleanCopy?.loadBaseline() ?? () - _ = await (git, tree, loaded, baseline) + _ = await (git, tree, baseline) await editor?.restore(restoreSession: config.session.restoreOnLaunch) guard generation == current else { return } startWatcher(root) @@ -115,7 +110,7 @@ extension WorkspaceModel { } /// Stops the watchers and polling, waits for the work still running against this project, - /// then stops reading aloud, saves the note and the session and ends the terminals. + /// then stops reading aloud, saves the session and ends the terminals. func closeProject() async { watcher?.stop() watcher = nil @@ -134,7 +129,6 @@ extension WorkspaceModel { for task in running { await task.value } readAloud.stop() await editor?.flushAutoSaves() - await note?.save() await editor?.persist() terminal.terminateAll() } diff --git a/Sources/HelderUI/State/WorkspaceModel+Refresh.swift b/Sources/HelderUI/State/WorkspaceModel+Refresh.swift index fd6dbd5..0522b46 100644 --- a/Sources/HelderUI/State/WorkspaceModel+Refresh.swift +++ b/Sources/HelderUI/State/WorkspaceModel+Refresh.swift @@ -15,7 +15,7 @@ extension WorkspaceModel { /// Reacts to a disk change from the watcher: project and git events gather into one debounced refresh. public func handle(_ event: WatchEvent) async { switch event { - case .project: scheduleRefresh([.git, .tree, .symbols, .openFiles, .note]) + case .project: scheduleRefresh([.git, .tree, .symbols, .openFiles]) case .git: scheduleRefresh(.git) case .config: await reloadConfig() case .cleanCopy: await cleanCopyChanged() @@ -61,7 +61,7 @@ extension WorkspaceModel { /// Reads the stores once up front, so a pass that outlives a project switch only touches the old project. func run(_ scope: RefreshScope) async { - let sourceControl = sourceControl, explorer = explorer, editor = editor, note = note + let sourceControl = sourceControl, explorer = explorer, editor = editor let current = generation if scope.contains(.symbols) { await services?.symbols.invalidate() @@ -70,8 +70,7 @@ extension WorkspaceModel { async let git: Void = scope.contains(.git) ? (sourceControl?.refresh() ?? ()) : () async let tree: Void = scope.contains(.tree) ? (explorer?.reload() ?? ()) : () async let files: Void = scope.contains(.openFiles) ? (editor?.filesChanged(nil) ?? ()) : () - async let notes: Void = scope.contains(.note) ? (note?.reloadIfClean() ?? ()) : () - _ = await (git, tree, files, notes) + _ = await (git, tree, files) } /// Restarts the countdown on every change, so a burst of writes loads the class list once. diff --git a/Sources/HelderUI/State/WorkspaceModel.swift b/Sources/HelderUI/State/WorkspaceModel.swift index 2f1be43..6c42851 100644 --- a/Sources/HelderUI/State/WorkspaceModel.swift +++ b/Sources/HelderUI/State/WorkspaceModel.swift @@ -41,8 +41,6 @@ public struct RefreshScope: OptionSet, Sendable { public static let symbols = RefreshScope(rawValue: 4) /// The open file and every unsaved buffer pick up the disk text; unsaved edits are kept. public static let openFiles = RefreshScope(rawValue: 8) - /// The project note picks up an outside edit when it has no unsaved typing. - public static let note = RefreshScope(rawValue: 16) } /// A list row whose on-screen frame the ⌘→ menu anchors to. @@ -84,7 +82,6 @@ public final class WorkspaceModel { public internal(set) var explorer: ExplorerStore? public internal(set) var editor: EditorStore? public internal(set) var terminal: TerminalStore - public internal(set) var note: NoteStore? public internal(set) var cleanCopy: CleanCopyStore? @ObservationIgnored public let app: AppServices @@ -122,7 +119,7 @@ public final class WorkspaceModel { if let root = self.root { attach(root) } } - /// Loads the recents and, with a project, its config, git, tree, note and session; then starts the watchers. + /// Loads the recents and, with a project, its config, git, tree and session; then starts the watchers. public func start() async { guard !hasStarted else { return } hasStarted = true @@ -136,7 +133,6 @@ public final class WorkspaceModel { public func perform(_ command: Command) { switch command { case let .showSearch(seed): overlay.present(.search(seed: seed.isEmpty ? editorSelectionFirstLine() : seed)) - case .showNote: overlay.present(.note) case .showShortcuts: overlay.present(.shortcuts) case .showRecentProjects: showRecentProjects() case let .showRecentFiles(index): overlay.present(.recentFiles(initialSelection: index)) @@ -188,7 +184,6 @@ public final class WorkspaceModel { layout.focus(.sourceControl) focusRequest = FocusRequest(.commitMessage) - case .passNote: passNote() case .copyCleanCopy: copyCleanCopy() case .stopReading: readAloud.stop() @@ -251,11 +246,9 @@ public final class WorkspaceModel { rowFrames[key] = frame } - /// Saves the note when the window loses focus. + /// Remembers the window lost focus, so coming back can flash branch · project. public func windowDidResignKey() { resignedKey = true - guard let note else { return } - track { await note.save() } } /// Coming back to a window flashes branch · project, so the right window is obvious; launch never does. diff --git a/Sources/HelderUI/State/WorkspaceServices.swift b/Sources/HelderUI/State/WorkspaceServices.swift index 36d2e40..9dc44fe 100644 --- a/Sources/HelderUI/State/WorkspaceServices.swift +++ b/Sources/HelderUI/State/WorkspaceServices.swift @@ -9,17 +9,15 @@ public struct WorkspaceServices { public var search: SearchServicing public var symbols: SymbolServicing public var config: ConfigServicing - public var notes: NotesServicing public var recentFiles: RecentFilesStoring public init(git: GitServicing, files: FileServicing, search: SearchServicing, symbols: SymbolServicing, - config: ConfigServicing, notes: NotesServicing, recentFiles: RecentFilesStoring) { + config: ConfigServicing, recentFiles: RecentFilesStoring) { self.git = git self.files = files self.search = search self.symbols = symbols self.config = config - self.notes = notes self.recentFiles = recentFiles } @@ -32,7 +30,6 @@ public struct WorkspaceServices { search: search, symbols: SymbolService(root: root, config: config), config: config, - notes: NotesService(root: root), recentFiles: RecentFilesStore(root: root) ) } diff --git a/Tests/HelderServicesTests/Project/ProjectServicesTests.swift b/Tests/HelderServicesTests/Project/ProjectServicesTests.swift index 1331360..20f90e4 100644 --- a/Tests/HelderServicesTests/Project/ProjectServicesTests.swift +++ b/Tests/HelderServicesTests/Project/ProjectServicesTests.swift @@ -23,15 +23,6 @@ import Testing #expect(try String(contentsOf: folder.appendingPathComponent(".gitignore"), encoding: .utf8) == HelderConfig.gitignoreBody) } - @Test func notesRoundTrip() async throws { - let root = try tempDir() - defer { try? FileManager.default.removeItem(at: root) } - let notes = NotesService(root: root) - #expect(await notes.read() == "") - try await notes.write("tell the agent\n") - #expect(await notes.read() == "tell the agent\n") - } - @Test func recentProjectsAreNewestFirstAndDeduplicated() async throws { let dir = try tempDir() defer { try? FileManager.default.removeItem(at: dir) } diff --git a/Tests/HelderUITests/Overlays/NoteStoreTests.swift b/Tests/HelderUITests/Overlays/NoteStoreTests.swift deleted file mode 100644 index 20ac260..0000000 --- a/Tests/HelderUITests/Overlays/NoteStoreTests.swift +++ /dev/null @@ -1,99 +0,0 @@ -import HelderUI -import Testing - -@MainActor -@Suite struct NoteStoreTests { - @Test func loadsTheNoteThatIsAlreadyOnDisk() async { - let store = NoteStore(notes: FakeNotes("earlier thoughts\n")) - await store.load() - #expect(store.text == "earlier thoughts\n") - #expect(!store.isDirty) - } - - @Test func nothingIsWrittenWhileTyping() async { - let notes = FakeNotes() - let store = NoteStore(notes: notes) - await store.load() - store.text = "buy milk" - #expect(notes.writes.isEmpty) - #expect(store.isDirty) - } - - @Test func savingOnFocusLossWritesTheEditedText() async { - let notes = FakeNotes() - let store = NoteStore(notes: notes) - await store.load() - store.text = "buy milk" - await store.save() - #expect(notes.writes == ["buy milk"]) - #expect(notes.onDisk == "buy milk") - #expect(!store.isDirty) - } - - @Test func anUnchangedNoteIsNeverRewritten() async { - let notes = FakeNotes("unchanged") - let store = NoteStore(notes: notes) - await store.load() - await store.save() - await store.save() - #expect(notes.writes.isEmpty) - } - - @Test func aFailedWriteLeavesTheNoteDirtyForTheNextTry() async { - let notes = FakeNotes() - notes.failWrites = true - let store = NoteStore(notes: notes) - store.text = "keep me" - await store.save() - #expect(store.isDirty) - } - - @Test func passableTextIsTheTrimmedNote() { - let store = NoteStore(notes: FakeNotes()) - store.text = " refactor the policy\n\n" - #expect(store.passableText == "refactor the policy") - } - - @Test func anEmptyNoteHasNothingToPass() { - let store = NoteStore(notes: FakeNotes()) - store.text = " \n " - #expect(store.passableText == nil) - } - - @Test func aFailedWriteRaisesAToast() async { - let notes = FakeNotes() - notes.failWrites = true - let store = NoteStore(notes: notes) - var toasts: [String?] = [] - store.notify = { title, detail in toasts.append(title + " " + (detail ?? "")) } - store.text = "keep me" - #expect(await store.save() == false) - #expect(toasts == ["Save failed .notes.txt"]) - } - - @Test func anOutsideEditReplacesACleanNote() async { - let notes = FakeNotes("old") - let store = NoteStore(notes: notes) - await store.load() - notes.setOnDisk("new from the agent") - await store.reloadIfClean() - #expect(store.text == "new from the agent") - #expect(!store.isDirty) - } - - @Test func anOutsideEditNeverReplacesUnsavedTyping() async { - let notes = FakeNotes("old") - let store = NoteStore(notes: notes) - await store.load() - store.text = "typing" - notes.setOnDisk("new from the agent") - await store.reloadIfClean() - #expect(store.text == "typing") - } - - @Test func theFooterCountsCharacters() { - let store = NoteStore(notes: FakeNotes()) - store.text = "héllo" - #expect(store.characterCount == 5) - } -} diff --git a/Tests/HelderUITests/Overlays/OverlayListTests.swift b/Tests/HelderUITests/Overlays/OverlayListTests.swift index 888a8c2..47d12c4 100644 --- a/Tests/HelderUITests/Overlays/OverlayListTests.swift +++ b/Tests/HelderUITests/Overlays/OverlayListTests.swift @@ -11,7 +11,7 @@ import Testing @Test func everyShortcutTheAppHandlesIsListed() { let listed = Set(ShortcutCatalog.groups.flatMap(\.rows).map { $0.keys.joined() }) - let handled = ["⌘F", "⌘↑↓", "↵", "⌘←→", "↑↓", "⇧⌘O", "⌘O", "⌘→", "⌘N", "⌘P", + let handled = ["⌘F", "⌘↑↓", "↵", "⌘←→", "↑↓", "⇧⌘O", "⌘O", "⌘→", "⌘P", "⌘C", "⌘↵", "⌘G", "⌘M", "⌘S", "⌘.", "⌘A", "⌘L", "Esc", "⌘W", "⌘R", "⇧⌘N", "?", "⌘click", "⌘0", "⌘+", "⌘−"] #expect(Set(handled).subtracting(listed).isEmpty) @@ -35,11 +35,6 @@ import Testing #expect(!row.label.isEmpty) } } - - @Test func theNotePassOnSitsInTheAgentGroup() { - let agent = ShortcutCatalog.groups.first { $0.title == "Agent" } - #expect(agent?.rows.contains(ShortcutRow(keys: ["⌘", "P"], label: "Pass on the whole note")) == true) - } } @Suite struct ListCursorTests { diff --git a/Tests/HelderUITests/Shell/KeyRouterTests.swift b/Tests/HelderUITests/Shell/KeyRouterTests.swift index b106156..b4a76d8 100644 --- a/Tests/HelderUITests/Shell/KeyRouterTests.swift +++ b/Tests/HelderUITests/Shell/KeyRouterTests.swift @@ -7,7 +7,7 @@ import Testing private func route(_ press: KeyPress, _ context: KeyContext = KeyContext()) -> KeyRoute { KeyRouter.route(press, context) } @Test(arguments: [ - ("n", Command.showNote), ("p", .push), ("s", .save), ("m", .cycleMode), ("g", .toggleGit), + ("p", Command.push), ("s", .save), ("m", .cycleMode), ("g", .toggleGit), ("l", .toggleAutoFit), (".", .toggleHidden), ("w", .closeFileOrWindow), ]) func commandLettersMapToTheirCommand(key: String, command: Command) { @@ -89,7 +89,7 @@ import Testing @Test func escapeClosesAnOverlayAndOtherwiseReachesTheTerminal() { #expect(route(KeyPress(.escape), KeyContext(overlay: .other)) == .perform(.dismissOverlay)) - #expect(route(KeyPress(.escape), KeyContext(overlay: .note, owner: .text(in: nil))) == .perform(.dismissOverlay)) + #expect(route(KeyPress(.escape), KeyContext(overlay: .other, owner: .text(in: nil))) == .perform(.dismissOverlay)) #expect(route(KeyPress(.escape), KeyContext(owner: .terminal)) == .pass) } @@ -100,9 +100,8 @@ import Testing #expect(route(KeyPress(.right, command: true), search) == .pass) } - @Test func commandPPassesTheNoteWhileItIsOpen() { - #expect(route(cmd("p"), KeyContext(overlay: .note)) == .perform(.passNote)) - #expect(route(cmd("g"), KeyContext(overlay: .note)) == .pass) + @Test func commandNIsLeftUnbound() { + #expect(route(cmd("n")) == .pass) } @Test func theBareLauncherTakesArrowsAndEnter() { diff --git a/Tests/HelderUITests/State/CleanCopyTests.swift b/Tests/HelderUITests/State/CleanCopyTests.swift index 18d8737..a626ed8 100644 --- a/Tests/HelderUITests/State/CleanCopyTests.swift +++ b/Tests/HelderUITests/State/CleanCopyTests.swift @@ -92,10 +92,10 @@ import Testing @Test func textWaitsForAnotherOverlayAndOnlyTheLatestShows() async { let harness = await started() - await harness.perform(.showNote) + await harness.perform(.showShortcuts) await agentWrites("one", harness) await agentWrites("two", harness) - #expect(harness.model.overlay.current == .note) + #expect(harness.model.overlay.current == .shortcuts) await harness.perform(.dismissOverlay) #expect(await eventually { harness.model.overlay.current == .cleanCopy }) #expect(harness.model.cleanCopy?.text == "two") diff --git a/Tests/HelderUITests/State/OverlayStoreTests.swift b/Tests/HelderUITests/State/OverlayStoreTests.swift index 230f333..dfb071e 100644 --- a/Tests/HelderUITests/State/OverlayStoreTests.swift +++ b/Tests/HelderUITests/State/OverlayStoreTests.swift @@ -6,8 +6,8 @@ import Testing @Test func overlaysNeverStack() { let store = OverlayStore() store.present(.search(seed: "foo")) - store.present(.note) - #expect(store.current == .note) + store.present(.launcher) + #expect(store.current == .launcher) store.dismiss() #expect(store.current == .none) #expect(!store.isPresented) @@ -17,11 +17,11 @@ import Testing let store = OverlayStore() var changes: [(Overlay, Overlay)] = [] store.onChange = { changes.append(($0, $1)) } - store.present(.note) - store.present(.note) + store.present(.launcher) + store.present(.launcher) store.present(.shortcuts) store.dismiss() - #expect(changes.map(\.0) == [.none, .note, .shortcuts]) - #expect(changes.map(\.1) == [.note, .shortcuts, .none]) + #expect(changes.map(\.0) == [.none, .launcher, .shortcuts]) + #expect(changes.map(\.1) == [.launcher, .shortcuts, .none]) } } diff --git a/Tests/HelderUITests/State/WorkspaceCloseTests.swift b/Tests/HelderUITests/State/WorkspaceCloseTests.swift index 2122735..38d5d5b 100644 --- a/Tests/HelderUITests/State/WorkspaceCloseTests.swift +++ b/Tests/HelderUITests/State/WorkspaceCloseTests.swift @@ -27,10 +27,8 @@ import Testing @Test func savingFromTheCloseQuestionWritesBeforeTheWindowGoes() async { let harness = await dirtyHarness() harness.system.unsavedCloseChoice = .save - harness.model.note?.text = "thought" #expect(await harness.model.prepareToClose()) #expect(harness.files.current("a.php") == " - - init(_ stored: String = "") { - state = Locked((stored, [], false)) - } - - var writes: [String] { state.current.writes } - var onDisk: String { state.current.stored } - - var failWrites: Bool { - get { state.current.failWrites } - set { state.mutate { $0.failWrites = newValue } } - } - - /// Another program rewrote the note file. - func setOnDisk(_ text: String) { state.mutate { $0.stored = text } } - - func read() async -> String { state.current.stored } - - func write(_ text: String) async throws { - try state.mutate { state in - if state.failWrites { throw CocoaError(.fileWriteNoPermission) } - state.writes.append(text) - state.stored = text - } - } -} diff --git a/Tests/HelderUITests/Support/WorkspaceHarness.swift b/Tests/HelderUITests/Support/WorkspaceHarness.swift index 5a02c98..5b15e60 100644 --- a/Tests/HelderUITests/Support/WorkspaceHarness.swift +++ b/Tests/HelderUITests/Support/WorkspaceHarness.swift @@ -11,7 +11,6 @@ struct WorkspaceHarness { let git: FakeGit let files: FakeFiles let config: FakeConfig - let notes: FakeNotes let symbols: FakeSymbols let recentFiles: FakeRecentFiles let recents: FakeRecentProjects @@ -27,13 +26,12 @@ struct WorkspaceHarness { var last: FakeWatcher? { made.last } } - init(root: URL? = URL(fileURLWithPath: "/fake/project"), config: HelderConfig = .defaults, note: String = "", + init(root: URL? = URL(fileURLWithPath: "/fake/project"), config: HelderConfig = .defaults, git: GitSnapshot? = nil, tree: FileNode = sampleTree(), contents: [String: String] = [:], recents: [RecentProject] = [], session: FakeSession = FakeSession()) { let git = FakeGit(git) let files = FakeFiles(tree: tree, contents: contents, root: root ?? URL(fileURLWithPath: "/")) let config = FakeConfig(config) - let notes = FakeNotes(note) let symbols = FakeSymbols() let recentFiles = FakeRecentFiles() let recentStore = FakeRecentProjects(recents) @@ -45,7 +43,7 @@ struct WorkspaceHarness { recentProjects: recentStore, session: session, layouts: layouts, system: system, speech: speech, makeWorkspace: { _ in WorkspaceServices(git: git, files: files, search: FakeSearch(), symbols: symbols, - config: config, notes: notes, recentFiles: recentFiles) + config: config, recentFiles: recentFiles) }, makeWatcher: { let watcher = FakeWatcher() @@ -58,7 +56,6 @@ struct WorkspaceHarness { self.git = git self.files = files self.config = config - self.notes = notes self.symbols = symbols self.recentFiles = recentFiles self.recents = recentStore diff --git a/docs/architecture.md b/docs/architecture.md index 8ebb229..2c19f41 100644 --- a/docs/architecture.md +++ b/docs/architecture.md @@ -18,13 +18,13 @@ Helder (executable) → HelderUI → HelderServices → HelderCore ## How a window works -- `WorkspaceModel` owns one window (`WorkspaceModel.swift`: state and `perform`; `+Commands`, `+ContextActions`, `+Lifecycle`, `+Refresh` hold the rest): the stores (`SourceControlStore`, `ExplorerStore`, `EditorStore`, `NoteStore`, `CleanCopyStore`, `TerminalStore`, `LayoutStore`, `OverlayStore`, `ToastStore`, `ReadAloudStore`) and every action that spans more than one of them. A store never reaches into a sibling; `EditorStore` only reads the git state through a closure. -- **One entry point.** Views, the menu bar and the key router all call `WorkspaceModel.perform(Command)` (`Shell/Command.swift`). Context-menu items arrive as `.context(ContextAction)`; the model asks `SourceControlStore.confirmation(for:)` / `ExplorerStore.confirmation(for:)` first and shows the confirm overlay, and `.confirmPending` runs the action. The name prompt submits with `.submitName`, the pass-on prompt with `.passToAgent`, the note's ⌘P with `.passNote`. -- **Overlays never stack.** `OverlayStore.current` is one `Overlay` enum; only the model presents or dismisses it. `OverlayStore.onChange` lets the model run closing behaviour however an overlay went away (the note saves, the Diff gives back the mode it covered). `OverlayHost` draws the current overlay. `.launcher` is the ⇧⌘O "Open recent project" list; the bare window's launcher is part of the shell, not an overlay. The key router only sees `OverlayKind` (`none`, `note`, `diff(busy:)`, `other`): over the Diff the workspace keys keep working unless its own menu or prompt is open (`busy`). Toasts (`ToastStore`) may sit on top. The Diff draws its own right-click menu and pass-on prompt inside itself, so it stays open. +- `WorkspaceModel` owns one window (`WorkspaceModel.swift`: state and `perform`; `+Commands`, `+ContextActions`, `+Lifecycle`, `+Refresh` hold the rest): the stores (`SourceControlStore`, `ExplorerStore`, `EditorStore`, `CleanCopyStore`, `TerminalStore`, `LayoutStore`, `OverlayStore`, `ToastStore`, `ReadAloudStore`) and every action that spans more than one of them. A store never reaches into a sibling; `EditorStore` only reads the git state through a closure. +- **One entry point.** Views, the menu bar and the key router all call `WorkspaceModel.perform(Command)` (`Shell/Command.swift`). Context-menu items arrive as `.context(ContextAction)`; the model asks `SourceControlStore.confirmation(for:)` / `ExplorerStore.confirmation(for:)` first and shows the confirm overlay, and `.confirmPending` runs the action. The name prompt submits with `.submitName`, the pass-on prompt with `.passToAgent`. +- **Overlays never stack.** `OverlayStore.current` is one `Overlay` enum; only the model presents or dismisses it. `OverlayStore.onChange` lets the model run closing behaviour however an overlay went away (the Diff gives back the mode it covered). `OverlayHost` draws the current overlay. `.launcher` is the ⇧⌘O "Open recent project" list; the bare window's launcher is part of the shell, not an overlay. The key router only sees `OverlayKind` (`none`, `diff(busy:)`, `other`): over the Diff the workspace keys keep working unless its own menu or prompt is open (`busy`). Toasts (`ToastStore`) may sit on top. The Diff draws its own right-click menu and pass-on prompt inside itself, so it stays open. - **Read aloud.** `.readAloudFile` reads the open file's buffer (unsaved edits included) or the file from disk, turns it into prose with `MarkdownSpeech`, and hands it to `ReadAloudStore`; `.readAloudText` speaks the selection (selected Markdown as prose). `ReadAloudStore` lives as long as the window, like `ToastStore`; its `isReading` shows the title bar's Stop, which runs `.stopReading`. `closeProject()` stops the reading. - **Stores report, the model shows.** Stores raise toasts through `notify`/`showToast` hooks the model wires to `ToastStore`; the model never toasts a second time for the same action. -- **Closing.** A window close, a project switch and ⌘Q all run `prepareToClose()` first: every unsaved file (at most the open one plus a vanished-file buffer) is asked about, and a cancel keeps everything open. Then `closeProject()` waits for running work, writes the note and session and ends the terminals. -- **Lifecycle.** `start()`: recents → config (applied to every store and the terminals) → git, tree, note and the `.clean-copy` baseline in parallel → `editor.restore` → watcher → git polling (`git.refreshInterval`) → the PHP class list 1.5 s later. Watcher events: `.cleanCopy` (`.clean-copy` in the root, 150 ms debounce, fired besides `.project`) makes `CleanCopyStore` re-read the file and opens the `.cleanCopy` overlay for new non-blank text (the text found at load is the baseline; another open overlay makes it wait, keeping only the newest); `.project` re-reads git, the tree, the open file and every unsaved buffer (the edits kept), invalidates the symbol index and reloads the class list 2 s after the last change; `.git` re-reads git; `.config` re-resolves and re-applies the config. ⌘R re-reads git and the tree and lets the disk win in the open file. A project switch or window close saves the note and the session, stops the watcher and polling, and ends both terminals. +- **Closing.** A window close, a project switch and ⌘Q all run `prepareToClose()` first: every unsaved file (at most the open one plus a vanished-file buffer) is asked about, and a cancel keeps everything open. Then `closeProject()` waits for running work, writes the session and ends the terminals. +- **Lifecycle.** `start()`: recents → config (applied to every store and the terminals) → git, tree and the `.clean-copy` baseline in parallel → `editor.restore` → watcher → git polling (`git.refreshInterval`) → the PHP class list 1.5 s later. Watcher events: `.cleanCopy` (`.clean-copy` in the root, 150 ms debounce, fired besides `.project`) makes `CleanCopyStore` re-read the file and opens the `.cleanCopy` overlay for new non-blank text (the text found at load is the baseline; another open overlay makes it wait, keeping only the newest); `.project` re-reads git, the tree, the open file and every unsaved buffer (the edits kept), invalidates the symbol index and reloads the class list 2 s after the last change; `.git` re-reads git; `.config` re-resolves and re-applies the config. ⌘R re-reads git and the tree and lets the disk win in the open file. A project switch or window close saves the session, stops the watcher and polling, and ends both terminals. - **Terminals.** `TerminalStore` owns both panes' handles. Ending a pane goes through the store (`terminateAll`, `restart`, or `release` when a pane's window closes), which signals the child and lets `ChildReaper` collect it, so no zombie or orphan is left. A pane whose child exited restarts on the next key press. Right-click raises `contextMenuRequested`; the model shows the app's own menu (`.terminal` target: Copy with a selection, Paste). Font size follows `layout.textScale` (⌘0/⌘+/⌘−) live. - **Git and files.** Git gets paths as literal pathspecs (`GIT_LITERAL_PATHSPECS=1`, so `pages/[id].vue` is one file). A changed file over `FileLimits.maxDiffFileBytes` (1 MB) keeps its row but loads no text: `GitFileChange.isTooBig` → `Diff.isTooBig`, and the Diff shows "Too big.". Saves are atomic (temp file, then rename, keeping permissions). Writes, creates, renames and deletes are refused when the entry's folder resolves (symlinks included) outside the project (`containedURL`). The watcher drops `IgnoreRules.walkIgnoredNames`, framework caches (`storage/framework/`, `bootstrap/cache/`, `.phpunit*`) and `files.exclude`. - **Processes.** Every new window (⇧⌘N, the Dock's New Window, Open Folder or Open Recent with no key window) is a new Helder process via `SystemActing.openNewInstance`: `NSWorkspace` with `createsNewApplicationInstance` in the bundle, `InstanceLauncher` (Foundation `Process`) under `swift run`. The folder travels as `-HelderProject `, which `ProjectLocator.initialRoot` reads as its directory argument; a bare path could reach AppKit as a file to open. Switching projects (⌘O, Open Recent in a window) stays in the process. `AppName` renames the process to the project's title (the launcher is "Helder"), so Mission Control, the Dock and ⌘Tab tell projects apart. Windows are not restorable and `NSQuitAlwaysKeepsWindows` is off, so a launch opens exactly one window. @@ -50,7 +50,7 @@ Sources/HelderServices/ Git/ GitServicing, GitService, GitDirectory (worktrees) Logging/ Log (unified log) + FileLogger (~/Library/Logs/Helder/helder.log) Process/ ProcessRunner, ExecutableLocator, ChildReaper, InstanceLauncher - Project/ ConfigService, NotesService, RecentStores, SessionStore, ProjectLocator + Project/ ConfigService, RecentStores, SessionStore, ProjectLocator Search/ SearchServicing + RipgrepSearchService, ProjectScanner (rg, or a Swift walk) Speech/ SpeechServicing + SpeechService (AVSpeechSynthesizer, the system voice), shared by the window Symbols/ SymbolService @@ -65,7 +65,7 @@ Sources/HelderUI/ Explorer/ the file tree column and the row glyphs Editor/ the bar above the code, code/markdown/image panes, Diff overlay, pass-on panel, symbol popup Terminal/ agent + shell panes over SwiftTerm - Overlays/ OverlayHost, search, note and clean copy (sharing OverlayTextEditor), shortcuts, recent files, context menu, name prompt, confirm, OverlayKeys + Overlays/ OverlayHost, search, clean copy (OverlayTextEditor), shortcuts, recent files, context menu, name prompt, confirm, OverlayKeys Theme/ Palette, Typography, Metrics, FontRegistry Resources/Fonts/ IBM Plex Mono 400–700, Plex Sans 400/500/600/700/400i (WOFF2, OFL) Tests/Tests// @@ -102,7 +102,7 @@ How the suites are organised and how to run one: see the Testing section of the - **ripgrep** is not on this machine's `PATH`. `bundle.sh` copies `$RG_BINARY`, else `vendor/ripgrep/rg`, else an `rg` on `PATH` into `Contents/Helpers/rg`, which `ExecutableLocator.standard` checks first. `$RG_BINARY` overrides it at runtime; the tests use it, else `vendor/ripgrep/rg`. Without any rg, search, the file list and the symbol index fall back to a Swift walk (slower, same results). - **Own data.** The recent-projects list (`~/Library/Application Support/Helder/recent-projects.json`, read by ⇧⌘O and the launcher) and the log (`~/Library/Logs/Helder/helder.log`) belong to this app alone. Running it on a scratch folder adds that folder to the list; remove it afterwards. Under `swift run` the UserDefaults domain is `Helder` (sessions, layouts), in the bundle `nl.blijnder.helder`. - **`bundle.sh --install`** refuses to replace a `~/Applications/Helder.app` with a different bundle id without `--force`. -- **⌘N** is the note, so "New Window" is ⇧⌘N. New Window starts a new process on the launcher, and the child never inherits `HELDER_PROJECT` (it would win over the folder argument). ⌘A is select-all in the focused view (in the code pane, the whole file); fluid columns are ⌘L. +- **⌘N** is unbound; "New Window" is ⇧⌘N. New Window starts a new process on the launcher, and the child never inherits `HELDER_PROJECT` (it would win over the folder argument). ⌘A is select-all in the focused view (in the code pane, the whole file); fluid columns are ⌘L. - **Config.** `files.followGitignore` defaults to **false** (the main-process value). There is no CSS layer: code font and size come from config/Typography. - **One file, no Original.** The editor deliberately has no tabs and no Original mode. `git.defaultDiffMode: "original"` in an older config decodes as `"updated"`. - **SwiftTerm** has no line-height or letter-spacing setting, so `terminal.lineHeight`/`letterSpacing` from the config are ignored. diff --git a/docs/behaviour.md b/docs/behaviour.md index 3a80aee..af8ab9e 100644 --- a/docs/behaviour.md +++ b/docs/behaviour.md @@ -34,7 +34,7 @@ The top bar contains, left to right: - The Helder wordmark. - A breadcrumb showing the path to the active file, for example `console / src / Http / Controller / UserController.php`. The breadcrumb is **display only** for now. It is not clickable and does not navigate. - Centred on the window, the **pane toggles**: Git · Explorer · File · Claude, one per column, all on by default (see Pane toggles in section 9). The breadcrumb truncates before it reaches them. -- On the right, the toolbar: **Search** (`Cmd+F`) and **Note** (`Cmd+N`) are actions; **Fluid** (`Cmd+L`) and **Hidden** (`Cmd+.`) are toggles. Then `?` for the keyboard shortcuts. +- On the right, the toolbar: **Search** (`Cmd+F`) is an action; **Fluid** (`Cmd+L`) and **Hidden** (`Cmd+.`) are toggles. Then `?` for the keyboard shortcuts. - While Helder reads aloud, a **Stop** toggle appears left of **Search**, in the same style and switched on. A click switches it off and stops the reading; the button then goes away. It also goes away when the reading reaches the end, and a project switch or window close stops the reading. --- @@ -183,7 +183,7 @@ The top pane of the fourth column. The agent hands the user text to copy through one file, `.clean-copy` in the project root. The agent overwrites the file each time; Helder only reads it and never clears or deletes it. -- When the file's contents change while the project is open, Helder reads it after a short pause (writes are not atomic) and opens the **From Claude** popup, a card like the note. The contents found when the project opens are the baseline and never open the popup. An empty or blank file, or the same text as last seen, opens nothing. +- When the file's contents change while the project is open, Helder reads it after a short pause (writes are not atomic) and opens the **From Claude** popup, a card at the top of the window. The contents found when the project opens are the baseline and never open the popup. An empty or blank file, or the same text as last seen, opens nothing. - The popup holds an editable text area. **Copy** (or `Cmd+Enter`) copies the text, with the user's edits, to the clipboard as plain text, closes the popup and shows the "Copied" toast. `Esc` or a click outside closes it without copying. - With another overlay open, the newest text waits and opens once that overlay closes. New text while the popup is open replaces its text only when the user has not edited it. - The popup opens in the project's own window even when that window is in the background; Helder does not take focus. diff --git a/docs/design/README.md b/docs/design/README.md index bc23249..dee6c01 100644 --- a/docs/design/README.md +++ b/docs/design/README.md @@ -4,7 +4,7 @@ Helder is a desktop code editor built around one job: work on a codebase together with Claude Code. It replaces a general IDE with four columns — source control, explorer, -editor, agent — plus five overlays (search, keyboard shortcuts, project note, project +editor, agent — plus four overlays (search, keyboard shortcuts, project launcher, expanded diff) and a set of small surfaces (context menus, a pass-on-to-agent prompt, tooltips, a markdown preview). @@ -182,7 +182,7 @@ transform:translate(-50%,-50%)` inside the title bar) — Git · Explorer · Fil One per column, all on by default, no shortcut shown. **Toolbar** (right) — Search ⌘F (action) · Auto-fit ⌘A (toggle, on) · Hidden ⌘. -(toggle, off) · Note ⌘N (action). The old Git ⌘G toolbar button is removed; the +(toggle, off). The old Git ⌘G toolbar button is removed; the Git pane toggle replaces it. **Source control column** (300px, `#18202B`, 1px right border) @@ -256,16 +256,6 @@ Body groups (`NAVIGATE`, `AGENT`, `GIT`, `FILE`) each a 10px mono label, then a `92px 1fr` grid: keycap cluster left (gap 4px), description Sans 13px `#E4E7E6` right, 6px vertical padding per row. -### 02c · Project note (⌘N) - -Same shell. Header: `▤` amber, "Note", filename `.notes.txt` Mono 12px `#6C7783`, then -the primary button — amber fill, `#171C22` text, Sans 500 12px, radius 2, padding -6px 10px, with a `⌘P` keycap at Mono 600 11px — then the `esc` chip. -Body: Mono 400 14px/1.7 `#E4E7E6`, max 68ch, 18px between paragraphs, blinking caret at -the end of the text. Footer 34px: "saved on focus loss · 412 characters". - -The note is plain text and it is the agent's input: ⌘P sends the whole note. - ### 02d · Project launcher Window `#101720` with only traffic lights (34px), no title bar. Centred panel on @@ -358,8 +348,6 @@ gets room: | `⌘G` | Show or hide the source-control column (same as the Git pane toggle) | | Pane toggle click | Show or hide that column — see below | | `⌘S` / `⌘W` / `⌘D` | Save / close / delete (confirm) the current file | -| `⌘N` | Open the project note; it saves on focus loss | -| `⌘P` (note open) | Send the whole note to the agent | | right-click a row | Context menu, anchored to the pointer, first item pre-highlighted | | `esc` | Close the top overlay, menu or prompt; never more than one | @@ -393,10 +381,9 @@ Rules that hold everywhere: - `tree` — expanded paths, selected path, `showHidden` - `git` — staged[], unstaged[], commit message draft, ahead/behind counts - `agent` — model, session, transcript, prompt draft, pending tool calls, auth notices -- `overlay` — `null | search | shortcuts | note | diff | launcher | menu | passOn` +- `overlay` — `null | search | shortcuts | diff | launcher | menu | passOn` - `panels` — column widths, `autoFit`, and `visible: { git, explorer, file, claude }` (all `true` by default, persisted per project) -- `note` — text, dirty flag (write on blur) Search runs per keystroke against three indexes (open file, project contents, file names) and reports counts per column; a query with no hits leaves the columns in their diff --git a/docs/guide/claude-code.md b/docs/guide/claude-code.md index 46ab0c5..11da433 100644 --- a/docs/guide/claude-code.md +++ b/docs/guide/claude-code.md @@ -39,7 +39,7 @@ The Claude Code pane is the top half of the right-hand column. It is a live term - The pane takes the keyboard when it starts, so you can type to Claude at once. ### Passed references arrive unsubmitted -- [Pass on to Agent](pass-on-to-agent.md) and the [note](notes.md) send text into Claude's composer. +- [Pass on to Agent](pass-on-to-agent.md) sends text into Claude's composer. - The text arrives as a paste. It is never submitted. You press `Enter` when you are ready. - Each new pass starts on a fresh line when the composer already holds text. So you can stack several references, then send them as one message. - After a pass, the keyboard moves to the Claude pane and a short [notification](notifications.md) confirms it ("Passed to agent"). @@ -110,7 +110,6 @@ All settings live in `.helder/config.json`. See [Configuration](configuration.md - [Command line](command-line.md): the shell pane below, with the same look and copy behaviour. - [Pass on to Agent](pass-on-to-agent.md): send code references into Claude's composer. -- [Notes](notes.md): send the project note to Claude with `Cmd+P`. - [Clean copy](clean-copy.md): copy text that Claude writes to `.clean-copy`. - [Right-click menu](right-click-menu.md): Copy and Paste in the terminal. - [Layout](layout.md): the splitter, the Claude toggle and column widths. diff --git a/docs/guide/clean-copy.md b/docs/guide/clean-copy.md index 1c402c9..b095da9 100644 --- a/docs/guide/clean-copy.md +++ b/docs/guide/clean-copy.md @@ -2,7 +2,7 @@ Clean copy lets Claude hand you text to copy: a command, a commit message, a draft. Claude writes it to a file, and Helder shows it in a card at the top of the window, ready to edit and copy. You never have to select text out of the terminal. -[Guide index](index.md) · Related: [Claude Code](claude-code.md), [Notes](notes.md), [Notifications](notifications.md) +[Guide index](index.md) · Related: [Claude Code](claude-code.md), [Notifications](notifications.md) ## At a glance @@ -42,7 +42,7 @@ Clean copy lets Claude hand you text to copy: a command, a commit message, a dra - The card opens in the window of that project, even when the window is in the background. Helder does not come to the front. ### While something else is open -- When another card or dialog is open, such as the [note](notes.md) or [search](search.md), the text waits. The card opens once you close the other one. +- When another card or dialog is open, such as [search](search.md) or a [dialog](dialogs.md), the text waits. The card opens once you close the other one. - If Claude writes several times while you wait, only the newest text shows. - When the clean-copy card is already open and new text arrives, the card shows the new text, unless you already edited the text. Then your edits stay and the new text is dropped. @@ -62,6 +62,5 @@ Clean copy lets Claude hand you text to copy: a command, a commit message, a dra ## Related - [Claude Code](claude-code.md): the agent that writes `.clean-copy`. -- [Notes](notes.md): the card the clean-copy card looks like. - [Notifications](notifications.md): the "Copied" confirmation. - [Keyboard shortcuts](keyboard-shortcuts.md): every key in one list. diff --git a/docs/guide/configuration.md b/docs/guide/configuration.md index 8c831b4..778b3d5 100644 --- a/docs/guide/configuration.md +++ b/docs/guide/configuration.md @@ -13,8 +13,7 @@ my-project/ | +-- config.default.json (3) every setting with its default | +-- .gitignore (4) keeps the folder out of git | +-- recent.json (5) recently opened files -+-- .notes.txt (6) the project note -+-- .env (7) APP_NAME sets the project title ++-- .env (6) APP_NAME sets the project title ``` 1. **`.helder` folder**: Helder creates it when you open the project. @@ -22,8 +21,7 @@ my-project/ 3. **`config.default.json`**: the full list of settings and their defaults. Helder rewrites it each time the project opens. 4. **`.gitignore`**: ignores the whole `.helder` folder, because its content is local to your machine. 5. **`recent.json`**: the list behind the recent files navigator. See [Go to file](go-to-file.md). -6. **`.notes.txt`**: the project note. See [Notes](notes.md). -7. **`.env`**: Helder reads only `APP_NAME` from it, for the project title. +6. **`.env`**: Helder reads only `APP_NAME` from it, for the project title. ## Features diff --git a/docs/guide/file-view.md b/docs/guide/file-view.md index 30c8101..54ae3cf 100644 --- a/docs/guide/file-view.md +++ b/docs/guide/file-view.md @@ -94,14 +94,13 @@ The file view is the third column (Col C), between the [Explorer](explorer.md) a - With no file open, `Cmd+W` closes the window. ### Empty state -With no file open, the bar is empty and the pane shows "No file open" with four shortcuts: +With no file open, the bar is empty and the pane shows "No file open" with three shortcuts: | Shortcut | Action | |---|---| | `Cmd+O` | Open folder | | `Cmd+Shift+O` | [Recent projects](recent-projects.md) | | `Cmd+F` | [Search files & content](search.md) | -| `Cmd+N` | Project [note](notes.md) | ### Files that are not plain text - **Images** (png, jpg, gif, webp, svg, bmp, ico, avif and more) show as a picture, centred, on a checkerboard so transparent parts stay visible. They are read-only. An image that cannot be read shows "Can't preview this image". diff --git a/docs/guide/git-commit-form.md b/docs/guide/git-commit-form.md index 4a0a273..874c4d9 100644 --- a/docs/guide/git-commit-form.md +++ b/docs/guide/git-commit-form.md @@ -87,7 +87,7 @@ Pull, fetch and branch switching are not part of Helder. Use the [Command line]( | `Shift+Enter` | Commit, while in the message field | | `Cmd+Enter` | Commit, from anywhere in the window | | `Ctrl+Enter` | Commit, while in the message field | -| `Cmd+P` | Push the current branch (while the [note](notes.md) is open, `Cmd+P` passes the note on instead) | +| `Cmd+P` | Push the current branch | ## Related diff --git a/docs/guide/index.md b/docs/guide/index.md index bbce4ee..252ae41 100644 --- a/docs/guide/index.md +++ b/docs/guide/index.md @@ -65,7 +65,6 @@ This guide explains Helder from the user's side: what each part of the window sh - [Search](search.md): search file contents and names at once. - [Go to file](go-to-file.md): the Recent files list, to jump back to a file you had open. -- [Notes](notes.md): the project's scratch note. ### Menus, dialogs and keys diff --git a/docs/guide/keyboard-shortcuts.md b/docs/guide/keyboard-shortcuts.md index d3598ce..3b10acd 100644 --- a/docs/guide/keyboard-shortcuts.md +++ b/docs/guide/keyboard-shortcuts.md @@ -39,7 +39,7 @@ Helder is built to run from the keyboard. Press `?` to see a short list of the m - It scrolls only when the window is too short to show all of it. - It holds the main shortcuts, in four groups: - **Navigate**: search, list movement, column movement, recent projects, open folder, new window, PHP class lookup, and this list. - - **Agent**: pass the selection to the agent, the project note, pass on the whole note. + - **Agent**: pass the selection to the agent. - **Git**: focus the commit message, commit, Git column on or off, push. - **File**: save, Markdown preview, close, refresh, hidden files, select all, Fluid columns, zoom, and `Esc`. - The full reference is below. @@ -164,15 +164,6 @@ See [Search](search.md). | `Return` | Open the selected result | | `Esc` | Close search | -### Notes -See [Notes](notes.md). - -| Keys | Action | -|---|---| -| `Cmd+N` | Open the project note | -| `Cmd+P` | Pass the whole note to the agent (while the note is open) | -| `Esc` | Close the note (it saves) | - ### Clean copy See [Clean copy](clean-copy.md). diff --git a/docs/guide/layout.md b/docs/guide/layout.md index c5134b6..ef37d78 100644 --- a/docs/guide/layout.md +++ b/docs/guide/layout.md @@ -122,7 +122,7 @@ A Helder window holds one project. It has a title bar on top, four columns in th ### Closing and quitting - `Cmd+W` closes the open file. With no file open, it closes the window. - `Shift+Cmd+W` closes the window. -- Before a window closes, or the app quits with `Cmd+Q`, Helder asks about every file with unsaved edits. It saves the project note and the session too. Cancel keeps the window open. +- Before a window closes, or the app quits with `Cmd+Q`, Helder asks about every file with unsaved edits. It saves the session too. Cancel keeps the window open. ### What Helder remembers Per project, always: diff --git a/docs/guide/notes.md b/docs/guide/notes.md deleted file mode 100644 index a9ee8ed..0000000 --- a/docs/guide/notes.md +++ /dev/null @@ -1,72 +0,0 @@ -# Notes - -The note is one plain-text scratch pad per project. It opens as a card at the top of the window with `Cmd+N`. - -[Guide index](index.md) · Related: [Claude Code](claude-code.md), [Pass on to Agent](pass-on-to-agent.md), [Title bar](title-bar.md) - -## At a glance - -```text -+----------------------------------------------------------------+ -| (1) Note .notes.txt (2) [ To the agent Cmd+P ] | -+----------------------------------------------------------------+ -| (3) | -| - check the refund flow after the merge | -| - ask Claude to add tests for Handler::handle_ | -| | -+----------------------------------------------------------------+ -| (4) saved on focus loss . 92 characters | -+----------------------------------------------------------------+ -``` - -1. **Header**: the title and the file name, `.notes.txt`. -2. **To the agent**: sends the whole note to Claude. -3. **Text area**: plain text in a monospaced font, with an amber caret. -4. **Footer**: when the note saves, and how many characters it holds. - -## Features - -### What a note is -- One note per project. Use it for to-dos, questions for Claude, or anything you want to keep next to the code. -- It is plain text. There is no formatting and no Markdown preview. -- An empty note shows the hint "Anything you want to keep next to this project…". - -### Where it is stored -- The note is the file `.notes.txt` in the root of the project. -- You can open and edit that file in any other editor too. When it changes outside Helder, the note picks up the change, unless you have unsaved typing in it. -- Like any file, `.notes.txt` shows up in [Git](git.md) unless you ignore it. - -### Opening -- Press `Cmd+N`, or click **Note** in the [title bar](title-bar.md). -- The caret starts at the end of the text, so you can add a line at once. - -### Saving -There is no save key. The note saves itself when: -- you close it (`Esc` or a click outside the card), -- the window loses focus, -- the window closes. - -It only writes when the text changed. If a save fails, a [notification](notifications.md) says "Save failed". - -### Passing the note to the agent -- Press `Cmd+P` or click **To the agent**. -- The whole note, trimmed, goes into Claude's composer. It is not submitted; press `Enter` in Claude to send it. -- The note closes, so you see the text land, and a notification says "Note passed to agent". -- An empty note sends nothing. -- In the note, `Cmd+P` passes the note. It does not push, as it does elsewhere. - -## Keyboard - -| Keys | Action | -|---|---| -| `Cmd+N` | Open the note | -| `Cmd+P` | Pass the note to Claude and close it | -| `Esc` | Close and save | - -## Related - -- [Claude Code](claude-code.md): where the passed note arrives. -- [Pass on to Agent](pass-on-to-agent.md): send code references instead of the note. -- [Title bar](title-bar.md): the Note button. -- [Notifications](notifications.md): the confirmation and the save-failed message. -- [Keyboard shortcuts](keyboard-shortcuts.md): every key in one list. diff --git a/docs/guide/notifications.md b/docs/guide/notifications.md index b1b427e..8faaf59 100644 --- a/docs/guide/notifications.md +++ b/docs/guide/notifications.md @@ -42,7 +42,7 @@ Helder confirms what it just did with a toast: a small card that appears near th ### Where it appears - Centred at the bottom of the window, 44 points above the bottom edge, just over the status bar. - Several toasts stack on top of each other. -- Toasts may sit on top of an open overlay, such as search or the note. +- Toasts may sit on top of an open overlay, such as search or clean copy. ### How it goes away - Each toast disappears by itself after about 2.3 seconds. @@ -76,13 +76,11 @@ Git: | Discard failed | path | Discard did not work | | Stage failed / Unstage failed | path or git's error | Staging or unstaging did not work | -The agent and the note: +The agent: | Title | Detail | When | |---|---|---| | Passed to agent | the reference | Text was inserted into the Claude pane | -| Note passed to agent | `.notes.txt` | You passed the whole note with `Cmd+P` | -| Save failed | `.notes.txt` | The project note could not be saved | | Copied | character count | You copied the text of the [clean-copy](clean-copy.md) card | ### Other short messages @@ -95,5 +93,4 @@ Two other messages appear for a moment, but they are not toasts: - [Git](git.md): commit, push, stage and discard, which report through toasts. - [Explorer](explorer.md) and [Right-click menu](right-click-menu.md): the file actions behind most file toasts. - [Pass on to agent](pass-on-to-agent.md): the "Passed to agent" toast. -- [Notes](notes.md): passing and saving the note. - [Dialogs](dialogs.md): prompts that do ask you something, unlike toasts. diff --git a/docs/guide/pass-on-to-agent.md b/docs/guide/pass-on-to-agent.md index eaa3c6c..b56cc4a 100644 --- a/docs/guide/pass-on-to-agent.md +++ b/docs/guide/pass-on-to-agent.md @@ -79,7 +79,6 @@ Pass on to Agent sends a pointer to your code to the [Claude Code](claude-code.m ### Other things you can pass on - Files, folders and Git rows have their own pass-on items in their [right-click menu](right-click-menu.md), such as **Pass on file name**. -- The project [note](notes.md) can be passed on as a whole. ## Keyboard diff --git a/docs/guide/title-bar.md b/docs/guide/title-bar.md index 8dc9316..bfb64b3 100644 --- a/docs/guide/title-bar.md +++ b/docs/guide/title-bar.md @@ -2,7 +2,7 @@ The title bar is the 44-point strip across the top of a project window. It tells you which project, branch and file you are on, and holds the column toggles and the main tools. -[Guide index](index.md) · Related: [Window layout](layout.md), [Search](search.md), [Notes](notes.md), [Keyboard shortcuts](keyboard-shortcuts.md) +[Guide index](index.md) · Related: [Window layout](layout.md), [Search](search.md), [Keyboard shortcuts](keyboard-shortcuts.md) ## At a glance @@ -11,8 +11,8 @@ The title bar is the 44-point strip across the top of a project window. It tells | o o o Helder. shop . main app > Http > User.php * | | (1) (2) (3) (4) (5) (6) | | | -| [.Git|.Explorer|.File|.Claude] [Search |.Fluid |.Hidden |Note] [?] | -| (7) (8) (9) (9) (8) (10) | +| [.Git|.Explorer|.File|.Claude] [Search |.Fluid |.Hidden] [?] | +| (7) (8) (9) (9) (10) | +----------------------------------------------------------------------------+ ``` @@ -21,7 +21,7 @@ The bar is one row in the app. It is drawn on two rows here to fit the page. While Helder reads aloud, a **Stop** button leads the toolbar: ```text -| [.Stop |Search |.Fluid |.Hidden |Note] [?] | +| [.Stop |Search |.Fluid |.Hidden] [?] | ``` 1. **Window buttons**: the macOS close, minimize and zoom buttons. @@ -31,7 +31,7 @@ While Helder reads aloud, a **Stop** button leads the toolbar: 5. **Breadcrumb**: the path of the open file, folder by folder. 6. **Unsaved dot**: an amber dot when the open file has unsaved edits. 7. **Pane toggles**: one button per column. -8. **Search** and **Note**: buttons that open an overlay. +8. **Search**: a button that opens an overlay. 9. **Fluid** and **Hidden**: on/off toggles. 10. **`?`**: opens the keyboard shortcuts. @@ -65,10 +65,9 @@ The toolbar sits on the right. Each button shows its shortcut next to its label. - **Search** (`Cmd+F`): opens search over the open file, the project contents and the file names. See [Search](search.md). - **Fluid** (`Cmd+L`): when on, the columns re-fit on resize and when focus moves. When off, they keep their size. See [Window layout](layout.md). - **Hidden** (`Cmd+.`): when on, dotfiles appear in the Explorer and in search. -- **Note** (`Cmd+N`): opens the project note. See [Notes](notes.md). - **`?`**: opens the keyboard shortcuts list. See [Keyboard shortcuts](keyboard-shortcuts.md). -Fluid and Hidden carry a state dot like the pane toggles. Search and Note have no dot, because they are actions. Hover any button for a tooltip that explains its current state. +Fluid and Hidden carry a state dot like the pane toggles. Search has no dot, because it is an action. Hover any button for a tooltip that explains its current state. ### Read aloud - **Stop** shows only while Helder reads a file or a selection aloud. Start the reading from the [right-click menu](right-click-menu.md): **Read aloud** on a Markdown file, **Read aloud selection** in the code. @@ -86,7 +85,6 @@ Drag an empty part of the title bar to move the window, as in any macOS app. | `Cmd+F` | Search | | `Cmd+L` | Fluid column widths on or off | | `Cmd+.` | Hidden files on or off | -| `Cmd+N` | Project note | | `Cmd+G` | Git column on or off | | `?` | Keyboard shortcuts (when no text field has focus) | | `Cmd+O` | Open a folder (same as clicking the project name) | @@ -95,7 +93,6 @@ Drag an empty part of the title bar to move the window, as in any macOS app. - [Window layout](layout.md): what the pane toggles, Fluid and Hidden do to the columns. - [Search](search.md): the overlay the Search button opens. -- [Notes](notes.md): the overlay the Note button opens. - [Keyboard shortcuts](keyboard-shortcuts.md): the overlay the `?` button opens. - [Recent projects](recent-projects.md): opening another folder. - [Status bar](status-bar.md): the matching bar at the bottom of the window. diff --git a/docs/plak.md b/docs/plak.md index 5ee7c63..0e0e586 100644 --- a/docs/plak.md +++ b/docs/plak.md @@ -60,4 +60,4 @@ subprocess.run(["open", "plak://append?text=" + urllib.parse.quote(text, safe="" - URL building and the 100 KB choice: `Plak` in `Sources/HelderCore/Files/Plak.swift`. The limit counts UTF-8 bytes. - Opening the URL and the clipboard save and restore: `SystemActing.sendToPlak` in `Sources/HelderUI/Shell/SystemActions.swift`. -Later, Plak will replace Helder's own notes (`.notes.txt`, `Cmd+N`; see [Notes](guide/notes.md)). +Plak replaces Helder's old project note (`.notes.txt`, `Cmd+N`), which is gone.