Skip to content

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

refactor(settings): replace PanelPage with SettingsPanel for non-embedded mode

Steven Enamakel88667e1f698f
diff --git a/app/src/components/settings/panels/MemoryDataPanel.tsx b/app/src/components/settings/panels/MemoryDataPanel.tsx
index f506e12034..8d30433ead 100644
--- a/app/src/components/settings/panels/MemoryDataPanel.tsx
+++ b/app/src/components/settings/panels/MemoryDataPanel.tsx
@@ -7,9 +7,8 @@ import { ToastContainer } from '../../intelligence/Toast';
import { VaultHealthChecklist } from '../../intelligence/VaultHealthChecklist';
import PanelPage from '../../layout/PanelPage';
import MemoryWindowControl from '../components/MemoryWindowControl';
-import SettingsBackButton from '../components/SettingsBackButton';
import { SettingsSection } from '../controls';
-import { useSettingsNavigation } from '../hooks/useSettingsNavigation';
+import SettingsPanel from '../layout/SettingsPanel';
interface MemoryDataPanelProps {
/** When true, render without the SettingsHeader chrome (used when embedded
@@ -19,7 +18,6 @@ interface MemoryDataPanelProps {
const MemoryDataPanel = ({ embedded = false }: MemoryDataPanelProps = {}) => {
const { t } = useT();
- const { navigateBack } = useSettingsNavigation();
const [toasts, setToasts] = useState<ToastNotification[]>([]);
const addToast = useCallback((toast: Omit<ToastNotification, 'id'>) => {
@@ -49,13 +47,9 @@ const MemoryDataPanel = ({ embedded = false }: MemoryDataPanelProps = {}) => {
[addToast, t]
);
- return (
- <PanelPage
- className="z-10"
- contentClassName=""
- description={embedded ? undefined : t('devOptions.memoryInspectionDesc')}
- leading={embedded ? undefined : <SettingsBackButton onBack={navigateBack} />}>
- <div className={embedded ? 'space-y-5' : 'p-4 space-y-5'}>
+ const body = (
+ <>
+ <div className="space-y-5">
<SettingsSection title={t('memoryData.howItWorks')}>
<dl className="space-y-2.5 px-4 py-3">
<div>
@@ -89,8 +83,21 @@ const MemoryDataPanel = ({ embedded = false }: MemoryDataPanelProps = {}) => {
<MemoryWorkspace onToast={addToast} />
</div>
<ToastContainer notifications={toasts} onRemove={removeToast} />
- </PanelPage>
+ </>
);
+
+ // Embedded (the onboarding custom wizard) keeps the headerless PanelPage
+ // branch — that host draws its own step chrome, so a settings page header
+ // here would be a second one.
+ if (embedded) {
+ return (
+ <PanelPage className="z-10" contentClassName="">
+ {body}
+ </PanelPage>
+ );
+ }
+
+ return <SettingsPanel description={t('devOptions.memoryInspectionDesc')}>{body}</SettingsPanel>;
};
export default MemoryDataPanel;