toggling between views made possible
This commit is contained in:
@@ -34,6 +34,8 @@ public enum ContextAction: Sendable, Equatable {
|
|||||||
case newFolder(inDirectory: String)
|
case newFolder(inDirectory: String)
|
||||||
/// Opens a file from the Git view, which closes first.
|
/// Opens a file from the Git view, which closes first.
|
||||||
case openFile(String)
|
case openFile(String)
|
||||||
|
/// Opens a file from the Git view on its Diff, which closes first.
|
||||||
|
case openDiff(String)
|
||||||
/// Reverts unstaged changes: modified and deleted files come back from the index, new files are removed.
|
/// Reverts unstaged changes: modified and deleted files come back from the index, new files are removed.
|
||||||
case gitDiscard([String])
|
case gitDiscard([String])
|
||||||
/// The Git view's Clean up: every unstaged change reverted to the index, every untracked file and folder removed.
|
/// The Git view's Clean up: every unstaged change reverted to the index, every untracked file and folder removed.
|
||||||
@@ -153,7 +155,11 @@ public enum ContextActions {
|
|||||||
let paste: [ContextMenuEntry] = kind == .tail ? [] : [.action(.pasteIntoTerminal(kind), label: "Paste")]
|
let paste: [ContextMenuEntry] = kind == .tail ? [] : [.action(.pasteIntoTerminal(kind), label: "Paste")]
|
||||||
return (hasSelection ? [.action(.copyTerminalSelection(kind), label: "Copy")] : []) + paste + readAloud + waitWhat
|
return (hasSelection ? [.action(.copyTerminalSelection(kind), label: "Copy")] : []) + paste + readAloud + waitWhat
|
||||||
case let .gitRow(path, isDeleted):
|
case let .gitRow(path, isDeleted):
|
||||||
let open: [ContextMenuEntry] = isDeleted ? [] : [.action(.openFile(path), label: "Open in editor"), .separator]
|
let open: [ContextMenuEntry] = isDeleted ? [] : [
|
||||||
|
.action(.openFile(path), label: "Open in editor"),
|
||||||
|
.action(.openDiff(path), label: "Open diff"),
|
||||||
|
.separator,
|
||||||
|
]
|
||||||
return open + [
|
return open + [
|
||||||
.action(.passOnReference(path, code: nil), label: "Pass on reference"),
|
.action(.passOnReference(path, code: nil), label: "Pass on reference"),
|
||||||
.action(.copyReference(path), label: "Copy reference"),
|
.action(.copyReference(path), label: "Copy reference"),
|
||||||
|
|||||||
@@ -118,7 +118,7 @@ struct ContextMenuOverlay: View {
|
|||||||
.plak, .plakTerminalSelection, .openFile, .mergeBranch, .tailLog: .plain
|
.plak, .plakTerminalSelection, .openFile, .mergeBranch, .tailLog: .plain
|
||||||
case .newFile, .newFolder: .add
|
case .newFile, .newFolder: .add
|
||||||
case .copyFileName, .revealInFinder: .modify
|
case .copyFileName, .revealInFinder: .modify
|
||||||
case .passOnReference, .passOnFileName, .bouwen, .waitWhat, .showDiff, .rename: .rename
|
case .passOnReference, .passOnFileName, .bouwen, .waitWhat, .showDiff, .openDiff, .rename: .rename
|
||||||
case .gitDiscard, .gitCleanUp, .delete: .danger
|
case .gitDiscard, .gitCleanUp, .delete: .danger
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -135,7 +135,7 @@ struct ContextMenuOverlay: View {
|
|||||||
case .pasteIntoTerminal: "doc.on.clipboard"
|
case .pasteIntoTerminal: "doc.on.clipboard"
|
||||||
case .newFile: "doc.badge.plus"
|
case .newFile: "doc.badge.plus"
|
||||||
case .newFolder: "folder.badge.plus"
|
case .newFolder: "folder.badge.plus"
|
||||||
case .showDiff: "arrow.left.arrow.right"
|
case .showDiff, .openDiff: "arrow.left.arrow.right"
|
||||||
case .gitDiscard: "arrow.uturn.backward"
|
case .gitDiscard: "arrow.uturn.backward"
|
||||||
case .gitCleanUp: "eraser"
|
case .gitCleanUp: "eraser"
|
||||||
case .rename: "pencil"
|
case .rename: "pencil"
|
||||||
|
|||||||
@@ -99,6 +99,8 @@ public enum OverlayKind: Equatable, Sendable {
|
|||||||
/// The full-screen Diff: the workspace shortcuts keep working over it. `busy` while its own
|
/// 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.
|
/// menu or pass-on prompt is open; those then own every key.
|
||||||
case diff(busy: Bool)
|
case diff(busy: Bool)
|
||||||
|
/// The search: it owns every key but Esc, ⌘G and ⌘D, so it can switch to the Git or Schema view.
|
||||||
|
case search
|
||||||
/// Any other overlay: it owns every key but Esc.
|
/// Any other overlay: it owns every key but Esc.
|
||||||
case other
|
case other
|
||||||
|
|
||||||
@@ -106,6 +108,7 @@ public enum OverlayKind: Equatable, Sendable {
|
|||||||
switch overlay {
|
switch overlay {
|
||||||
case .none: self = .none
|
case .none: self = .none
|
||||||
case .diff: self = .diff(busy: diffBusy)
|
case .diff: self = .diff(busy: diffBusy)
|
||||||
|
case .search: self = .search
|
||||||
default: self = .other
|
default: self = .other
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -141,6 +144,7 @@ public enum KeyRouter {
|
|||||||
case .none: break
|
case .none: break
|
||||||
case .diff:
|
case .diff:
|
||||||
if press == .cmd(.character("a")) { return .pass }
|
if press == .cmd(.character("a")) { return .pass }
|
||||||
|
case .search: return searchKey(press, context)
|
||||||
case .other: return .pass
|
case .other: return .pass
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -163,6 +167,15 @@ public enum KeyRouter {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static func searchKey(_ press: KeyPress, _ context: KeyContext) -> KeyRoute {
|
||||||
|
guard press.command, !press.shift else { return .pass }
|
||||||
|
switch press.key {
|
||||||
|
case .character("g"): return .perform(.toggleGit)
|
||||||
|
case .character("d"): return context.schemaAvailable ? .perform(.toggleSchemaView) : .pass
|
||||||
|
default: return .pass
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private static func schemaEscape(_ context: KeyContext) -> KeyRoute {
|
private static func schemaEscape(_ context: KeyContext) -> KeyRoute {
|
||||||
if context.schemaHasSelection { return .perform(.clearSchemaSelection) }
|
if context.schemaHasSelection { return .perform(.clearSchemaSelection) }
|
||||||
if context.schemaSearchHasText { return .perform(.clearSchemaSearch) }
|
if context.schemaSearchHasText { return .perform(.clearSchemaSearch) }
|
||||||
|
|||||||
@@ -71,6 +71,18 @@ extension WorkspaceModel {
|
|||||||
|
|
||||||
// MARK: Git view
|
// MARK: Git view
|
||||||
|
|
||||||
|
/// ⌘G or ⌘D: toggles the view, but over the search or the Diff it switches to it.
|
||||||
|
/// Both full-screen views sit under `OverlayHost`, so a toggle beneath them would stay hidden.
|
||||||
|
func toggleView(isOpen: Bool, open: () -> Void, close: () -> Void) {
|
||||||
|
switch overlay.current {
|
||||||
|
case .search, .diff:
|
||||||
|
overlay.dismiss()
|
||||||
|
open()
|
||||||
|
default:
|
||||||
|
isOpen ? close() : open()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// Opens the Git view on its message field, re-reads git and fetches origin; an open view only takes the field again.
|
/// Opens the Git view on its message field, re-reads git and fetches origin; an open view only takes the field again.
|
||||||
func openGitView() {
|
func openGitView() {
|
||||||
if !layout.isGitViewOpen {
|
if !layout.isGitViewOpen {
|
||||||
|
|||||||
@@ -81,6 +81,9 @@ extension WorkspaceModel {
|
|||||||
case let .openFile(path):
|
case let .openFile(path):
|
||||||
closeGitView()
|
closeGitView()
|
||||||
open(path)
|
open(path)
|
||||||
|
case let .openDiff(path):
|
||||||
|
closeGitView()
|
||||||
|
open(path, OpenOptions(showDiff: true))
|
||||||
case let .mergeBranch(name):
|
case let .mergeBranch(name):
|
||||||
guard let sourceControl else { return }
|
guard let sourceControl else { return }
|
||||||
track {
|
track {
|
||||||
|
|||||||
@@ -149,9 +149,9 @@ public final class WorkspaceModel {
|
|||||||
case let .launcherSelect(index): launcher.select(index)
|
case let .launcherSelect(index): launcher.select(index)
|
||||||
case .launcherActivate: activateLauncher()
|
case .launcherActivate: activateLauncher()
|
||||||
|
|
||||||
case .toggleGit: layout.isGitViewOpen ? closeGitView() : openGitView()
|
case .toggleGit: toggleView(isOpen: layout.isGitViewOpen, open: openGitView, close: closeGitView)
|
||||||
case .closeGitView: closeGitView()
|
case .closeGitView: closeGitView()
|
||||||
case .toggleSchemaView: layout.isSchemaViewOpen ? closeSchemaView() : openSchemaView()
|
case .toggleSchemaView: toggleView(isOpen: layout.isSchemaViewOpen, open: openSchemaView, close: closeSchemaView)
|
||||||
case .closeSchemaView: closeSchemaView()
|
case .closeSchemaView: closeSchemaView()
|
||||||
case let .togglePane(panel): layout.togglePane(panel)
|
case let .togglePane(panel): layout.togglePane(panel)
|
||||||
case .toggleAutoFit: layout.toggleFluid()
|
case .toggleAutoFit: layout.toggleFluid()
|
||||||
|
|||||||
@@ -137,6 +137,7 @@ import Testing
|
|||||||
@Test func aGitRowOpensInTheEditorThenPassesOnItsPath() {
|
@Test func aGitRowOpensInTheEditorThenPassesOnItsPath() {
|
||||||
#expect(ContextActions.entries(for: .gitRow(path: "src/a.php", isDeleted: false)) == [
|
#expect(ContextActions.entries(for: .gitRow(path: "src/a.php", isDeleted: false)) == [
|
||||||
.action(.openFile("src/a.php"), label: "Open in editor"),
|
.action(.openFile("src/a.php"), label: "Open in editor"),
|
||||||
|
.action(.openDiff("src/a.php"), label: "Open diff"),
|
||||||
.separator,
|
.separator,
|
||||||
.action(.passOnReference("src/a.php", code: nil), label: "Pass on reference"),
|
.action(.passOnReference("src/a.php", code: nil), label: "Pass on reference"),
|
||||||
.action(.copyReference("src/a.php"), label: "Copy reference"),
|
.action(.copyReference("src/a.php"), label: "Copy reference"),
|
||||||
@@ -146,6 +147,8 @@ import Testing
|
|||||||
.action(.copyReference("gone.php"), label: "Copy reference"),
|
.action(.copyReference("gone.php"), label: "Copy reference"),
|
||||||
])
|
])
|
||||||
#expect(ContextAction.openFile("src/a.php").isEmphasized)
|
#expect(ContextAction.openFile("src/a.php").isEmphasized)
|
||||||
|
#expect(!ContextAction.openDiff("src/a.php").isEmphasized)
|
||||||
|
#expect(!ContextAction.openDiff("src/a.php").isDestructive)
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test func aSelectionCanBeReadAloudAfterCopyReference() {
|
@Test func aSelectionCanBeReadAloudAfterCopyReference() {
|
||||||
|
|||||||
@@ -166,6 +166,21 @@ import Testing
|
|||||||
#expect(route(KeyPress(.escape), context) == .perform(.dismissOverlay))
|
#expect(route(KeyPress(.escape), context) == .perform(.dismissOverlay))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test func theSearchSwitchesToTheGitAndSchemaViewsAndOwnsEveryOtherKey() {
|
||||||
|
let search = KeyContext(overlay: .search, owner: .text(in: nil), schemaAvailable: true)
|
||||||
|
#expect(OverlayKind(.search(seed: "x")) == .search)
|
||||||
|
#expect(route(cmd("g"), search) == .perform(.toggleGit))
|
||||||
|
#expect(route(cmd("d"), search) == .perform(.toggleSchemaView))
|
||||||
|
#expect(route(cmd("d"), KeyContext(overlay: .search, owner: .text(in: nil))) == .pass)
|
||||||
|
#expect(route(cmd("f"), search) == .pass)
|
||||||
|
#expect(route(cmd("s"), search) == .pass)
|
||||||
|
#expect(route(cmd("g", shift: true), search) == .pass)
|
||||||
|
#expect(route(KeyPress(.character("g")), search) == .pass)
|
||||||
|
#expect(route(KeyPress(.down), search) == .pass)
|
||||||
|
#expect(route(KeyPress(.enter), search) == .pass)
|
||||||
|
#expect(route(KeyPress(.escape), search) == .perform(.dismissOverlay))
|
||||||
|
}
|
||||||
|
|
||||||
@Test func theWorkspaceShortcutsKeepWorkingOverTheDiff() {
|
@Test func theWorkspaceShortcutsKeepWorkingOverTheDiff() {
|
||||||
let diff = KeyContext(overlay: .diff(busy: false), activePanel: .editor)
|
let diff = KeyContext(overlay: .diff(busy: false), activePanel: .editor)
|
||||||
#expect(route(cmd("m"), diff) == .perform(.cycleMode))
|
#expect(route(cmd("m"), diff) == .perform(.cycleMode))
|
||||||
|
|||||||
@@ -448,6 +448,18 @@ import Testing
|
|||||||
#expect(harness.model.editor?.activePath == "a.php")
|
#expect(harness.model.editor?.activePath == "a.php")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test func openDiffFromTheRowMenuClosesTheGitViewOnTheDiff() async {
|
||||||
|
let harness = WorkspaceHarness(git: snapshot([("a.php", .modified, false)]), contents: ["a.php": "<?php"])
|
||||||
|
await harness.start()
|
||||||
|
harness.model.perform(.toggleGit)
|
||||||
|
await harness.model.settle()
|
||||||
|
harness.model.perform(.showContextMenu(.gitRow(path: "a.php", isDeleted: false), anchor: CGPoint(x: 10, y: 20)))
|
||||||
|
await harness.perform(.context(.openDiff("a.php")))
|
||||||
|
#expect(!harness.model.layout.isGitViewOpen)
|
||||||
|
#expect(harness.model.editor?.activePath == "a.php")
|
||||||
|
#expect(harness.model.overlay.current == .diff(DiffOverlayRequest(path: "a.php", side: nil)))
|
||||||
|
}
|
||||||
|
|
||||||
@Test func thePassOnPromptInsertsIntoTheAgent() async {
|
@Test func thePassOnPromptInsertsIntoTheAgent() async {
|
||||||
let harness = WorkspaceHarness()
|
let harness = WorkspaceHarness()
|
||||||
await harness.start()
|
await harness.start()
|
||||||
@@ -686,6 +698,59 @@ import Testing
|
|||||||
#expect(harness.model.overlay.current == .diff(DiffOverlayRequest(path: "a.php", side: nil, focusLine: 3)))
|
#expect(harness.model.overlay.current == .diff(DiffOverlayRequest(path: "a.php", side: nil, focusLine: 3)))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test func commandGOverTheSearchSwitchesToTheGitView() async {
|
||||||
|
let harness = WorkspaceHarness()
|
||||||
|
await harness.start()
|
||||||
|
harness.model.perform(.showSearch(seed: "x"))
|
||||||
|
await harness.perform(.toggleGit)
|
||||||
|
#expect(harness.model.overlay.current == .none)
|
||||||
|
#expect(harness.model.layout.isGitViewOpen)
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test func commandGOverASearchAboveTheGitViewKeepsTheGitViewOpen() async {
|
||||||
|
let harness = WorkspaceHarness()
|
||||||
|
await harness.start()
|
||||||
|
await harness.perform(.toggleGit)
|
||||||
|
harness.model.perform(.showSearch(seed: "x"))
|
||||||
|
await harness.perform(.toggleGit)
|
||||||
|
#expect(harness.model.overlay.current == .none)
|
||||||
|
#expect(harness.model.layout.isGitViewOpen)
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test func commandGOverTheDiffClosesItAndOpensTheGitView() async {
|
||||||
|
let harness = WorkspaceHarness(git: snapshot([("a.php", .modified, false)]), contents: ["a.php": "b"])
|
||||||
|
await harness.start()
|
||||||
|
let editor = harness.model.editor
|
||||||
|
harness.model.open("a.php")
|
||||||
|
editor?.setMode(.diff, for: "a.php")
|
||||||
|
#expect(harness.model.overlay.current == .diff(DiffOverlayRequest(path: "a.php", side: nil)))
|
||||||
|
await harness.perform(.toggleGit)
|
||||||
|
#expect(harness.model.overlay.current == .none)
|
||||||
|
#expect(editor?.mode(for: "a.php") != .diff)
|
||||||
|
#expect(harness.model.layout.isGitViewOpen)
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test func commandDOverTheSearchSwitchesFromTheGitViewToTheSchemaView() async {
|
||||||
|
let harness = WorkspaceHarness()
|
||||||
|
await harness.start()
|
||||||
|
await harness.perform(.toggleGit)
|
||||||
|
harness.model.perform(.showSearch(seed: "x"))
|
||||||
|
await harness.perform(.toggleSchemaView)
|
||||||
|
#expect(harness.model.overlay.current == .none)
|
||||||
|
#expect(harness.model.layout.isSchemaViewOpen)
|
||||||
|
#expect(!harness.model.layout.isGitViewOpen)
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test func commandDOverASearchAboveTheSchemaViewKeepsTheSchemaViewOpen() async {
|
||||||
|
let harness = WorkspaceHarness()
|
||||||
|
await harness.start()
|
||||||
|
await harness.perform(.toggleSchemaView)
|
||||||
|
harness.model.perform(.showSearch(seed: "x"))
|
||||||
|
await harness.perform(.toggleSchemaView)
|
||||||
|
#expect(harness.model.overlay.current == .none)
|
||||||
|
#expect(harness.model.layout.isSchemaViewOpen)
|
||||||
|
}
|
||||||
|
|
||||||
@Test func theRecentProjectListLeavesOutTheOpenProject() async {
|
@Test func theRecentProjectListLeavesOutTheOpenProject() async {
|
||||||
let harness = WorkspaceHarness(recents: [RecentProject(path: "/elsewhere", name: "elsewhere")])
|
let harness = WorkspaceHarness(recents: [RecentProject(path: "/elsewhere", name: "elsewhere")])
|
||||||
await harness.start()
|
await harness.start()
|
||||||
|
|||||||
@@ -20,13 +20,13 @@ Helder (executable) → HelderUI → HelderServices → HelderCore
|
|||||||
|
|
||||||
- `WorkspaceModel` owns one window (`WorkspaceModel.swift`: state and `perform`; `+Commands`, `+ContextActions`, `+Lifecycle`, `+Refresh` hold the rest): the stores (`SourceControlStore`, `ExplorerStore`, `EditorStore`, `CleanCopyStore`, `SchemaStore`, `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.
|
- `WorkspaceModel` owns one window (`WorkspaceModel.swift`: state and `perform`; `+Commands`, `+ContextActions`, `+Lifecycle`, `+Refresh` hold the rest): the stores (`SourceControlStore`, `ExplorerStore`, `EditorStore`, `CleanCopyStore`, `SchemaStore`, `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`.
|
- **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.
|
- **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`, `search`, `diff(busy:)`, `other`): over the search only ⌘G/⌘D route (the rest stays with the search); 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.
|
- **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.
|
- **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 session and ends the 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.
|
- **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. The Explorer's tail block is a third kind, `.tail` (`TerminalLaunch.tail`: `/usr/bin/tail -f <path>`, no shell): `startTail` ends the old one and bumps `tailGeneration`, which the block uses as its pane's `.id`, so each file gets a fresh view and process; `closeTail` and `terminateAll` end it, and `tailedPath` is never persisted.
|
- **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. The Explorer's tail block is a third kind, `.tail` (`TerminalLaunch.tail`: `/usr/bin/tail -f <path>`, no shell): `startTail` ends the old one and bumps `tailGeneration`, which the block uses as its pane's `.id`, so each file gets a fresh view and process; `closeTail` and `terminateAll` end it, and `tailedPath` is never persisted.
|
||||||
- **Git view.** ⌘G toggles `LayoutStore.isGitViewOpen` (never persisted, reset on a project switch). `WorkspaceView` draws `GitView` as an overlay over title bar, columns and status bar, under `OverlayHost`, so every overlay and toast sits above it; the columns stay mounted. `KeyContext.gitViewOpen` sends keys to `KeyRouter.gitViewKey` (column keys rest, ⌘↵ commits) and makes a bare Esc `.closeGitView` once no overlay is open; `inGitConsole` (first responder is a `GitConsoleFieldEditor`) keeps ⌘↵ from committing out of the console. `openGitView()` / `closeGitView()` in `+Commands` move the focus request (commit message in, previous `activePanel` out). Design source: `design/README.md`.
|
- **Git view.** ⌘G toggles `LayoutStore.isGitViewOpen` (never persisted, reset on a project switch). With a search or Diff overlay up, `.toggleGit`/`.toggleSchemaView` (keys and View menu) dismiss it first and then open the view, never closing a view already open under the search. `WorkspaceView` draws `GitView` as an overlay over title bar, columns and status bar, under `OverlayHost`, so every overlay and toast sits above it; the columns stay mounted. `KeyContext.gitViewOpen` sends keys to `KeyRouter.gitViewKey` (column keys rest, ⌘↵ commits) and makes a bare Esc `.closeGitView` once no overlay is open; `inGitConsole` (first responder is a `GitConsoleFieldEditor`) keeps ⌘↵ from committing out of the console. `openGitView()` / `closeGitView()` in `+Commands` move the focus request (commit message in, previous `activePanel` out). Design source: `design/README.md`.
|
||||||
- **Schema view.** ⌘D toggles `LayoutStore.isSchemaViewOpen` (never persisted, reset on a project switch); `openGitView`/`openSchemaView` close each other. It exists only when `SchemaStore.isLaravelApp` (an `artisan` file): the title-bar toggle, `KeyContext.schemaAvailable` for ⌘D and the View menu item follow it. `WorkspaceView` draws `SchemaView` like `GitView`. `SchemaStore.body` picks the command-missing prompt, the no-dump state or the diagram. The watcher's `.project` events and ⌘R carry `RefreshScope.schema`: `refresh(readingDump:)` re-checks the command and re-reads the dump only when its modification date moved, keeping viewport and positions (`SchemaLayout.positions(_:saved:)`). Card positions go to `AppServices.schemaLayouts` when a drag ends; the first dump in a store fits once the canvas has a size. `run()` streams `SchemaServicing.runDump` like the Git console and toasts through `notify`. Esc over the view: selection (`.clearSchemaSelection`), then the search text while `SchemaSearchFieldEditor` has the keyboard (`.clearSchemaSearch`), then `.closeSchemaView`. The canvas lays each card out at 100% and scales it into its on-screen frame, so the click and `.pointerHand()` area stay unscaled; scroll and pinch arrive through a local event monitor (`SchemaScrollCatcher`), since the cards would take them otherwise. Contract: [schema.md](schema.md).
|
- **Schema view.** ⌘D toggles `LayoutStore.isSchemaViewOpen` (never persisted, reset on a project switch); `openGitView`/`openSchemaView` close each other. It exists only when `SchemaStore.isLaravelApp` (an `artisan` file): the title-bar toggle, `KeyContext.schemaAvailable` for ⌘D and the View menu item follow it. `WorkspaceView` draws `SchemaView` like `GitView`. `SchemaStore.body` picks the command-missing prompt, the no-dump state or the diagram. The watcher's `.project` events and ⌘R carry `RefreshScope.schema`: `refresh(readingDump:)` re-checks the command and re-reads the dump only when its modification date moved, keeping viewport and positions (`SchemaLayout.positions(_:saved:)`). Card positions go to `AppServices.schemaLayouts` when a drag ends; the first dump in a store fits once the canvas has a size. `run()` streams `SchemaServicing.runDump` like the Git console and toasts through `notify`. Esc over the view: selection (`.clearSchemaSelection`), then the search text while `SchemaSearchFieldEditor` has the keyboard (`.clearSchemaSearch`), then `.closeSchemaView`. The canvas lays each card out at 100% and scales it into its on-screen frame, so the click and `.pointerHand()` area stay unscaled; scroll and pinch arrive through a local event monitor (`SchemaScrollCatcher`), since the cards would take them otherwise. Contract: [schema.md](schema.md).
|
||||||
- **Git commands.** Every git write and every typed console command goes through `SourceControlStore.run`, which chains onto `commandTail` so two commands never race for `.git/index.lock`, logs `$ git …` and streams lines via `GitServicing.execute` → `ProcessRunning.stream` into the console (`GitOutputClassifier`, one per run). `execute` never throws and switches off prompts, editors and pagers (`GIT_TERMINAL_PROMPT=0`, `GIT_EDITOR=true`, `GIT_PAGER=cat`), so a run can never wait on input. Typed commands run without literal pathspecs (globs work); buttons always pass explicit paths, never `add -A`. Push/pull/fetch and typed commands get `remoteTimeout` (120 s). Commit always runs git, even when `canCommitNow` is false, so git's refusal is the error the user sees. Branch switching and merging are refused in the store while `isDirty`, without asking git. The status read (`load`) stays on `ProcessRunning.run`.
|
- **Git commands.** Every git write and every typed console command goes through `SourceControlStore.run`, which chains onto `commandTail` so two commands never race for `.git/index.lock`, logs `$ git …` and streams lines via `GitServicing.execute` → `ProcessRunning.stream` into the console (`GitOutputClassifier`, one per run). `execute` never throws and switches off prompts, editors and pagers (`GIT_TERMINAL_PROMPT=0`, `GIT_EDITOR=true`, `GIT_PAGER=cat`), so a run can never wait on input. Typed commands run without literal pathspecs (globs work); buttons always pass explicit paths, never `add -A`. Push/pull/fetch and typed commands get `remoteTimeout` (120 s). Commit always runs git, even when `canCommitNow` is false, so git's refusal is the error the user sees. Branch switching and merging are refused in the store while `isDirty`, without asking git. The status read (`load`) stays on `ProcessRunning.run`.
|
||||||
- **Commit message generation.** `.generateCommitMessage` → `SourceControlStore.generateCommitMessage()`: `GitServicing.stagedDiff()` (stat + patch, outside `commandTail` and the console), `CommitMessagePrompt.make` (patch cut at 60 000 characters), then `WorkspaceServices.commitMessages` (`ClaudeCommitMessageService`: the binary from `ExecutableLocator.agent`, its folder first on PATH, the prompt via `ProcessRunning.run(input:)`, cleaned with `CommitMessagePrompt.clean`). Success goes through `setCommitMessage` (so it is lowercased) and `focusMessage`; a `CommitMessageError` toasts through `notify`. `isGeneratingMessage` drives the label and ignores a second click. A window close cancels the run with the rest of `work`, which kills the child.
|
- **Commit message generation.** `.generateCommitMessage` → `SourceControlStore.generateCommitMessage()`: `GitServicing.stagedDiff()` (stat + patch, outside `commandTail` and the console), `CommitMessagePrompt.make` (patch cut at 60 000 characters), then `WorkspaceServices.commitMessages` (`ClaudeCommitMessageService`: the binary from `ExecutableLocator.agent`, its folder first on PATH, the prompt via `ProcessRunning.run(input:)`, cleaned with `CommitMessagePrompt.clean`). Success goes through `setCommitMessage` (so it is lowercased) and `focusMessage`; a `CommitMessageError` toasts through `notify`. `isGeneratingMessage` drives the label and ignores a second click. A window close cancels the run with the rest of `work`, which kills the child.
|
||||||
|
|||||||
+5
-4
@@ -42,7 +42,7 @@ The top bar contains, left to right:
|
|||||||
|
|
||||||
## 3. Git view
|
## 3. Git view
|
||||||
|
|
||||||
A full-screen view over the whole window (top bar, columns and status bar) for staging, committing, pulling, pushing and switching branches. `Cmd+G`, the `Git N` toggle and View › Show Git open it. `Cmd+G`, `Esc` and its **Close** button close it. Dialogs, context menus, search, the Diff and toasts sit above it. The columns stay mounted under it, so terminals keep running and the editor keeps its state. Opening it puts the keyboard in the commit message; closing it hands the keyboard back to the column that had it. It is not persisted: a project always opens with it closed.
|
A full-screen view over the whole window (top bar, columns and status bar) for staging, committing, pulling, pushing and switching branches. `Cmd+G`, the `Git N` toggle and View › Show Git open it. `Cmd+G`, `Esc` and its **Close** button close it. Dialogs, context menus, search, the Diff and toasts sit above it. From the search or the Diff, `Cmd+G` (and View › Show Git) closes that overlay and opens the view; when the view is already open under the search it only closes the search, it never closes the view. `Cmd+F` from the view opens the search above it. The columns stay mounted under it, so terminals keep running and the editor keeps its state. Opening it puts the keyboard in the commit message; closing it hands the keyboard back to the column that had it. It is not persisted: a project always opens with it closed.
|
||||||
|
|
||||||
While it is open, the columns' row, focus and editor keys rest. `Cmd+Return` commits, except from the console input. The other `Cmd` shortcuts keep working. `Cmd+C` with no selection, outside a terminal, opens the view on the commit message. `Esc` closes the topmost layer: an overlay (context menu, dialog, search, Diff) first, then the Git view; with neither open it reaches the terminal.
|
While it is open, the columns' row, focus and editor keys rest. `Cmd+Return` commits, except from the console input. The other `Cmd` shortcuts keep working. `Cmd+C` with no selection, outside a terminal, opens the view on the commit message. `Esc` closes the topmost layer: an overlay (context menu, dialog, search, Diff) first, then the Git view; with neither open it reaches the terminal.
|
||||||
|
|
||||||
@@ -88,7 +88,7 @@ Four colour-coded sections, each only when it has rows, in this order:
|
|||||||
- A merge conflict (`UU`, `AA`, `DD`, or any `U`) is one unstaged `U` row in **changed**, never a staged row, and does not count toward `Commit N files`. Its badge is red, a red flag after the path has the tooltip `Merge conflict — resolve, then Stage`, and the row has a red left bar and a faint red fill. Its inline diff is the last commit against the file on disk, conflict markers included.
|
- A merge conflict (`UU`, `AA`, `DD`, or any `U`) is one unstaged `U` row in **changed**, never a staged row, and does not count toward `Commit N files`. Its badge is red, a red flag after the path has the tooltip `Merge conflict — resolve, then Stage`, and the row has a red left bar and a faint red fill. Its inline diff is the last commit against the file on disk, conflict markers included.
|
||||||
- A conflicted row offers only **Stage**: staging marks the resolution.
|
- A conflicted row offers only **Stage**: staging marks the resolution.
|
||||||
- **Discard** reverts unstaged changes (modified and deleted files from the index, new files removed). **Discard** and **Delete** ask first (`git.confirmDiscard`, default on); **Restore** never asks. Stage and unstage never ask.
|
- **Discard** reverts unstaged changes (modified and deleted files from the index, new files removed). **Discard** and **Delete** ask first (`git.confirmDiscard`, default on); **Restore** never asks. Stage and unstage never ask.
|
||||||
- **Right-click** a row: **Open in editor** (left out for a deleted file), **Pass on reference**, **Copy reference**. Open in editor and Pass on reference close the view first.
|
- **Right-click** a row: **Open in editor** and **Open diff** (both left out for a deleted file), **Pass on reference**, **Copy reference**. Open diff opens the file and shows its full-screen Diff. Open in editor, Open diff and Pass on reference close the view first.
|
||||||
|
|
||||||
### Bottom strip
|
### Bottom strip
|
||||||
|
|
||||||
@@ -119,7 +119,7 @@ The list is read when the view opens and after every command, with the branches.
|
|||||||
|
|
||||||
## 4. Schema view
|
## 4. Schema view
|
||||||
|
|
||||||
A full-screen view, drawn like the Git view, that shows the database of a Laravel app as a diagram of tables and foreign-key lines. It exists only in a Laravel app: a project with an `artisan` file in its root. Elsewhere there is no **Schema** button, `Cmd+D` does nothing and View › Show Schema is disabled. `Cmd+D`, the **Schema** toggle and View › Show Schema open it; `Cmd+D`, `Esc` and its **Close** button close it. Opening it closes the Git view, and opening the Git view closes it. Dialogs, menus, search and toasts sit above it, and the columns stay mounted under it. It is not persisted: a project always opens with it closed.
|
A full-screen view, drawn like the Git view, that shows the database of a Laravel app as a diagram of tables and foreign-key lines. It exists only in a Laravel app: a project with an `artisan` file in its root. Elsewhere there is no **Schema** button, `Cmd+D` does nothing and View › Show Schema is disabled. `Cmd+D`, the **Schema** toggle and View › Show Schema open it; `Cmd+D`, `Esc` and its **Close** button close it. Opening it closes the Git view, and opening the Git view closes it. `Cmd+D` and View › Show Schema switch from the search and the Diff exactly as `Cmd+G` does for the Git view (section 3). Dialogs, menus, search and toasts sit above it, and the columns stay mounted under it. It is not persisted: a project always opens with it closed.
|
||||||
|
|
||||||
Helder reads the diagram from `database/helder/schema.json`, which the app's own Artisan command `app/Console/Commands/HelderSchemaCommand.php` (`php artisan helder:schema`) writes. The file's contract is in [schema.md](schema.md).
|
Helder reads the diagram from `database/helder/schema.json`, which the app's own Artisan command `app/Console/Commands/HelderSchemaCommand.php` (`php artisan helder:schema`) writes. The file's contract is in [schema.md](schema.md).
|
||||||
|
|
||||||
@@ -197,7 +197,7 @@ All are presentations of the same file:
|
|||||||
|
|
||||||
1. **The live file**: the current, editable version. On a changed file it marks the changed lines in place, with a teal tint, a 2px teal left rule, and a teal line number. There is no sign column, no `+` or `-` pair, and no removed line inline. A pure deletion has no current line to mark, so the neighbouring current line carries a 2px amber-deep rule on its top edge, or on its bottom edge at the end of the file. An unchanged file shows plain code.
|
1. **The live file**: the current, editable version. On a changed file it marks the changed lines in place, with a teal tint, a 2px teal left rule, and a teal line number. There is no sign column, no `+` or `-` pair, and no removed line inline. A pure deletion has no current line to mark, so the neighbouring current line carries a 2px amber-deep rule on its top edge, or on its bottom edge at the end of the file. An unchanged file shows plain code.
|
||||||
2. **Preview**: Markdown files only. It shows the rendered document instead of the source. `Cmd+M` switches a Markdown file between code and the rendered preview.
|
2. **Preview**: Markdown files only. It shows the rendered document instead of the source. `Cmd+M` switches a Markdown file between code and the rendered preview.
|
||||||
3. **Diff**: changed files only. The editor expands to full screen, covering the other columns. The original file is on the left and the updated file is on the right, lines aligned. `Esc`, or a collapse control in the corner, returns to the live file.
|
3. **Diff**: changed files only. The editor expands to full screen, covering the other columns. The original file is on the left and the updated file is on the right, lines aligned. `Esc`, or a collapse control in the corner, returns to the live file. `Cmd+G` / `Cmd+D` close the Diff (back to the live file) and open the Git / Schema view; `Cmd+F` replaces the Diff with the search.
|
||||||
|
|
||||||
A changed file opens on the live file, or on the Diff when `git.defaultDiffMode` is `diff`.
|
A changed file opens on the live file, or on the Diff when `git.defaultDiffMode` is `diff`.
|
||||||
|
|
||||||
@@ -304,6 +304,7 @@ Inside the overlay:
|
|||||||
- The focused column shows its focus only by its amber title and count.
|
- The focused column shows its focus only by its amber title and count.
|
||||||
- Selecting a content result opens the file and jumps to that line. Selecting a file-name result opens that file.
|
- Selecting a content result opens the file and jumps to that line. Selecting a file-name result opens that file.
|
||||||
- When nothing matches, each column shows a brief no-results message.
|
- When nothing matches, each column shows a brief no-results message.
|
||||||
|
- Every key belongs to the search except `Cmd+G` and `Cmd+D` (Laravel app only): they close the search and open the Git / Schema view, or leave that view open when it is already under the search. View › Show Git / Show Schema do the same.
|
||||||
- `Esc` closes the overlay; there is no area to click to close it. The respected excludes are the same as the Explorer (`files.exclude` and, when on, gitignore).
|
- `Esc` closes the overlay; there is no area to click to close it. The respected excludes are the same as the Explorer (`files.exclude` and, when on, gitignore).
|
||||||
|
|
||||||
### Mouse pointer
|
### Mouse pointer
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ The Diff is a full-screen, side-by-side comparison of a changed file. It covers
|
|||||||
- Click **Diff** in the [file view](file-view.md) bar. The button shows only on a file with git changes.
|
- Click **Diff** in the [file view](file-view.md) bar. The button shows only on a file with git changes.
|
||||||
- Right-click a marked (teal) line in the file view and choose **Show diff**. The Diff opens centred on that line.
|
- Right-click a marked (teal) line in the file view and choose **Show diff**. The Diff opens centred on that line.
|
||||||
- Show diff on a marked line always compares the last commit with the file on disk.
|
- Show diff on a marked line always compares the last commit with the file on disk.
|
||||||
- The [Git](git.md) view has its own inline diff per file row. **Open in editor** on a row opens the file; click **Diff** there for the full-screen view.
|
- In the [Git](git.md) view, right-click a file row and choose **Open diff**. The view closes and the file opens in the Diff.
|
||||||
|
|
||||||
### Layout
|
### Layout
|
||||||
- The Diff covers all columns. The window's shortcuts still work over it.
|
- The Diff covers all columns. The window's shortcuts still work over it.
|
||||||
@@ -74,6 +74,7 @@ The Diff is a full-screen, side-by-side comparison of a changed file. It covers
|
|||||||
### Close the Diff
|
### Close the Diff
|
||||||
- Press `Esc` or click **Collapse**.
|
- Press `Esc` or click **Collapse**.
|
||||||
- `Esc` closes the innermost layer first: the menu, then the prompt, then the Diff.
|
- `Esc` closes the innermost layer first: the menu, then the prompt, then the Diff.
|
||||||
|
- `Cmd+G` or `Cmd+D` closes the Diff and opens the [Git](git.md) or [Schema](schema.md) view. `Cmd+F` replaces the Diff with [Search](search.md).
|
||||||
- You return to the view you came from, with the keyboard back in the code.
|
- You return to the view you came from, with the keyboard back in the code.
|
||||||
|
|
||||||
## Keyboard
|
## Keyboard
|
||||||
@@ -81,6 +82,8 @@ The Diff is a full-screen, side-by-side comparison of a changed file. It covers
|
|||||||
| Keys | Action |
|
| Keys | Action |
|
||||||
|---|---|
|
|---|---|
|
||||||
| `Esc` | Close the menu, the prompt, or the Diff |
|
| `Esc` | Close the menu, the prompt, or the Diff |
|
||||||
|
| `Cmd+G` / `Cmd+D` | Close the Diff and open the Git / Schema view |
|
||||||
|
| `Cmd+F` | Close the Diff and open Search |
|
||||||
| `Cmd+C` | Copy the selected lines |
|
| `Cmd+C` | Copy the selected lines |
|
||||||
| `Cmd+A` | Select all lines of one side |
|
| `Cmd+A` | Select all lines of one side |
|
||||||
| `Up` / `Down` / `Enter` | Move through and choose in the right-click menu |
|
| `Up` / `Down` / `Enter` | Move through and choose in the right-click menu |
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ The file view is the third column (Col C), between the [Explorer](explorer.md) a
|
|||||||
## Features
|
## Features
|
||||||
|
|
||||||
### Open a file
|
### Open a file
|
||||||
- Click a file in the [Explorer](explorer.md), choose **Open in editor** on a row in the [Git](git.md) view, pick a result in [Search](search.md), or use [Go to file](go-to-file.md).
|
- Click a file in the [Explorer](explorer.md), choose **Open in editor** (or **Open diff**) on a row in the [Git](git.md) view, pick a result in [Search](search.md), or use [Go to file](go-to-file.md).
|
||||||
- The new file replaces the one that was open. Helder shows one file at a time.
|
- The new file replaces the one that was open. Helder shows one file at a time.
|
||||||
- A file always opens fresh from disk.
|
- A file always opens fresh from disk.
|
||||||
- When you open a file at a line (from Search or the [symbol popup](code-symbols.md)), that line moves to the middle of the pane and flashes amber for about a second.
|
- When you open a file at a line (from Search or the [symbol popup](code-symbols.md)), that line moves to the middle of the pane and flashes amber for about a second.
|
||||||
|
|||||||
+4
-3
@@ -46,6 +46,7 @@ The Git view is a full-screen page for everything git: it lists every changed fi
|
|||||||
|
|
||||||
### Open and close the view
|
### Open and close the view
|
||||||
- `Cmd+G`, the **Git** toggle in the [Title bar](title-bar.md), or View > Show Git opens it. The toggle reads `Git N`, where N counts the changed files.
|
- `Cmd+G`, the **Git** toggle in the [Title bar](title-bar.md), or View > Show Git opens it. The toggle reads `Git N`, where N counts the changed files.
|
||||||
|
- From [Search](search.md) or the [Diff](file-view-diff.md), `Cmd+G` closes it and opens the view. If the view is already open under Search, `Cmd+G` only closes Search.
|
||||||
- The view covers the whole window: title bar, columns and status bar. The columns stay as they were under it. Terminals keep running.
|
- The view covers the whole window: title bar, columns and status bar. The columns stay as they were under it. Terminals keep running.
|
||||||
- When it opens, the keyboard goes to the commit message.
|
- When it opens, the keyboard goes to the commit message.
|
||||||
- `Cmd+C` with no text selected, outside a terminal, also opens the view on the commit message.
|
- `Cmd+C` with no text selected, outside a terminal, also opens the view on the commit message.
|
||||||
@@ -98,10 +99,10 @@ Staged rows carry an amber bar on their left edge. A conflicted row carries a re
|
|||||||
- Removed lines have an amber tint, added lines a teal tint. In a changed line pair, the part that differs is highlighted.
|
- Removed lines have an amber tint, added lines a teal tint. In a changed line pair, the part that differs is highlighted.
|
||||||
- Each change keeps 3 unchanged lines around it. Longer unchanged runs fold into `⋯ N unchanged lines`.
|
- Each change keeps 3 unchanged lines around it. Longer unchanged runs fold into `⋯ N unchanged lines`.
|
||||||
- A file over 1 MB shows `Too big.`. A file with no text changes shows `— No line changes.`.
|
- A file over 1 MB shows `Too big.`. A file with no text changes shows `— No line changes.`.
|
||||||
- For the full-screen comparison, open the file and use the [Diff](file-view-diff.md).
|
- For the full-screen comparison, right-click the row and choose **Open diff**, or open the file and use the [Diff](file-view-diff.md).
|
||||||
|
|
||||||
### Right-click a row
|
### Right-click a row
|
||||||
Right-click a file row for **Open in editor**, **Pass on reference** and **Copy reference**. See the [right-click menu](right-click-menu.md#git-rows). Open in editor and Pass on reference close the view first.
|
Right-click a file row for **Open in editor**, **Open diff**, **Pass on reference** and **Copy reference**. See the [right-click menu](right-click-menu.md#git-rows). Open in editor, Open diff and Pass on reference close the view first.
|
||||||
|
|
||||||
### Pull and push
|
### Pull and push
|
||||||
- **Pull** runs `git pull --no-rebase`. When your branch and origin both have new commits, git merges them.
|
- **Pull** runs `git pull --no-rebase`. When your branch and origin both have new commits, git merges them.
|
||||||
@@ -150,7 +151,7 @@ You do not need to refresh by hand. The list updates by itself:
|
|||||||
|
|
||||||
| Keys | Action |
|
| Keys | Action |
|
||||||
|---|---|
|
|---|---|
|
||||||
| `Cmd+G` | Open or close the Git view |
|
| `Cmd+G` | Open or close the Git view; from Search or the Diff, close it and open the view |
|
||||||
| `Esc` | Close the Git view (after any dialog, menu, search or Diff on top of it) |
|
| `Esc` | Close the Git view (after any dialog, menu, search or Diff on top of it) |
|
||||||
| `Cmd+C` | Open the view on the commit message (no text selected, not in a terminal) |
|
| `Cmd+C` | Open the view on the commit message (no text selected, not in a terminal) |
|
||||||
| `Cmd+Enter` | Commit, while the view is open (not from the console input) |
|
| `Cmd+Enter` | Commit, while the view is open (not from the console input) |
|
||||||
|
|||||||
@@ -51,6 +51,7 @@ Helder is built to run from the keyboard. Press `?` to see a short list of the m
|
|||||||
- A text field, the code, or a terminal keeps the keys it needs. Arrows, `Return`, `?`, `Cmd+A` and `Cmd+C` with a selection go to the field, not to Helder.
|
- A text field, the code, or a terminal keeps the keys it needs. Arrows, `Return`, `?`, `Cmd+A` and `Cmd+C` with a selection go to the field, not to Helder.
|
||||||
- Keys with `Ctrl` or `Opt` always go to the field or terminal, except the menu shortcuts that use them.
|
- Keys with `Ctrl` or `Opt` always go to the field or terminal, except the menu shortcuts that use them.
|
||||||
- While an overlay is open, it owns the keys. `Esc` closes it. The Diff is the exception: the workspace shortcuts keep working over it.
|
- While an overlay is open, it owns the keys. `Esc` closes it. The Diff is the exception: the workspace shortcuts keep working over it.
|
||||||
|
- Search, the Git view, the Schema view and the Diff switch to each other: `Cmd+G` / `Cmd+D` from Search or the Diff close it and open the view (Search only closes when the view is already under it). `Cmd+F` opens Search above the Git or Schema view, and in place of the Diff.
|
||||||
- `Esc` closes the topmost layer: a right-click menu, a dialog, search or the Diff first, then the [Schema](schema.md) view's selection, its search text and the view itself, or the [Git](git.md) view. With none of those open, `Esc` goes to the terminal.
|
- `Esc` closes the topmost layer: a right-click menu, a dialog, search or the Diff first, then the [Schema](schema.md) view's selection, its search text and the view itself, or the [Git](git.md) view. With none of those open, `Esc` goes to the terminal.
|
||||||
- While the Git or Schema view is open, the column keys rest: arrows, `Return` and `Cmd+Left` / `Cmd+Right` do nothing in the columns under it.
|
- While the Git or Schema view is open, the column keys rest: arrows, `Return` and `Cmd+Left` / `Cmd+Right` do nothing in the columns under it.
|
||||||
|
|
||||||
@@ -156,6 +157,8 @@ See [Diff view](file-view-diff.md).
|
|||||||
| Keys | Action |
|
| Keys | Action |
|
||||||
|---|---|
|
|---|---|
|
||||||
| `Esc` | Close the menu, then the pass-on prompt, then the Diff itself |
|
| `Esc` | Close the menu, then the pass-on prompt, then the Diff itself |
|
||||||
|
| `Cmd+G` / `Cmd+D` | Close the Diff and open the Git / Schema view |
|
||||||
|
| `Cmd+F` | Close the Diff and open search |
|
||||||
| `Cmd+A` | Select all lines on one side |
|
| `Cmd+A` | Select all lines on one side |
|
||||||
| `Cmd+C` | Copy the selected lines |
|
| `Cmd+C` | Copy the selected lines |
|
||||||
| `Up` / `Down`, `Return` | Move through and choose in the Diff's right-click menu |
|
| `Up` / `Down`, `Return` | Move through and choose in the Diff's right-click menu |
|
||||||
@@ -178,6 +181,7 @@ See [Search](search.md).
|
|||||||
| `Cmd+Left` / `Cmd+Right` | Move to the column on the left or right |
|
| `Cmd+Left` / `Cmd+Right` | Move to the column on the left or right |
|
||||||
| `Up` / `Down`, `Cmd+Up` / `Cmd+Down` | Move through the results in a column |
|
| `Up` / `Down`, `Cmd+Up` / `Cmd+Down` | Move through the results in a column |
|
||||||
| `Return` | Open the selected result |
|
| `Return` | Open the selected result |
|
||||||
|
| `Cmd+G` / `Cmd+D` | Close search and open the Git / Schema view |
|
||||||
| `Esc` | Close search |
|
| `Esc` | Close search |
|
||||||
|
|
||||||
### Clean copy
|
### Clean copy
|
||||||
|
|||||||
@@ -67,6 +67,7 @@ Right-click a file row in the [Git](git.md) view. The header is the file's path.
|
|||||||
| app/Http/UserController.php |
|
| app/Http/UserController.php |
|
||||||
|----------------------------------------|
|
|----------------------------------------|
|
||||||
| [] Open in editor |
|
| [] Open in editor |
|
||||||
|
| <> Open diff |
|
||||||
|----------------------------------------|
|
|----------------------------------------|
|
||||||
| * Pass on reference |
|
| * Pass on reference |
|
||||||
| # Copy reference |
|
| # Copy reference |
|
||||||
@@ -74,6 +75,7 @@ Right-click a file row in the [Git](git.md) view. The header is the file's path.
|
|||||||
```
|
```
|
||||||
|
|
||||||
- **Open in editor** (bold): closes the Git view and opens the file in the [File view](file-view.md). A deleted file has nothing to open, so its menu holds only the two reference items.
|
- **Open in editor** (bold): closes the Git view and opens the file in the [File view](file-view.md). A deleted file has nothing to open, so its menu holds only the two reference items.
|
||||||
|
- **Open diff**: closes the Git view, opens the file and shows its full-screen [Diff](file-view-diff.md). Not on a deleted file.
|
||||||
- **Pass on reference**: closes the Git view, then opens the [Pass on](pass-on-to-agent.md) prompt with the file's path.
|
- **Pass on reference**: closes the Git view, then opens the [Pass on](pass-on-to-agent.md) prompt with the file's path.
|
||||||
- **Copy reference**: copies the file's path.
|
- **Copy reference**: copies the file's path.
|
||||||
|
|
||||||
|
|||||||
@@ -41,6 +41,7 @@ The Schema view is a full-screen diagram of a Laravel app's database: every tabl
|
|||||||
### Open and close the view
|
### Open and close the view
|
||||||
- `Cmd+D`, the **Schema** toggle in the [Title bar](title-bar.md), or View > Show Schema opens it. The toggle's dot is amber while the view is open.
|
- `Cmd+D`, the **Schema** toggle in the [Title bar](title-bar.md), or View > Show Schema opens it. The toggle's dot is amber while the view is open.
|
||||||
- The view covers the whole window. The columns stay as they were under it, and terminals keep running.
|
- The view covers the whole window. The columns stay as they were under it, and terminals keep running.
|
||||||
|
- From [Search](search.md) or the [Diff](file-view-diff.md), `Cmd+D` closes it and opens the view. If the view is already open under Search, `Cmd+D` only closes Search.
|
||||||
- Close it with `Cmd+D`, `Esc`, or the **Close** button. The keyboard goes back to the column that had it.
|
- Close it with `Cmd+D`, `Esc`, or the **Close** button. The keyboard goes back to the column that had it.
|
||||||
- The Git view and the Schema view never show together: opening one closes the other.
|
- The Git view and the Schema view never show together: opening one closes the other.
|
||||||
- The view is not remembered: a project always opens with it closed.
|
- The view is not remembered: a project always opens with it closed.
|
||||||
@@ -117,7 +118,7 @@ You do not need to refresh by hand. Helder watches the project folder: when the
|
|||||||
|
|
||||||
| Keys | Action |
|
| Keys | Action |
|
||||||
|---|---|
|
|---|---|
|
||||||
| `Cmd+D` | Open or close the Schema view (Laravel apps) |
|
| `Cmd+D` | Open or close the Schema view (Laravel apps); from Search or the Diff, close it and open the view |
|
||||||
| `Return` | In the table search: select and centre the first match |
|
| `Return` | In the table search: select and centre the first match |
|
||||||
| `Esc` | Deselect the table, then clear the search (while it has the keyboard), then close the view |
|
| `Esc` | Deselect the table, then clear the search (while it has the keyboard), then close the view |
|
||||||
| `Cmd+G` | Switch to the Git view |
|
| `Cmd+G` | Switch to the Git view |
|
||||||
|
|||||||
@@ -35,6 +35,8 @@ Search covers the whole window, edge to edge, like the [Git view](git.md). One q
|
|||||||
- Press `Cmd+F`, or click **Search** in the [title bar](title-bar.md).
|
- Press `Cmd+F`, or click **Search** in the [title bar](title-bar.md).
|
||||||
- With text selected in the file view, the query starts with the first line of that selection.
|
- With text selected in the file view, the query starts with the first line of that selection.
|
||||||
- Search covers the whole window, title bar and status bar included, with no margin. Press `Esc` to close it.
|
- Search covers the whole window, title bar and status bar included, with no margin. Press `Esc` to close it.
|
||||||
|
- Over the [Git](git.md) or [Schema](schema.md) view, Search opens on top of it. From the [Diff](file-view-diff.md), Search takes its place.
|
||||||
|
- `Cmd+G` and `Cmd+D` close Search and open the Git or Schema view (or leave it open, if it was under Search). Every other key stays with Search.
|
||||||
|
|
||||||
### Typing
|
### Typing
|
||||||
- Results update as you type.
|
- Results update as you type.
|
||||||
@@ -97,6 +99,7 @@ Each column says why it is empty:
|
|||||||
| `Up` / `Down` | Previous / next row in the column |
|
| `Up` / `Down` | Previous / next row in the column |
|
||||||
| `Cmd+Up` / `Cmd+Down` | Previous / next row in the column |
|
| `Cmd+Up` / `Cmd+Down` | Previous / next row in the column |
|
||||||
| `Enter` | Open the selected result |
|
| `Enter` | Open the selected result |
|
||||||
|
| `Cmd+G` / `Cmd+D` | Close Search and open the Git / Schema view |
|
||||||
| `Esc` | Close Search |
|
| `Esc` | Close Search |
|
||||||
|
|
||||||
## Settings
|
## Settings
|
||||||
|
|||||||
Reference in New Issue
Block a user