feat: track recently visited flows for command palette empty state
Calls addRecentFlow after tree data loads in both TreeNavigationPage and ProceduralNavigationPage so the command palette can surface recent flows when the query is empty. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -29,6 +29,7 @@ import { TicketPickerModal } from '@/components/session/TicketPickerModal'
|
||||
import { TicketLinkIndicator } from '@/components/session/TicketLinkIndicator'
|
||||
import { UpdateTicketModal } from '@/components/session/UpdateTicketModal'
|
||||
import type { PSATicketInfo } from '@/types/integrations'
|
||||
import { addRecentFlow } from '@/lib/recentFlows'
|
||||
|
||||
interface StepState {
|
||||
notes: string
|
||||
@@ -213,6 +214,7 @@ export function ProceduralNavigationPage() {
|
||||
return
|
||||
}
|
||||
setTree(treeData)
|
||||
addRecentFlow({ id: treeData.id, name: treeData.name, tree_type: treeData.tree_type })
|
||||
|
||||
// If resuming an existing session
|
||||
if (locationState?.sessionId) {
|
||||
|
||||
@@ -27,6 +27,7 @@ import { TicketPickerModal } from '@/components/session/TicketPickerModal'
|
||||
import { TicketLinkIndicator } from '@/components/session/TicketLinkIndicator'
|
||||
import { UpdateTicketModal } from '@/components/session/UpdateTicketModal'
|
||||
import type { PSATicketInfo } from '@/types/integrations'
|
||||
import { addRecentFlow } from '@/lib/recentFlows'
|
||||
|
||||
interface LocationState {
|
||||
sessionId?: string
|
||||
@@ -325,6 +326,7 @@ export function TreeNavigationPage() {
|
||||
}
|
||||
|
||||
setTree(treeData)
|
||||
addRecentFlow({ id: treeData.id, name: treeData.name, tree_type: treeData.tree_type })
|
||||
|
||||
// If resuming a session
|
||||
if (locationState?.sessionId) {
|
||||
|
||||
Reference in New Issue
Block a user