Skip to content

Remove dead code from native apps (skills UI, wizard/OAuth, model catalog) #123

@alexey-pelykh

Description

@alexey-pelykh

Summary

Remove dead UI code from the macOS native app that references gutted backend systems. After the middleware replacement (CLI agent runtimes via ChannelBridge), two features visible in the macOS app no longer have functioning backends:

  1. Skills system — the gateway no longer implements skills.* RPC methods (gutted in PR feat: gut skills system and ClawHub (#63) #64). The macOS Settings tab and onboarding skills overview call dead endpoints.
  2. LLM model catalog — the local ModelCatalogLoader reads models.generated.js from the old in-process LLM system (gutted in PR feat: remove in-process LLM packages and dead model management #108). The models.list gateway method exists in the method list but has no handler implementation.

The wizard/onboarding flow is ALIVEwizard.* gateway methods are fully functional (redesigned in PR #90). Do NOT touch wizard UI code.

iOS and Android do NOT have skills settings or model catalog UI — this is macOS-only dead code.

Dead Code Inventory

Skills UI (macOS only)

File Action What
apps/macos/Sources/OpenClaw/SkillsSettings.swift DELETE Skills settings tab (621 lines) — calls GatewayConnection.shared.skillsStatus() and skillsInstall() which resolve to skills.status and skills.install RPC methods that no longer exist on the gateway
apps/macos/Sources/OpenClaw/SkillsModels.swift DELETE Skills data models (74 lines) — SkillsStatusReport, SkillsBin, InstalledSkill types used only by SkillsSettings
apps/macos/Tests/OpenClawIPCTests/SkillsSettingsSmokeTests.swift DELETE Smoke tests for the deleted SkillsSettings view
apps/macos/Sources/OpenClaw/SettingsRootView.swift MODIFY Line 54: remove SkillsSettings(state: self.state) tab from settings navigation
apps/macos/Sources/OpenClaw/OnboardingView+Pages.swift MODIFY Lines ~773-849: remove skillsOverview property and skills list from the final onboarding page (readyPage())
apps/macos/Sources/OpenClaw/GatewayConnection.swift MODIFY Lines 81-82: remove skillsStatus and skillsInstall case from Method enum. Lines 516-535: remove skillsStatus(), skillsInstall(), skillsUpdate() convenience methods
apps/macos/Sources/OpenClaw/ExecApprovals.swift MODIFY Line ~773: remove skillsStatus() call in exec approvals context

Model Catalog (macOS only)

File Action What
apps/macos/Sources/OpenClaw/ModelCatalogLoader.swift DELETE LLM model catalog loader (~160 lines) — loads models.generated.js from bundle/node_modules/cache. No corresponding gateway handler exists (models.list is in the method list but has no handler implementation)
apps/macos/Tests/OpenClawIPCTests/ModelCatalogLoaderTests.swift DELETE Tests for the deleted loader
apps/macos/Sources/OpenClaw/DebugSettings.swift MODIFY Remove model catalog section: @AppStorage(modelCatalogPathKey) binding (line 10), @AppStorage(modelCatalogReloadKey) binding (line 11), modelsLoading state (line 15), the "Reload models" UI section (~lines 430-470), and the reload function (~lines 725-735)
apps/macos/Sources/OpenClaw/Constants.swift MODIFY Remove modelCatalogPathKey (line 41) and modelCatalogReloadKey (line 42) constants

NOT Dead (leave alone)

Component Status Evidence
Wizard/Onboarding ALIVE wizard.start, wizard.next, wizard.cancel, wizard.status all implemented in src/gateway/server-methods/wizard.ts. Wizard was redesigned for RemoteClaw (PR #90).
DeviceModelCatalog ALIVE Device identification (iPhone/Mac model names), NOT LLM models. Used for device UI display.
GatewayModels.swift Skills types GENERATED SkillsStatusParams, SkillsBinsParams, etc. in apps/shared/OpenClawKit/Sources/OpenClawProtocol/GatewayModels.swift are auto-generated from the protocol schema. These dead types are harmless — they'll be removed when the protocol schema is cleaned up separately.

Verification

Pre-check (understanding what's dead)

To verify skills methods are dead:

# Gateway method list — no skills.* methods
grep 'skills' src/gateway/server-methods-list.ts
# Expected: no output

# Gateway handlers — no skills handler
grep 'skills' src/gateway/server-methods.ts
# Expected: no output

To verify model catalog handler is dead:

# models.list exists in method list but has no handler
grep 'models' src/gateway/server-methods.ts
# Expected: no output (no handler imported or registered)

Post-change verification

# macOS app builds successfully
cd apps/macos && swift build

# No references to deleted views remain
grep -rn 'SkillsSettings\|SkillsModels\|ModelCatalogLoader' apps/macos/Sources/ --include='*.swift'
# Expected: no output

# Skills methods removed from GatewayConnection
grep -n 'skillsStatus\|skillsInstall\|skillsUpdate' apps/macos/Sources/OpenClaw/GatewayConnection.swift
# Expected: no output

# Model catalog constants removed
grep -n 'modelCatalogPathKey\|modelCatalogReloadKey' apps/macos/Sources/OpenClaw/Constants.swift
# Expected: no output

Acceptance Criteria

  • SkillsSettings.swift, SkillsModels.swift, SkillsSettingsSmokeTests.swift deleted
  • ModelCatalogLoader.swift, ModelCatalogLoaderTests.swift deleted
  • Skills tab removed from SettingsRootView.swift
  • Skills overview removed from onboarding readyPage()
  • Skills methods removed from GatewayConnection.swift
  • Skills reference removed from ExecApprovals.swift
  • Model catalog section removed from DebugSettings.swift
  • Model catalog constants removed from Constants.swift
  • cd apps/macos && swift build passes
  • grep confirms zero references to deleted types/files in remaining app code

Scope

~5 files deleted, ~5 files modified. macOS only. iOS and Android have no dead skills/model-catalog UI.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions