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 { TicketLinkIndicator } from '@/components/session/TicketLinkIndicator'
|
||||||
import { UpdateTicketModal } from '@/components/session/UpdateTicketModal'
|
import { UpdateTicketModal } from '@/components/session/UpdateTicketModal'
|
||||||
import type { PSATicketInfo } from '@/types/integrations'
|
import type { PSATicketInfo } from '@/types/integrations'
|
||||||
|
import { addRecentFlow } from '@/lib/recentFlows'
|
||||||
|
|
||||||
interface StepState {
|
interface StepState {
|
||||||
notes: string
|
notes: string
|
||||||
@@ -213,6 +214,7 @@ export function ProceduralNavigationPage() {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
setTree(treeData)
|
setTree(treeData)
|
||||||
|
addRecentFlow({ id: treeData.id, name: treeData.name, tree_type: treeData.tree_type })
|
||||||
|
|
||||||
// If resuming an existing session
|
// If resuming an existing session
|
||||||
if (locationState?.sessionId) {
|
if (locationState?.sessionId) {
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ import { TicketPickerModal } from '@/components/session/TicketPickerModal'
|
|||||||
import { TicketLinkIndicator } from '@/components/session/TicketLinkIndicator'
|
import { TicketLinkIndicator } from '@/components/session/TicketLinkIndicator'
|
||||||
import { UpdateTicketModal } from '@/components/session/UpdateTicketModal'
|
import { UpdateTicketModal } from '@/components/session/UpdateTicketModal'
|
||||||
import type { PSATicketInfo } from '@/types/integrations'
|
import type { PSATicketInfo } from '@/types/integrations'
|
||||||
|
import { addRecentFlow } from '@/lib/recentFlows'
|
||||||
|
|
||||||
interface LocationState {
|
interface LocationState {
|
||||||
sessionId?: string
|
sessionId?: string
|
||||||
@@ -325,6 +326,7 @@ export function TreeNavigationPage() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
setTree(treeData)
|
setTree(treeData)
|
||||||
|
addRecentFlow({ id: treeData.id, name: treeData.name, tree_type: treeData.tree_type })
|
||||||
|
|
||||||
// If resuming a session
|
// If resuming a session
|
||||||
if (locationState?.sessionId) {
|
if (locationState?.sessionId) {
|
||||||
|
|||||||
Reference in New Issue
Block a user