chore: rebrand from Kon/Corbie to Magnotia

Replace all instances of the legacy product names "Kon" and "Corbie" with
"Magnotia" across user-facing copy, code identifiers, package names, bundle
ids, file paths, and documentation. Preserves the unrelated "konsole" (KDE
terminal) reference and the parent CORBEL company name.

- Renames 10 Rust crates (kon-* → magnotia-*) and the tauri binary
- Updates package.json, tauri.conf.json (productName + identifier)
- Renames CSS classes (kon-rh-* → magnotia-rh-*) and animations
- Renames brand and roadmap docs
- Regenerates Cargo.lock and package-lock.json

Verified: svelte-check passes; pure-rust crates compile under new names.
This commit is contained in:
Claude
2026-04-30 13:06:55 +00:00
parent 749403697a
commit 89c63891fa
186 changed files with 1297 additions and 1297 deletions

View File

@@ -6,7 +6,7 @@
**Architecture:** See companion spec for full detail. Four sub-phases: 9a export plumbing, 9b LLM tags, 9c Settings restructure, 9d visual + a11y polish.
**Tech Stack:** Rust + Tauri 2, `tauri-plugin-dialog` (already installed), `kon-llm` (already wired to llama-cpp-2), Svelte 5 runes, TypeScript, Tailwind v4, Lucide icons.
**Tech Stack:** Rust + Tauri 2, `tauri-plugin-dialog` (already installed), `magnotia-llm` (already wired to llama-cpp-2), Svelte 5 runes, TypeScript, Tailwind v4, Lucide icons.
**Spec:** [docs/superpowers/specs/2026-04-24-phase9-polish-debt-design.md](../specs/2026-04-24-phase9-polish-debt-design.md)
@@ -16,7 +16,7 @@
Critical-review pass against the actual codebase (after Codex was unavailable for a cross-model read) surfaced three mismatches between the plan's prescribed code and what the repo actually contains. Implementations adapt as follows.
**1. `kon-llm` API.** Plan referenced `LlamaEngine::generate_chat(messages, config).await`. Actual: `LlmEngine::generate(prompt: &str, config: &GenerationConfig) -> Result<String, EngineError>`*synchronous*, prompt is a single rendered string, no chat-message vec. The engine struct is `LlmEngine` not `LlamaEngine`. Loaded via `engine.load(model_path)` (sync, &self). The closest in-tree analogue to the new `extract_content_tags` is `LlmEngine::cleanup_text` — same crate, same generate-with-prompt shape; copy that pattern. Tasks 7 + 8 code samples are guides, not literals.
**1. `magnotia-llm` API.** Plan referenced `LlamaEngine::generate_chat(messages, config).await`. Actual: `LlmEngine::generate(prompt: &str, config: &GenerationConfig) -> Result<String, EngineError>`*synchronous*, prompt is a single rendered string, no chat-message vec. The engine struct is `LlmEngine` not `LlamaEngine`. Loaded via `engine.load(model_path)` (sync, &self). The closest in-tree analogue to the new `extract_content_tags` is `LlmEngine::cleanup_text` — same crate, same generate-with-prompt shape; copy that pattern. Tasks 7 + 8 code samples are guides, not literals.
**2. Tauri `AppState`.** Plan referenced `state.llm.read().await.engine.as_ref()`. Actual: `AppState.llm_engine: Arc<LlmEngine>` — direct, no RwLock, accessed as `state.llm_engine.as_ref()`. Existing LLM commands file is `src-tauri/src/commands/llm.rs` (already there — do not create a new one).
@@ -43,7 +43,7 @@ Fix in scope (decided 2026-04-24, "do it properly so we don't need to revisit"):
**TDD steps:**
1. Storage test: migration v14 adds `llm_tags TEXT NOT NULL DEFAULT ''` column; pre-existing rows default to empty string.
2. Storage test: `db_update_transcript(.., None, Some("topic:x,intent:y"))` writes only `llm_tags` and leaves `manual_tags` untouched.
3. Tauri command compile-check via `cargo build -p kon`.
3. Tauri command compile-check via `cargo build -p magnotia`.
4. Frontend `npm run check` clean.
Commit message: `feat(phase9): migration v14 + tag persistence wiring`.
@@ -72,7 +72,7 @@ Tasks 8.5 inserted between 8 and 9. Subsequent task numbers (11..16) unchanged.
- Every Phase 9 addition with motion respects `prefers-reduced-motion`.
- Phase 8 gotchas carried forward:
- `$derived` cannot export at `.svelte.ts` module scope — use `export function` instead.
- `#[derive(sqlx::FromRow)]` is not available in `kon-storage` (not expected to fire in this phase; noted for safety).
- `#[derive(sqlx::FromRow)]` is not available in `magnotia-storage` (not expected to fire in this phase; noted for safety).
---
@@ -97,7 +97,7 @@ Tasks 8.5 inserted between 8 and 9. Subsequent task numbers (11..16) unchanged.
- `src/lib/stores/page.svelte.ts` — hydrate / persist `llmTags`.
- `src/lib/utils/frontmatter.ts` — include `llmTags` in `buildFrontmatter` tag union.
- `src/lib/components/CompletionSparkline.svelte` — friendlier aria-label, per-bar `<title>`, `tabindex`, stagger entrance.
- `docs/roadmap/2026-04-23-corbie-feature-complete-roadmap.md` — mark Phase 9 shipped.
- `docs/roadmap/2026-04-23-magnotia-feature-complete-roadmap.md` — mark Phase 9 shipped.
- `HANDOVER.md` — end-of-session state.
**Files deleted:** None.
@@ -144,7 +144,7 @@ mod tests {
async fn write_text_file_errors_on_bad_parent() {
// Parent dir does not exist → expect Err.
let result = write_text_file_cmd(
"/definitely-not-a-real-path-kon-phase9/out.md".into(),
"/definitely-not-a-real-path-magnotia-phase9/out.md".into(),
"x".into(),
)
.await;
@@ -157,7 +157,7 @@ If `tempfile` is not already a workspace dev-dep, add it to `src-tauri/Cargo.tom
- [ ] **Step 3: Run test to verify it fails**
Run: `cargo test -p kon write_text_file -- --nocapture`
Run: `cargo test -p magnotia write_text_file -- --nocapture`
Expected: FAIL — `write_text_file_cmd` not defined.
- [ ] **Step 4: Add the command**
@@ -177,7 +177,7 @@ pub async fn write_text_file_cmd(path: String, contents: String) -> Result<(), S
- [ ] **Step 5: Tests pass**
Run: `cargo test -p kon write_text_file -- --nocapture`
Run: `cargo test -p magnotia write_text_file -- --nocapture`
Expected: PASS.
- [ ] **Step 6: Commit**
@@ -218,7 +218,7 @@ Add the line inside the block (alphabetical neighbourhood or end — match local
- [ ] **Step 3: Compile**
Run: `cargo build -p kon`
Run: `cargo build -p magnotia`
Expected: clean build.
- [ ] **Step 4: Commit**
@@ -627,7 +627,7 @@ pub use prompts::{ContentTags, INTENT_CLOSED_SET, is_valid_intent};
- [ ] **Step 4: Type-check**
Run: `cargo build -p kon-llm && cargo clippy -p kon-llm -- -D warnings`
Run: `cargo build -p magnotia-llm && cargo clippy -p magnotia-llm -- -D warnings`
Expected: clean.
- [ ] **Step 5: Commit**
@@ -659,10 +659,10 @@ EOF
```rust
// crates/llm/tests/content_tags_smoke.rs
use kon_llm::{extract_content_tags, is_valid_intent, model_manager::LlmModelId};
use magnotia_llm::{extract_content_tags, is_valid_intent, model_manager::LlmModelId};
// Marked #[ignore] so it does not run in default cargo test (the model
// load is heavy). Run explicitly: cargo test -p kon-llm --test
// load is heavy). Run explicitly: cargo test -p magnotia-llm --test
// content_tags_smoke -- --ignored --nocapture.
#[tokio::test]
#[ignore]
@@ -685,14 +685,14 @@ async fn extract_content_tags_on_short_transcript() {
assert!(is_valid_intent(&tags.intent), "intent in closed set: {tags:?}");
}
async fn load_local_tier0_engine() -> Option<kon_llm::LlamaEngine> {
async fn load_local_tier0_engine() -> Option<magnotia_llm::LlamaEngine> {
// Use the existing recommend_tier / model_manager path to find a
// locally-downloaded model file. Skip the test if none is present.
let tier = kon_llm::recommend_tier();
let info = kon_llm::LlmModelInfo::from_id(&LlmModelId::from_tier(tier))?;
let tier = magnotia_llm::recommend_tier();
let info = magnotia_llm::LlmModelInfo::from_id(&LlmModelId::from_tier(tier))?;
let path = info.local_path().ok()?;
if !path.exists() { return None; }
kon_llm::LlamaEngine::load(&path).await.ok()
magnotia_llm::LlamaEngine::load(&path).await.ok()
}
```
@@ -757,9 +757,9 @@ pub async fn extract_content_tags(
- [ ] **Step 3: Build + tests**
```
cargo build -p kon-llm
cargo test -p kon-llm # excludes #[ignore] — should still be green
cargo clippy -p kon-llm -- -D warnings
cargo build -p magnotia-llm
cargo test -p magnotia-llm # excludes #[ignore] — should still be green
cargo clippy -p magnotia-llm -- -D warnings
cargo fmt --check
```
@@ -787,13 +787,13 @@ EOF
### Task 8: `extract_content_tags_cmd` Tauri wrapper
**Files:**
- Modify: the existing LLM-commands file under `src-tauri/src/commands/` (grep for `kon_llm::` to find it; typically something like `llm.rs` or `ai.rs`). If absent, create `src-tauri/src/commands/llm.rs` and register the module in `commands/mod.rs`.
- Modify: the existing LLM-commands file under `src-tauri/src/commands/` (grep for `magnotia_llm::` to find it; typically something like `llm.rs` or `ai.rs`). If absent, create `src-tauri/src/commands/llm.rs` and register the module in `commands/mod.rs`.
- Modify: `src-tauri/src/lib.rs` — register the command.
- [ ] **Step 1: Add the command**
```rust
use kon_llm::{extract_content_tags as llm_extract_content_tags, ContentTags};
use magnotia_llm::{extract_content_tags as llm_extract_content_tags, ContentTags};
// …alongside existing LLM imports.
#[tauri::command]
@@ -827,7 +827,7 @@ In `src-tauri/src/lib.rs` `invoke_handler!`:
- [ ] **Step 3: Build**
Run: `cargo build -p kon && cargo clippy -p kon -- -D warnings && cargo fmt --check`
Run: `cargo build -p magnotia && cargo clippy -p magnotia -- -D warnings && cargo fmt --check`
Expected: clean.
- [ ] **Step 4: Commit**
@@ -837,7 +837,7 @@ git add src-tauri/src/commands/ src-tauri/src/lib.rs
git commit -m "$(cat <<'EOF'
feat(phase9): extract_content_tags_cmd Tauri wrapper
Bridges kon_llm::extract_content_tags to the frontend. Returns a
Bridges magnotia_llm::extract_content_tags to the frontend. Returns a
ContentTags object serialised to the {topic, intent} shape the
frontend stores on item.llmTags.
@@ -1560,7 +1560,7 @@ EOF
### Task 16: Full verification pass + roadmap + HANDOVER
**Files:**
- Modify: `docs/roadmap/2026-04-23-corbie-feature-complete-roadmap.md` — mark Phase 9 shipped.
- Modify: `docs/roadmap/2026-04-23-magnotia-feature-complete-roadmap.md` — mark Phase 9 shipped.
- Modify: `HANDOVER.md` — end-of-session state.
- [ ] **Step 1: Full Rust gate**
@@ -1605,7 +1605,7 @@ Replace the session summary with today's state:
- [ ] **Step 6: Commit**
```bash
git add docs/roadmap/2026-04-23-corbie-feature-complete-roadmap.md HANDOVER.md
git add docs/roadmap/2026-04-23-magnotia-feature-complete-roadmap.md HANDOVER.md
git commit -m "$(cat <<'EOF'
docs(phase9): mark Phase 9 shipped + refresh HANDOVER