| null>(null)
@@ -245,6 +247,9 @@ export function ProceduralNavigationPage() {
})
setCompletedAt(completedTime)
setIsComplete(true)
+ if (!hasBeenRated(session.id)) {
+ setShowCsatModal(true)
+ }
} else {
setCurrentStepIndex(currentStepIndex + 1)
}
@@ -275,6 +280,10 @@ export function ProceduralNavigationPage() {
})
}
+ const handleCsatClose = () => {
+ setShowCsatModal(false)
+ }
+
// Loading state
if (isLoading) {
return (
@@ -415,6 +424,15 @@ export function ProceduralNavigationPage() {
+ {/* CSAT Modal */}
+ {session && (
+
+ )}
+
{/* Parameters popover */}
{paramsOpen && (
diff --git a/frontend/src/pages/TreeNavigationPage.tsx b/frontend/src/pages/TreeNavigationPage.tsx
index c03b1a0d..e3183895 100644
--- a/frontend/src/pages/TreeNavigationPage.tsx
+++ b/frontend/src/pages/TreeNavigationPage.tsx
@@ -14,6 +14,7 @@ import { Plus, CheckCircle, ArrowRight, Clock, Terminal, Clipboard, Check, Copy,
import { toast } from '@/lib/toast'
import { Modal } from '@/components/common/Modal'
import { ShareSessionModal } from '@/components/session/ShareSessionModal'
+import { CSATModal, hasBeenRated } from '@/components/session/CSATModal'
import { StepFeedback } from '@/components/session/StepFeedback'
import { buildSessionShareUrl, getLatestActiveShareForSession } from '@/lib/sessionShare'
@@ -53,6 +54,7 @@ export function TreeNavigationPage() {
const [isCopyingForTicket, setIsCopyingForTicket] = useState(false)
const [showSharePopover, setShowSharePopover] = useState(false)
const [showShareModal, setShowShareModal] = useState(false)
+ const [showCsatModal, setShowCsatModal] = useState(false)
const [copiedShareLink, setCopiedShareLink] = useState(false)
const [isCopyingShareLink, setIsCopyingShareLink] = useState(false)
const sharePopoverRef = useRef(null)
@@ -196,6 +198,13 @@ export function TreeNavigationPage() {
setCompletionSource('standard')
}
+ const handleCsatClose = () => {
+ setShowCsatModal(false)
+ if (session) {
+ navigate(`/sessions/${session.id}`)
+ }
+ }
+
// Custom step flow (creation, post-step actions, continuation, branching, forking)
const customStepFlow = useCustomStepFlow({
tree,
@@ -451,6 +460,8 @@ export function TreeNavigationPage() {
setPendingCompletionDecision(null)
if (completionSource === 'custom' && customStepFlow.customSteps.length > 0) {
customStepFlow.setShowForkModal(true)
+ } else if (!hasBeenRated(session.id)) {
+ setShowCsatModal(true)
} else {
navigate(`/sessions/${session.id}`)
}
@@ -1188,6 +1199,14 @@ export function TreeNavigationPage() {
isSubmitting={isCompleting}
/>
+ {session && (
+
+ )}
+
{/* Keyboard Shortcuts Modal */}