Skip to content

feat: support non-git directories as local workspaces#825

Open
JRBusiness wants to merge 7 commits into
dohooo:mainfrom
JRBusiness:feat/non-git-directories
Open

feat: support non-git directories as local workspaces#825
JRBusiness wants to merge 7 commits into
dohooo:mainfrom
JRBusiness:feat/non-git-directories

Conversation

@JRBusiness

Copy link
Copy Markdown
Contributor

Summary

Adds opt-in support for attaching sessions to plain local folders that are not git repositories, so Helmor can be used in a directory without initializing git.

  • New Non-git directories toggle (Settings → General). When enabled, Open project can attach a session to any local folder; these run as local-mode sessions with no branch/worktree actions.
  • Repository/workspace layer (models/repos.rs, workspace/lifecycle.rs, repository_commands.rs) resolves a non-git root when the toggle is on and the folder isn't a git repo, instead of failing.
  • Hardens agent process environment resolution so the bundled CLIs find their PATH reliably — Windows PATH is rebuilt from the registry (agent-path-env.ts, used by the Claude/Codex/OpenCode session managers) — and resolves git pointer-file paths correctly for Windows absolute and UNC paths (git-access.ts). Both are platform-guarded and no-op off Windows.

Testing

  • bun run typecheck (frontend + sidecar): clean
  • Sidecar tests: agent-path-env, git-access, codex-app-server, claude-session-manager — pass
  • Frontend tests: App.add-repo, settings round-trip — pass
  • Rust: cargo clippy -- -D warnings clean; repository/repos unit tests pass

A changeset is included (minor).

@vercel

vercel Bot commented Jun 13, 2026

Copy link
Copy Markdown

@jerryluong94-create is attempting to deploy a commit to the Caspian's Team Team on Vercel.

A member of the Team first needs to authorize it.

@dosubot dosubot Bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Jun 13, 2026
@dosubot

dosubot Bot commented Jun 13, 2026

Copy link
Copy Markdown
Contributor

📄 Knowledge review

✏️ Suggested updates

4 page suggestions need review.

Page Library Status
01 - Repository Helmor 🟡 Review
02 - Workspace Helmor 🟡 Review
03 - Add a Repository Helmor 🟡 Review
04 - Create a Workspace Helmor 🟡 Review
📝 01 - Repository
@@ -7,18 +7,24 @@
 When you add a repository, Helmor gains access to:
 
 - **File tree** — browse, search, and open any file in the project.
-- **Git history** — view commits, branches, and tags.
-- **Branch context** — workspaces branch from the repository's default or target branch.
-- **Diff baseline** — agent changes are compared against the repository state.
+- **Git history** — view commits, branches, and tags (git repositories only).
+- **Branch context** — workspaces branch from the repository's default or target branch (git repositories only).
+- **Diff baseline** — agent changes are compared against the repository state (git repositories only).
 
-## Local vs. GitHub-connected
+With the **Non-git directories** toggle enabled (Settings → General), a repository can also be a plain local folder without git. These provide file access but no git history, branches, or diff baselines.
+
+## Storage modes
 
 | Mode | What you get |
 |------|-------------|
-| **Local only** | File browsing, workspace creation, agent sessions, local commits. |
-| **GitHub-connected** | Everything above, plus remote branch tracking, account identity, and pull request workflows. |
+| **Local only** | Repository on disk (git or plain folder), file browsing, workspace creation, agent sessions. Local git repos support local commits; non-git folders have no version control. |
+| **GitHub-connected** | Everything above (git only), plus remote branch tracking, account identity, and pull request workflows. |
 
 A local repository is sufficient for isolated agent work and review. Connect GitHub when you need remote collaboration, branch protection context, or PR-based shipping.
+
+### Non-git directories
+
+When the **Non-git directories** toggle is enabled (Settings → General), you can add plain local folders that aren't git repositories. These repositories provide file access but no git history, branches, or diff baselines. They're useful for working with code outside version control or quickly experimenting with files that aren't tracked yet.
 
 ## Adding a repository
 

Accept · Edit · Decline

📝 02 - Workspace
@@ -4,18 +4,32 @@
 
 ## What a workspace provides
 
-- **Branch isolation** — each workspace gets its own Git branch so agent edits never contaminate other work.
+- **Branch isolation** — each workspace gets its own Git branch so agent edits never contaminate other work. (Git repositories only.)
 - **File tree** — browse, search, and edit files scoped to this workspace's state.
 - **Session history** — every agent conversation and its resulting changes are recorded.
-- **Diff baseline** — changes are compared against the workspace's target branch.
+- **Diff baseline** — changes are compared against the workspace's target branch. (Git repositories only.)
 
 ## Isolation modes
+
+When working with git repositories:
 
 | Mode | How it works |
 |------|-------------|
 | **Worktree** (default) | Creates a dedicated `git worktree` directory. Full isolation — the workspace has its own branch and disk copy. |
 | **Local** | Points directly at the repository root. Multiple conversations share the same files. Useful for quick edits without branching overhead. |
 | **Chat** | A scratch directory with no Git binding. Good for exploratory questions where you don't need file changes. |
+
+**Non-git directories:** When the "Non-git directories" toggle is enabled in Settings → General, sessions attached to plain local folders run in Local mode with limitations: no branch context, no worktrees, and the branch display shows "Files" instead of a git branch name.
+
+## Non-git directory workspaces
+
+When the "Non-git directories" toggle is enabled in Settings → General, you can attach sessions to plain local folders that are not git repositories. These workspaces:
+
+- Show "Files" as the branch name instead of a git branch.
+- Run in Local mode — no branch isolation or worktree creation.
+- Provide file browsing, editing, and session history, but no git operations (diffs, commits, branch switching).
+
+This is useful for working with code that isn't in version control or for exploratory tasks where git tracking isn't needed.
 
 ## Lifecycle
 

Accept · Edit · Decline

📝 03 - Add a Repository
@@ -2,11 +2,19 @@
 
 A repository is the project Helmor will manage. Once added, you can create workspaces, browse files, run agent sessions, and review diffs — all against that project's codebase.
 
+## Non-git directories
+
+By default, Helmor requires a Git repository. If you want to work in a plain local folder that is not a Git repository, enable **Non-git directories** under **Settings → General**.
+
+When enabled, **Open project** can attach to any local folder. These non-git directories run as local-mode sessions — file browsing and agent tasks work normally, but Git features (history, branches, workspaces, commit/push) are unavailable. The branch name displays as **Files** instead.
+
+The rest of this page describes Git repository workflows. If you're using a non-git directory, those features do not apply.
+
 ## Add a local repository
 
 1. Open Helmor and click **Add Repository** (or use the `+` button in the sidebar).
-2. Browse to your local Git project folder.
-3. Confirm the detected default branch (e.g., `main` or `master`).
+2. Browse to your local project folder. If the **Non-git directories** setting is enabled, you can select any folder — otherwise, Helmor will only accept Git repositories.
+3. Confirm the detected default branch (e.g., `main` or `master`). Non-git directories skip this step and display **Files** as the branch name.
 
 The repository appears in your sidebar immediately. Helmor reads the Git history, branches, and file tree from disk.
 
@@ -18,12 +26,14 @@
 
 ## What Helmor reads
 
-Helmor uses the repository as the source for:
+For Git repositories, Helmor uses the repository as the source for:
 
 - **Workspaces** — isolated copies branched from your default or target branch.
 - **File browsing** — view, search, and navigate the project tree.
 - **Diffs** — compare agent changes against the base branch.
 - **Git operations** — commit, push, and prepare PRs from inside the app.
+
+Non-git directories provide only file access. No Git history, branches, workspaces, or Git operations are available.
 
 Helmor does not replace Git. It wraps Git with an agent-friendly workflow layer.
 

Accept · Edit · Decline

📝 04 - Create a Workspace
@@ -1,17 +1,21 @@
 # 04 - Create a Workspace
 
 A workspace is an isolated working copy where one task lives. It gives your agent a clean environment tied to a branch, separate from everything else in the repository.
+
+> **Note:** This page describes workspace creation for **git repositories**. When using non-git directories (enabled via Settings → General → Non-git directories), workspace creation is simplified: only Local mode is available, with no branch/worktree options.
 
 ## Create a workspace
 
 1. Select a repository from the sidebar.
 2. Click **New Workspace** (or press the `+` button).
-3. Choose a base branch to fork from (e.g., `main`).
-4. Helmor creates a dedicated Git worktree and auto-names a new branch for the task.
+3. Choose a base branch to fork from (e.g., `main`). *(Git repositories only — non-git directories display "Files" instead.)*
+4. Select an isolation mode *(see below)*. *(Git repositories only — non-git directories always use Local mode.)*
 
 The workspace appears in the sidebar within milliseconds — Helmor writes the database record instantly while the filesystem setup finishes in the background.
 
 ## Isolation modes
+
+*These modes apply to **git repositories**. Non-git directory workspaces always run in Local mode with no branch context or worktree isolation.*
 
 | Mode | Description | Use case |
 |------|-------------|----------|
@@ -30,6 +34,10 @@
 - **Ready** — workspace is usable; start a session.
 - **Archived** — task complete. In worktree mode, the branch is deleted on archive since the workspace owned it.
 
+### Non-git directory workspaces
+
+For non-git directories, workspace creation is simplified: no branch selection or worktree setup occurs. These workspaces always run in Local mode, operating directly in the selected folder with no git operations available.
+
 ## Best practices
 
 - **One task per workspace.** Keep scope tight for clean diffs and easy review.

Accept · Edit · Decline


Leave Feedback Ask Dosu about helmor

Allow attaching sessions to plain local folders that are not git
repositories, behind an opt-in 'Non-git directories' setting. These run
as local-mode sessions with no branch/worktree actions.

Also harden agent process environment resolution: rebuild Windows PATH
from the registry so bundled CLIs resolve reliably, and handle Windows
absolute/UNC paths when resolving git pointer files.
@JRBusiness JRBusiness force-pushed the feat/non-git-directories branch from 99b0f42 to 125e383 Compare June 13, 2026 05:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants