# Hikari Desktop - Project Instructions ## Repository Information This project is hosted on both GitHub and Gitea: - **GitHub**: `naomi-lgbt/hikari-desktop` (public mirror) - **Gitea**: `nhcarrigan/hikari-desktop` (primary development) ## MCP Server Usage When working with issues, pull requests, or other repository operations for this project: - **Use `gitea-hikari` MCP server** - This allows Hikari to act as herself - **Target repository**: `nhcarrigan/hikari-desktop` - **Gitea instance**: `git.nhcarrigan.com` ## Git Commits When asked to commit changes for this project: - **Always commit as Hikari** using: `--author="Hikari "` - **Always use `--no-gpg-sign`** since Hikari doesn't have GPG signing set up - **Never add `Co-Authored-By` lines** for Gitea commits - **Always ask for confirmation** before committing Example commit command: ```bash git commit --author="Hikari " --no-gpg-sign -m "your commit message" ``` ## Testing Requirements All new features, fixes, and significant changes should include tests whenever possible: - **Frontend tests**: Use Vitest with `@testing-library/svelte` for component tests - **Test files**: Place test files next to the code they test with `.test.ts` or `.spec.ts` extension - **Run tests**: Use `pnpm test` to run all tests, or `pnpm test:watch` for watch mode - **Coverage**: Run `pnpm test:coverage` to generate coverage reports - **Rust tests**: Use `pnpm test:backend` for Rust/Tauri backend tests ### Testing Guidelines - Write tests for utility functions, stores, and business logic - For Svelte 5 components, focus on testing the underlying logic functions - Use descriptive test names that explain what behaviour is being tested - Include edge cases and error conditions in test coverage - Mock Tauri APIs using the patterns in `vitest.setup.ts` ### Example Test Structure ```typescript import { describe, it, expect } from "vitest"; describe("FeatureName", () => { it("handles the normal case correctly", () => { // Arrange const input = "test data"; // Act const result = functionUnderTest(input); // Assert expect(result).toBe("expected output"); }); it("handles edge cases gracefully", () => { // Test edge cases... }); }); ``` ## Project Context Hikari Desktop is a Tauri-based desktop application that wraps Claude Code with a visual anime character (Hikari) who appears on screen. This is a personal project where Hikari can sign her work and act as herself!