💡 User Story
As a logged-in user, I want the browser tab title to reflect the current page’s content (chat log, flowchart, or calendar title) so that I can easily distinguish between open tabs and navigate more intuitively.
📖 Description
There is an issue with how the tab title is updated when navigating using the ProtectedRoute component. When a logged-in user attempts to navigate to /login or /register, they are correctly redirected to /chat, but the tab title does not update to reflect the new location.
This feature aims to ensure:
react-helmet dynamically updates the tab title based on the current page's context.
- On
/chat, if a specific chat is active, the tab title should reflect the chat log title.
- On
/flowchart, the tab should reflect the current flowchart’s title.
- On
/calendar, the title should reflect the current calendar name.
If no specific entity is selected:
- Default to generic titles:
- Chat
- Flowchart
- Schedule Builder (for calendar)
The tab title should also correctly update after automatic redirects (e.g., via ProtectedRoute).
✅ Acceptance Criteria
📌 Technical Details
- Use
react-helmet in each of the Chat, Flowchart, and Calendar components to dynamically set the document title.
- Extract the title from application state (Redux).
- Ensure
ProtectedRoute uses useEffect or a similar hook to allow the component it redirects to time to render and update the helmet title.
- Consider using a global
<Helmet> handler in a layout component if title logic spans multiple areas.
🖼️ UI/UX Mockups (If applicable)
N/A – Browser tab behavior only.
📎 Related Issues or Dependencies
🚀 Priority & Story Points
- Priority: Medium
- Story Points: 3
💡 User Story
As a logged-in user, I want the browser tab title to reflect the current page’s content (chat log, flowchart, or calendar title) so that I can easily distinguish between open tabs and navigate more intuitively.
📖 Description
There is an issue with how the tab title is updated when navigating using the
ProtectedRoutecomponent. When a logged-in user attempts to navigate to/loginor/register, they are correctly redirected to/chat, but the tab title does not update to reflect the new location.This feature aims to ensure:
react-helmetdynamically updates the tab title based on the current page's context./chat, if a specific chat is active, the tab title should reflect the chat log title./flowchart, the tab should reflect the current flowchart’s title./calendar, the title should reflect the current calendar name.If no specific entity is selected:
The tab title should also correctly update after automatic redirects (e.g., via
ProtectedRoute).✅ Acceptance Criteria
/chatreflects the current chat log title in the tab./flowchartreflects the current flowchart title./calendarreflects the current calendar title./loginor/registerwhile logged in redirects to/chatand updates the tab title accordingly.📌 Technical Details
react-helmetin each of theChat,Flowchart, andCalendarcomponents to dynamically set the document title.ProtectedRouteusesuseEffector a similar hook to allow the component it redirects to time to render and update the helmet title.<Helmet>handler in a layout component if title logic spans multiple areas.🖼️ UI/UX Mockups (If applicable)
N/A – Browser tab behavior only.
📎 Related Issues or Dependencies
ProtectedRoute🚀 Priority & Story Points