Repository navigation
sidebar: redesign as a calm project tree with live agent cues - #97
Merged
Merged
Conversation
Replace the attention-inbox sidebar (filter pills, Needs You / Running sections, project letter tiles) with a flat folder-style project list. Each project expands inline into a quiet Worktrees group of compact single-line rows named by branch. Drops the heavy WorktreeRowView in favour of an inline compact row.
Worktree rows now sit directly under the project folder. The leading glyph distinguishes main/master (branch icon) from linked worktrees (node-graph) and detached HEADs (dotted circle); colour stays quiet unless an agent is live.
Collapsing (⌘B) now zeroes the sidebar width and hides the container and its divider, so the content area takes the whole window — no narrow project-icon rail.
The sidebar now fully hides on collapse (the split view drops its container), so the SwiftUI rail and its collapse plumbing are dead: remove collapsedBody/railProject/PulsingRing and the ProjectLetterTile + ProjectRailView components, plus the isSidebarCollapsed signal that threaded from RootSplitViewController through to the sidebar view.
Reuses the existing agentState detection — when a worktree's agent is .running, its branch icon gets a repeating SF Symbol pulse so the row reads as live/in-progress at a glance.
Match the Conductor reference: the leading slot becomes a small spinning arc when agentState is .running, instead of pulsing the branch glyph in place. Swaps back to the branch/main identity glyph when idle.
Swap the abstract spinner for an SF Symbol `sparkles` with a repeating variableColor effect — reads as an AI agent at work rather than a generic loading spinner. Agent-agnostic since no per-agent brand assets exist.
Resolve the running agent from the worktree's tmux windows (detectedAgent) and render its logo in the row's leading slot — Claude Code, Codex (OpenAI mark), or Pi — as a template image tinted to the sidebar's running colour, breathing to signal live work. Unknown agents fall back to a generic glyph. Icons ship as loose SVGs loaded via NSImage (SwiftPM doesn't compile asset catalogs); sourced from the dashboard-icons project.
Full-width repo sections with collapse chevrons and hairline dividers, a '+ New workspace' row per repo, and two-line workspace rows: branch + '+added -removed' line-diff badge, then worktree name · status (Working / Needs input / Ready to merge / Merge conflicts / last activity) with a per-workspace ⌘1-9 hint. Bottom bar now holds 'Add repository' and Settings. Backend: GitBackend.diffStat runs merge-base + diff --shortstat against the project's base branch (plus a merge-tree conflict probe, git 2.38+, degrades to nil) each poll cycle; results land on Worktree as additions/deletions/hasMergeConflicts. ⌘1-9 quick jump now selects worktrees instead of tmux windows to match the new hints.
Text("+\(n)") goes through LocalizedStringKey, which locale-formats
integers (65031 → "65,031") and let the badge wrap to two lines. Use
verbatim text, keep the badge on one line, and compact counts ≥10k to
"65k". Hide the sidebar scroll indicators like the reference design.
The badge compared the working tree against the main worktree's checked-out branch — if that checkout sits on a feature branch (or a stale main), the badge absorbs tens of thousands of unrelated lines. Resolve the base as origin/HEAD first (falling back to the passed ref) and count only merge-base..HEAD, matching the numbers a PR shows; uncommitted work is already signalled via hasUncommittedChanges. The merge-tree conflict probe now uses the same resolved base. Verified against cherry-studio: the badge previously read +68946 -76172; committed-vs-origin/main reads +5273 -1748, matching GitHub.
Mori already bootstraps a 'Home' project at $HOME on first launch; render it Conductor-style as one fixed row above the repo sections — house glyph (or the working agent's breathing glyph), one click into its session, no workspace list and no '+ New workspace'. Identified by Project.isHomeWorkspace (path == $HOME, local only) so no schema change. Home worktrees are excluded from ⌘1-9 quick-jump indexing on both the sidebar-hint and WorkspaceManager sides.
The calm-project-tree redesign dropped the quiet strip above the footer; bring it back with a third indicator — waiting / running / error dots with worktree counts, dimmed when zero.
Clicking a state indicator selects the next workspace whose agent is in that state — cycling from the current selection, Home included even when a section is collapsed — and lands on the matching tmux window inside it. Zero-count indicators stay disabled and dimmed.
Cycling was non-deterministic — with several agents waiting you click into the dark. Each state indicator is now a borderless menu listing its workspaces as 'project · branch'; picking one jumps straight to the matching tmux window.
menuStyle(.borderlessButton) flattens the custom label to monochrome text, dropping the waiting/running/error tints; .button + .plain renders the label view as-is.
plus.rectangle.on.folder → plus, text.magnifyingglass → magnifyingglass, point.topleft.down.curvedto.point.bottomright.up → arrow.triangle.branch. Tooltips carry the meaning; the icons just need to be recognizable.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Redesigns the macOS sidebar to match the Conductor reference: a calm, flat project tree instead of the old attention-inbox.
What changed
Agent icons
Ship as loose SVGs loaded via
NSImage(SwiftPM doesn't compile asset catalogs), sourced from the dashboard-icons project. Resolved from each worktree's tmuxdetectedAgent.Verification
swift build --product Mori(debug) ✅swift build -c release --product Mori(strict concurrency) ✅https://claude.ai/code/session_01DKRNuzqVVenwcr6H5ypjLf