feat: new drafts feature and sound spam fix #174

Merged
naomi merged 3 commits from fix/drafts into main 2026-02-27 15:07:10 -08:00
Owner

Summary

  • Saved Drafts feature: Users can now save input content as drafts for later use, and manage them from a new panel
  • Sound spam fix: The "Working on it!" sound no longer plays repeatedly when Claude makes multiple tool calls in a row

Details

Drafts feature

  • Rust backend (drafts.rs) with list_drafts, save_draft, delete_draft, and delete_all_drafts commands, persisted to hikari-drafts.json via the Tauri Store plugin
  • draftsStore wrapping all four commands with timestamp formatting
  • DraftPanel overlay with insert, per-item two-step delete confirmation, delete-all with confirmation, empty state, and slide-in animation
  • Drafts button in the top control row (pencil icon)
  • Save as Draft floppy-disk icon button in the button wrapper (disabled when input is empty)

Sound spam fix

  • Root cause: resetSoundState was called on every thinking state transition, including mid-task transitions (coding → thinking → coding)
  • Fix: only reset sound state when entering thinking from a clean-slate state (idle, success, or error) — states that genuinely mark the end of one task and the start of a new one

Test plan

  • Save a draft and verify it persists across app restarts
  • Insert a draft and verify it populates the input
  • Delete individual drafts and verify delete-all works
  • Verify "Working on it!" plays once per user message regardless of how many tools are called

This PR was created with help from Hikari~ 🌸

## Summary - **Saved Drafts feature**: Users can now save input content as drafts for later use, and manage them from a new panel - **Sound spam fix**: The "Working on it!" sound no longer plays repeatedly when Claude makes multiple tool calls in a row ## Details ### Drafts feature - Rust backend (`drafts.rs`) with `list_drafts`, `save_draft`, `delete_draft`, and `delete_all_drafts` commands, persisted to `hikari-drafts.json` via the Tauri Store plugin - `draftsStore` wrapping all four commands with timestamp formatting - `DraftPanel` overlay with insert, per-item two-step delete confirmation, delete-all with confirmation, empty state, and slide-in animation - **Drafts** button in the top control row (pencil icon) - **Save as Draft** floppy-disk icon button in the button wrapper (disabled when input is empty) ### Sound spam fix - Root cause: `resetSoundState` was called on **every** `thinking` state transition, including mid-task transitions (`coding → thinking → coding`) - Fix: only reset sound state when entering `thinking` from a clean-slate state (`idle`, `success`, or `error`) — states that genuinely mark the end of one task and the start of a new one ## Test plan - [ ] Save a draft and verify it persists across app restarts - [ ] Insert a draft and verify it populates the input - [ ] Delete individual drafts and verify delete-all works - [ ] Verify "Working on it!" plays once per user message regardless of how many tools are called ✨ This PR was created with help from Hikari~ 🌸
hikari added 3 commits 2026-02-27 14:18:58 -08:00
Adds a drafts system allowing users to save input content for later use.

- Rust backend: list, save, delete, delete-all commands backed by hikari-drafts.json
- Svelte store wrapping all four Tauri commands with timestamp formatting
- DraftPanel overlay with insert, per-item delete confirmation, and delete-all
- InputBar: Drafts button in control row, floppy-disk Save as Draft icon button
fix: only reset task-start sound on new user message, not between tool calls
Security Scan and Upload / Security & DefectDojo Upload (pull_request) Successful in 1m12s
CI / Lint & Test (pull_request) Successful in 17m0s
CI / Build Linux (pull_request) Successful in 20m14s
CI / Build Windows (cross-compile) (pull_request) Successful in 30m2s
0752ab7995
naomi changed title from fix: drafts feature and sound spam fix to feat: new drafts feature and sound spam fix 2026-02-27 15:05:25 -08:00
naomi merged commit 7ebd9dc97a into main 2026-02-27 15:07:10 -08:00
naomi deleted branch fix/drafts 2026-02-27 15:07:10 -08:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: nhcarrigan/hikari-desktop#174