Skip to content
This repository was archived by the owner on Mar 7, 2026. It is now read-only.

feat: onboarding redesign, memory conflict resolution, identity fix#6

Merged
Natfii merged 24 commits intomainfrom
feature/onboarding-redesign
Feb 27, 2026
Merged

feat: onboarding redesign, memory conflict resolution, identity fix#6
Natfii merged 24 commits intomainfrom
feature/onboarding-redesign

Conversation

@Natfii
Copy link
Copy Markdown
Owner

@Natfii Natfii commented Feb 27, 2026

Summary

  • 9-step onboarding wizard with interactive channel setup sub-flows, live API key/channel token probing, identity/memory/tunnel configuration, and config summary review
  • Memory backend conflict resolution — detects stale SQLite/Markdown artifacts at daemon startup, shows blocking dialog for cleanup, verifies backend health post-start
  • Console identity fix — routes send_message through the full agent loop (process_message) instead of the stateless gateway webhook, giving Console messages memory recall, tool access, and proper workspace identity injection
  • Duplicate API key prevention in Settings with alias-aware dedup
  • Reusable setup composables (ProviderSetupFlow, ChannelSetupFlow, TunnelConfigFlow, IdentityConfigFlow, etc.) wired into both onboarding and Settings screens
  • Version bump to v0.0.29 (versionCode 31)

Key changes

  • 22 new files, 48 modified files (~10k lines added)
  • OnboardingCoordinator replaces OnboardingViewModel for the 9-step wizard
  • DaemonServiceBridge gains memory conflict detection, cleanup, and health checking (23 unit tests)
  • FFI send_message now calls zeroclaw::agent::process_message directly — full agent loop with memory, tools, and identity
  • New validation layer: ProviderValidator, ChannelValidator, ValidationResult

Test plan

  • 105 Rust FFI tests pass (including version assertion)
  • 23 DaemonServiceBridgeTest pass
  • spotlessCheck + detekt pass
  • assembleDebug builds successfully
  • Manual test: installed on device, identity files verified, daemon starts

🤖 Generated with Claude Code

Natfii and others added 24 commits February 26, 2026 11:02
Addresses issues #2 and #5. Designs a 9-step onboarding wizard with
interactive channel sub-flows, live validation, and deep links.
All setup flows are reusable from both onboarding and Settings screens.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Wraps ModelFetcher.fetchModels() to return ValidationResult, classifying
probe outcomes into Success/Failure/Offline/Idle for onboarding and settings
UI. Includes 9 unit tests covering all classification branches.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Validates Telegram, Discord, Slack, and Matrix tokens by probing their
respective APIs. Other channel types return a deferred success result.
Classification logic is exposed as internal functions for unit testing
without network access. All 12 tests pass.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Centralises deep-link URIs and Intent construction for onboarding and
settings flows. Includes DeepLinkTarget data class, pre-defined targets
for Telegram, Discord, and Slack, provider console lookup for 7 AI
providers, and a launch function with fallback URI handling.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Define a data-driven specification for interactive channel setup
with per-platform step sequences, instructions, deep links, field
grouping, and validator types. Includes dedicated specs for Telegram,
Discord, Slack, and Matrix, plus generic two-step specs for all other
channel types. Fields reference existing ChannelType.fields instances
to prevent drift.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…omposables

Add three reusable setup-flow composables in ui/component/setup/:
- ValidationIndicator: renders ValidationResult states with icons/spinners
- InstructionsList: renders InstructionItem list with numbered steps, warnings, hints
- DeepLinkButton: OutlinedButton that opens external apps via ExternalAppLauncher

Also fix pre-existing detekt issues: suppress TooGenericExceptionCaught in
ChannelValidator catch blocks, bump TooManyFunctions threshold for objects,
and configure UnusedPrivateMember to ignore @Preview-annotated functions.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Extract shared provider setup UI (credential form, validation button,
deep-link to console, model suggestions) into ProviderSetupFlow in the
setup component package. ProviderStep becomes a thin wrapper that adds
onboarding-specific title/description and live model fetching logic.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
ChannelSetupFlow renders per-channel sub-step wizards with instructions,
deep links, dynamic field rendering, and validation support. Fields are
mapped from FieldInputType to appropriate keyboard types and widgets
including secret fields with reveal toggles and boolean switches.

ChannelSelectionGrid provides a two-column multi-select grid for choosing
which channels to configure, with visual indicators for selected and
already-configured channels.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ntityConfigFlow, ConfigSummaryCard

Add five reusable setup composables for the onboarding redesign:
- TunnelConfigFlow: tunnel type selector with conditional token/URL fields
- AutonomyPicker: three-level autonomy selector with warning styling
- MemoryConfigFlow: backend, auto-save, embedding provider, retention
- IdentityConfigFlow: agent name, user name, timezone, style, format
- ConfigSummaryCard: read-only overview with status icons per dimension

All field names align with ConfigTomlBuilder/GlobalTomlConfig. Each
composable includes KDoc, accessibility semantics, and preview variants.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace the 5-step OnboardingViewModel with a 9-step OnboardingCoordinator
that supports multiple channel sub-flows, tunnel configuration, security/
autonomy settings, memory backend selection, and identity customisation.

New files:
- OnboardingStepStates.kt: Data classes for each step's state
- OnboardingCoordinator.kt: AndroidViewModel with 9-step navigation,
  provider validation, channel sub-flow management, debounced model
  fetching, and enhanced completion logic preserving all existing
  OnboardingViewModel persistence
- OnboardingCoordinatorTest.kt: 24 unit tests covering step navigation
  bounds, state defaults, copy semantics, and auth failure detection

All existing completion logic is preserved: auth probing, API key saving,
agent create/update, channel saving (now multi-channel), identity JSON,
workspace scaffolding, provider/model defaults, and PIN/lock persistence.
New persistence added for tunnel, autonomy, and memory configuration.

Also applies spotless formatting corrections to setup composables.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Addresses spec review findings:
- Expose welcomeState + acknowledgeWelcome() from coordinator
- Inline isDefinitiveAuthFailure to remove coupling to OnboardingViewModel

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace OnboardingViewModel with OnboardingCoordinator in OnboardingScreen,
expanding the wizard from 5 to 9 steps: permissions, welcome, provider,
channels, tunnel, security, memory, identity, and activation.

- Create WelcomeStep composable with hero icon and setup preview card
- Create SecurityStep composable wrapping AutonomyPicker
- Wire ChannelStepCollector with ChannelSelectionGrid and ChannelSetupFlow
  for per-channel interactive sub-flows
- Add TunnelStepCollector, SecurityStepCollector, MemoryStepCollector,
  IdentityStepCollector, and ActivationStepCollector
- Update ActivationStep to render ConfigSummaryCard with aggregated config
- Update OnboardingContent to remove onActivate parameter since the
  activation step renders its own button
- Update instrumented tests and FakeData for 9-step state

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace the channel type picker dialog with ChannelSelectionGrid for a
richer visual selection experience. Add ChannelSetupFlow wizard for new
channel creation in ChannelDetailScreen while preserving the flat form
for editing existing channels. Add inline validation with ValidationIndicator
to each API key card in ApiKeysScreen via ProviderValidator.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Mark the legacy 5-step OnboardingViewModel as @deprecated with a
pointer to OnboardingCoordinator. Update KDoc references in
AgentConfigStep and all test files to point to the new coordinator.
All unit tests, spotless, detekt, and assembleDebug pass cleanly.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add three methods to DaemonServiceBridge:
- detectMemoryConflict(): scans workspace for stale backend artifacts
- cleanupStaleMemory(): deletes stale files (sqlite, markdown, or both)
- checkMemoryHealth(): write/read probe to verify backend storage

Includes 13 unit tests covering all backends, state/ subdirectory,
and edge cases. Reviewed for spec compliance and code quality.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add memoryConflict and memoryHealthWarning StateFlows, plus
awaitConflictResolution() suspend method and setMemoryHealthWarning()
for the service to use during startup orchestration.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Insert conflict detection between config build and attemptStart() in
handleStartFromSettings(). Suspends on awaitConflictResolution() when
stale files are found. Post-start health check via runMemoryHealthCheck().

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…iewModel

Add memoryConflict, memoryHealthWarning StateFlows and resolution
methods so the dashboard UI can observe and respond to conflicts.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Show blocking AlertDialog when stale memory backend files are detected
at daemon startup. Add dismissible error banner for failed health checks.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Console messages were routed through the stateless gateway webhook
(run_gateway_chat_simple) which had no tools, no memory recall, and
used native_tools=false causing hallucinated <tool_call> tags.

Now routes through zeroclaw::agent::process_message directly, giving
Console the same treatment as channels: memory recall, tool access,
proper identity injection, and correct native_tools detection.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@Natfii Natfii merged commit 4bd0965 into main Feb 27, 2026
4 checks passed
@Natfii Natfii deleted the feature/onboarding-redesign branch February 27, 2026 00:05
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant