feat: Lifecycle UI — status, cycle, orphans, restore - #236
Open
ajianaz wants to merge 3 commits into
Open
Conversation
Layer 0 (uteke_client.rs): - LifecycleStatus, LifecycleCycleResult, OrphanMemory structs - lifecycle_status() → GET /lifecycle/status - lifecycle_cycle() → POST /lifecycle/cycle - lifecycle_promote() → POST /lifecycle/promote - find_orphans() → POST /orphans - consolidate() → POST /consolidate (dry_run only) Layer 1 (commands.rs + lib.rs): - 5 Tauri commands: lifecycle_status, lifecycle_cycle, lifecycle_promote, find_orphans, consolidate_memories - All registered in generate_handler![] Layer 2 (types.ts + ipc.ts): - LifecycleStatus, LifecycleCycleResult, OrphanMemory interfaces - 5 IPC wrapper functions Layer 3 (LifecycleView.svelte): - Status cards: Active / Deprecated / Pruned counts - Memory health bar (active vs deprecated ratio) - Run Cycle with confirmation modal - Orphaned memories list with restore button - Graceful 404 handling for older uteke versions Layer 4 (App.svelte + Sidebar.svelte): - HeartPulse nav icon added to sidebar - View switch routing to LifecycleView - View type extended with lifecycle Closes #227 (partial — consolidate preview in #230) 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
| loading = false; | ||
| } | ||
| } | ||
|
|
🔍 Cora AI Code Review✅ No issues found. Code looks good! Review powered by cora-code · BYOK · MIT |
- cargo fmt reformatted lifecycle method signatures - class:spinning directive is invalid on Svelte components (lucide-svelte icons) — wrap in <span class:spinning> instead Fixes CI: Rust Format + Frontend Build failures on PR #236
Cora Review caught double loadData() call: onMount + $effect both fired on component init, causing race condition. Removed onMount, kept $effect which covers both init + namespace change.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implementasi Phase 1 Lifecycle UI untuk Corin — full 5-layer stack dari Rust client sampai Svelte view.
Changes
Layer 0:
uteke_client.rsLifecycleStatusstruct: active, deprecated, pruned countsLifecycleCycleResultstruct: deprecated, pruned, skipped countsOrphanMemorystruct: id, content, tags, namespace, importance, created_atlifecycle_status()→ GET /lifecycle/statuslifecycle_cycle()→ POST /lifecycle/cyclelifecycle_promote()→ POST /lifecycle/promotefind_orphans()→ POST /orphansconsolidate()→ POST /consolidate (always dry_run from Corin)Layer 1:
commands.rs+lib.rsgenerate_handler![]Layer 2:
types.ts+ipc.tsLayer 3:
LifecycleView.svelte(751 lines)Layer 4: Sidebar + App routing
HeartPulseicon dari lucide-svelte'lifecycle'addedTesting
cargo check— blocked oleh missinglibglib2.0-devdi server ini (desktop build dependency)pnpm check— blocked oleh Tauri build dep chainNotes
consolidate_memoriescommand sudah included tapi consolidate preview UI deferred ke feat: Consolidate preview mode — merge duplicates with review #230GET /lifecycle/deprecatedbelum ada di Uteke — issue uteke#1007 dibuat. Client code di Corin akan tetap work karena graceful 404 handlingCloses #227