Skip to content

armgit / avibe

Public Imported from GitHub
0

Make your computer a home for your AI partner. Avibe is the local-first Agent OS: Vibey, its built-in AI partner, works out of the box, and Claude Code, Codex & OpenCode run unchanged beside it — reach them from your browser, phone, or any chat app.

fix(deps): clarify source-managed Memory package status (#1881)

Call White55148194a059
diff --git a/ui/src/components/settings/SettingsDependenciesPage.logic.ts b/ui/src/components/settings/SettingsDependenciesPage.logic.ts
index a6e16f37c..183a610b4 100644
--- a/ui/src/components/settings/SettingsDependenciesPage.logic.ts
+++ b/ui/src/components/settings/SettingsDependenciesPage.logic.ts
@@ -10,6 +10,16 @@ const INSTALLABLE_DEPENDENCIES = new Set([
'tmux',
]);
+/** Source-only repair policy is not a verdict on runtime health. */
+export const memoryPackageIsSourceManaged = (
+ dependency: Pick<DependencyItem, 'id' | 'status' | 'action_class' | 'reason'>,
+): boolean => (
+ dependency.id === 'memory-package'
+ && dependency.status === 'error'
+ && dependency.action_class === 'operator_only'
+ && dependency.reason === 'memory_package_source_build'
+);
+
export const dependencyHasInstallAction = (
dependency: Pick<DependencyItem, 'id' | 'status' | 'action_class'>,
): boolean => {
diff --git a/ui/src/components/settings/SettingsDependenciesPage.test.ts b/ui/src/components/settings/SettingsDependenciesPage.test.ts
index c0ad8a3ed..23c93c776 100644
--- a/ui/src/components/settings/SettingsDependenciesPage.test.ts
+++ b/ui/src/components/settings/SettingsDependenciesPage.test.ts
@@ -1,6 +1,49 @@
import { describe, expect, it } from 'vitest';
-import { dependencyHasInstallAction, memoryRuntimeSidecarRunning } from './SettingsDependenciesPage.logic';
+import type { DependencyItem } from '@/context/ApiContext';
+import {
+ dependencyHasInstallAction,
+ memoryPackageIsSourceManaged,
+ memoryRuntimeSidecarRunning,
+} from './SettingsDependenciesPage.logic';
+
+describe('memoryPackageIsSourceManaged', () => {
+ const sourcePolicy = Object.freeze({
+ id: 'memory-package',
+ status: 'error',
+ action_class: 'operator_only',
+ reason: 'memory_package_source_build',
+ } as const);
+
+ it('recognizes source policy without changing dependency evidence or repair admission', () => {
+ expect(memoryPackageIsSourceManaged(sourcePolicy)).toBe(true);
+ expect(dependencyHasInstallAction(sourcePolicy)).toBe(false);
+ expect(sourcePolicy).toEqual({
+ id: 'memory-package',
+ status: 'error',
+ action_class: 'operator_only',
+ reason: 'memory_package_source_build',
+ });
+ });
+
+ it.each([
+ { id: 'memory-runtime' },
+ { status: 'missing' },
+ { status: 'not_required' },
+ { action_class: 'repairable' },
+ { action_class: 'none' },
+ { action_class: undefined },
+ { reason: 'memory_package_missing' },
+ { reason: 'memory_package_runtime_unavailable' },
+ { reason: 'memory_package_unpublished_build' },
+ { reason: null },
+ ] satisfies Partial<DependencyItem>[])(
+ 'requires the complete source-only policy, not %j',
+ (differentEvidence) => {
+ expect(memoryPackageIsSourceManaged({ ...sourcePolicy, ...differentEvidence })).toBe(false);
+ },
+ );
+});
describe('dependencyHasInstallAction', () => {
it('hides install and repair actions for unsupported dependencies', () => {
diff --git a/ui/src/components/settings/SettingsDependenciesPage.test.tsx b/ui/src/components/settings/SettingsDependenciesPage.test.tsx
index 60825b08e..a767ad047 100644
--- a/ui/src/components/settings/SettingsDependenciesPage.test.tsx
+++ b/ui/src/components/settings/SettingsDependenciesPage.test.tsx
@@ -138,6 +138,89 @@ describe('SettingsDependenciesPage Model Hub engine', () => {
});
describe('SettingsDependenciesPage Memory runtime', () => {
+ it.each([false, null, true])(
+ 'presents source management neutrally without claiming installation or readiness (%s)',
+ async (installed) => {
+ const row = Object.freeze(dependency({
+ id: 'memory-package',
+ required: true,
+ installed,
+ status: 'error',
+ readiness: 'not_ready',
+ action_class: 'operator_only',
+ version: null,
+ reason: 'memory_package_source_build',
+ }));
+ api.listDependencies.mockResolvedValue({ ok: true, deps: [row] });
+ api.getMemoryStatus.mockRejectedValue(new Error('Status is unavailable'));
+ renderPage();
+
+ const badge = await screen.findByText('settings.dependencies.statusSourceManaged');
+ expect(badge.className).not.toContain('destructive');
+ expect(badge.className).toContain('text-muted');
+ expect(screen.getByText('settings.dependencies.memoryPackageSourceManaged').className).toContain('text-muted');
+ expect(screen.queryByRole('alert')).toBeNull();
+ expect(screen.queryByText('settings.dependencies.statusReady')).toBeNull();
+ expect(screen.queryByText('settings.dependencies.statusMissing')).toBeNull();
+ expect(screen.queryByText('settings.dependencies.statusError')).toBeNull();
+ expect(screen.getAllByRole('button').map((button) => button.textContent)).toEqual([
+ 'settings.dependencies.recheckAll',
+ ]);
+ expect(api.installDependency).not.toHaveBeenCalled();
+ expect(row).toMatchObject({ installed, status: 'error', readiness: 'not_ready' });
+ },
+ );
+
+ it.each([
+ 'memory_package_runtime_unavailable',
+ 'memory_package_artifact_unavailable',
+ 'memory_runtime_install_failed',
+ ])('keeps the actual runtime failure visible next to a source-managed package: %s', async (reason) => {
+ api.listDependencies.mockResolvedValue({
+ ok: true,
+ deps: [
+ dependency({
+ id: 'memory-package',
+ installed: false,
+ status: 'error',
+ action_class: 'operator_only',
+ reason: 'memory_package_source_build',
+ }),
+ dependency({ installed: false, status: 'error', action_class: 'none', reason }),
+ ],
+ });
+ renderPage();
+
+ expect(await screen.findByText('settings.dependencies.statusSourceManaged')).toBeTruthy();
+ expect(screen.getByText('settings.dependencies.statusError').className).toContain('destructive');
+ expect(screen.getByRole('alert').textContent).toBe(`errors.${reason}`);
+ expect(api.installDependency).not.toHaveBeenCalled();
+ });
+
+ it.each([
+ 'memory_package_unpublished_build',
+ 'memory_package_metadata_unreadable',
+ 'memory_package_metadata_ambiguous',
+ 'memory_package_install_failed',
+ ])('does not reclassify a different package failure: %s', async (reason) => {
+ api.listDependencies.mockResolvedValue({
+ ok: true,
+ deps: [dependency({
+ id: 'memory-package',
+ installed: false,
+ status: 'error',
+ action_class: 'operator_only',
+ reason,
+ })],
+ });
+ renderPage();
+
+ expect((await screen.findByText('settings.dependencies.statusError')).className).toContain('destructive');
+ expect(screen.getByRole('alert').textContent).toBe(`errors.${reason}`);
+ expect(screen.queryByText('settings.dependencies.statusSourceManaged')).toBeNull();
+ expect(api.installDependency).not.toHaveBeenCalled();
+ });
+
it('routes repairable Python package bootstrap through its own dependency action', async () => {
api.listDependencies.mockResolvedValue({
ok: true,
diff --git a/ui/src/components/settings/SettingsDependenciesPage.tsx b/ui/src/components/settings/SettingsDependenciesPage.tsx
index 498083626..7896dc7ac 100644
--- a/ui/src/components/settings/SettingsDependenciesPage.tsx
+++ b/ui/src/components/settings/SettingsDependenciesPage.tsx
@@ -25,7 +25,11 @@ import { SettingsResourceRow } from './SettingsPrimitives';
import { useApi } from '@/context/ApiContext';
import type { DependencyItem, InstallResult, MemoryStatusResult } from '@/context/ApiContext';
import { useToast } from '@/context/ToastContext';
-import { dependencyHasInstallAction, memoryRuntimeSidecarRunning } from './SettingsDependenciesPage.logic';
+import {
+ dependencyHasInstallAction,
+ memoryPackageIsSourceManaged,
+ memoryRuntimeSidecarRunning,
+} from './SettingsDependenciesPage.logic';
import { errorMessage } from '@/lib/errorMessage';
// Mirrors design.pen "vibe-remote — Settings · Dependencies": one card per
@@ -123,6 +127,7 @@ export const SettingsDependenciesPage: React.FC = () => {
};
const statusText = (d: DependencyItem) => {
+ if (memoryPackageIsSourceManaged(d)) return t('settings.dependencies.statusSourceManaged');
// Closed non-installed failure states render distinctly, ahead
// of the generic "not installed" fallback.
if (d.status === 'unsupported') return t('settings.dependencies.statusUnsupported');
@@ -138,6 +143,7 @@ export const SettingsDependenciesPage: React.FC = () => {
};
const statusVariant = (d: DependencyItem): 'secondary' | 'success' | 'warning' | 'destructive' => {
+ if (memoryPackageIsSourceManaged(d)) return 'secondary';
if (d.status === 'not_required') return 'secondary';
if (d.status === 'error') return 'destructive';
if (d.status === 'unsupported' || d.status === 'upgrade_required') return 'warning';
@@ -186,7 +192,13 @@ export const SettingsDependenciesPage: React.FC = () => {
const sidecarRunning = isMemoryRuntime && memoryRuntimeSidecarRunning(memoryStatus);
const repairBlockedBySidecar = isMemoryRuntime && (!memoryStatusLoaded || sidecarRunning);
const dependencyOperationBusy = busy !== null;
- const persistedFailure = d.status === 'error' && d.reason
+ const sourceManaged = memoryPackageIsSourceManaged(d);
+ const notice = sourceManaged
+ ? t('settings.dependencies.memoryPackageSourceManaged')
+ : isMemoryRuntime && sidecarRunning
+ ? t('settings.dependencies.memoryRuntimeDisableBeforeRepair')
+ : null;
+ const persistedFailure = !sourceManaged && d.status === 'error' && d.reason
? localizedReason(d.reason, t('settings.dependencies.installFailed'))
: null;
return (
@@ -247,9 +259,9 @@ export const SettingsDependenciesPage: React.FC = () => {
)}
</>
}
- footer={isMemoryRuntime && sidecarRunning ? (
+ footer={notice ? (
<div className="border-t border-border pt-3 text-[11px] leading-snug text-muted">
- {t('settings.dependencies.memoryRuntimeDisableBeforeRepair')}
+ {notice}
</div>
) : persistedFailure ? (
<div
diff --git a/ui/src/i18n/en.json b/ui/src/i18n/en.json
index f04e0dfbb..032916e3b 100644
--- a/ui/src/i18n/en.json
+++ b/ui/src/i18n/en.json
@@ -387,6 +387,7 @@
"statusDetected": "Detected",
"statusMissing": "Not installed",
"statusNotRequired": "Not required",
+ "statusSourceManaged": "Source-managed",
"statusUpgradeRequired": "Upgrade required",
"install": "Install",
"update": "Update",
@@ -397,6 +398,7 @@
"installed": "{{name}} is ready.",
"installFailed": "Install failed.",
"memoryRuntimeDisableBeforeRepair": "Memory is running. Turn it off in Settings \u2192 Memory before repairing the runtime.",
+ "memoryPackageSourceManaged": "Source checkout; automatic package repair is unavailable.",
"backendsTitle": "Agent backends",
"backendsDetail": "Claude · OpenCode · Codex — managed in the Backends tab.",
"manageBackends": "Manage in Backends",
diff --git a/ui/src/i18n/zh.json b/ui/src/i18n/zh.json
index c64823afe..ddf38570f 100644
--- a/ui/src/i18n/zh.json
+++ b/ui/src/i18n/zh.json
@@ -387,6 +387,7 @@
"statusDetected": "已检测",
"statusMissing": "未安装",
"statusNotRequired": "无需安装",
+ "statusSourceManaged": "源码管理",
"statusUpgradeRequired": "需要升级",
"install": "安装",
"update": "更新",
@@ -397,6 +398,7 @@
"installed": "{{name}} 已就绪。",
"installFailed": "安装失败。",
"memoryRuntimeDisableBeforeRepair": "记忆功能正在运行。请先在「设置 → 记忆」中关闭记忆,再修复运行时。",
+ "memoryPackageSourceManaged": "当前为源码环境,不提供软件包自动修复。",
"backendsTitle": "Agent 后端",
"backendsDetail": "Claude · OpenCode · Codex —— 在 Backends 标签页管理。",
"manageBackends": "前往 Backends",