feat: project-centric navigation with inbox system
Summary
- Redesigned left sidebar from agent-centric to project-centric navigation model
- Added ProjectSidebar with project list, inbox section for attention items, and keyboard shortcuts
- Added projectStore (Zustand) and inboxStore for state management with IPC persistence
- Added useProjectRestoration hook with one-time groups-to-projects migration
- Added useInboxWatcher hook that monitors session state transitions (busy→idle, busy→error, →waiting_input) and surfaces non-active sessions in the inbox
- Removed deprecated group CRUD and bookmark actions from sessionStore
- 113 new tests across 5 test files, 0 regressions
Key Changes
src/renderer/components/ProjectSidebar/— InboxItem, InboxSection, ProjectItem, ProjectSidebarsrc/renderer/stores/projectStore.ts+inboxStore.ts— new Zustand storessrc/renderer/hooks/project/useProjectRestoration.ts— startup + migrationsrc/renderer/hooks/useInboxWatcher.ts— state transition → inbox triggerssrc/main/ipc/handlers/persistence.ts—projects:getAll,projects:setAllhandlerssrc/renderer/App.tsx— wired in ProjectSidebar, hooks, keyboard shortcutsCLAUDE.md— updated documentation for navigation model
Test plan
- [x] All 113 new tests pass (projectStore, inboxStore, useProjectRestoration, useInboxWatcher, persistence)
- [x] Full renderer test suite: 12,978 passed, 0 regressions
- [x] Persistence test updated for new project handlers (10 channels)
- [ ] Manual smoke test: create project via folder picker, verify inbox items appear on state transitions
🤖 Generated with Claude Code
Summary by CodeRabbit
-
New Features
- Introduced project-centric navigation with a sidebar displaying projects and their associated sessions, replacing the previous session list view.
- Added an inbox system that surfaces important session notifications (task completion, errors, awaiting input).
- Added keyboard shortcuts for navigating between projects and creating new ones.
-
Documentation
- Expanded internal documentation with guides for architecture, data models, performance patterns, common pitfalls, and testing conventions.
This PR introduces project-centric navigation, replacing a session-list sidebar with a Projects hierarchy containing per-project sessions, plus a global Inbox for attention items. It adds Project and InboxItem types, new Zustand stores (projectStore, inboxStore), IPC persistence for projects, UI components (ProjectSidebar with InboxSection), restoration and migration logic from groups to projects, and comprehensive test coverage, while removing group/bookmark store APIs. 🎯 4 (Complex) | ⏱️ ~45 minutes ✏️ Tip: You can configure your own custom pre-merge checks in the settings.📝 Walkthrough
Walkthrough
Changes
Cohort / File(s)
Summary
Documentation & Planning
.claude/memory/agents.md, .claude/memory/build-deploy.md, .claude/memory/data-model.md, .claude/memory/features.md, .claude/memory/ipc-api.md, .claude/memory/patterns.md, .claude/memory/performance.md, .claude/memory/pitfalls.md, .claude/memory/platform.md, .claude/memory/testing.md, .claude/memory/wizard.md, CLAUDE.md, docs/plans/2026-03-10-*Added 9 memory guides and 2 design/planning documents detailing agent system, build process, data model, features, IPC, patterns, performance, pitfalls, platform quirks, testing, and wizard system. Updated main CLAUDE.md with new documentation hierarchy and navigation model. Two detailed design docs outline project-centric navigation architecture, migration strategy, and data model changes.
Type System & Shared Definitions
src/shared/types.ts, src/renderer/types/index.tsAdded Project interface (id, name, repoPath, createdAt, optional color/collapsed). Extended Session with optional projectId. Added InboxReason union type and InboxItem interface with session/project/tab/reason metadata.
Project & Inbox Stores
src/renderer/stores/projectStore.ts, src/renderer/stores/inboxStore.tsNew Zustand stores: projectStore manages projects and active project selection with CRUD and selectors (selectActiveProject, selectAllProjects, selectProjectById, getProjectState/Actions). inboxStore manages inbox items with deduplication by sessionId+reason, dismissal by item/session/project, and selectors (selectInboxItems, selectInboxCount, selectInboxByProject).
Session Store Migration
src/renderer/stores/sessionStore.tsRemoved group management APIs (addGroup, removeGroup, updateGroup, toggleGroupCollapsed) and bookmark toggle. Renamed selectSessionsByGroup to selectSessionsByProject. Removed selectors: selectBookmarkedSessions, selectUngroupedSessions, selectGroupById.
Main Process Stores & Defaults
src/main/stores/defaults.ts, src/main/stores/getters.ts, src/main/stores/instances.ts, src/main/stores/index.ts, src/main/stores/types.tsAdded ProjectsData type definition. Added PROJECTS_DEFAULTS, getProjectsStore() getter. Extended store instances with projectsStore initialization (electron-store). Exposed new store via public getters and index exports.
IPC Persistence & Preload
src/main/ipc/handlers/persistence.ts, src/main/ipc/handlers/index.ts, src/main/preload/settings.ts, src/main/preload/index.ts, src/main/index.tsExtended persistence handlers to support projects (getAll/setAll channels). Added projectsStore to handler dependencies. Created createProjectsApi() in preload for IPC access to projects data. Wired projects store into main process initialization and IPC registration.
UI Components: Sidebar
src/renderer/components/ProjectSidebar/ProjectSidebar.tsx, src/renderer/components/ProjectSidebar/ProjectItem.tsx, src/renderer/components/ProjectSidebar/InboxSection.tsx, src/renderer/components/ProjectSidebar/InboxItem.tsx, src/renderer/components/ProjectSidebar/index.tsNew ProjectSidebar component replacing SessionList, rendering InboxSection header and Projects list. ProjectItem renders individual project with session count and selection/context menu. InboxSection shows dismissible inbox items with count badge. InboxItemComponent displays inbox entry with reason dot, tab/project name, and timestamp. All memoized with theme-aware styling.
Project Restoration & Inbox Logic
src/renderer/hooks/project/useProjectRestoration.ts, src/renderer/hooks/useInboxWatcher.tsuseProjectRestoration orchestrates on-startup: loads saved projects, runs group→project migration on first run (grouping by projectRoot), selects active project, debounced persistence. useInboxWatcher creates InboxItems on session state transitions (busy→idle/error, waiting_input) for non-active sessions; pure function shouldCreateInboxItem for testability.
Keyboard & App Integration
src/renderer/constants/shortcuts.ts, src/renderer/hooks/keyboard/useMainKeyboardHandler.ts, src/renderer/App.tsxAdded cycleProjectNext/Prev and newProject shortcuts (Ctrl+Shift+]/[, Ctrl+Shift+n). Wired shortcuts into keyboard handler to cycle projects/sessions and trigger project creation. Replaced SessionList with ProjectSidebar in App. Integrated useProjectRestoration and useInboxWatcher hooks. Added handleAddProject callback for new project creation via folder picker.
Comprehensive Tests
src/__tests__/renderer/stores/projectStore.test.ts, src/__tests__/renderer/stores/inboxStore.test.ts, src/__tests__/renderer/stores/sessionStore.test.ts, src/__tests__/renderer/hooks/useProjectRestoration.test.ts, src/__tests__/renderer/hooks/useInboxWatcher.test.ts, src/__tests__/main/ipc/handlers/persistence.test.tsAdded projectStore tests (CRUD, selectors, non-React accessors). Added inboxStore tests (deduplication, dismissal, selectors). Updated sessionStore tests to use selectSessionsByProject. Added useProjectRestoration tests (migration, load/save, debouncing, error handling). Added useInboxWatcher tests (shouldCreateInboxItem transitions, store integration, deduplication). Added persistence test coverage for projects IPC handlers.
Sequence Diagrams
sequenceDiagram
participant App
participant useProjectRestoration
participant projectStore
participant sessionStore
participant IPC as maestro.projects
participant Disk
App->>useProjectRestoration: mount
useProjectRestoration->>sessionStore: check initialLoadComplete
alt initialLoadComplete
useProjectRestoration->>IPC: getAll() projects
IPC->>Disk: read projects
Disk-->>IPC: projects or null
IPC-->>useProjectRestoration: projects[]
alt projects exist
useProjectRestoration->>projectStore: setProjects(loaded)
useProjectRestoration->>projectStore: setActiveProjectId(fromSession)
else no projects
useProjectRestoration->>useProjectRestoration: migrateGroupsToProjects()
useProjectRestoration->>sessionStore: setSessions(migratedSessions)
useProjectRestoration->>projectStore: setProjects(migrated)
useProjectRestoration->>IPC: setAll(migrated)
IPC->>Disk: persist projects
end
useProjectRestoration->>useProjectRestoration: debounce persistence
useProjectRestoration->>IPC: setAll(projects)
IPC->>Disk: write projects
end
sequenceDiagram
participant sessionStore
participant useInboxWatcher
participant shouldCreateInboxItem
participant inboxStore
participant projectStore
participant Inbox
sessionStore->>useInboxWatcher: state change detected
useInboxWatcher->>shouldCreateInboxItem: (prevState, newState, sessionId, activeSessionId)
alt session is active
shouldCreateInboxItem-->>useInboxWatcher: null (suppress)
else non-active session
alt busy → idle/error or any → waiting_input
shouldCreateInboxItem-->>useInboxWatcher: reason (finished/error/waiting_input)
useInboxWatcher->>projectStore: getProject(session.projectId)
useInboxWatcher->>inboxStore: addItem(sessionId, reason, projectName, ...)
inboxStore->>Inbox: dedup by sessionId+reason
Inbox->>Inbox: render InboxItem with badge
else no transition
shouldCreateInboxItem-->>useInboxWatcher: null
end
end
sequenceDiagram
participant User
participant KeyboardHandler
participant projectStore
participant sessionStore
participant ProjectSidebar
participant UI
User->>KeyboardHandler: Ctrl+Shift+]
KeyboardHandler->>projectStore: getState() → activeProjectId, projects
KeyboardHandler->>projectStore: compute nextProjectId
KeyboardHandler->>projectStore: setActiveProjectId(nextProjectId)
KeyboardHandler->>sessionStore: selectSessionsByProject(nextProjectId)
KeyboardHandler->>sessionStore: setActiveSessionId(firstSessionId)
projectStore->>ProjectSidebar: notify activeProjectId change
sessionStore->>ProjectSidebar: notify activeSessionId change
ProjectSidebar->>UI: re-render with new active project highlight
Estimated code review effort
Possibly related PRs
🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name
Status
Explanation
Resolution
Docstring Coverage
⚠️ Warning
Docstring coverage is 65.52% which is insufficient. The required threshold is 80.00%.
Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name
Status
Explanation
Description Check
✅ Passed
Check skipped - CodeRabbit’s high-level summary is enabled.
Title check
✅ Passed
The PR title clearly and concisely describes the main feature: introducing project-centric navigation with an inbox system. It accurately summarizes the primary architectural change across the codebase.
✨ Finishing Touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Comment @coderabbitai help to get the list of available commands and usage tips.
Greptile Summary
This PR replaces the agent-centric left sidebar with a project-centric navigation model. It introduces projectStore and inboxStore (Zustand), a ProjectSidebar component with an inbox section, a useProjectRestoration hook for startup loading and one-time groups→projects migration, a useInboxWatcher hook that surfaces background session completions/errors/input-waits, and the corresponding IPC persistence layer (projects:getAll / projects:setAll). The overall architecture is sound and the test coverage (113 new tests, 0 regressions) is thorough.
Issues found:
- Stale relative timestamps in
InboxItem—timeAgois frozen at mount viauseMemo; it never refreshes, so items will permanently display their initial age string until the component is unmounted. - Inbox deduplication silently drops re-notifications —
addItemignores new items whose(sessionId, reason)pair already exists. If a session completes, the inbox item is never dismissed, and the session then completes a second time, the second notification is silently dropped. The existing entry should be replaced rather than discarded. ProjectSidebarbypasses the group-chat-dismissal wrapper — BothhandleSelectProjectandhandleNavigateToInboxItemcall the rawsetActiveSessionIdfromsessionStoreinstead of the wrapped version inApp.tsxthat callssetActiveGroupChatId(null). This leaves the group chat panel open when the user navigates from the sidebar.- Dead code left in
App.tsx—SessionListis imported but unused, anduseSessionListPropsis still called with its result suppressed under@ts-expect-error. The hook's side-effects still run on every render, and the suppressed error obscures an underlying type mismatch. any[]type in preload —createProjectsApi.setAllusesany[]instead ofProject[], losing type safety at the IPC boundary.
Confidence Score: 3/5
- Safe to merge after addressing the group-chat bypass, stale timestamp, and inbox deduplication issues.
- The architectural foundation (stores, IPC, migration) is solid and well-tested, but three logic bugs in the UI layer — stale timestamps, silent drop of repeat notifications, and group-chat not dismissed on sidebar navigation — should be resolved before shipping. The dead-code in App.tsx is also a merge-readiness concern.
- src/renderer/components/ProjectSidebar/InboxItem.tsx (stale time), src/renderer/stores/inboxStore.ts (deduplication replacement), src/renderer/components/ProjectSidebar/ProjectSidebar.tsx (group-chat dismissal), src/renderer/App.tsx (dead code cleanup)
Important Files Changed
| Filename | Overview |
|---|---|
| src/renderer/stores/inboxStore.ts | New Zustand store for inbox items; deduplication logic silently drops repeat notifications for the same session+reason (e.g. a session that completes twice before the first item is dismissed). |
| src/renderer/components/ProjectSidebar/InboxItem.tsx | New inbox item component; relative timestamp is frozen at mount time via useMemo and never refreshes, causing stale "just now" / "Xm ago" displays. |
| src/renderer/components/ProjectSidebar/ProjectSidebar.tsx | New project-centric left sidebar; navigation actions use the raw store setter instead of App.tsx's wrapped setActiveSessionId, so the active group chat is never dismissed on project/inbox navigation. |
| src/renderer/App.tsx | Wires ProjectSidebar, useProjectRestoration, and useInboxWatcher into the app; retains dead useSessionListProps call under @ts-expect-error, indicating an incomplete migration. |
| src/renderer/hooks/project/useProjectRestoration.ts | New hook handling startup project loading and one-time groups→projects migration; migration ordering (persist data before setting the flag) and React Strict Mode guard are correctly implemented. |
| src/renderer/hooks/useInboxWatcher.ts | New hook subscribing to sessionStore to detect state transitions and create inbox items; pure shouldCreateInboxItem function is well-tested and correctly ignores no-op same-state transitions. |
| src/renderer/stores/projectStore.ts | New Zustand store for project state; CRUD operations, selectors, and functional-updater pattern are clean and consistent with the existing sessionStore design. |
| src/main/ipc/handlers/persistence.ts | Adds projects:getAll and projects:setAll IPC handlers; error handling follows the pattern used by existing session/group handlers. |
| src/main/preload/settings.ts | Adds createProjectsApi for the renderer ↔ main IPC bridge; uses any[] instead of Project[] for the setAll argument, losing type safety at the IPC boundary. |
| src/renderer/components/ProjectSidebar/InboxSection.tsx | Collapsible inbox section component; two separate useInboxStore subscriptions (items + count) are slightly redundant but harmless, and the hide-when-empty behavior is correctly implemented. |
| src/renderer/stores/sessionStore.ts | Removes deprecated group CRUD actions (addGroup, removeGroup, updateGroup, toggleGroupCollapsed, toggleBookmark) and related selectors; setGroups is retained for migration consumers as documented. |
Sequence Diagram
sequenceDiagram
participant S as SessionStore
participant IW as useInboxWatcher
participant IS as inboxStore
participant PS as ProjectSidebar
participant App as App.tsx
Note over App: App startup
App->>App: useProjectRestoration()
App->>App: useInboxWatcher()
Note over App: Load projects from disk
App->>App: window.maestro.projects.getAll()
App->>S: setProjects(savedProjects)
Note over S,IW: Session state transition (background session)
S-->>IW: subscribe callback fires (prevState, newState)
IW->>IW: shouldCreateInboxItem(prevState, newState, sessionId, activeId)
IW->>IS: addItem({ id, sessionId, reason, projectName, ... })
IS->>IS: deduplicate by (sessionId + reason)
Note over PS,App: User clicks inbox item
PS->>S: setActiveSessionId(item.sessionId) [raw — no group chat dismissal]
PS->>S: setActiveProjectId(item.projectId)
PS->>IS: dismissItem(item.id)
PS->>IS: dismissAllForSession(item.sessionId)
Note over App: User navigates via setActiveSessionId wrapper
App->>App: setActiveGroupChatId(null)
App->>S: setActiveSessionIdFromContext(id)
App->>IS: dismissAllForSession(id)
Note over App: Project store change → debounced persist
S-->>App: useProjectRestoration debounce (2000ms)
App->>App: window.maestro.projects.setAll(projects)
Last reviewed commit: 8873b3e
@wistfulvariable please run the following on your machine for this PR so it can move toward acceptance.
Here is the prompt you should run:
You are responsible for getting this PR in RunMaestro/Maestro to an accept-ready state.
PR: https://github.com/RunMaestro/Maestro/pull/549
Branch/Head: inspect the PR branch locally before making changes.
Goal:
Drive this PR to zero unresolved CodeRabbit and Greptile review threads.
Process:
1. Fetch the PR locally and work from a clean git worktree on the PR branch.
2. List all unresolved CodeRabbit and Greptile review threads for this PR.
3. For each unresolved bot thread:
- verify whether the issue is still real on the current PR head
- if it is already fixed or the thread is outdated, resolve the GitHub review thread immediately
- if it is real, implement the smallest correct fix on the PR branch
4. After each fix batch:
- run the relevant validation commands locally
- push the branch
- re-poll the PR’s unresolved CodeRabbit/Greptile threads
- resolve any newly stale/fixed bot threads
5. Repeat until this PR has zero unresolved CodeRabbit and Greptile threads.
Rules:
- Resolve bot threads only when the current branch state actually fixes them.
- Do not resolve human review threads unless explicitly asked.
- Be surgical. Do not broaden scope beyond the review findings.
- If local validation differs from CI because of environment issues, state the exact failing test/check and the exact missing dependency/file/path.
- If a bot comment is a design tradeoff rather than a bug, explain why and leave it unresolved only if it truly still applies.
Definition of done:
- zero unresolved CodeRabbit threads
- zero unresolved Greptile threads
- branch pushed
- latest validation/check status re-polled
- concise summary written with:
- PR URL
- commits pushed
- threads resolved
- any remaining blockers
Keep looping until the PR is clean.
@wistfulvariable this is a major design change. Instead of changing it for everybody, can you add this as an "encore feature" that, when enabled, will implement your re-imagined version of the left side panel? please also re-target to rc branch as we'll need to get it soak time there before merging into main it's such a big lift.
If you're not familiar with the Encore features, it is basically default disabled features. a pre-plugin pathway for allowing feature breadth without having to pull the app in multiple directions.
there is relevant CLAUDE*.md documentation as well as user docs about encore features.
Hey I'm super sorry for this. I'm a vibe coding idiot, and I intended to fork to make some test changes, then I told Claude to push to remote without updating the remote location.
No further action necessary.
Totally my fault, and I apologize for the trouble.
Thank you for building a really damned cool tool.
-- Johnny Lasater
On Wed, Mar 18, 2026 at 6:21 PM, Pedram Amini @.***> wrote:
pedramamini left a comment (RunMaestro/Maestro#549) https://github.com/RunMaestro/Maestro/pull/549#issuecomment-4085934640
@wistfulvariable https://github.com/wistfulvariable this is a major design change. Instead of changing it for everybody, can you add this as an "encore feature" that, when enabled, will implement your re-imagined version of the left side panel? please also re-target to rc branch as we'll need to get it soak time there before merging into main it's such a big lift.
If you're not familiar with the Encore features, it is basically default disabled features. a pre-plugin pathway for allowing feature breadth without having to pull the app in multiple directions. image.png (view on web) https://github.com/user-attachments/assets/7063eddf-1168-4dd6-a9d3-c02561eff19e image.png (view on web) https://github.com/user-attachments/assets/70f11074-296c-476e-a9e5-d55657b9e077
there is relevant CLAUDE*.md http://claude%2A.md/ documentation as well as user docs about encore features.
— Reply to this email directly, view it on GitHub https://github.com/RunMaestro/Maestro/pull/549#issuecomment-4085934640, or unsubscribe https://github.com/notifications/unsubscribe-auth/AO2NOWUUUGYAFJV7WT5D6YD4RMOPTAVCNFSM6AAAAACWNL55UCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHM2DAOBVHEZTINRUGA . You are receiving this because you were mentioned.Message ID: @.***>
@wistfulvariable I'd still love to see how your sidebar looks and happily test it. Maybe it fixes my cluttering a little.
You can let Claude handle Encore featuresz. Ask him for it and it will find it through Claude files!
Thanks so much for this @wistfulvariable — project-centric navigation with an inbox is a really nice direction, and the test coverage (113 new tests, 0 regressions) is great to see. 🙏
A few things before we can merge:
🔧 Merge conflicts
The branch is currently in a conflicting state against main (mergeable: CONFLICTING). Could you please rebase onto the latest main and resolve the conflicts so we get a clean merge? documentation-2026-03-10 has fallen behind a few releases.
🤖 AI review feedback to address
CodeRabbit posted a CHANGES_REQUESTED review and Greptile flagged several issues too. The themes worth addressing before merge:
- Inbox dedup drops fresh events (both reviewers flagged) — in
inboxStore.tsaddItem, when the same(sessionId, reason)arrives again, the new item is silently dropped instead of replacing the stale one. Users miss the second completion. Suggest replacing the existing entry and moving it to the top. - Stale relative time in
InboxItem.tsx—timeAgois memoized onitem.timestampwhich never changes, so it freezes at mount. Needs asetIntervalrefresh. - Navigation bypasses the group-chat-dismissal wrapper —
ProjectSidebarcalls the rawsetActiveSessionIdfrom the store instead of theApp.tsxwrapped version that also clearsactiveGroupChatId. Pass the wrapped setter down as a prop. - Selecting an empty project doesn't clear
activeSessionId— sidebar and main panel can disagree about what's selected. - Keyboard accessibility —
InboxItemandProjectItemare mouse-only. Per our guidelines they needtabIndex,onKeyDown(Enter/Space), andoutline-none focus:ring-*styles.InboxItemshould also expose the reason as text (not just color) for screen readers. - Empty-array guards on project cycling —
cycleProjectNext/cycleProjectPrevinuseMainKeyboardHandler.tsproduceNaNindices whenprojects.length === 0. - Silent error swallowing —
useProjectRestorationcatches andconsole.errorsloadProjectsfailures, and the corresponding test codifies that behavior. Per our Sentry guidelines, unexpected failures should bubble up. Same for theany[]typing onprojects:setAllinpreload/settings.ts— please type it asProject[]. - Dead-code in
App.tsx—_SessionListis imported but never rendered, anduseSessionListPropsis still called with its result discarded under@ts-expect-error. IfSessionListis fully replaced byProjectSidebar, please remove the leftovers (and surface that as part of the dead-code hygiene checklist in CLAUDE.md). Session.projectIdis optional — CodeRabbit suggests narrowing this to required after migration so we don't reintroduce orphaned sessions; reasonable to consider but I'll leave the call to you.- Memory docs out of date —
.claude/memory/data-model.mdstill describes the pre-PR store layout.
Once the rebase is clean and these are addressed (or you've pushed back with reasoning on any you disagree with), ping me and I'll take another pass. Thanks again!