Skip to content

sidebar: redesign as a calm project tree with live agent cues - #97

Merged
vaayne merged 18 commits into
mainfrom
sidebar-conductor-redesign
Jul 3, 2026
Merged

vaayne merged 18 commits into
mainfrom
sidebar-conductor-redesign

Conversation

@vaayne

@vaayne vaayne commented Jun 29, 2026

Copy link
Copy Markdown
Owner

Redesigns the macOS sidebar to match the Conductor reference: a calm, flat project tree instead of the old attention-inbox.

What changed

  • Calm project tree — flat folder-style project list, each expanding inline into compact single-line worktree rows named by branch. Dropped the attention-inbox (filter pills, Needs You / Running sections, project letter tiles).
  • Per-branch glyphs — main/master vs linked worktrees vs detached HEAD read as distinct icons.
  • Collapse fully hides — ⌘B now hides the sidebar entirely instead of leaving a narrow icon rail; the rail code and its plumbing are deleted.
  • Live agent cue — while a worktree's agent is running, its leading slot shows that agent's own brand glyph (Claude Code, Codex, or Pi), template-tinted to the sidebar's running colour and breathing to signal activity. Unknown agents fall back to a generic AI glyph.

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 tmux detectedAgent.

Verification

  • swift build --product Mori (debug) ✅
  • swift build -c release --product Mori (strict concurrency) ✅
  • Icon load + template tint verified offline via NSImage rendering

https://claude.ai/code/session_01DKRNuzqVVenwcr6H5ypjLf

vaayne added 18 commits June 27, 2026 22:42
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.
@vaayne
vaayne merged commit a4e37a8 into main Jul 3, 2026
5 checks passed
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