galaxyproject / galaxyproject/brc-analytics

Assistant: stale "Saved to your account" label after client-side sign-out

Open Beginner friendly
#1,708 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
7
Forks
11
Avg merge
2d 12h
Merged PRs (30d)
16

Description

Part of #1707. Found in the review of #1689.

## Problem

`packages/shared/views/AssistantView/components/ChatPanel/chatPanel.tsx` (around line 158) latches `isSaved` once a turn comes back with `saved: true` and only clears it in `resetSession`. Auth state changes don't touch it.

## Failure scenario

1. Signed-in user sends a turn on `/assistant`; `response.saved === true` so `setIsSaved(true)`.
2. User clicks **Sign out** in the header while still on `/assistant`. `AuthProvider.logout` only does `setUser(null)`, with no reload or redirect, so `isAuthenticated` flips to `false`.
3. `isSaved` stays `true`, so the `InputRow` renders both **"Saved to your account"** and the `!isAuthenticated && messages.length >= 2` **"Sign in to keep this conversation"** button at the same time.

## Suggested fix

Clear `isSaved` (and `saveAttemptRef` in `useAssistantChat`) whenever `isAuthenticated` becomes `false`.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start in packages/shared/views/AssistantView/components/ChatPanel/chatPanel.tsx around line 158, then trace useAssistantChat and AuthProvider.logout. Check how InputRow renders the saved label and sign-in prompt when authentication changes. Done means signing out clears isSaved and saveAttemptRef so the stale saved label is not shown, while the sign-in prompt can appear.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
authentication, frontend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
84/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.