diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 661fdc95..da94479b 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1 +1 @@ -* @asispts +* @wrgrant diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml deleted file mode 100644 index 3ef4cf4b..00000000 --- a/.github/workflows/publish.yml +++ /dev/null @@ -1,40 +0,0 @@ -name: publish - -permissions: - contents: read - -on: - push: - tags: - - "v*" - -jobs: - deploy: - name: Deploy to ${{ matrix.name }} - runs-on: ubuntu-latest - strategy: - matrix: - include: - - name: VS Marketplace - pat: VS_MARKETPLACE_TOKEN - registryUrl: https://marketplace.visualstudio.com - - name: Open VSX - pat: OPEN_VSX_TOKEN - steps: - - uses: actions/checkout@v7 - - - uses: pnpm/action-setup@v6 - - uses: actions/setup-node@v7 - with: - node-version: 22 - cache: pnpm - - - name: Install dependencies - run: pnpm install --frozen-lockfile - - - name: Publish to ${{ matrix.name }} - uses: HaaLeo/publish-vscode-extension@v2 - with: - pat: ${{ secrets[matrix.pat] }} - registryUrl: ${{ matrix.registryUrl || '' }} - dependencies: false diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 00000000..41c867f1 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,36 @@ +name: Release VSIX + +on: + push: + tags: + - "v*" + +permissions: + contents: write + +jobs: + release: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v7 + + - uses: pnpm/action-setup@v6 + - uses: actions/setup-node@v7 + with: + node-version: 22 + cache: pnpm + + - name: Install dependencies + run: pnpm install --frozen-lockfile + + - name: Verify + run: pnpm run package && pnpm run test + + - name: Package VSIX + run: pnpm dlx @vscode/vsce package --no-dependencies --out git-fleet-${{ github.ref_name }}.vsix + + - name: Publish GitHub release + uses: softprops/action-gh-release@v2 + with: + generate_release_notes: true + files: git-fleet-${{ github.ref_name }}.vsix diff --git a/.vscodeignore b/.vscodeignore index 265072ad..dfd7df17 100644 --- a/.vscodeignore +++ b/.vscodeignore @@ -5,12 +5,20 @@ # Whitelist files !LICENSE !CHANGELOG.md +!CONTRIBUTING.md +!NOTICE.md +!README.md +!ROADMAP.md +!SECURITY.md +!docs/PUBLISHING.md !package.nls*.json !out/ !media/ !l10n/ !resources/icon.png +!resources/repository-navigator.svg +!resources/screenshots/** !resources/webview-icon.svg !resources/webview-icon-dark.svg !resources/webview-icon-light.svg diff --git a/CHANGELOG.md b/CHANGELOG.md index 4243f53e..89ac7828 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,73 +2,35 @@ ## [Unreleased] -## [0.5.0] - 2026-07-24 +## [0.1.0] - 2026-08-05 -### Added - -- Git Graph button in the Source Control view title -- Centralized logging with a dedicated "Git Graph" output channel - -### Changed - -- Optimize extension initialization logic -- Replace the "Locate HEAD" button with a highlighted HEAD commit row in the graph -- Status bar: add icons for the active and watching states -- Simplify localization to use English-string keys extracted with @vscode/l10n-dev - -### Fixed - -- Native browser context menu appearing over the graph in browser-based VS Code (vscode.dev / Codespaces) -- Header layout quirks around the refresh button - -## [0.4.0] - 2026-04-10 - -### Added - -- Full internationalization (i18n) support with multiple languages -- Language support: English (default), Simplified Chinese (简体中文), Traditional Chinese (繁體中文) - -### Fixed - -- Escape HTML in git output before rendering - -## [0.3.0] - 2026-03-26 +The first Git Fleet release, forked from Neo Git Graph 0.5.0. ### Added -- Introduce gitClient based on simple-git -- Added a button to locate HEAD in the graph +- A dedicated Git Fleet Activity Bar pane for cross-repository navigation +- Repository arrangements by recent activity, dirty-file count, or folder tree +- A persistent hide-clean-repositories control +- Configurable global repository search roots for projects outside the workspace +- Nested repository discovery to a default depth of four folders +- Clickable Uncommitted Changes details with file-level diffs +- A right-side Git worktree rail with confirmed HEAD positions, dirty state, branch information, inferred bases, and offscreen continuation arrows +- Manifest regression tests for valid VS Code view identifiers ### Changed -- Extract webview bridge -- Extract webview lifecycle - -## [0.2.0] - 2026-03-17 - -### Added +- Renamed the extension, commands, settings, views, logs, and diff scheme to Git Fleet +- Moved cross-repository navigation out of the built-in Source Control pane +- Kept the graph cell visible through row selection styling +- Updated the product identity to `wgrant-dev.git-fleet` -- Add initial test suite and CI configuration - -### Fixed - -- Remove information message - -## [0.1.1] - 2026-02-23 - -### Changed +### Security -- Migrate build system to esbuild and upgrade dependencies -- Add oxlint linter and oxfmt formatter +- Removed an inherited hard-coded GitLab token from avatar lookup requests -## [0.1.0] - 2026-02-18 +## Neo Git Graph history -Initial release +Git Fleet began from Neo Git Graph 0.5.0. Its earlier changelog remains available in the [upstream repository](https://github.com/asispts/neo-git-graph/blob/main/CHANGELOG.md). -[Unreleased]: https://github.com/asispts/neo-git-graph/compare/v0.5.0...HEAD -[0.5.0]: https://github.com/asispts/neo-git-graph/compare/v0.4.0...v0.5.0 -[0.4.0]: https://github.com/asispts/neo-git-graph/compare/v0.3.0...v0.4.0 -[0.3.0]: https://github.com/asispts/neo-git-graph/compare/v0.2.0...v0.3.0 -[0.2.0]: https://github.com/asispts/neo-git-graph/compare/v0.1.1...v0.2.0 -[0.1.1]: https://github.com/asispts/neo-git-graph/compare/v0.1.0...v0.1.1 -[0.1.0]: https://github.com/asispts/neo-git-graph/releases/tag/v0.1.0 +[Unreleased]: https://github.com/wrgrant/git-fleet/compare/v0.1.0...HEAD +[0.1.0]: https://github.com/wrgrant/git-fleet/releases/tag/v0.1.0 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 00000000..003d3f26 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,23 @@ +# Contributing to Git Fleet + +Thanks for helping make multi-repository Git work easier to understand. + +## Before opening a change + +Open an issue for behavior changes that affect repository discovery, Git mutations, worktree inference, or the extension identity. Small fixes and tests can go directly to a pull request. + +## Local verification + +```sh +pnpm install +pnpm run format +pnpm run lint +pnpm run typecheck +pnpm run test +pnpm run test:ext +pnpm run package +``` + +Keep the repository navigator compact and navigational. Git mutations should remain in a surface that makes their repository and history context obvious. + +All contributions are accepted under the repository's [MIT License](LICENSE). Preserve upstream attribution when moving or substantially rewriting inherited code. diff --git a/LICENSE b/LICENSE index 85d3ad3b..0743d032 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,7 @@ MIT License -Copyright (c) 2019 mhutchie. Fork (c) 2026-present asispts +Copyright (c) 2019 mhutchie. Fork (c) 2026-present asispts. +Git Fleet modifications (c) 2026 William Grant. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/NOTICE.md b/NOTICE.md new file mode 100644 index 00000000..58238f00 --- /dev/null +++ b/NOTICE.md @@ -0,0 +1,9 @@ +# Attribution notice + +Git Fleet is a software fork of [Neo Git Graph](https://github.com/asispts/neo-git-graph), created and maintained by Asis Pattisahusiwa under the MIT License. + +Neo Git Graph is based on commit [`4af8583`](https://github.com/mhutchie/vscode-git-graph/commit/4af8583a42082b2c230d2c0187d4eaff4b69c665) of [Git Graph](https://github.com/mhutchie/vscode-git-graph), created by Michael Hutchison. That commit and its ancestors were released under the MIT License. Git Fleet does not incorporate later source releases that use a different license. + +Git Fleet retains the original copyright and license notices. The Git Fleet name, repository navigator, working-tree details, worktree visualization, and subsequent modifications are maintained independently by William Grant and contributors. + +Git Fleet is not affiliated with or endorsed by Neo Git Graph, Git Graph, their maintainers, Git, GitHub, Microsoft, or Visual Studio Code. diff --git a/README.md b/README.md index ae9266c7..e7f4e979 100644 --- a/README.md +++ b/README.md @@ -1,73 +1,82 @@
One pane for every repository. A familiar Git graph for each one.
+ -## Why this fork +## What Git Fleet adds -The original [Git Graph](https://github.com/mhutchie/vscode-git-graph) by mhutchie changed its license in May 2019. -Everything after [commit 4af8583](https://github.com/mhutchie/vscode-git-graph/commit/4af8583a42082b2c230d2c0187d4eaff4b69c665) is no longer MIT. +- A dedicated Activity Bar pane instead of another toolbar inside Source Control +- Repository discovery below every workspace folder, including nested projects +- Optional global search roots for repositories outside the current workspace +- Recent-activity, dirty-file, and folder-tree arrangements +- A persistent eye control that hides clean repositories +- A clickable Uncommitted Changes row with the same file tree and diff flow as a commit +- A worktree rail showing each checkout's HEAD, dirty state, branch, and inferred base +- Viewport-edge arrows when a worktree connector continues above or below the loaded history -This fork is based on the last MIT commit and: + -- Keeps MIT license -- Adds devcontainer support -- Adds internationalization support (English, zh-CN, zh-TW) -- Improves codebase, tooling, and maintainability +The repository navigator is intentionally read-only. Repository-level actions—checkout, branch, merge, tag, reset, cherry-pick, and more—stay in the graph where their context is visible. -## Features +## Install -- **Graph view**: See branches, tags, and uncommitted changes in one graph -- **Commit details**: Click a commit to see message, files, and diffs -- **Branch actions**: Create, checkout, rename, delete, and merge -- **Tag actions**: Create, delete, and push tags -- **Commit actions**: Checkout, cherry-pick, revert, and reset -- **Avatar support**: Optional avatars from GitHub, GitLab, or Gravatar -- **Multi-repo**: Work with multiple repositories in one workspace -- **Devcontainer ready**: Works in remote and container environments +Git Fleet is not yet listed in the VS Code Marketplace. Download the latest `.vsix` from [GitHub Releases](https://github.com/wrgrant/git-fleet/releases), then run: + +```sh +code --install-extension git-fleet-v0.1.0.vsix +``` + +Or choose **Extensions: Install from VSIX...** from the VS Code Command Palette. + +After installation, select the Git Fleet icon in the Activity Bar. The folder-plus button adds a repository search root that should be visible from every VS Code window. ## Configuration -All settings use the `neo-git-graph` prefix. +All extension settings use the `git-fleet` prefix. -| Setting | Default | Description | -| ----------------------------- | --------------- | ------------------------------------------------ | -| `autoCenterCommitDetailsView` | `true` | Center commit details when opened | -| `dateFormat` | `"Date & Time"` | `"Date & Time"`, `"Date Only"`, or `"Relative"` | -| `dateType` | `"Author Date"` | `"Author Date"` or `"Commit Date"` | -| `fetchAvatars` | `false` | Fetch avatars (sends email to external services) | -| `graphColours` | 12 defaults | Colors for graph lines | -| `graphStyle` | `"rounded"` | `"rounded"` or `"angular"` | -| `initialLoadCommits` | `300` | Commits to load on open | -| `loadMoreCommits` | `100` | Commits to load on demand | -| `maxDepthOfRepoSearch` | `0` | Folder depth for repo search | -| `showCurrentBranchByDefault` | `false` | Show only current branch on open | -| `showStatusBarItem` | `true` | Show status bar button | -| `showUncommittedChanges` | `true` | Show uncommitted changes node | -| `tabIconColourTheme` | `"colour"` | `"colour"` or `"grey"` | +| Setting | Default | Purpose | +| -------------------------------------- | ------- | ------------------------------------------------- | +| `git-fleet.repositorySearchRoots` | `[]` | Additional folders to scan in every window | +| `git-fleet.maxDepthOfRepoSearch` | `4` | Nested folder depth used for repository discovery | +| `git-fleet.showUncommittedChanges` | `true` | Show working changes as the first graph row | +| `git-fleet.showCurrentBranchByDefault` | `false` | Open the graph filtered to the current branch | +| `git-fleet.initialLoadCommits` | `300` | Initial graph history length | +| `git-fleet.loadMoreCommits` | `100` | Additional commits loaded on demand | +| `git-fleet.fetchAvatars` | `false` | Fetch commit avatars from external services | -## Installation +The full settings list is available in VS Code under **Extensions → Git Fleet**. -Search for `neo-git-graph` in Extensions, or install from: +## Worktree history -- [VS Code Marketplace](https://marketplace.visualstudio.com/items?itemName=asispts.neo-git-graph) -- [Open VSX Registry](https://open-vsx.org/extension/asispts/neo-git-graph) +Git records a worktree's current HEAD but not the exact commit from which that worktree was originally created. Git Fleet therefore draws HEAD connectors as confirmed state and labels base connectors as inferred merge bases against the repository's default branch. That distinction is deliberate. -## License +## Project lineage and attribution + +Git Fleet is an MIT-licensed fork of [asispts/neo-git-graph](https://github.com/asispts/neo-git-graph). Neo Git Graph is based on the last MIT-licensed commit of Michael Hutchison's [mhutchie/vscode-git-graph](https://github.com/mhutchie/vscode-git-graph), commit [`4af8583`](https://github.com/mhutchie/vscode-git-graph/commit/4af8583a42082b2c230d2c0187d4eaff4b69c665). -MIT — see [LICENSE](LICENSE). +Git Fleet preserves the MIT license and copyright notices from both upstream projects. It is maintained independently and is not affiliated with or endorsed by either upstream project. See [NOTICE.md](NOTICE.md) for the attribution chain. + +## Development + +```sh +pnpm install +pnpm run typecheck +pnpm run lint +pnpm run test +pnpm run package +``` + +Contributions are welcome. Start with [CONTRIBUTING.md](CONTRIBUTING.md), see [ROADMAP.md](ROADMAP.md) for planned work, and use [docs/PUBLISHING.md](docs/PUBLISHING.md) for the release process. + +## License -> Not related to the original Git Graph project. +[MIT](LICENSE) © Michael Hutchison, Asis Pattisahusiwa, and Git Fleet contributors. diff --git a/ROADMAP.md b/ROADMAP.md new file mode 100644 index 00000000..9d2f9dc6 --- /dev/null +++ b/ROADMAP.md @@ -0,0 +1,20 @@ +# Git Fleet roadmap + +Git Fleet 0.1 focuses on visibility: find repositories, see which ones need attention, and open a familiar graph with worktree context. + +## Next + +- Separate repository **layout** from **sort order**. Layout becomes flat list or folder tree; sort becomes recent activity, dirty-file count, or alphabetical. Tree sorting applies within each folder. +- Let users remove, rename, temporarily disable, and reorder configured repository search roots from the navigator. +- Add stale-branch, ahead/behind, and fetch-state signals without turning the navigator into another Source Control action surface. +- Improve worktree base inference and make the confirmed-versus-inferred distinction even easier to scan. +- Add keyboard-first repository switching. + +## Later + +- Safe, contextual repository actions from the navigator +- Saved fleet scopes for work, personal, client, or monorepo groupings +- Optional notifications or health summaries for abandoned dirty repositories +- Marketplace and Open VSX distribution + +Roadmap items are direction, not commitments. Please open an issue with the problem you are trying to solve, not only a proposed control. diff --git a/SECURITY.md b/SECURITY.md new file mode 100644 index 00000000..60e6ba42 --- /dev/null +++ b/SECURITY.md @@ -0,0 +1,7 @@ +# Security policy + +Please do not open a public issue for a suspected vulnerability or exposed credential. Use GitHub's private vulnerability reporting for `wrgrant/git-fleet` when it is available, or contact the maintainer through [wgrant.dev](https://wgrant.dev). + +Git Fleet runs Git commands against local repositories and can expose Git actions that change repository state. Review the selected repository and command before confirming a mutation. Avatar fetching is disabled by default because enabling it sends commit email-derived lookup data to external avatar services. + +Only the latest Git Fleet release receives security fixes. diff --git a/docs/PUBLISHING.md b/docs/PUBLISHING.md new file mode 100644 index 00000000..169bd82a --- /dev/null +++ b/docs/PUBLISHING.md @@ -0,0 +1,35 @@ +# Publishing Git Fleet + +GitHub Releases are the first distribution channel. Marketplace publishing is intentionally a separate, manual decision. + +## GitHub release + +1. Confirm `package.json` version, `CHANGELOG.md`, screenshots, and release notes. +2. Run `pnpm run format`, `pnpm run lint`, `pnpm run typecheck`, `pnpm run test`, and `pnpm run package`. +3. Package locally with `pnpm dlx @vscode/vsce package --no-dependencies --out git-fleet-vX.Y.Z.vsix`. Runtime dependencies are bundled by esbuild. +4. Install that exact VSIX into stable VS Code and smoke-test repository discovery, the Activity Bar view, working changes, worktrees, and Git actions. +5. Tag the verified commit as `vX.Y.Z` and push the tag. The release workflow packages a VSIX and attaches it to a GitHub release. + +## First VS Code Marketplace release + +1. Create the Marketplace publisher `wgrant-dev` and verify its public profile. +2. Verify that `package.json` still declares publisher `wgrant-dev`, name `git-fleet`, and a unique version. The resulting extension ID is `wgrant-dev.git-fleet`. +3. Review the listing copy, icon, screenshots, repository link, license, privacy implications, and support links in a packaged VSIX. +4. Upload the already-tested VSIX through the [Marketplace publisher management page](https://marketplace.visualstudio.com/manage/publishers/). VS Code officially supports this manual route, and it keeps the first release independent from a long-lived publishing credential. +5. Verify installation from a clean VS Code profile and confirm updates resolve from the new ID. +6. Only after the manual flow is stable, add a separately approved automated publish job. Follow the current [VS Code publishing documentation](https://code.visualstudio.com/api/working-with-extensions/publishing-extension); Microsoft has announced retirement of global Azure DevOps PATs on December 1, 2026, so prefer the documented Microsoft Entra ID flow instead of designing new automation around a global PAT. + +## Open VSX + +Open VSX uses a separate namespace and token. Claim the `wgrant-dev` namespace, verify ownership, and publish the same already-tested VSIX with `ovsx`. Do not make Marketplace and Open VSX publishing part of the GitHub release job until both identities and recovery procedures are confirmed. + +## Identity invariants + +- GitHub repository: `wrgrant/git-fleet` +- Marketplace publisher: `wgrant-dev` +- Package name: `git-fleet` +- Extension ID: `wgrant-dev.git-fleet` +- Command, view, and setting namespace: `git-fleet` +- Activity Bar view container ID: `git-fleet` + +Changing the publisher or package name after release creates a different extension identity and breaks automatic updates, so treat both values as permanent. diff --git a/flake.nix b/flake.nix index f332c341..a7fd7297 100644 --- a/flake.nix +++ b/flake.nix @@ -1,5 +1,5 @@ { - description = "(neo) Git Graph — VS Code extension dev environment"; + description = "Git Fleet — VS Code extension development environment"; inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; diff --git a/l10n/bundle.l10n.json b/l10n/bundle.l10n.json index 4d4ce716..7cfef0b6 100644 --- a/l10n/bundle.l10n.json +++ b/l10n/bundle.l10n.json @@ -1,15 +1,17 @@ { "No Git repository found — watching for one": "No Git repository found — watching for one", - "View Git Graph": "View Git Graph", + "Open Git Fleet": "Open Git Fleet", "Repo": "Repo", "Branch": "Branch", "Show Remote Branches": "Show Remote Branches", "Refresh": "Refresh", - "Unable to load Git Graph": "Unable to load Git Graph", + "Worktrees": "Worktrees", + "Unable to load Git Fleet": "Unable to load Git Fleet", "Either the current workspace does not contain a Git repository, or the Git repository is not configured correctly.": "Either the current workspace does not contain a Git repository, or the Git repository is not configured correctly.", "If you are using a portable Git installation, make sure you have set the Visual Studio Code Setting \"git.path\" to the path of your portable installation (e.g. \"C:\\Program Files\\Git\\bin\\git.exe\" on Windows).": "If you are using a portable Git installation, make sure you have set the Visual Studio Code Setting \"git.path\" to the path of your portable installation (e.g. \"C:\\Program Files\\Git\\bin\\git.exe\" on Windows).", "Added in {0}": "Added in {0}", "Deleted in {0}": "Deleted in {0}", + "Working Tree": "Working Tree", "Loading ...": "Loading ...", "Load More Commits": "Load More Commits", "Show All": "Show All", @@ -20,6 +22,16 @@ "Date": "Date", "Author": "Author", "Commit": "Commit", + "Hover to connect HEAD and its inferred base to history.": "Hover to connect HEAD and its inferred base to history.", + "current": "current", + "clean": "clean", + "{0} changed": "{0} changed", + "prunable": "prunable", + "locked": "locked", + "base {0}": "base {0}", + "{0} ahead · {1} behind": "{0} ahead · {1} behind", + "outside loaded history": "outside loaded history", + "Changes in the checkout that have not been committed.": "Changes in the checkout that have not been committed.", "Unable to load commit details": "Unable to load commit details", "Unable to Copy {0} to Clipboard": "Unable to Copy {0} to Clipboard", "Unable to view diff of file": "Unable to view diff of file", diff --git a/l10n/bundle.l10n.zh-cn.json b/l10n/bundle.l10n.zh-cn.json index c6fd057e..00496c55 100644 --- a/l10n/bundle.l10n.zh-cn.json +++ b/l10n/bundle.l10n.zh-cn.json @@ -1,10 +1,11 @@ { "No Git repository found — watching for one": "未找到 Git 仓库 — 正在监视", - "View Git Graph": "查看 Git 分支图", + "Open Git Fleet": "打开 Git Fleet", "Repo": "仓库", "Branch": "分支", "Show Remote Branches": "显示远程分支", "Refresh": "刷新", + "Worktrees": "工作树", "Loading ...": "加载中 ...", "Load More Commits": "加载更多提交", "Show All": "显示全部", @@ -15,9 +16,20 @@ "Date": "日期", "Author": "作者", "Commit": "提交", - "Unable to load Git Graph": "无法加载 Git 图形", + "Unable to load Git Fleet": "无法加载 Git Fleet", "Either the current workspace does not contain a Git repository, or the Git repository is not configured correctly.": "当前工作区不包含 Git 仓库,或者 Git 仓库配置不正确。", "If you are using a portable Git installation, make sure you have set the Visual Studio Code Setting \"git.path\" to the path of your portable installation (e.g. \"C:\\Program Files\\Git\\bin\\git.exe\" on Windows).": "如果您使用的是便携版 Git,请确保已将 Visual Studio Code 的设置 “git.path” 设置为便携版安装的路径(例如 Windows 上的 “C:\\Program Files\\Git\\bin\\git.exe”)。", + "Working Tree": "工作目录", + "Hover to connect HEAD and its inferred base to history.": "悬停以将 HEAD 及其推断的基点连接到历史记录。", + "current": "当前", + "clean": "干净", + "{0} changed": "{0} 个更改", + "prunable": "可清理", + "locked": "已锁定", + "base {0}": "基点 {0}", + "{0} ahead · {1} behind": "领先 {0} · 落后 {1}", + "outside loaded history": "在已加载历史记录之外", + "Changes in the checkout that have not been committed.": "检出目录中尚未提交的更改。", "Add Tag": "添加标签", "Create Branch": "创建分支", "Checkout": "检出", diff --git a/l10n/bundle.l10n.zh-tw.json b/l10n/bundle.l10n.zh-tw.json index 87da50c2..35a48543 100644 --- a/l10n/bundle.l10n.zh-tw.json +++ b/l10n/bundle.l10n.zh-tw.json @@ -1,10 +1,11 @@ { "No Git repository found — watching for one": "找不到 Git 存放庫 — 正在監看", - "View Git Graph": "檢視 Git 分支圖", + "Open Git Fleet": "開啟 Git Fleet", "Repo": "存放庫", "Branch": "分支", "Show Remote Branches": "顯示遠端分支", "Refresh": "重新整理", + "Worktrees": "工作樹", "Loading ...": "載入中 ...", "Load More Commits": "載入更多提交", "Show All": "顯示全部", @@ -15,9 +16,20 @@ "Date": "日期", "Author": "作者", "Commit": "提交", - "Unable to load Git Graph": "無法載入 Git 圖形", + "Unable to load Git Fleet": "無法載入 Git Fleet", "Either the current workspace does not contain a Git repository, or the Git repository is not configured correctly.": "目前工作區不包含 Git 存放庫,或者 Git 存放庫設定不正確。", "If you are using a portable Git installation, make sure you have set the Visual Studio Code Setting \"git.path\" to the path of your portable installation (e.g. \"C:\\Program Files\\Git\\bin\\git.exe\" on Windows).": "如果您使用的是可攜式 Git 安裝程式,請確保已將 Visual Studio Code 的設定 “git.path” 設定為該可攜式安裝程式的內容路徑(例如 Windows 上的 “C:\\Program Files\\Git\\bin\\git.exe”)。", + "Working Tree": "工作目錄", + "Hover to connect HEAD and its inferred base to history.": "暫留以將 HEAD 及其推斷的基點連接到歷史記錄。", + "current": "目前", + "clean": "乾淨", + "{0} changed": "{0} 個變更", + "prunable": "可清理", + "locked": "已鎖定", + "base {0}": "基點 {0}", + "{0} ahead · {1} behind": "領先 {0} · 落後 {1}", + "outside loaded history": "在已載入歷史記錄之外", + "Changes in the checkout that have not been committed.": "檢出目錄中尚未提交的變更。", "Add Tag": "新增標籤", "Create Branch": "建立分支", "Checkout": "檢出", diff --git a/media/main.css b/media/main.css index d3ecd4c4..322a9ca0 100644 --- a/media/main.css +++ b/media/main.css @@ -24,6 +24,10 @@ body.unableToLoad p { #content { position: relative; } +body.worktreesVisible #content, +body.worktreesVisible #footer { + margin-right: 276px; +} /* Commit Graph */ #commitGraph { @@ -83,6 +87,12 @@ body.unableToLoad p { #commitTable tr.commit:hover td { cursor: pointer; } +#commitTable tr.commit:hover td:first-child, +#commitTable tr.commit.contextMenuActive td:first-child, +#commitTable tr.commit.dialogActive td:first-child, +#commitTable tr.commit.commitDetailsOpen td:first-child { + background-color: transparent; +} #commitTable td { line-height: 24px; padding: 0 4px; @@ -170,6 +180,186 @@ body.unableToLoad p { border-right: 1px solid rgba(128, 128, 128, 0.2); user-select: text; } +#commitDetails.workingTreeDetails #commitDetailsSummary { + display: flex; + flex-direction: column; + justify-content: center; +} +#commitDetails.workingTreeDetails #commitDetailsSummary h3 { + margin: 0 0 6px; + font-size: 14px; +} +#commitDetails.workingTreeDetails #commitDetailsSummary p { + margin: 0; + color: var(--vscode-descriptionForeground); +} + +/* Worktree history rail */ +#worktreeRail { + position: fixed; + top: 44px; + right: 8px; + bottom: 8px; + z-index: 4; + width: 256px; + display: flex; + flex-direction: column; + overflow: hidden; + border: 1px solid var(--vscode-panel-border, rgba(128, 128, 128, 0.35)); + border-radius: 6px; + background: var(--vscode-editor-background); + box-shadow: 0 4px 18px rgba(0, 0, 0, 0.16); +} +#worktreeRail[hidden] { + display: none; +} +#worktreeHeader { + flex: none; + padding: 9px 10px 8px; + border-bottom: 1px solid var(--vscode-panel-border, rgba(128, 128, 128, 0.28)); +} +.worktreeTitle { + display: flex; + justify-content: space-between; + font-weight: 600; +} +.worktreeTitle span:last-child, +.worktreeHelp, +.worktreePath, +.worktreeMeta { + color: var(--vscode-descriptionForeground); +} +.worktreeHelp { + margin-top: 3px; + font-size: 10px; + line-height: 1.35; +} +#worktreeList { + min-height: 0; + overflow: auto; +} +.worktreeItem { + display: block; + width: 100%; + padding: 8px 9px; + border: 0; + border-bottom: 1px solid rgba(128, 128, 128, 0.2); + background: transparent; + color: var(--vscode-foreground); + text-align: left; + cursor: pointer; +} +.worktreeItem:hover, +.worktreeItem:focus, +.worktreeItem.active { + outline: none; + background: var(--vscode-list-hoverBackground); +} +.worktreeTopline, +.worktreeMeta { + display: flex; + align-items: center; + gap: 6px; + min-width: 0; +} +.worktreeStatus { + width: 7px; + height: 7px; + flex: none; + border-radius: 50%; + background: var(--vscode-testing-iconPassed, #2f9e44); +} +.worktreeStatus.dirty { + background: var(--vscode-gitDecoration-modifiedResourceForeground, #d29922); +} +.worktreeStatus.prunable { + background: var(--vscode-errorForeground, #f85149); +} +.worktreeBranch { + min-width: 0; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + font-weight: 600; +} +.worktreeCurrent { + flex: none; + color: var(--vscode-textLink-foreground); + font-size: 10px; +} +.worktreeSha { + margin-left: auto; + flex: none; + color: var(--vscode-descriptionForeground); + font: 10px var(--vscode-editor-font-family); +} +.worktreePath { + margin: 3px 0 0 13px; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + font: 10px/1.35 var(--vscode-editor-font-family); +} +.worktreeMeta { + margin: 4px 0 0 13px; + font-size: 10px; +} +.worktreeMeta .dirty { + color: var(--vscode-gitDecoration-modifiedResourceForeground, #d29922); +} +.worktreeMeta .base { + color: var(--vscode-textLink-foreground); +} +#worktreeConnectorOverlay { + position: fixed; + inset: 0; + z-index: 3; + width: 100%; + height: 100%; + pointer-events: none; + overflow: visible; +} +#worktreeConnectorOverlay path { + fill: none; + vector-effect: non-scaling-stroke; +} +#worktreeConnectorOverlay .headLink { + stroke: var(--vscode-textLink-foreground); + stroke-width: 2.25; +} +#worktreeConnectorOverlay .baseLink { + stroke: var(--vscode-gitDecoration-modifiedResourceForeground, #d29922); + stroke-width: 1.75; + stroke-dasharray: 5 4; +} +#worktreeConnectorOverlay circle { + fill: var(--vscode-editor-background); + vector-effect: non-scaling-stroke; +} +#worktreeConnectorOverlay .headDot { + stroke: var(--vscode-textLink-foreground); + stroke-width: 2; +} +#worktreeConnectorOverlay .baseDot { + stroke: var(--vscode-gitDecoration-modifiedResourceForeground, #d29922); + stroke-width: 1.75; +} +#worktreeConnectorOverlay .headArrow { + fill: var(--vscode-textLink-foreground); +} +#worktreeConnectorOverlay .baseArrow { + fill: var(--vscode-gitDecoration-modifiedResourceForeground, #d29922); +} +@media (max-width: 760px) { + body.worktreesVisible #content, + body.worktreesVisible #footer { + margin-right: 0; + } + #worktreeRail { + width: 218px; + opacity: 0.96; + } +} .commitDetailsSummaryTop { display: inline-table; width: 100%; @@ -327,6 +517,26 @@ svg.fileIcon { #commitTable tr.commit.head:hover td:not(:first-child) { background-color: var(--vscode-list-hoverBackground); } +#commitTable tr.worktreeHead td:not(:first-child) { + box-shadow: + inset 0 1px 0 color-mix(in srgb, var(--vscode-textLink-foreground) 42%, transparent), + inset 0 -1px 0 color-mix(in srgb, var(--vscode-textLink-foreground) 42%, transparent); +} +#commitTable tr.worktreeBase td:not(:first-child) { + box-shadow: + inset 0 1px 0 + color-mix( + in srgb, + var(--vscode-gitDecoration-modifiedResourceForeground, #d29922) 38%, + transparent + ), + inset 0 -1px 0 + color-mix( + in srgb, + var(--vscode-gitDecoration-modifiedResourceForeground, #d29922) 38%, + transparent + ); +} /* Ref labels */ .gitRef { diff --git a/package.json b/package.json index 4901e475..a5627cb7 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { - "name": "neo-git-graph", - "displayName": "(neo) Git Graph", - "version": "0.5.0", + "name": "git-fleet", + "displayName": "Git Fleet", + "version": "0.1.0", "description": "%description%", "categories": [ "SCM Providers", @@ -12,18 +12,25 @@ "git", "git graph", "git history", - "git log" + "git log", + "multi repository", + "repository manager", + "worktree" ], - "homepage": "https://github.com/asispts/neo-git-graph", + "homepage": "https://github.com/wrgrant/git-fleet#readme", "bugs": { - "url": "https://github.com/asispts/neo-git-graph/issues" + "url": "https://github.com/wrgrant/git-fleet/issues" }, "license": "MIT", "author": { - "name": "Asis Pattisahusiwa", - "email": "asispts@gmail.com" + "name": "William Grant", + "url": "https://wgrant.dev" }, "contributors": [ + { + "name": "Asis Pattisahusiwa", + "url": "https://github.com/asispts" + }, { "name": "Michael Hutchison", "url": "https://github.com/mhutchie" @@ -31,9 +38,9 @@ ], "repository": { "type": "git", - "url": "https://github.com/asispts/neo-git-graph.git" + "url": "https://github.com/wrgrant/git-fleet.git" }, - "publisher": "asispts", + "publisher": "wgrant-dev", "main": "./out/extension.js", "scripts": { "typecheck": "tsc -p . --noEmit && tsc -p ./src --noEmit && tsc -p ./src/webview --noEmit && tsc -p ./tests --noEmit && tsc -p ./tests-ext --noEmit", @@ -76,8 +83,8 @@ "contributes": { "commands": [ { - "category": "(neo) Git Graph", - "command": "neo-git-graph.view", + "category": "Git Fleet", + "command": "git-fleet.view", "title": "%command.view%", "icon": { "light": "resources/webview-icon-light.svg", @@ -85,30 +92,124 @@ } }, { - "category": "(neo) Git Graph", - "command": "neo-git-graph.clearAvatarCache", + "category": "Git Fleet", + "command": "git-fleet.clearAvatarCache", "title": "%command.clearAvatarCache%" + }, + { + "category": "Git Fleet", + "command": "git-fleet.openRepositoryGraph", + "title": "%command.openRepositoryGraph%" + }, + { + "category": "Git Fleet", + "command": "git-fleet.refreshRepositoryNavigator", + "icon": "$(refresh)", + "title": "%command.refreshRepositoryNavigator%" + }, + { + "category": "Git Fleet", + "command": "git-fleet.changeRepositoryNavigatorMode", + "icon": "$(list-tree)", + "title": "%command.changeRepositoryNavigatorMode%" + }, + { + "category": "Git Fleet", + "command": "git-fleet.hideCleanRepositories", + "icon": "$(eye-closed)", + "title": "%command.hideCleanRepositories%" + }, + { + "category": "Git Fleet", + "command": "git-fleet.showAllRepositories", + "icon": "$(eye)", + "title": "%command.showAllRepositories%" + }, + { + "category": "Git Fleet", + "command": "git-fleet.addRepositorySearchRoot", + "icon": "$(folder-opened)", + "title": "%command.addRepositorySearchRoot%" + }, + { + "category": "Git Fleet", + "command": "git-fleet.openRepositorySearchRootsSettings", + "icon": "$(settings-gear)", + "title": "%command.openRepositorySearchRootsSettings%" + } + ], + "viewsContainers": { + "activitybar": [ + { + "id": "git-fleet", + "title": "%viewContainer.gitFleet%", + "icon": "resources/repository-navigator.svg" + } + ] + }, + "views": { + "git-fleet": [ + { + "id": "git-fleet.repositoryNavigator", + "name": "%view.repositoryNavigator%", + "icon": "resources/repository-navigator.svg", + "contextualTitle": "%viewContainer.gitFleet%" + } + ] + }, + "viewsWelcome": [ + { + "view": "git-fleet.repositoryNavigator", + "contents": "No repositories with uncommitted changes.\n[Show all repositories](command:git-fleet.showAllRepositories)", + "when": "gitFleet.hideCleanRepositories" } ], "menus": { - "scm/title": [ + "view/title": [ + { + "command": "git-fleet.addRepositorySearchRoot", + "group": "navigation@1", + "when": "view == git-fleet.repositoryNavigator" + }, + { + "command": "git-fleet.changeRepositoryNavigatorMode", + "group": "navigation@2", + "when": "view == git-fleet.repositoryNavigator" + }, + { + "command": "git-fleet.hideCleanRepositories", + "group": "navigation@3", + "when": "view == git-fleet.repositoryNavigator && !gitFleet.hideCleanRepositories" + }, { - "command": "neo-git-graph.view", + "command": "git-fleet.showAllRepositories", + "group": "navigation@3", + "when": "view == git-fleet.repositoryNavigator && gitFleet.hideCleanRepositories" + }, + { + "command": "git-fleet.refreshRepositoryNavigator", + "group": "navigation@4", + "when": "view == git-fleet.repositoryNavigator" + } + ], + "view/item/context": [ + { + "command": "git-fleet.openRepositoryGraph", "group": "navigation", - "when": "scmProvider == git" + "when": "view == git-fleet.repositoryNavigator && viewItem == repositoryNavigator.repository" } ] }, "configuration": { "type": "object", - "title": "(neo) Git Graph", + "title": "Git Fleet", "properties": { - "neo-git-graph.autoCenterCommitDetailsView": { + "git-fleet.autoCenterCommitDetailsView": { "type": "boolean", "default": true, "description": "%config.autoCenterCommitDetailsView%" }, - "neo-git-graph.dateFormat": { + "git-fleet.dateFormat": { "type": "string", "enum": [ "Date & Time", @@ -123,7 +224,7 @@ "default": "Date & Time", "description": "%config.dateFormat%" }, - "neo-git-graph.dateType": { + "git-fleet.dateType": { "type": "string", "enum": [ "Author Date", @@ -136,12 +237,12 @@ "default": "Author Date", "description": "%config.dateType%" }, - "neo-git-graph.fetchAvatars": { + "git-fleet.fetchAvatars": { "type": "boolean", "default": false, "description": "%config.fetchAvatars%" }, - "neo-git-graph.graphColours": { + "git-fleet.graphColours": { "type": "array", "items": { "type": "string", @@ -164,7 +265,7 @@ ], "description": "%config.graphColours%" }, - "neo-git-graph.graphStyle": { + "git-fleet.graphStyle": { "type": "string", "enum": [ "rounded", @@ -177,37 +278,46 @@ "default": "rounded", "description": "%config.graphStyle%" }, - "neo-git-graph.initialLoadCommits": { + "git-fleet.initialLoadCommits": { "type": "number", "default": 300, "description": "%config.initialLoadCommits%" }, - "neo-git-graph.loadMoreCommits": { + "git-fleet.loadMoreCommits": { "type": "number", "default": 100, "description": "%config.loadMoreCommits%" }, - "neo-git-graph.maxDepthOfRepoSearch": { + "git-fleet.maxDepthOfRepoSearch": { "type": "number", - "default": 0, + "default": 4, "description": "%config.maxDepthOfRepoSearch%" }, - "neo-git-graph.showCurrentBranchByDefault": { + "git-fleet.repositorySearchRoots": { + "type": "array", + "items": { + "type": "string" + }, + "default": [], + "scope": "machine-overridable", + "description": "%config.repositorySearchRoots%" + }, + "git-fleet.showCurrentBranchByDefault": { "type": "boolean", "default": false, "description": "%config.showCurrentBranchByDefault%" }, - "neo-git-graph.showStatusBarItem": { + "git-fleet.showStatusBarItem": { "type": "boolean", "default": true, "description": "%config.showStatusBarItem%" }, - "neo-git-graph.showUncommittedChanges": { + "git-fleet.showUncommittedChanges": { "type": "boolean", "default": true, "description": "%config.showUncommittedChanges%" }, - "neo-git-graph.tabIconColourTheme": { + "git-fleet.tabIconColourTheme": { "type": "string", "enum": [ "colour", @@ -226,9 +336,17 @@ "activationEvents": [ "onStartupFinished" ], + "extensionKind": [ + "workspace" + ], "icon": "resources/icon.png", "engines": { "vscode": "^1.98.0" }, - "packageManager": "pnpm@11.15.1" + "packageManager": "pnpm@11.15.1", + "capabilities": { + "untrustedWorkspaces": { + "supported": false + } + } } diff --git a/package.nls.json b/package.nls.json index c12da961..26dd31e8 100644 --- a/package.nls.json +++ b/package.nls.json @@ -1,13 +1,22 @@ { - "description": "A clean MIT fork of Git Graph. Visual history, branch actions, and devcontainer support.", - "command.view": "View Git Graph (git log)", + "description": "See every repository, working tree, and worktree from one VS Code pane.", + "command.view": "Open Git Fleet Graph", "command.clearAvatarCache": "Clear Avatar Cache", + "command.openRepositoryGraph": "Open Repository Graph", + "command.refreshRepositoryNavigator": "Refresh Repository Navigator", + "command.changeRepositoryNavigatorMode": "Change Repository Arrangement", + "command.hideCleanRepositories": "Hide Clean Repositories", + "command.showAllRepositories": "Show Clean Repositories", + "command.addRepositorySearchRoot": "Add Repository Search Root", + "command.openRepositorySearchRootsSettings": "Manage Repository Search Roots", + "viewContainer.gitFleet": "Git Fleet", + "view.repositoryNavigator": "Repositories", "config.autoCenterCommitDetailsView": "Automatically center the commit details view when it is opened.", - "config.dateFormat": "Specifies the date format to be used in the date column of Git Graph.", + "config.dateFormat": "Specifies the date format used in the graph date column.", "config.dateFormat.dateTime": "Show the date and time, for example \"19 Mar 2019 21:34\"", "config.dateFormat.dateOnly": "Show the date only, for example \"19 Mar 2019\"", "config.dateFormat.relative": "Show relative times, for example \"5 minutes ago\"", - "config.dateType": "Specifies the date type to be displayed throughout Git Graph.", + "config.dateType": "Specifies the date type displayed throughout Git Fleet.", "config.dateType.authorDate": "Use the author date of a commit", "config.dateType.commitDate": "Use the committer date of a commit", "config.fetchAvatars": "Fetch avatars of commit authors and committers. By enabling this setting, you consent to commit author and committer email addresses being sent GitHub, GitLab or Gravatar, depending on the repositories remote origin.", @@ -18,11 +27,12 @@ "config.graphStyle.angular": "Use angular lines when transitioning between branches on the graph", "config.initialLoadCommits": "Specifies the number of commits to initially load.", "config.loadMoreCommits": "Specifies the number of commits to load when the \"Load More Commits\" button is pressed (only shown when more commits are available).", - "config.maxDepthOfRepoSearch": "Specifies the maximum depth of subfolders to search when discovering repositories in the workspace.", - "config.showCurrentBranchByDefault": "Show the current branch by default when Git Graph is opened. Default: false (show all branches)", - "config.showStatusBarItem": "Show a Status Bar item which opens Git Graph when clicked.", + "config.maxDepthOfRepoSearch": "Specifies the maximum depth of subfolders to search when discovering repositories in the workspace. Defaults to 4 so a parent code folder can discover nested projects.", + "config.repositorySearchRoots": "Additional folders Git Fleet searches for repositories in every VS Code window. Use this for repositories outside the current workspace.", + "config.showCurrentBranchByDefault": "Show the current branch by default when the graph is opened. Default: false (show all branches)", + "config.showStatusBarItem": "Show a Status Bar item which opens Git Fleet when clicked.", "config.showUncommittedChanges": "Show uncommitted changes (set to false to decrease load time on large repositories).", - "config.tabIconColourTheme": "Specifies the colour theme of the icon displayed on the Git Graph tab.", + "config.tabIconColourTheme": "Specifies the colour theme of the icon displayed on the Git Fleet tab.", "config.tabIconColourTheme.colour": "Show a colour icon which suits most Visual Studio Code colour themes", "config.tabIconColourTheme.grey": "Show a grey icon which suits Visual Studio Code colour themes that are predominantly grayscale" } diff --git a/package.nls.zh-cn.json b/package.nls.zh-cn.json index 02dcf638..e2fe8564 100644 --- a/package.nls.zh-cn.json +++ b/package.nls.zh-cn.json @@ -1,7 +1,16 @@ { - "description": "Git Graph 的纯净 MIT 分支。可视化历史记录、分支操作和开发容器支持。", - "command.view": "查看 Git Graph (git log)", + "description": "在一个 VS Code 面板中查看所有仓库、工作目录和 worktree。", + "command.view": "打开 Git Fleet 图形", "command.clearAvatarCache": "清除头像缓存", + "command.openRepositoryGraph": "打开仓库图形", + "command.refreshRepositoryNavigator": "刷新仓库导航器", + "command.changeRepositoryNavigatorMode": "更改仓库导航器布局", + "command.hideCleanRepositories": "隐藏无更改的仓库", + "command.showAllRepositories": "显示无更改的仓库", + "command.addRepositorySearchRoot": "添加仓库搜索根目录", + "command.openRepositorySearchRootsSettings": "管理仓库搜索根目录", + "viewContainer.gitFleet": "Git 仓库总览", + "view.repositoryNavigator": "仓库", "config.autoCenterCommitDetailsView": "打开提交详情视图时自动居中显示。", "config.dateFormat": "指定 Git 图形日期列中使用的日期格式。", "config.dateFormat.dateTime": "显示日期和时间,例如 \"2019年3月19日 21:34\"", @@ -19,6 +28,7 @@ "config.initialLoadCommits": "指定初始加载的提交数量。", "config.loadMoreCommits": "指定按下“加载更多提交”按钮时要加载的提交数量(仅在有更多提交可用时显示)。", "config.maxDepthOfRepoSearch": "指定在工作区中发现仓库时搜索的子文件夹最大深度。", + "config.repositorySearchRoots": "Git Fleet 在每个 VS Code 窗口中搜索仓库的其他文件夹。适用于当前工作区之外的仓库。", "config.showCurrentBranchByDefault": "打开 Git 图形时默认显示当前分支。默认值:false(显示所有分支)", "config.showStatusBarItem": "显示状态栏项,单击时打开 Git 图形。", "config.showUncommittedChanges": "显示未提交的更改(在大型仓库上设置为 false 以减少加载时间)。", diff --git a/package.nls.zh-tw.json b/package.nls.zh-tw.json index ea910d99..60b45687 100644 --- a/package.nls.zh-tw.json +++ b/package.nls.zh-tw.json @@ -1,7 +1,16 @@ { - "description": "Git Graph 的純淨 MIT 分支。視覺化歷史記錄、分支操作和開發容器支援。", - "command.view": "檢視 Git Graph (git log)", + "description": "在一個 VS Code 面板中查看所有儲存庫、工作目錄和 worktree。", + "command.view": "開啟 Git Fleet 圖形", "command.clearAvatarCache": "清除頭像快取", + "command.openRepositoryGraph": "開啟儲存庫圖形", + "command.refreshRepositoryNavigator": "重新整理儲存庫導覽器", + "command.changeRepositoryNavigatorMode": "變更儲存庫導覽器版面配置", + "command.hideCleanRepositories": "隱藏無變更的儲存庫", + "command.showAllRepositories": "顯示無變更的儲存庫", + "command.addRepositorySearchRoot": "新增儲存庫搜尋根目錄", + "command.openRepositorySearchRootsSettings": "管理儲存庫搜尋根目錄", + "viewContainer.gitFleet": "Git 儲存庫總覽", + "view.repositoryNavigator": "儲存庫", "config.autoCenterCommitDetailsView": "開啟提交詳情檢視時自動置中顯示。", "config.dateFormat": "指定 Git 圖形日期欄中使用的日期格式。", "config.dateFormat.dateTime": "顯示日期和時間,例如 \"2019年3月19日 21:34\"", @@ -19,6 +28,7 @@ "config.initialLoadCommits": "指定初始載入的提交數量。", "config.loadMoreCommits": "指定按下「載入更多提交」按鈕時要載入的提交數量(僅在有更多提交可用時顯示)。", "config.maxDepthOfRepoSearch": "指定在工作區中發現存放庫時搜尋的子資料夾最大深度。", + "config.repositorySearchRoots": "Git Fleet 在每個 VS Code 視窗中搜尋儲存庫的其他資料夾。適用於目前工作區之外的儲存庫。", "config.showCurrentBranchByDefault": "開啟 Git 圖形時預設顯示目前分支。預設值:false(顯示所有分支)", "config.showStatusBarItem": "顯示狀態列項目,按一下時開啟 Git 圖形。", "config.showUncommittedChanges": "顯示未提交的變更(在大型存放庫上設定為 false 以減少載入時間)。", diff --git a/plans/content-discovery-queue.md b/plans/content-discovery-queue.md new file mode 100644 index 00000000..33ec61f3 --- /dev/null +++ b/plans/content-discovery-queue.md @@ -0,0 +1,39 @@ +# Content discovery queue + +## 2026-08-05 — Audit inherited network code before publishing a fork + +- Why it matters: An MIT license permits reuse, but a public release still needs its own credential and privacy audit. +- Evidence: The inherited GitLab avatar request contained a hard-coded API token. Git Fleet removed the token and retained the public unauthenticated lookup path. +- Files changed: `src/avatarManager.ts`, `SECURITY.md`, `CHANGELOG.md` +- Suggested content angle: Rebranding is the visible part of launching a fork; inspecting every outbound request is the part that keeps the launch safe. + +## 2026-08-05 — Treat the working tree as graph data, not a decorative row + +- Why it matters: Users already understand Neo's commit detail tree, so the useful extension is making the uncommitted pseudo-commit satisfy the same data contract and open combined HEAD-to-checkout diffs. +- Evidence: The `*` commit now returns file changes, opens the shared details tree, and routes added, modified, renamed, and deleted working-tree paths through VS Code's diff editor. +- Files changed: `src/backend/queries/commitDetails.ts`, `src/extension/messageHandler.ts`, `src/webview/main.ts`, `src/diffDocProvider.ts` +- Suggested content angle: A small data-model repair can unlock a large interaction without duplicating UI. + +## 2026-08-05 — Overlay worktree state on the history users already know + +- Why it matters: A worktree count answers how many checkouts exist but not where their HEADs or inferred branch points sit in history. +- Evidence: The graph now has a dedicated right rail, live HEAD/base connectors, row cues, and viewport-edge arrows for offscreen or unloaded endpoints. +- Files changed: `src/backend/queries/loadWorktrees.ts`, `src/webview/graph.ts`, `src/webview/main.ts`, `media/main.css` +- Suggested content angle: Git records worktree HEADs but not creation points, so honest visualization distinguishes confirmed state from inferred merge bases. + +## 2026-08-04 — A repository navigator should not be an action surface + +- Status: idea +- Evidence: The built-in Source Control pane repeats commit inputs, large primary buttons, and dense toolbars for every repository. In the supplied example, a repository with 811 dirty files makes fleet-level navigation effectively disappear. +- Product insight: Separate the cross-repository questions (where is activity, what is dirty, which repository needs attention) from repository-level Git mutations. Keep the left pane compact and navigational; keep detailed history and actions in the graph. +- Platform insight: VS Code extensions can contribute a dedicated Activity Bar View Container containing a native Tree View. This avoids rewriting Source Control entirely and lets users move the whole Git Fleet surface to the secondary sidebar or bottom panel. +- Implementation surfaces: `src/extension/repoNavigator.ts`, `src/extension/initExtension.ts`, `package.json` +- Discovery guardrail: Parent-folder scans deliberately skip dependency and build-cache directories such as `node_modules`, `.venv`, `DerivedData`, and `target`, so increasing the useful default scan depth does not flood the navigator with generated checkouts. + +## 2026-08-04 — Stop replacing built-in panes; compose a new native surface + +- Status: idea +- Why it matters: Extension APIs are strongest when a product adds a focused navigation surface instead of trying to subtract controls from a built-in one. +- Evidence: The repository tree moved from the Source Control container to one custom Activity Bar View Container. The resulting toolbar needs only three controls: layout, hide/show clean repositories, and refresh. +- Files changed: `package.json`, `src/extension/repoNavigator.ts`, `src/extensionState.ts`, `resources/repository-navigator.svg` +- Suggested content angle: A short build thread showing how a screenshot complaint about 811 dirty files led from “replace Source Control” to “create a native Git Fleet panel.” diff --git a/resources/icon.png b/resources/icon.png index c100c852..3a0f57f1 100644 Binary files a/resources/icon.png and b/resources/icon.png differ diff --git a/resources/icon.svg b/resources/icon.svg new file mode 100644 index 00000000..8211c0eb --- /dev/null +++ b/resources/icon.svg @@ -0,0 +1,14 @@ + diff --git a/resources/repository-navigator.svg b/resources/repository-navigator.svg new file mode 100644 index 00000000..fc0836e3 --- /dev/null +++ b/resources/repository-navigator.svg @@ -0,0 +1,11 @@ + diff --git a/resources/screenshots/repository-fleet.png b/resources/screenshots/repository-fleet.png new file mode 100644 index 00000000..26a37295 Binary files /dev/null and b/resources/screenshots/repository-fleet.png differ diff --git a/resources/screenshots/worktree-history.png b/resources/screenshots/worktree-history.png new file mode 100644 index 00000000..502ec291 Binary files /dev/null and b/resources/screenshots/worktree-history.png differ diff --git a/src/avatarManager.ts b/src/avatarManager.ts index ece65a27..14d1fe46 100644 --- a/src/avatarManager.ts +++ b/src/avatarManager.ts @@ -153,7 +153,7 @@ export class AvatarManager { { hostname: "api.github.com", path: "/repos/" + owner + "/" + repo + "/commits/" + avatarRequest.commits[commitIndex], - headers: { "User-Agent": "neo-git-graph" }, + headers: { "User-Agent": "git-fleet" }, agent: false, timeout: 15000 }, @@ -224,7 +224,7 @@ export class AvatarManager { { hostname: "gitlab.com", path: "/api/v4/users?search=" + avatarRequest.email, - headers: { "User-Agent": "neo-git-graph", "Private-Token": "w87U_3gAxWWaPtFgCcus" }, // Token only has read access + headers: { "User-Agent": "git-fleet" }, agent: false, timeout: 15000 }, @@ -299,7 +299,7 @@ export class AvatarManager { { hostname: imgUrl.hostname, path: imgUrl.path, - headers: { "User-Agent": "neo-git-graph" }, + headers: { "User-Agent": "git-fleet" }, agent: false, timeout: 15000 }, diff --git a/src/backend/queries/commitDetails.ts b/src/backend/queries/commitDetails.ts index c44d37f3..095b980a 100644 --- a/src/backend/queries/commitDetails.ts +++ b/src/backend/queries/commitDetails.ts @@ -68,11 +68,79 @@ async function fetchNumStat(git: SimpleGit, commitHash: string): Promise
${vscode.l10n.t("Either the current workspace does not contain a Git repository, or the Git repository is not configured correctly.")}
${vscode.l10n.t('If you are using a portable Git installation, make sure you have set the Visual Studio Code Setting "git.path" to the path of your portable installation (e.g. "C:\\Program Files\\Git\\bin\\git.exe" on Windows).')}