feat(app): improve desktop v2 startup and controls#28788
Open
Hona wants to merge 1 commit into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR refines the desktop v2 UI/UX (Home, session composer, titlebar/status controls) and improves startup behavior by reducing workspace/session boot fanout and making MCP status/startup non-blocking, while adding branch-aware worktree creation plus branch listing API plumbing.
Changes:
- Add MCP “connecting” status + status-changed event, make configured MCP startup non-blocking, and serialize configured startup across projects.
- Add worktree branch listing endpoint + SDK bindings, and support specifying a branch when creating a worktree.
- Update desktop v2 UI components (Home empty states/actions, titlebar status control, session composer project/branch pickers, settings toggles).
Reviewed changes
Copilot reviewed 32 out of 32 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/ui/src/v2/components/icon.tsx | Adds new v2 icons used by desktop v2 controls (sidebar/status). |
| packages/sdk/js/src/v2/gen/types.gen.ts | Extends generated SDK types for MCP status + worktree branch/list/create inputs/events. |
| packages/sdk/js/src/v2/gen/sdk.gen.ts | Adds generated client method for listing worktree branches. |
| packages/opencode/test/project/worktree.test.ts | Adds coverage for branch-based worktree info, branch listing, and branch-based creation. |
| packages/opencode/test/mcp/lifecycle.test.ts | Adds tests ensuring MCP status is non-blocking and configured startup is serialized across projects. |
| packages/opencode/src/worktree/index.ts | Implements branch-aware worktree creation and adds local branch listing service method. |
| packages/opencode/src/server/routes/instance/httpapi/handlers/experimental.ts | Wires new experimental handler to list worktree branches. |
| packages/opencode/src/server/routes/instance/httpapi/groups/experimental.ts | Exposes experimental GET endpoint for listing git branches. |
| packages/opencode/src/mcp/index.ts | Introduces “connecting” status, status-changed bus event, and async/serialized configured startup. |
| packages/opencode/src/cli/cmd/mcp.ts | Displays “connecting” state in CLI MCP list output. |
| packages/app/src/pages/session/use-session-commands.tsx | Updates desktop v2 gating for file tree visibility in session commands. |
| packages/app/src/pages/session/session-side-panel.tsx | Updates desktop v2 gating for side panel visibility logic. |
| packages/app/src/pages/session/composer/session-composer-region.tsx | Removes now-unused new-session worktree change prop plumbing. |
| packages/app/src/pages/session.tsx | Removes old worktree prop passing and adjusts new session design view usage. |
| packages/app/src/pages/home.tsx | Loads sessions only for selected project root; adds empty states and project row actions/menus. |
| packages/app/src/i18n/en.ts | Adds new strings for Clear, MCP connecting, and v2 new-session/project/branch labels. |
| packages/app/src/context/settings.tsx | Adds showCustomAgents setting and setter. |
| packages/app/src/context/layout.tsx | Avoids creating child stores while rendering project list; removes startup session-load fanout. |
| packages/app/src/context/global-sync/event-reducer.ts | Applies new mcp.status.changed events into global sync store. |
| packages/app/src/context/global-sync/child-store.ts | Adds onCreate hook and existing() accessor for child store manager. |
| packages/app/src/context/global-sync/child-store.test.ts | Updates test setup for new onCreate hook. |
| packages/app/src/context/global-sync.tsx | Adds childVersion and existing() surface; polls MCP status while connecting. |
| packages/app/src/components/titlebar.tsx | Refactors v2 right-side controls and integrates server-scoped status popover. |
| packages/app/src/components/status-popover.tsx | Adds v2 trigger rendering and splits server vs directory status popovers. |
| packages/app/src/components/status-popover-body.tsx | Adds server-only body and refactors server list rendering; handles MCP connecting UI state. |
| packages/app/src/components/settings-general.tsx | Adds toggle for custom agents and expands advanced section gating to non-prod. |
| packages/app/src/components/session/session-new-design-view.tsx | Removes legacy project/branch selection UI (moved into composer). |
| packages/app/src/components/session/session-header.tsx | Adds v2 actions (status + review sidebar button) and updates desktop v2 gating. |
| packages/app/src/components/prompt-input/submit.ts | Supports creating sessions in selected project + passing branch when creating worktrees. |
| packages/app/src/components/prompt-input/submit.test.ts | Adds tests for selected project session creation and branch passthrough. |
| packages/app/src/components/prompt-input.tsx | Adds v2 composer project/branch pickers and custom agent control plumbing. |
| packages/app/src/components/dialog-select-mcp.tsx | Disables MCP toggles while connecting and adds connecting label support. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| const selectedProjectStore = createMemo(() => { | ||
| const project = selectedProject() | ||
| if (!project) return | ||
| return globalSync.child(project.worktree, { bootstrap: false })[0] |
Comment on lines
+123
to
+125
| label: "Update", | ||
| ariaLabel: language.t("toast.update.action.installRestart"), | ||
| title: version ? `Update ${version}` : undefined, |
| <input | ||
| ref={props.state.searchRef} | ||
| value={props.state.search} | ||
| placeholder={props.state.searchPlaceholder} |
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.
Summary
Verification
Notes