feat: upgrade design system to v0.1.19, use onNavigate/fillHeight, add SonarQube workflow
- Use Sidebar onNavigate callback instead of display:contents click interception - Use DataTable fillHeight prop instead of manual scroll wrapper divs - Fix DataTable scroll/pagination by adding overflow:hidden to content container - Fix left panel in split view to use flex column instead of overflow:auto - Make error tab stack trace scrollable for large traces - Add nightly SonarQube workflow with manual trigger support Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -222,36 +222,31 @@ function LayoutContent() {
|
||||
navigate(`${baseParts.join('/')}?text=${encodeURIComponent(query)}`);
|
||||
}, [navigate, scope.appId, scope.routeId]);
|
||||
|
||||
// Intercept Sidebar's internal <Link> navigation to re-route through current tab
|
||||
const handleSidebarClick = useCallback((e: React.MouseEvent) => {
|
||||
const anchor = (e.target as HTMLElement).closest('a[href]');
|
||||
if (!anchor) return;
|
||||
const href = anchor.getAttribute('href') || '';
|
||||
|
||||
// Intercept /apps/:appId and /apps/:appId/:routeId links
|
||||
const appMatch = href.match(/^\/apps\/([^/]+)(?:\/(.+))?$/);
|
||||
// Translate Sidebar's internal paths to our URL structure
|
||||
const handleSidebarNavigate = useCallback((path: string) => {
|
||||
// /apps/:appId and /apps/:appId/:routeId → current tab
|
||||
const appMatch = path.match(/^\/apps\/([^/]+)(?:\/(.+))?$/);
|
||||
if (appMatch) {
|
||||
e.preventDefault();
|
||||
const [, sAppId, sRouteId] = appMatch;
|
||||
navigate(sRouteId ? `/${scope.tab}/${sAppId}/${sRouteId}` : `/${scope.tab}/${sAppId}`);
|
||||
return;
|
||||
}
|
||||
|
||||
// Intercept /agents/* links — redirect to runtime tab
|
||||
const agentMatch = href.match(/^\/agents\/([^/]+)(?:\/(.+))?$/);
|
||||
// /agents/:appId/:instanceId → runtime tab
|
||||
const agentMatch = path.match(/^\/agents\/([^/]+)(?:\/(.+))?$/);
|
||||
if (agentMatch) {
|
||||
e.preventDefault();
|
||||
const [, sAppId, sInstanceId] = agentMatch;
|
||||
navigate(sInstanceId ? `/runtime/${sAppId}/${sInstanceId}` : `/runtime/${sAppId}`);
|
||||
return;
|
||||
}
|
||||
|
||||
navigate(path);
|
||||
}, [navigate, scope.tab]);
|
||||
|
||||
return (
|
||||
<AppShell
|
||||
sidebar={
|
||||
<div onClick={handleSidebarClick} style={{ display: 'contents' }}>
|
||||
<Sidebar apps={sidebarApps} />
|
||||
</div>
|
||||
<Sidebar apps={sidebarApps} onNavigate={handleSidebarNavigate} />
|
||||
}
|
||||
>
|
||||
<TopBar
|
||||
|
||||
Reference in New Issue
Block a user