Skip to content

Conversation

@unfunco
Copy link
Owner

@unfunco unfunco commented Nov 16, 2025

This allows custom themes to be configured with a JSON configuration file located in the same location as where the todo data is stored, config will always be stored on the filesystem regardless of the chosen storage, but uses the storage mechanism to read config.

This allows custom themes to be configured with a JSON configuration
file located in the same location as where the todo data is stored,
config will always be stored on the filesystem regardless of the chosen
storage, but uses the storage mechanism to read config.
@unfunco unfunco self-assigned this Nov 16, 2025
@unfunco unfunco added the adds a feature 💡 Improvements or additions. label Nov 16, 2025
@unfunco unfunco requested a review from Copilot November 16, 2025 15:39
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds support for custom theme configuration through a JSON config file. The config file is stored in the XDG config directory (typically ~/.config/t/config.json) and allows users to customize theme colors for text, muted, highlight, success, and worry colors.

  • Introduces a new config package that loads theme configuration from JSON files
  • Adds a paths package to centralize platform-specific directory resolution
  • Updates the application to load custom themes at startup with graceful fallback to defaults

Reviewed Changes

Copilot reviewed 10 out of 11 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
main.go Adds config and theme loading at startup with warning messages for invalid configurations
internal/config/config.go New package for loading and managing application configuration from JSON files
internal/config/config_test.go Test coverage for config loading with default and custom themes
internal/paths/paths.go New package centralizing XDG-compliant directory resolution for data and config
internal/theme/theme.go Adds JSON tags to Config struct, extracts DefaultConfig function, and improves comments
internal/storage/file.go Refactored to use centralized paths package for data directory resolution
internal/cmd/t.go Updated to accept and thread theme parameter through command initialization
internal/tui/tui.go Updated constructor to accept theme parameter
internal/tui/tui_test.go Updated test to pass theme to constructor
go.mod, go.sum Updated dependencies including lipgloss v2 and related packages

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@unfunco unfunco merged commit c55afbe into main Nov 16, 2025
7 checks passed
@unfunco unfunco deleted the feat/config branch November 16, 2025 15:42
@github-actions github-actions bot mentioned this pull request Nov 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

adds a feature 💡 Improvements or additions.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants