@iloveagents/foundry-web-primitives 0.2.1 → 0.3.0

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.
Files changed (2) hide show
  1. package/CHANGELOG.md +37 -0
  2. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,42 @@
1
1
  # @iloveagents/foundry-web-primitives
2
2
 
3
+ ## 0.3.0
4
+
5
+ ## 0.2.2
6
+
7
+ ### Patch Changes
8
+
9
+ - 8184a8c: shell: URL is authoritative for the runtime threadId — fixes
10
+ resume-creates-new-conversation race
11
+
12
+ `ChatConversationAwareRuntime` previously computed
13
+ `effectiveThreadId = sticky ?? urlMatch ?? freshIdRef.current`.
14
+ When the user navigated from one chat to another via a Recents
15
+ click, the synchronous render that followed the URL change had:
16
+ - `urlMatch = B` (read from the now-updated `useLocation`)
17
+ - `sticky = A` (the active-chat-store hadn't been updated by
18
+ `useTrackActiveChatFromUrl`'s `useEffect` yet — effects run
19
+ AFTER the commit phase)
20
+
21
+ `sticky ?? urlMatch` picked `A` (the previous chat). The AG-UI
22
+ adapter was constructed with `threadId = A`. The first message the
23
+ user sent went to `/api/agent` with `thread_id = A`, the middleware
24
+ created a new row keyed by `A`... wait actually no, here's what
25
+ happens — the runtime mints a fresh runner UUID when given a
26
+ mismatched threadId; that fresh UUID became a new conversation row,
27
+ appearing as "Untitled chat" at the top of the sidebar while the
28
+ URL still said `/chat/B`. Two active-looking dots: one for `B`
29
+ (NavLink URL match), one for the new row (statusDot from the
30
+ updated active-chat-store after the lazy ensure ran).
31
+
32
+ Swap the priority: `urlMatch ?? sticky ?? freshIdRef.current`. The
33
+ URL is authoritative whenever it's set (i.e. on `/chat/<id>`
34
+ routes), eliminating the stale-sticky race entirely. `sticky` is
35
+ still consulted as the second-priority fallback for non-chat
36
+ routes (`/spaces`, `/tasks`) so the popout chat stays "live" while
37
+ the user browses workspaces — that's the original purpose of
38
+ `useStickyConversationId` and it's preserved.
39
+
3
40
  ## 0.2.1
4
41
 
5
42
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@iloveagents/foundry-web-primitives",
3
- "version": "0.2.1",
3
+ "version": "0.3.0",
4
4
  "license": "SEE LICENSE IN LICENSE",
5
5
  "type": "module",
6
6
  "types": "./src/index.ts",