Description
Currently, Code Collab room/{roomId} has multiple tabs like Files, Chat, and Settings, etc.
But the active tab is not reflected in the URL. This issue proposes syncing the active tab with a tab search parameter, like:
/room/{roomId}?tab=files
Why is this feature useful?
- Improves shareability: users can send links that open directly to a specific tab
- Improves UX: refresh doesn’t reset the active tab
- Helps with deep linking and future bookmarking
- A standard pattern used in web apps with multiple views
How could it work?
- Use
useSearchParams() (Next.js App Router)
- When a user switches tabs, update the
tab query param (e.g. ?tab=chat)
- On initial load, check the
tab param and activate the correct tab
- If no tab is found in the URL, default to the
files tab
Description
Currently, Code Collab room/{roomId} has multiple tabs like Files, Chat, and Settings, etc.
But the active tab is not reflected in the URL. This issue proposes syncing the active tab with a
tabsearch parameter, like:/room/{roomId}?tab=files
Why is this feature useful?
How could it work?
useSearchParams()(Next.js App Router)tabquery param (e.g.?tab=chat)tabparam and activate the correct tabfilestab