fix: task lane restore checks activeChatId, not urlSessionId
The showTaskLane initializer was comparing the saved chatId against urlSessionId (null on /assistant), so it never matched. Now compares against activeChatId which is already restored from sessionStorage. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -48,21 +48,21 @@ export default function AssistantChatPage() {
|
|||||||
const [activeQuestions, setActiveQuestions] = useState<QuestionItem[]>(() => {
|
const [activeQuestions, setActiveQuestions] = useState<QuestionItem[]>(() => {
|
||||||
try {
|
try {
|
||||||
const saved = sessionStorage.getItem('rf-tasklane-meta')
|
const saved = sessionStorage.getItem('rf-tasklane-meta')
|
||||||
if (saved) { const d = JSON.parse(saved); return d.questions || [] }
|
if (saved) { const d = JSON.parse(saved); if (d.chatId === activeChatId) return d.questions || [] }
|
||||||
} catch { /* ignore */ }
|
} catch { /* ignore */ }
|
||||||
return []
|
return []
|
||||||
})
|
})
|
||||||
const [activeActions, setActiveActions] = useState<ActionItem[]>(() => {
|
const [activeActions, setActiveActions] = useState<ActionItem[]>(() => {
|
||||||
try {
|
try {
|
||||||
const saved = sessionStorage.getItem('rf-tasklane-meta')
|
const saved = sessionStorage.getItem('rf-tasklane-meta')
|
||||||
if (saved) { const d = JSON.parse(saved); return d.actions || [] }
|
if (saved) { const d = JSON.parse(saved); if (d.chatId === activeChatId) return d.actions || [] }
|
||||||
} catch { /* ignore */ }
|
} catch { /* ignore */ }
|
||||||
return []
|
return []
|
||||||
})
|
})
|
||||||
const [showTaskLane, setShowTaskLane] = useState(() => {
|
const [showTaskLane, setShowTaskLane] = useState(() => {
|
||||||
try {
|
try {
|
||||||
const saved = sessionStorage.getItem('rf-tasklane-meta')
|
const saved = sessionStorage.getItem('rf-tasklane-meta')
|
||||||
if (saved) { const d = JSON.parse(saved); return d.show === true && d.chatId === (urlSessionId || null) }
|
if (saved) { const d = JSON.parse(saved); return d.show === true && d.chatId === activeChatId }
|
||||||
} catch { /* ignore */ }
|
} catch { /* ignore */ }
|
||||||
return false
|
return false
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user