pi-dev-flow 0.82.0 → 0.82.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/CHANGELOG.md +7 -0
- package/extensions/dev-flow.ts +15 -6
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,13 @@ Format: newest first. `Unreleased` collects what's merged but not yet tagged.
|
|
|
4
4
|
|
|
5
5
|
## [Unreleased]
|
|
6
6
|
|
|
7
|
+
## [0.82.1] - 2026-11-05
|
|
8
|
+
|
|
9
|
+
**pi-web shows one dev-flow chip per session again.**
|
|
10
|
+
|
|
11
|
+
### Fixed
|
|
12
|
+
- **A stage change no longer leaves the previous stage's chip behind in pi-web.** The chip's label is its widget key, and the "previous key" to clear on repaint was one slot for the whole server process; when another session (a chat, a worker) repainted in between, the next repaint cleared that session's key instead, so e.g. `🔨telegram-settings` stayed beside `🚀telegram-settings`. The previous key is now kept per session (and survives `/reload`); a session's slot is dropped at shutdown.
|
|
13
|
+
|
|
7
14
|
## [0.82.0] - 2026-11-05
|
|
8
15
|
|
|
9
16
|
**A feature split off mid-flow is parked in the roadmap with its notes, and a hand-made feature dir can be adopted instead of deleted.**
|
package/extensions/dev-flow.ts
CHANGED
|
@@ -2413,9 +2413,12 @@ function tail(out: string, n = 15): string {
|
|
|
2413
2413
|
|
|
2414
2414
|
// ------------------------------------------------------------------ extension
|
|
2415
2415
|
|
|
2416
|
-
/** The pi-web chip's current key: the chip's label IS the widget key, so it changes with the
|
|
2417
|
-
* and the previous one must be cleared on every repaint.
|
|
2418
|
-
|
|
2416
|
+
/** The pi-web chip's current key, per session: the chip's label IS the widget key, so it changes with the
|
|
2417
|
+
* footer text and the previous one must be cleared on every repaint. Per session, not per process — one
|
|
2418
|
+
* pi-web server repaints many sessions (drivers, chats, workers), and a single shared slot let session B's
|
|
2419
|
+
* repaint overwrite A's key, so A's next repaint cleared a key A never had and left its old chip beside
|
|
2420
|
+
* the new one. On globalThis so a /reload or a duplicate copy still knows the chip already painted. */
|
|
2421
|
+
const WEB_CHIP_KEYS: Map<string, string> = ((globalThis as { __piDevFlowChipKeys?: Map<string, string> }).__piDevFlowChipKeys ??= new Map());
|
|
2419
2422
|
|
|
2420
2423
|
/** Compact footer: bound flow = stage glyph, slug, mode markers, ⚠️ on its failing checks; unbound = the
|
|
2421
2424
|
* unfinished-flow count, or `💬 no flows` — an initiated repo always carries the footer. An uninitiated
|
|
@@ -2425,10 +2428,15 @@ let webChipKey: string | undefined;
|
|
|
2425
2428
|
function refreshStatus(ctx: ExtensionContext, root: string): void {
|
|
2426
2429
|
if (!ctx.hasUI) return;
|
|
2427
2430
|
const web = ctx.mode !== "tui";
|
|
2431
|
+
const sk = sessionKey(ctx);
|
|
2428
2432
|
const setChip = (key: string | undefined, lines?: string[]) => {
|
|
2429
|
-
|
|
2430
|
-
|
|
2431
|
-
if (key
|
|
2433
|
+
const prev = WEB_CHIP_KEYS.get(sk);
|
|
2434
|
+
if (prev !== undefined && prev !== key) ctx.ui.setWidget(prev, undefined);
|
|
2435
|
+
if (key === undefined) WEB_CHIP_KEYS.delete(sk);
|
|
2436
|
+
else {
|
|
2437
|
+
WEB_CHIP_KEYS.set(sk, key);
|
|
2438
|
+
ctx.ui.setWidget(key, lines);
|
|
2439
|
+
}
|
|
2432
2440
|
};
|
|
2433
2441
|
if (!initiated(root)) {
|
|
2434
2442
|
ctx.ui.setStatus("dev-flow", undefined);
|
|
@@ -2796,6 +2804,7 @@ export default function devFlow(pi: ExtensionAPI) {
|
|
|
2796
2804
|
// The session, not the process, owns the binding and the claim: pi-web keeps serving other sessions
|
|
2797
2805
|
// after one ends, and a stale claim there is a permanent lock (its pid is the server's, always alive).
|
|
2798
2806
|
pi.on("session_shutdown", async (_event, ctx) => {
|
|
2807
|
+
WEB_CHIP_KEYS.delete(sessionKey(ctx)); // the session's UI is gone; a long-lived server must not keep its slot
|
|
2799
2808
|
if (!guardsAreMine()) return;
|
|
2800
2809
|
const root = await flowRoot(ctx.cwd);
|
|
2801
2810
|
if (!existsSync(dfDir(root))) return;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-dev-flow",
|
|
3
|
-
"version": "0.82.
|
|
3
|
+
"version": "0.82.1",
|
|
4
4
|
"description": "Enforced feature workflow for Pi: plan → implement → pre-release → release, gated checkpoints, self-improvement reflections, one git worktree per feature, changelog + publish as part of the release",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"keywords": [
|