From c2b38b853c36f0d5dd8989c8ee2d01b3be3023af Mon Sep 17 00:00:00 2001 From: Jonathan van Rij Date: Mon, 28 Sep 2026 10:26:39 +0200 Subject: [PATCH] first commit --- README.md | 78 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 78 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..847342f --- /dev/null +++ b/README.md @@ -0,0 +1,78 @@ +# Claude Storm. + +Claude Storm is the dark workbench for reviewing the code Claude Code writes: a native macOS rewrite (Swift, SwiftUI and AppKit) of the Electron app in `old-app/`, which was called Helder. That original stays the behavioural and visual reference; see [docs/architecture.md](docs/architecture.md). + +## Build, test, run + +```bash +scripts/build.sh # debug build (--release for release) +scripts/test.sh # all three test targets; e.g. --filter WorkspaceModel +scripts/run.sh [project] # build and run; the optional folder opens in the first window +scripts/bundle.sh # "build/Claude Storm.app", ad-hoc signed, with ripgrep inside (--install copies it to ~/Applications) +``` + +Always use the scripts: they select the toolchain this machine needs. Search uses ripgrep when it can find one (`Contents/Helpers/rg` in the bundle, or `$RG_BINARY`) and a slower Swift walk otherwise. + +## What it does + +One project per window, four columns: + +- **Source Control**: staged and unstaged changes grouped by folder, stage/unstage/discard, the commit box and push at the foot. +- **Explorer**: the file tree with change letters; new file/folder, rename, delete, Show in Finder, copy or pass on a reference. +- **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. + +## Keyboard + +| Keys | Action | +|---|---| +| ⌘F | Search this file, the project and file names | +| ⌘O | Open a folder | +| ⇧⌘O | Open recent project: the list of recent projects | +| ⇧⌘N | New window | +| ⌘← ⌘→ | Column left or right; in Git or Explorer ⌘→ opens the row's menu | +| ↑ ↓ ↵ | Git or Explorer: move the row cursor, open the row | +| ⌘↑ ⌘↓ | Recent files, from the editor | +| ⌘→ (selection) | Pass the selection to the agent | +| ⌘M | Markdown: code or rendered preview | +| ⌘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 | +| ⌘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 | +| ⌘0 / ⌘+ / ⌘− | Zoom: editor, Diff and terminal text | +| 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. + +## Testing + +Three test targets mirror the three library targets: `Tests/ClaudeStormCoreTests`, `Tests/ClaudeStormServicesTests` and `Tests/ClaudeStormUITests`. Inside each target, the folders mirror `Sources//` (a test for `Sources/ClaudeStormUI/State/EditorStore.swift` sits in `Tests/ClaudeStormUITests/State/`). + +The tests use Swift Testing. For a PHPUnit reader: + +| PHPUnit | Swift Testing | +|---|---| +| `class FooTest extends TestCase` | `@Suite struct FooTests` | +| `public function test_it_works()` | `@Test func itWorks()` | +| `$this->assertSame($a, $b)` | `#expect(a == b)` | +| `$this->markTestSkipped` / fail early | `try #require(value)` (stops the test when nil or false) | +| `@dataProvider` | `@Test(arguments: [...]) func x(_ value: …)` | +| `setUp()` | the suite's `init()`, or a helper that builds the fixture | + +- **Fakes and harnesses** live in `Tests/ClaudeStormUITests/Support/`: one fake per service protocol in `Fakes/` (`FakeGit`, `FakeFiles`, `FakeSystem`, `FakeTerminal`, …), and `WorkspaceHarness`, which wires a whole window to those fakes. UI tests never touch the disk, git, the user's defaults or the log. +- **Integration tests** in `ClaudeStormServicesTests` run the real `git` and file system. `TempGitRepo` creates a throwaway repository (`commit`, `write`, `run`); `TempDirectory` a throwaway folder. +- **Waiting**: `await model.settle()` or `eventually { … }`, never a sleep. + +```bash +scripts/test.sh # everything +scripts/test.sh --filter GitServiceLoadTests # one suite (the @Suite name, not the file name) +scripts/test.sh --filter "GitServiceLoadTests/aFileUnderTheSizeCapStillCarriesItsText" # one test +``` +