generated from nhcarrigan/template
32a74235c0
Add a SystemClock component that displays the current date and time in British format. The clock appears in the top control bar (same row as Clipboard and Actions buttons) and updates every second. Features: - Date format: "7 February 2026" (British English) - Time format: "14:35:42" (24-hour) - Auto-updates every second via setInterval - Proper cleanup on unmount using Svelte 5 $effect - Hover effect with accent colour border - Positioned with margin-left: auto to align right Testing: - Added comprehensive unit tests for date/time formatting logic - 12 test cases covering edge cases, month boundaries, leap years - All tests passing with proper local timezone handling - Updated CLAUDE.md with testing requirements and guidelines Resolves: #128
2.5 KiB
2.5 KiB
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-hikariMCP 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 <hikari@nhcarrigan.com>" - Always use
--no-gpg-signsince Hikari doesn't have GPG signing set up - Never add
Co-Authored-Bylines for Gitea commits - Always ask for confirmation before committing
Example commit command:
git commit --author="Hikari <hikari@nhcarrigan.com>" --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/sveltefor component tests - Test files: Place test files next to the code they test with
.test.tsor.spec.tsextension - Run tests: Use
pnpm testto run all tests, orpnpm test:watchfor watch mode - Coverage: Run
pnpm test:coverageto generate coverage reports - Rust tests: Use
pnpm test:backendfor 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
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!