@phi-code-admin/phi-code 0.97.0 → 0.97.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 CHANGED
@@ -1,5 +1,26 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.97.1] - 2026-07-12
4
+
5
+ ### Fixed — a message typed during a session transition is queued, not lost
6
+
7
+ Reported live: type a message right after `/new` (while the runtime is still
8
+ rebuilding, e.g. combined with a quick model switch) and it vanished — the
9
+ editor cleared, nothing happened, no feedback. Two swallow paths existed in
10
+ the TUI: a submission while the main loop was busy in prompt preflight hit an
11
+ unarmed input callback and went nowhere, and a submission while `/new` was
12
+ rebuilding the runtime went into the half-torn-down session.
13
+
14
+ Both now queue: `pendingSubmissions` + a `sessionTransitioning` flag around
15
+ the `/new` rebuild. Queued messages show "Message queued — sending when the
16
+ session is ready" and are replayed to the main loop as soon as it is (the
17
+ rebuild's `finally` drains, and `getUserInput()` drains on every loop
18
+ iteration — never during a transition).
19
+
20
+ 4 new tests on top of the 5 that locked the submit path during diagnosis
21
+ (queue during transition, drain by the loop, no drain mid-transition, end to
22
+ end replay after `/new`).
23
+
3
24
  ## [0.97.0] - 2026-07-12
4
25
 
5
26
  ### Changed — the remaining debt from the line-by-line review
@@ -42,6 +42,8 @@ export declare class InteractiveMode {
42
42
  private version;
43
43
  private isInitialized;
44
44
  private onInputCallback?;
45
+ private pendingSubmissions;
46
+ private sessionTransitioning;
45
47
  private inputMode;
46
48
  private loadingAnimation;
47
49
  private workingMessage;
@@ -253,6 +255,12 @@ export declare class InteractiveMode {
253
255
  private renderSessionContext;
254
256
  renderInitialMessages(): void;
255
257
  getUserInput(): Promise<string>;
258
+ /**
259
+ * Hand one queued submission to the waiting main loop, if any. Called when
260
+ * a session transition completes; the loop drains the rest through
261
+ * getUserInput() as it comes back around.
262
+ */
263
+ private drainPendingSubmissions;
256
264
  private rebuildChatFromMessages;
257
265
  private handleCtrlC;
258
266
  private handleCtrlD;