Skip to content

Comments

feat(import): add OpenClaw import crate, CLI, gateway RPC, and UI#209

Open
penso wants to merge 3 commits intomainfrom
openclaw-import
Open

feat(import): add OpenClaw import crate, CLI, gateway RPC, and UI#209
penso wants to merge 3 commits intomainfrom
openclaw-import

Conversation

@penso
Copy link
Collaborator

@penso penso commented Feb 22, 2026

Summary

  • Add moltis-openclaw-import crate that detects OpenClaw installations and imports identity, provider keys, model preferences, skills, memory, sessions, Telegram channels, and MCP servers — with per-category reporting, idempotent imports, and 59 unit tests
  • openclaw-import feature flag (default on) in gateway and CLI for compile-time opt-out
  • CLI moltis import command (detect, all, select) with --dry-run and --json flags
  • Gateway RPC methods (openclaw.detect, openclaw.scan, openclaw.import) with conditional onboarding wizard step and Settings page section
  • Gateway startup logs OpenClaw detection diagnostics

Validation

Completed

  • cargo +nightly-2025-11-30 fmt --all -- --check
  • cargo clippy -p moltis-openclaw-import -p moltis-gateway -p moltis --all-targets -- -D warnings
  • cargo test -p moltis-openclaw-import (59 tests pass)
  • cargo check --workspace
  • Builds without openclaw-import feature (cargo check -p moltis-gateway --features "file-watcher,graphql,local-llm,metrics,prometheus,push-notifications,qmd,tailscale,tls,voice,web-ui")
  • biome check on modified JS files

Remaining

  • ./scripts/local-validate.sh
  • E2E tests for onboarding import step
  • E2E tests for settings import section
  • Manual QA with real OpenClaw installation

Manual QA

  1. CLI detect: cargo run -- import detect / cargo run -- import detect --json
  2. CLI import: cargo run -- import all --dry-run / cargo run -- import all --json
  3. Onboarding: Start gateway, visit onboarding — import step should appear if ~/.openclaw/ exists
  4. Settings: Visit Settings > OpenClaw Import — section visible only when OpenClaw detected
  5. Feature disabled: Build without feature, verify graceful fallbacks

🤖 Generated with Claude Code

@codspeed-hq
Copy link
Contributor

codspeed-hq bot commented Feb 22, 2026

Merging this PR will not alter performance

✅ 39 untouched benchmarks
⏩ 5 skipped benchmarks1


Comparing openclaw-import (a778a5d) with main (12e438c)

Open in CodSpeed

Footnotes

  1. 5 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

Add `moltis-openclaw-import` crate that detects OpenClaw installations
and imports identity, provider keys, model preferences, skills, memory,
sessions, Telegram channels, and MCP servers into Moltis.

Backend (crates/openclaw-import):
- Detection via `~/.openclaw/` and OPENCLAW_HOME env var
- Per-category scanning and selective import with idempotency
- ImportReport with per-category status, warnings, and TODOs
- 59 unit tests covering all import categories

CLI (moltis import):
- `detect` — show detected installation and available data
- `all` — import everything (with --dry-run)
- `select -c identity,providers,...` — import specific categories
- `--json` flag on all subcommands for structured output

Gateway:
- RPC methods: openclaw.detect, openclaw.scan, openclaw.import
- openclaw_detected field in GonData for frontend conditional UI
- Startup logging with detailed detection diagnostics
- Feature-gated behind `openclaw-import` (default on) with
  cfg-gated fallbacks when the feature is disabled

UI:
- Onboarding wizard: conditional "Import" step between LLM and Voice
  steps, shown only when OpenClaw is detected
- Settings page: "OpenClaw Import" section under Integrations with
  scan results, category checkboxes, and import progress
@penso penso changed the title feat(import): add OpenClaw import crate and UI migration flows feat(import): add OpenClaw import crate, CLI, gateway RPC, and UI Feb 22, 2026
Identity (agent name, timezone) and Telegram channel config were
extracted during import but silently discarded. Now they are written
to moltis.toml so subsequent onboarding steps and the gateway pick
them up.

- Persist imported identity (name → identity.name, timezone → user.timezone)
- Persist imported Telegram channels to [channels.telegram] section
- Add refreshGon() after import in onboarding wizard so later steps
  see the freshly persisted data
- Return imported_identity and imported_channels in ImportReport for
  the UI
- Add 4 new persistence tests (63 total, all passing)
The selector `.filter({ hasText: "OpenAI" })` matched "OpenAI Codex"
(OAuth) before plain "OpenAI" (API key), causing the test to click the
wrong provider and fail looking for API key form elements. Use an exact
regex match on the `.provider-item-name` element instead.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant