Repository navigation
app/vmui: keep the selected tenant when opening a trace - #303
Conversation
Signed-off-by: Sanskar Sharma <sanskarsharma3110@gmail.com>
There was a problem hiding this comment.
All reported issues were addressed across 7 files
Click Fix with cubic on a comment, or reply @cubic-dev-ai fix this, and cubic writes the fix.
Re-trigger cubic
Signed-off-by: Sanskar Sharma <sanskarsharma3110@gmail.com>
arturminchukov
left a comment
There was a problem hiding this comment.
Thanks a lot for the PR! Overall, it looks good! I've left a few comments and want to ask you to also fix one more problem related to tenant params:
The header logo click also drops the selected tenant (same class of bug as #293). Could you please fix it as well?
Root cause, layouts/Header/Header.tsx:
onClickLogonavigates to{ pathname: router.home }withoutsearchand then reloads, so the explorer opens with tenant0:0.Logorenders<NavLink to={router.home}>, so Ctrl/Cmd-click (new tab) uses anhrefwithout the tenant as well.
Suggested fix (same pattern as HeaderNav/NavItem.tsx):
- In
Header, getsearchParamsviauseSearchParamsand buildtenantSearch = getTenantSearchParams(searchParams). - Build
homeLocation = { pathname: router.home, search: tenantSearch.toString() }once. - Pass
homeLocationto the logo'sNavLinkviato(makeLogoaccept it as a prop), so thehrefkeeps the tenant. - In
onClickLogo, callnavigate(homeLocation)instead ofnavigate({ pathname: router.home }). Keepwindow.location.reload()as is.
No new helpers needed; getTenantSearchParams already lives in hooks/useTenant.ts.
|
Sure @arturminchukov Will fix it aswell ! |
Signed-off-by: Sanskar Sharma <sanskarsharma3110@gmail.com>
There was a problem hiding this comment.
All reported issues were addressed across 13 files (changes from recent commits).
Tip: Review your code locally with the cubic CLI to iterate faster.
Re-trigger cubic
|
Hi @arturminchukov I have resolve all the comments and also fixed the Header Logo bug with this. PTAL! Screen.Recording.2026-11-09.at.1.53.10.PM.mp4 |
arturminchukov
left a comment
There was a problem hiding this comment.
LGTM! @mastersans, thanks for the contribution! I just deleted the unnecessary handler onClick in the Header.
fixes: #293
Summary:
accountIDandprojectID, so the trace page queried tenant0:0and showed no data.