Skip to content

Add worktree guide for onboarding - #7

Merged
frenchie4111 merged 1 commit into
mainfrom
guide-worktree-tutorial
Apr 10, 2026
Merged

frenchie4111 merged 1 commit into
mainfrom
guide-worktree-tutorial

Conversation

@frenchie4111

Copy link
Copy Markdown
Collaborator

Summary

  • New in-app Guide view explaining git worktrees, why they matter for agentic coding, and how Harness supports the parallel workflow. Aimed at developers new to multi-agent work — assumes git/GitHub fluency but explains git worktree from scratch.
  • Accessible from the repo-select screen ("New to multi-agent workflows? Read the worktree guide →") and from Settings → Help → Worktree Guide. Not auto-shown — opt-in.
  • New marketing site page at docs/guide.html linked from the nav and footer of docs/index.html. Same content, same six sections.
  • Four programmatic diagrams (pure SVG + divs, no raster assets) added to both the in-app and web versions:
    • Worktree anatomy — one .git node branching to three working copies
    • Collision vs isolation — before/after of sharing one dir vs per-task worktrees
    • Harness sidebar mockup — mini window with status dots and PR badges
    • Parallel workflow timeline — Gantt-style task progress with a legend
  • Also adds the Harness icon to the repo-select screen with the amber-glow styling from the website hero.

The in-app diagrams use theme tokens so they adapt to the user's chosen color scheme (dracula, nord, solarized, etc.); the web versions use the fixed amber/red/green palette matching the existing hero.

Test plan

  • Launch dev mode with a fresh guideSeen state — repo-select screen shows icon + guide link
  • Click the guide link → Guide view opens, all six sections and four diagrams render
  • Close the guide → returns to repo-select screen
  • Open Settings → Help → Worktree Guide — same guide view opens
  • Close guide from Settings entry point — returns to main app (not Settings)
  • Switch theme (Settings → Appearance) and reopen guide — diagrams re-color correctly
  • Open docs/guide.html in a browser — diagrams render, nav/footer links work
  • docs/index.html nav shows the new Guide link

🤖 Generated with Claude Code

A tutorial covering what git worktrees are, why they matter for running
many Claude Code agents in parallel, and how Harness turns them into a
usable workflow. Aimed at developers new to the multi-agent flow.

Lives in-app as a new Guide view (accessible from the repo-select
screen and Settings > Help) and on the marketing site at
docs/guide.html. Includes four programmatic diagrams — worktree
anatomy, collision vs isolation, a Harness sidebar mockup, and a
parallel workflow timeline — so there's no reliance on raster assets.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@frenchie4111
frenchie4111 merged commit 7796043 into main Apr 10, 2026
tresat added a commit to tresat/harness that referenced this pull request Jul 24, 2026
- Extract normalizeAlias() + ALIAS_MAX_LEN in shared/state/aliases.ts;
  IPC handler, MCP control-server dep, and control-server response
  echo all use it so the trim/clamp logic can't drift (fixes ness-dev#2)
- useHotkeys skips when focused element (or ancestor) has
  data-hotkeys="ignore"; AliasEditor input opts in so Cmd+W / Cmd+K /
  etc. don't fire while renaming. Opt-in (not a general "skip inputs"
  rule) because xterm's hidden textarea would otherwise break every
  terminal-time hotkey (fixes ness-dev#4)
- useAliasForPath now accepts string | null | undefined; App.tsx window
  title read no longer needs the '?? ...' fallback subscription to a
  permanently-empty key (fixes ness-dev#7)
- MCP control-server response includes clamped: true when the caller's
  input differed from what got stored; the set_worktree_alias tool
  surfaces this to the agent as "input was normalized" so silent
  whitespace/length changes are discoverable (fixes ness-dev#8)
- Add control-server.test.ts covering POST/DELETE /aliases end-to-end:
  scope-fallback, clamp reporting, empty-clears-alias, and 400 on no
  worktreePath + no scope (fixes ness-dev#9)
- displayLabel docstring now explains the resolution order, the
  machine-facing exclusion, and the per-id selector pairing (fixes ness-dev#10)
frenchie4111 pushed a commit that referenced this pull request Jul 24, 2026
- Extract normalizeAlias() + ALIAS_MAX_LEN in shared/state/aliases.ts;
  IPC handler, MCP control-server dep, and control-server response
  echo all use it so the trim/clamp logic can't drift (fixes #2)
- useHotkeys skips when focused element (or ancestor) has
  data-hotkeys="ignore"; AliasEditor input opts in so Cmd+W / Cmd+K /
  etc. don't fire while renaming. Opt-in (not a general "skip inputs"
  rule) because xterm's hidden textarea would otherwise break every
  terminal-time hotkey (fixes #4)
- useAliasForPath now accepts string | null | undefined; App.tsx window
  title read no longer needs the '?? ...' fallback subscription to a
  permanently-empty key (fixes #7)
- MCP control-server response includes clamped: true when the caller's
  input differed from what got stored; the set_worktree_alias tool
  surfaces this to the agent as "input was normalized" so silent
  whitespace/length changes are discoverable (fixes #8)
- Add control-server.test.ts covering POST/DELETE /aliases end-to-end:
  scope-fallback, clamp reporting, empty-clears-alias, and 400 on no
  worktreePath + no scope (fixes #9)
- displayLabel docstring now explains the resolution order, the
  machine-facing exclusion, and the per-id selector pairing (fixes #10)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant