# Sponsor UI Cleanup & v4.6.2 Release Implementation Plan

> **For Claude:** REQUIRED SUB-SKILL: Use superpowers:executing-plans to implement this plan task-by-task.

**Goal:** Remove the `Notes` field from provider add/edit UX, shorten the `Website URL (optional)` label, and ship a new release `v4.6.2`.

**Architecture:** Keep provider `notes` data for backward compatibility, but hide it from interactive flows (TUI + prompts) to reduce UI clutter. Keep sponsor presets extensible via `SPONSOR_PROVIDER_PRESETS`.

**Tech Stack:** Rust (`cargo`), ratatui TUI, inquire prompts, i18n via `src-tauri/src/cli/i18n.rs`.

---

### Task 1: Add failing tests (TDD Red)

**Files:**
- Modify: `src-tauri/src/cli/tui/form.rs`
- Modify: `src-tauri/src/cli/i18n.rs`

**Step 1: Write failing test for “no Notes field in Add Provider form”**
- Add a unit test under `#[cfg(test)] mod tests` in `src-tauri/src/cli/tui/form.rs` asserting `ProviderAddFormState::fields()` does **not** include `ProviderAddField::Notes` (for Claude/Codex/Gemini).

**Step 2: Write failing test for shorter website label**
- Add a unit test in `src-tauri/src/cli/i18n.rs` asserting `texts::website_url_label()` does not include the substring `(optional)` and matches the new shorter label.

**Step 3: Run tests to verify they fail**
- Run: `cd src-tauri && cargo test --lib`
- Expected: failures for the new assertions.

---

### Task 2: Implement UI cleanup (Green)

**Files:**
- Modify: `src-tauri/src/cli/tui/form.rs`
- Modify: `src-tauri/src/cli/commands/provider_input.rs`
- Modify: `src-tauri/src/cli/interactive/provider.rs` (if it prints Notes)
- Modify: `src-tauri/src/cli/i18n.rs`

**Step 1: Hide Notes in the TUI Add Provider form**
- Remove `ProviderAddField::Notes` from `ProviderAddFormState::fields()` so it no longer renders in the TUI.

**Step 2: Stop prompting for Notes in CLI flows**
- In `prompt_optional_fields(...)`, remove the Notes prompt and return `notes` as:
  - `None` when adding (`current == None`)
  - `current.notes.clone()` when editing (preserve existing data)
- In provider summary display, do not print the Notes section.

**Step 3: Shorten Website label**
- Change `texts::website_url_label()` to a shorter form (no `(optional)`), relying on the help text to communicate “press Enter to skip”.
- Update any related prompt strings that mention “notes” explicitly (e.g. “optional fields (notes, sort index)”).

**Step 4: Run tests to verify Green**
- Run: `cd src-tauri && cargo test --lib`
- Expected: all pass.

**Step 5: Refactor (optional)**
- If there is now dead code for Notes-only labels, remove it as long as tests stay green.

---

### Task 3: Commit fix

**Files:**
- Stage: modified Rust sources from Task 2 (+ tests)

**Step 1: Format**
- Run: `cd src-tauri && cargo fmt`

**Step 2: Verify**
- Run: `cd src-tauri && cargo test --lib`
- Run: `cd src-tauri && cargo build`

**Step 3: Commit**
- Run:
  - `git add src-tauri/src/cli/tui/form.rs src-tauri/src/cli/i18n.rs src-tauri/src/cli/commands/provider_input.rs src-tauri/src/cli/interactive/provider.rs`
  - `git commit -m "fix(tui): simplify provider add fields"`

---

### Task 4: Release v4.6.2 metadata

**Files:**
- Modify: `src-tauri/Cargo.toml`
- Modify: `CHANGELOG.md`
- Modify: `README.md`
- Modify: `README_ZH.md`
- (Maybe) Modify: `src-tauri/Cargo.lock`

**Step 1: Bump version**
- Set `src-tauri/Cargo.toml` `version = "4.6.2"`.

**Step 2: Update changelog**
- Add `## [4.6.2] - 2026-02-05` describing:
  - Notes field removed from provider UX
  - Website label shortened

**Step 3: Update README badges**
- Replace `4.6.1` → `4.6.2` in `README.md` and `README_ZH.md` version badges.

**Step 4: Build to refresh lockfile if needed**
- Run: `cd src-tauri && cargo build`

**Step 5: Commit release metadata**
- Run:
  - `git add src-tauri/Cargo.toml src-tauri/Cargo.lock CHANGELOG.md README.md README_ZH.md`
  - `git commit -m "chore(release): v4.6.2"`

---

### Task 5: Tag + push release

**Step 1: Tag**
- Run: `git tag v4.6.2`

**Step 2: Push**
- Run: `git push origin main v4.6.2`

