Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

chore(settings): inline single-line callbacks and reorder imports

Steven Enamakelc3bbf369dbe7
diff --git a/app/src/components/settings/panels/AgentEditorPage.tsx b/app/src/components/settings/panels/AgentEditorPage.tsx
index 127d02922d..313fa76734 100644
--- a/app/src/components/settings/panels/AgentEditorPage.tsx
+++ b/app/src/components/settings/panels/AgentEditorPage.tsx
@@ -70,10 +70,7 @@ const AgentEditorPage = () => {
const navigate = useNavigate();
const location = useLocation();
const { id: routeId } = useParams<{ id: string }>();
- const backToList = useCallback(
- () => navigate('/settings/agents'),
- [navigate, location]
- );
+ const backToList = useCallback(() => navigate('/settings/agents'), [navigate, location]);
const isCreate = !routeId;
const [loading, setLoading] = useState(!isCreate);
diff --git a/app/src/components/settings/panels/AppearancePanel.tsx b/app/src/components/settings/panels/AppearancePanel.tsx
index 20acb11037..c603477516 100644
--- a/app/src/components/settings/panels/AppearancePanel.tsx
+++ b/app/src/components/settings/panels/AppearancePanel.tsx
@@ -78,9 +78,7 @@ const AppearancePanel = () => {
const mode = useAppSelector(state => state.theme.mode);
const effectiveFontSizePx = useAppSelector(selectEffectiveFontSizePx);
const tabBarLabels = useAppSelector(state => state.theme.tabBarLabels);
- const agentMessageViewMode = useAppSelector(
- state => state.theme.agentMessageViewMode ?? 'text'
- );
+ const agentMessageViewMode = useAppSelector(state => state.theme.agentMessageViewMode ?? 'text');
const hideAgentInsights = useAppSelector(state => state.theme.hideAgentInsights ?? false);
const labelsAlwaysVisible = tabBarLabels === 'always';
const assistantTextModeEnabled = agentMessageViewMode === 'text';
diff --git a/app/src/components/settings/panels/NotificationsPanel.tsx b/app/src/components/settings/panels/NotificationsPanel.tsx
index ba3395b061..02304813b3 100644
--- a/app/src/components/settings/panels/NotificationsPanel.tsx
+++ b/app/src/components/settings/panels/NotificationsPanel.tsx
@@ -84,9 +84,12 @@ const NotificationsPanel = ({ embedded = false }: NotificationsPanelProps = {})
</>
);
- // Embedded inside the tabbed Notifications page: the parent owns the header,
- // so render just the padded body.
- if (embedded) return <div className="p-4 space-y-4">{body}</div>;
+ // `embedded` renders the body with no page chrome, for a host that draws its
+ // own header. The tabbed Notifications page that used it is gone — the
+ // routing tab was removed with `NotificationRoutingPanel`, and a two-tab page
+ // with one tab left is a control that cannot do anything — so this route now
+ // renders the preferences directly. The prop is kept for the next host.
+ if (embedded) return <div className="space-y-4">{body}</div>;
return <SettingsPanel>{body}</SettingsPanel>;
};
diff --git a/app/src/components/settings/panels/ProfileEditorPage.tsx b/app/src/components/settings/panels/ProfileEditorPage.tsx
index 2ae016d96e..7a1af92ffe 100644
--- a/app/src/components/settings/panels/ProfileEditorPage.tsx
+++ b/app/src/components/settings/panels/ProfileEditorPage.tsx
@@ -52,10 +52,7 @@ const ProfileEditorPage = () => {
const dispatch = useAppDispatch();
const { id: routeId } = useParams<{ id: string }>();
const profiles = useAppSelector(selectAgentProfiles);
- const backToList = useCallback(
- () => navigate('/settings/profiles'),
- [navigate, location]
- );
+ const backToList = useCallback(() => navigate('/settings/profiles'), [navigate, location]);
const isCreate = !routeId;
const existing = useMemo(
diff --git a/app/src/components/settings/panels/ProfilesPanel.tsx b/app/src/components/settings/panels/ProfilesPanel.tsx
index 1c18544aa1..1822122648 100644
--- a/app/src/components/settings/panels/ProfilesPanel.tsx
+++ b/app/src/components/settings/panels/ProfilesPanel.tsx
@@ -138,10 +138,7 @@ const ProfilesPanel = () => {
type="button"
variant="secondary"
size="sm"
- onClick={() =>
- navigate(
- `/settings/profiles/edit/${profile.id}`)
- }>
+ onClick={() => navigate(`/settings/profiles/edit/${profile.id}`)}>
{t('common.edit')}
</Button>
{!profile.builtIn && (
diff --git a/app/src/components/settings/settingsRouteElements.tsx b/app/src/components/settings/settingsRouteElements.tsx
index df3e9dcd07..34541c130c 100644
--- a/app/src/components/settings/settingsRouteElements.tsx
+++ b/app/src/components/settings/settingsRouteElements.tsx
@@ -215,7 +215,10 @@ export function settingsRouteElements(): ReactNode {
<Route path="webhooks-triggers" element={<Navigate to="/connections" replace />} />
{/* Notification routing tab */}
{/* The routing tab was removed; land on the notifications page itself. */}
- <Route path="notification-routing" element={<SettingsRedirect to="/settings/notifications" />} />
+ <Route
+ path="notification-routing"
+ element={<SettingsRedirect to="/settings/notifications" />}
+ />
{/* Fallback */}
<Route path="*" element={<SettingsRedirect to="/settings" />} />
</>
diff --git a/app/src/pages/FlowsPage.tsx b/app/src/pages/FlowsPage.tsx
index 1bf1bcea55..e3088db447 100644
--- a/app/src/pages/FlowsPage.tsx
+++ b/app/src/pages/FlowsPage.tsx
@@ -26,6 +26,7 @@ import PageSectionHeader from '../components/layout/PageSectionHeader';
import PageWelcome from '../components/layout/PageWelcome';
import PanelPage from '../components/layout/PanelPage';
import { usePageWelcomeView } from '../components/layout/usePageWelcomeView';
+import CronJobsPanel from '../components/settings/panels/CronJobsPanel';
import BetaBanner from '../components/ui/BetaBanner';
import Button from '../components/ui/Button';
import { CenteredLoadingState, ErrorBanner } from '../components/ui/LoadingState';
@@ -48,7 +49,6 @@ import {
setFlowEnabled,
} from '../services/api/flowsApi';
import type { ToastNotification } from '../types/intelligence';
-import CronJobsPanel from '../components/settings/panels/CronJobsPanel';
import WorkflowDiscoveriesPage from './WorkflowDiscoveriesPage';
import WorkflowRunsPage from './WorkflowRunsPage';