Skip to content

feat: add Tokyo Night theme - #40

Merged
aakashrajput merged 1 commit into
KlaatAI:mainfrom
floze-the-genius:feat/tokyo-night-theme
Jul 20, 2026
Merged

feat: add Tokyo Night theme#40
aakashrajput merged 1 commit into
KlaatAI:mainfrom
floze-the-genius:feat/tokyo-night-theme

Conversation

@floze-the-genius

Copy link
Copy Markdown
Contributor

Summary

  • add a Tokyo Night palette with blue, green, and navy-aligned terminal colors
  • register tokyo-night in /theme and document the expanded theme list
  • add focused tests for palette registration and valid 256-color slots

Contributes to #39.

Screenshot

Tokyo Night theme picker

Captured from the real TUI at 120x40 using /theme against an isolated localhost health stub.

Contrast checks

Checked against Tokyo Night background #1a1b26 (code foreground against #262626):

  • accent: 6.79:1
  • secondary text: 4.89:1
  • user green: 9.35:1
  • body text: 12.25:1
  • muted text: 4.98:1
  • tool text: 7.44:1
  • code text: 6.92:1

Validation

  • bun run typecheck
  • bun test (63 passed)
  • bun run build
  • real TUI /theme picker and persistence via isolated config.json

@github-actions

Copy link
Copy Markdown
Contributor

🤖 KlaatAI Review Bot (powered by Klaatu, advisory only — a maintainer makes the real call)

Issue match
Fully addresses the Tokyo Night requirement of #39. It adds the palette, registers it for the /theme command, updates the README, and includes the required screenshot.

Test coverage
src/engine/theme.test.ts verifies theme registration and validates that numeric color slots are valid 256-color integers. However, it explicitly filters out and ignores the hex string values (e.g., accent: "#7aa2f7"). A test validating the hex strings (or confirming the engine accepts mixed hex/integer types) is missing.

Correctness concerns
In src/engine/theme.ts, TOKYO_NIGHT_PALETTE mixes hex strings (accent, dimText, userColor, border) with 256-color integers and bg: null. While this likely matches existing theme patterns, it poses a risk if the TUI renderer expects a uniform type. Additionally, bg: null relies on the renderer correctly defaulting to the terminal's native background without throwing a null reference error.

Verdict
Ready to merge as-is, but flag the mixed hex/integer color types and bg: null handling to a human reviewer to confirm the rendering engine processes them without runtime errors.

This is an automated review to help triage faster, not a gate. Nothing here blocks merging.

@aakashrajput

aakashrajput commented Jul 19, 2026

Copy link
Copy Markdown
Member

@floze-the-genius can you take care of the comment.

@floze-the-genius
floze-the-genius force-pushed the feat/tokyo-night-theme branch from 75febc1 to 56f64b5 Compare July 20, 2026 11:15
@floze-the-genius

Copy link
Copy Markdown
Contributor Author

Added a focused palette test covering the mixed representation explicitly: terminal ANSI slots remain integer bytes, CSS-style slots are validated as six-digit hex colors, and bg: null is pinned as intentional so the terminal background shows through. bun test src/engine/theme.test.ts and bun run typecheck both pass.

@aakashrajput

Copy link
Copy Markdown
Member

@floze-the-genius
Thanks a lot for your contribution! 🎉

Really appreciate you taking the time to improve KlaatCode. Your contribution helps make the project better for everyone.

If you haven't already, we'd love it if you could ⭐ star the repository and follow https://github.com/KlaatAI on GitHub to stay updated with new features and releases.

Feel free to keep using KlaatAI for your projects, and don't hesitate to open more issues, suggest ideas, or submit future PRs—we're always happy to have contributors like you in the community.

Looking forward to seeing your next contribution. Happy coding! 🚀

@aakashrajput
aakashrajput merged commit eb490fc into KlaatAI:main Jul 20, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants