Skip to content

refactor: remove git detection from workspace wire and folder browse - #1787

Merged
sailist merged 1 commit into
MoonshotAI:mainfrom
sailist:refactor/drop-workspace-git-fields
Jul 16, 2026
Merged

refactor: remove git detection from workspace wire and folder browse#1787
sailist merged 1 commit into
MoonshotAI:mainfrom
sailist:refactor/drop-workspace-git-fields

Conversation

@sailist

@sailist sailist commented Jul 16, 2026

Copy link
Copy Markdown
Collaborator

Related Issue

None — the problem is explained below.

Problem

Workspace list responses and folder-browser (fs:browse) entries each carried best-effort git metadata (is_git_repo, branch) that required a .git / HEAD probe on every request, duplicated across both server generations (v1 and v2). The web UI consumed it only to render per-workspace git badges and branch labels — duplicating the branch/PR/diff status already shown for the active session, which comes from the dedicated session-level git status endpoint with proper caching. Two branch sources also disagreed in edge cases (worktrees, detached HEAD, stale values).

What changed

  • Removed is_git_repo / branch from the workspace wire schema and the fs:browse entry schema (shared protocol, the kap-server vendored copy, and the klient contract), and from both servers' workspace hydration and folder-browse paths; deleted all server-side detectGit probing plus the now-unused GitInfo types and re-exports.
  • Web: removed the git badges in the add-workspace dialog and folder browser, the per-workspace branch line in the mobile workspace switcher (falls back to the path), and the corresponding wire/type/mapper fields and locale strings. The chat header keeps showing branch, PR, and diff status from the active session's git status, unchanged.
  • The session-level git status endpoint remains the single source of git/PR information and is behaviorally untouched.

Checklist

  • I have read the CONTRIBUTING document.
  • I have linked a related issue, or explained the problem above.
  • I have added tests that prove my feature works.
  • Ran gen-changesets skill, or this PR needs no changeset.
  • Ran gen-docs skill, or this PR needs no doc update.

@changeset-bot

changeset-bot Bot commented Jul 16, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 1b17362

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@moonshot-ai/kimi-code Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@pkg-pr-new

pkg-pr-new Bot commented Jul 16, 2026

Copy link
Copy Markdown
pnpm dlx https://pkg.pr.new/@moonshot-ai/kimi-code@1b17362
npx https://pkg.pr.new/@moonshot-ai/kimi-code@1b17362

commit: 1b17362

@sailist
sailist merged commit 319001a into MoonshotAI:main Jul 16, 2026
18 checks passed
@github-actions github-actions Bot mentioned this pull request Jul 16, 2026
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