Skip to content

Commit

Permalink
Merge pull request #169 from PySpur-Dev/fix/page-title
Browse files Browse the repository at this point in the history
feat: improve page titles. show workflow title when available
  • Loading branch information
srijanpatel authored Feb 21, 2025
2 parents 5803e0a + d494aaa commit 00ef565
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions frontend/src/components/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,21 @@ const Header: React.FC<HeaderProps> = ({ activePage, associatedWorkflowId, runId
}
}, [isHistoryOpen])

useEffect(() => {
if (activePage === 'workflow' || activePage === 'trace') {
document.title = `${projectName} - PySpur`
}
if (activePage === 'dashboard') {
document.title = `Dashboard - PySpur`
}
if (activePage === 'evals') {
document.title = `Evals - PySpur`
}
if (activePage === 'rag') {
document.title = `RAG - PySpur`
}
}, [projectName, activePage])

useHotkeys(
['mod+enter'],
(e) => {
Expand Down

0 comments on commit 00ef565

Please sign in to comment.