fix(chat): recover web approvals and questions across clients and reconnects

This commit is contained in:
2026-10-20 17:23:07 +01:00
parent ed0abb976d
commit c78def70dd
16 changed files with 420 additions and 54 deletions
+2 -2
View File
@@ -182,13 +182,13 @@ func TestChatRejectsInvalidSessionWithoutCalling(t *testing.T) {
}
// TestChatPermissionsListsAndFilters loads a pending-request fixture in the
// verified V2 envelope (GET /api/permission/request) and asserts the adapter
// verified V2 session-owned envelope and asserts the adapter
// returns the requested session's request with its fields intact, filters out a
// foreign session's request, and reads the endpoint once.
func TestChatPermissionsListsAndFilters(t *testing.T) {
var reads atomic.Int32
srv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
if r.Method != http.MethodGet || r.URL.Path != "/api/permission/request" {
if r.Method != http.MethodGet || r.URL.Path != "/api/session/ses_1/permission" {
t.Errorf("unexpected request %s %s", r.Method, r.URL.Path)
return
}