guito 1.0.8 → 1.0.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -4,6 +4,23 @@ All notable changes to Guito are documented in this file. The project follows [S
4
4
 
5
5
  ## [Unreleased]
6
6
 
7
+ ## [1.0.10] - 2026-10-10
8
+
9
+ ### Added
10
+
11
+ - Sort the repository panel's worktrees and pull requests. New **Worktree order** and **Pull request order** settings (`guito.worktreeSort` and `guito.prSort` inside the extension) order each section independently: worktrees offer Default order, Name A–Z and Name Z–A, while pull requests offer Newest first, Oldest first, Title A–Z and Title Z–A. The defaults keep the current behavior.
12
+ - Both side panels can now be resized. Drag the thin handle on the repository panel's right edge or on a commit detail / working panel's left edge to give it more or less room; arrow keys resize too (hold Shift for bigger steps), and double-clicking the handle returns the panel to its default width. Each choice is remembered between sessions, and the two right-hand panels share one width so the detail view keeps its size as you move between commits and uncommitted changes.
13
+ - The diff viewers now include a code minimap. A scaled-down preview of the changed file sits on the modified side of every diff — commits, working-tree and branch comparisons, and pull request reviews alike — with green marks where lines were added and red marks where lines were removed, so the shape of a change is visible without scrolling. Clicking or dragging the minimap moves the diff, and the diff dialog's header has a new **Toggle minimap** button for hiding it when you would rather give the code the full width.
14
+
15
+ ## [1.0.9] - 2026-10-04
16
+
17
+ ### Fixed
18
+
19
+ - Every right-click menu now does what it says. The copy actions (commit hash, commit subject, tag, branch, stash and worktree names, worktree paths, file paths) reach the clipboard even where the browser's Async Clipboard API is unavailable — Guito served on a LAN address or inside a webview — and show a message when copying is refused instead of failing silently. Menu items are no longer swallowed by an in-flight background refresh either: while a fetch runs, items that change the repository are visibly disabled until it finishes, and read-only ones stay clickable.
20
+ - **View Details** on a tag whose commit lies outside the loaded history now pages the log to it and selects it, exactly like clicking the tag row, and **Create Archive** on a side-panel row archives that row's ref instead of doing nothing.
21
+ - Checking out a remote branch whose local name already exists no longer fails: the dialog warns before running, and the checkout switches to the existing local branch and fast-forwards it to the remote, reporting a warning when the two have diverged.
22
+ - **Open Source Control View** works inside the VS Code panel (it now asks the extension host) instead of trying to open a `vscode://` link from an iframe.
23
+
7
24
  ## [1.0.8] - 2026-10-02
8
25
 
9
26
  ### Changed
package/README.md CHANGED
@@ -14,7 +14,7 @@ The name combines **GUI** and **Git**: **G**u**IT**o. It is also a [Portuguese w
14
14
  - Stashes listed in the commit table with apply, pop, and drop actions.
15
15
  - Commit search by subject, body, author, or hash, with loading feedback and retries.
16
16
  - Local and remote branch filtering.
17
- - Commit and working-tree diffs powered by the Monaco editor, with inline and side-by-side layouts.
17
+ - Commit and working-tree diffs powered by the Monaco editor, with inline and side-by-side layouts and a code minimap preview of the changed file.
18
18
  - Fetch, pull, pull with rebase, push, and sync actions.
19
19
  - Context actions for creating branches and tags, checking out commits, cherry-picking, reverting, merging, rebasing, resetting, and exporting archives.
20
20
  - Working-tree actions for stashing changes, resetting tracked changes, and cleaning untracked files.
@@ -250,7 +250,7 @@ const azureErrorMessage = (result) => {
250
250
  return result.body;
251
251
  }
252
252
  };
253
- export async function startGuitoServer({ repositoryPath, uiRoot, host, port = 8080, apiToken, azureDevOpsUrl, prBranchNameTemplate, autoReload, diffViewer, showGraph, showStashes, showTags, showRemoteBranches, issueRegex, issueUrl, allowMerge, fileListView, refListView, sidePanelSectionsExpanded, searchMode, searchCaseSensitive, aiReview, azureRequestImpl, aiReviewModelImpl, avatarFetchImpl, onLog, }) {
253
+ export async function startGuitoServer({ repositoryPath, uiRoot, host, port = 8080, apiToken, azureDevOpsUrl, prBranchNameTemplate, autoReload, diffViewer, showGraph, showStashes, showTags, showRemoteBranches, issueRegex, issueUrl, allowMerge, fileListView, refListView, sidePanelSectionsExpanded, searchMode, searchCaseSensitive, worktreeSort, prSort, aiReview, azureRequestImpl, aiReviewModelImpl, avatarFetchImpl, onLog, }) {
254
254
  // Initialize server
255
255
  const app = fastify({
256
256
  logger: false,
@@ -685,6 +685,17 @@ export async function startGuitoServer({ repositoryPath, uiRoot, host, port = 80
685
685
  const fileSearchMode = file.searchMode === 'filter' || file.searchMode === 'navigate' ? file.searchMode : undefined;
686
686
  const fileAllowMerge = typeof file.allowMerge === 'boolean' ? file.allowMerge : undefined;
687
687
  const fileSearchCaseSensitive = typeof file.searchCaseSensitive === 'boolean' ? file.searchCaseSensitive : undefined;
688
+ const fileWorktreeSort = file.worktreeSort === 'default' ||
689
+ file.worktreeSort === 'name-asc' ||
690
+ file.worktreeSort === 'name-desc'
691
+ ? file.worktreeSort
692
+ : undefined;
693
+ const filePrSort = file.prSort === 'newest' ||
694
+ file.prSort === 'oldest' ||
695
+ file.prSort === 'title-asc' ||
696
+ file.prSort === 'title-desc'
697
+ ? file.prSort
698
+ : undefined;
688
699
  const filePrBranchNameTemplate = typeof file.prBranchNameTemplate === 'string' && file.prBranchNameTemplate.trim()
689
700
  ? file.prBranchNameTemplate.trim()
690
701
  : undefined;
@@ -738,6 +749,8 @@ export async function startGuitoServer({ repositoryPath, uiRoot, host, port = 80
738
749
  searchCaseSensitive: typeof searchCaseSensitive === 'boolean'
739
750
  ? searchCaseSensitive
740
751
  : (fileSearchCaseSensitive ?? false),
752
+ worktreeSort: worktreeSort ?? fileWorktreeSort ?? 'default',
753
+ prSort: prSort ?? filePrSort ?? 'newest',
741
754
  allowMerge: typeof allowMerge === 'boolean' ? allowMerge : (fileAllowMerge ?? true),
742
755
  aiReview: resolveAiReviewConfig(file.aiReview, aiReview),
743
756
  issueLinking,
@@ -1297,8 +1310,28 @@ export async function startGuitoServer({ repositoryPath, uiRoot, host, port = 80
1297
1310
  : '';
1298
1311
  if (newBranch) {
1299
1312
  await verifyBranchName(newBranch);
1300
- // --track sets the upstream when checking out a remote-tracking ref.
1301
- await git.raw(['checkout', '-b', newBranch, ...(track ? ['--track'] : []), ref]);
1313
+ const branchExists = track && (await git.branchLocal()).all.includes(newBranch);
1314
+ if (branchExists) {
1315
+ // The name is taken: switch to the existing branch and sync it with
1316
+ // the remote ref instead of failing to create a duplicate.
1317
+ await git.raw(['checkout', newBranch]);
1318
+ try {
1319
+ await git.raw(['branch', '--set-upstream-to', ref, newBranch]);
1320
+ }
1321
+ catch {
1322
+ // Tracking is best effort; keep the branch's existing upstream.
1323
+ }
1324
+ try {
1325
+ await git.raw(['merge', '--ff-only', ref]);
1326
+ }
1327
+ catch (err) {
1328
+ warnings.push(`Branch "${newBranch}" was checked out but could not be synced with "${ref}". It may have diverged: ${err.message}`);
1329
+ }
1330
+ }
1331
+ else {
1332
+ // --track sets the upstream when checking out a remote-tracking ref.
1333
+ await git.raw(['checkout', '-b', newBranch, ...(track ? ['--track'] : []), ref]);
1334
+ }
1302
1335
  }
1303
1336
  else {
1304
1337
  await git.raw(['checkout', ...(detach ? ['--detach'] : []), ref]);
@@ -1842,6 +1875,17 @@ export async function startGuitoServer({ repositoryPath, uiRoot, host, port = 80
1842
1875
  if (typeof body.searchCaseSensitive === 'boolean') {
1843
1876
  settings.searchCaseSensitive = body.searchCaseSensitive;
1844
1877
  }
1878
+ if (body.worktreeSort === 'default' ||
1879
+ body.worktreeSort === 'name-asc' ||
1880
+ body.worktreeSort === 'name-desc') {
1881
+ settings.worktreeSort = body.worktreeSort;
1882
+ }
1883
+ if (body.prSort === 'newest' ||
1884
+ body.prSort === 'oldest' ||
1885
+ body.prSort === 'title-asc' ||
1886
+ body.prSort === 'title-desc') {
1887
+ settings.prSort = body.prSort;
1888
+ }
1845
1889
  if (typeof body.allowMerge === 'boolean') {
1846
1890
  settings.allowMerge = body.allowMerge;
1847
1891
  }
@@ -3628,6 +3672,8 @@ export async function startGuitoServer({ repositoryPath, uiRoot, host, port = 80
3628
3672
  sidePanelSectionsExpanded = settings.sidePanelSectionsExpanded;
3629
3673
  searchMode = settings.searchMode;
3630
3674
  searchCaseSensitive = settings.searchCaseSensitive;
3675
+ worktreeSort = settings.worktreeSort;
3676
+ prSort = settings.prSort;
3631
3677
  showTags = settings.showTags;
3632
3678
  showRemoteBranches = settings.showRemoteBranches;
3633
3679
  issueRegex = settings.issueRegex;
@@ -9,5 +9,5 @@
9
9
  <style>:root{--bg:#1e1e1e;--bg-alt:#232323;--bg-hover:#2a2d2e;--border:#3c3c3c;--text:#cccccc;--text-bright:#e8e8e8;--text-dim:#9d9d9d;--accent:#3794ff;--red:#f14c4c;--mono:ui-monospace, "Cascadia Code", "SF Mono", Menlo, Consolas, monospace}*{box-sizing:border-box}html,body{height:100%;margin:0}body{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,sans-serif;font-size:13px;color:var(--text);background:var(--bg);overflow:hidden}</style><link rel="stylesheet" href="styles-I7K2YZTW.css" media="print" onload="this.media='all'"><noscript><link rel="stylesheet" href="styles-I7K2YZTW.css"></noscript></head>
10
10
  <body>
11
11
  <app-root></app-root>
12
- <script src="polyfills-5CFQRCPP.js" type="module"></script><script src="main-YO57LHBH.js" type="module"></script></body>
12
+ <script src="polyfills-5CFQRCPP.js" type="module"></script><script src="main-PE4C5Y3Z.js" type="module"></script></body>
13
13
  </html>