@omercnet/paseo-fresh-worktrees 1.2.0-next.99.1 → 1.2.1-next.117.1
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/README.md +14 -0
- package/index.client.ts +32 -6
- package/package.json +1 -2
- package/CHANGELOG.md +0 -43
package/README.md
CHANGED
|
@@ -6,6 +6,20 @@ branch-off workspace.
|
|
|
6
6
|
The plugin runs the refresh inside the Paseo daemon and adds a workspace-header indicator when an
|
|
7
7
|
active worktree falls behind the source checkout's remote base.
|
|
8
8
|
|
|
9
|
+
## Screenshots
|
|
10
|
+
|
|
11
|
+
The repository, remote, branch, and workspace are disposable local fixtures. Both PNGs come from
|
|
12
|
+
an isolated Paseo test daemon at 2× pixel density. Browser DevTools rewrites local paths and host
|
|
13
|
+
labels and verifies that no private organization names remain before capture.
|
|
14
|
+
|
|
15
|
+
### Behind indicator
|
|
16
|
+
|
|
17
|
+

|
|
18
|
+
|
|
19
|
+
### Installed plugin
|
|
20
|
+
|
|
21
|
+

|
|
22
|
+
|
|
9
23
|
## Behavior
|
|
10
24
|
|
|
11
25
|
Before Paseo creates a branch-off worktree, the plugin:
|
package/index.client.ts
CHANGED
|
@@ -13,6 +13,10 @@ interface WorkspaceEntry {
|
|
|
13
13
|
workspaceDirectory: string | null;
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
+
interface ReleasableSubscription {
|
|
17
|
+
release(): Promise<void>;
|
|
18
|
+
}
|
|
19
|
+
|
|
16
20
|
export default function contribute(client: PluginClientContext) {
|
|
17
21
|
const buttons = new Map<string, PluginButtonRegistration>();
|
|
18
22
|
const checks = new Map<string, Promise<void>>();
|
|
@@ -22,6 +26,18 @@ export default function contribute(client: PluginClientContext) {
|
|
|
22
26
|
>();
|
|
23
27
|
const projectRoots = new Map<string, string>();
|
|
24
28
|
let stopped = false;
|
|
29
|
+
let workspaceSubscription: ReleasableSubscription | undefined;
|
|
30
|
+
let releaseSubscriptionPromise: Promise<void> | undefined;
|
|
31
|
+
let initializationFailed = false;
|
|
32
|
+
|
|
33
|
+
function releaseWorkspaceSubscription(): Promise<void> {
|
|
34
|
+
if (releaseSubscriptionPromise) return releaseSubscriptionPromise;
|
|
35
|
+
const subscription = workspaceSubscription;
|
|
36
|
+
workspaceSubscription = undefined;
|
|
37
|
+
if (!subscription) return Promise.resolve();
|
|
38
|
+
releaseSubscriptionPromise = subscription.release();
|
|
39
|
+
return releaseSubscriptionPromise;
|
|
40
|
+
}
|
|
25
41
|
|
|
26
42
|
function removeIndicator(workspaceId: string) {
|
|
27
43
|
buttons.get(workspaceId)?.remove();
|
|
@@ -129,17 +145,26 @@ export default function contribute(client: PluginClientContext) {
|
|
|
129
145
|
}
|
|
130
146
|
});
|
|
131
147
|
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
148
|
+
const workspaceList = client.paseo.workspaces.list({ subscribe: {} }).then(async (result) => {
|
|
149
|
+
workspaceSubscription = result.subscription;
|
|
150
|
+
if (stopped || initializationFailed) await releaseWorkspaceSubscription();
|
|
151
|
+
return result;
|
|
152
|
+
});
|
|
153
|
+
|
|
154
|
+
void Promise.all([client.paseo.projects.list(), workspaceList])
|
|
136
155
|
.then(([{ projects }, { entries }]) => {
|
|
137
156
|
if (stopped) return;
|
|
138
157
|
for (const project of projects) projectRoots.set(project.projectId, project.projectRootPath);
|
|
139
158
|
for (const workspace of entries) trackWorkspace(workspace);
|
|
140
159
|
})
|
|
141
|
-
.catch((error) => {
|
|
142
|
-
|
|
160
|
+
.catch(async (error) => {
|
|
161
|
+
initializationFailed = true;
|
|
162
|
+
try {
|
|
163
|
+
await releaseWorkspaceSubscription();
|
|
164
|
+
} catch (releaseError) {
|
|
165
|
+
console.warn("[fresh-worktrees] Could not release workspace observation", releaseError);
|
|
166
|
+
}
|
|
167
|
+
if (!stopped) console.warn("[fresh-worktrees] Could not list workspaces", error);
|
|
143
168
|
});
|
|
144
169
|
|
|
145
170
|
const interval = setInterval(() => {
|
|
@@ -158,5 +183,6 @@ export default function contribute(client: PluginClientContext) {
|
|
|
158
183
|
buttons.clear();
|
|
159
184
|
workspaceLocations.clear();
|
|
160
185
|
projectRoots.clear();
|
|
186
|
+
return releaseWorkspaceSubscription();
|
|
161
187
|
};
|
|
162
188
|
}
|
package/package.json
CHANGED
|
@@ -23,7 +23,6 @@
|
|
|
23
23
|
"coding-agents"
|
|
24
24
|
],
|
|
25
25
|
"files": [
|
|
26
|
-
"CHANGELOG.md",
|
|
27
26
|
"LICENSE",
|
|
28
27
|
"README.md",
|
|
29
28
|
"index.client.ts",
|
|
@@ -32,7 +31,7 @@
|
|
|
32
31
|
"shared",
|
|
33
32
|
"paseo-plugin.json"
|
|
34
33
|
],
|
|
35
|
-
"version": "1.2.
|
|
34
|
+
"version": "1.2.1-next.117.1",
|
|
36
35
|
"type": "module",
|
|
37
36
|
"packageManager": "npm@11.19.1",
|
|
38
37
|
"engines": {
|
package/CHANGELOG.md
DELETED
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
# Changelog
|
|
2
|
-
|
|
3
|
-
## Unreleased
|
|
4
|
-
|
|
5
|
-
### Changed
|
|
6
|
-
|
|
7
|
-
* Fast-forward the clean, checked-out local base branch before creating a branch-off worktree.
|
|
8
|
-
* Warn and skip the local branch update when the source checkout is dirty instead of blocking workspace creation.
|
|
9
|
-
* Show a workspace-header indicator when a worktree is behind the source branch's remote-tracking ref.
|
|
10
|
-
|
|
11
|
-
## [1.2.0](https://github.com/omercnet/paseo-plugins/compare/fresh-worktrees-v1.1.1...fresh-worktrees-v1.2.0) (2026-09-18)
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
### Features
|
|
15
|
-
|
|
16
|
-
* **release:** publish plugins to npm ([#80](https://github.com/omercnet/paseo-plugins/issues/80)) ([3c93048](https://github.com/omercnet/paseo-plugins/commit/3c93048cfefda97d8c2bc1631e3428fb64bdad09))
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
### Bug Fixes
|
|
20
|
-
|
|
21
|
-
* **fresh-worktrees:** prepare for Paseo 0.9 ([#84](https://github.com/omercnet/paseo-plugins/issues/84)) ([17e45c2](https://github.com/omercnet/paseo-plugins/commit/17e45c2b3687949340339bcc0146563be6e9c631))
|
|
22
|
-
|
|
23
|
-
## [1.1.1](https://github.com/omercnet/paseo-plugins/compare/fresh-worktrees-v1.1.0...fresh-worktrees-v1.1.1) (2026-09-13)
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
### Bug Fixes
|
|
27
|
-
|
|
28
|
-
* **fresh-worktrees:** prevent freshness RPC storms ([#28](https://github.com/omercnet/paseo-plugins/issues/28)) ([6244ebe](https://github.com/omercnet/paseo-plugins/commit/6244ebec4dee63694fa16a376877453510d9364f))
|
|
29
|
-
|
|
30
|
-
## [1.1.0](https://github.com/omercnet/paseo-plugins/compare/fresh-worktrees-v1.0.0...fresh-worktrees-v1.1.0) (2026-09-10)
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
### Features
|
|
34
|
-
|
|
35
|
-
* **fresh-worktrees:** keep local base branch current ([#9](https://github.com/omercnet/paseo-plugins/issues/9)) ([2ebd062](https://github.com/omercnet/paseo-plugins/commit/2ebd0620d4356103c2a162b503103090b7289add))
|
|
36
|
-
|
|
37
|
-
## 1.0.0 (2026-09-10)
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
### Bug Fixes
|
|
41
|
-
|
|
42
|
-
* upgrade plugins to Paseo 0.8.0 ([c6b4e40](https://github.com/omercnet/paseo-plugins/commit/c6b4e4081fc9527de0ca6183a3903ff5ec4f93c4))
|
|
43
|
-
* upgrade plugins to Paseo 0.8.0 ([d7ad454](https://github.com/omercnet/paseo-plugins/commit/d7ad4540d2e1875bdf4a4d21f76ded25cac2f3dc))
|