Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,14 +67,14 @@ jobs:

# MSRV build job
msrv:
name: MSRV 1.78 Build
name: MSRV 1.80 Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- name: Install Rust (MSRV)
uses: dtolnay/rust-toolchain@stable
with:
toolchain: 1.78
toolchain: 1.80
components: rustfmt, clippy
- name: Rust cache
uses: Swatinem/rust-cache@v2
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Thanks for taking the time to contribute!

## Development setup

- Rust 1.78+ (MSRV pinned)
- Rust 1.80+ (MSRV pinned)
- Install components: `rustup component add rustfmt clippy`

## Workflow
Expand Down
11 changes: 0 additions & 11 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 1 addition & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "terminalist"
version = "0.5.0"
edition = "2021"
rust-version = "1.78"
rust-version = "1.80"
keywords = ["terminal", "tui", "todoist", "productivity", "cli"]
description = "A terminal-based Todoist client with modern TUI interface"
authors = ["Romain Bertrand <romain@doxin.net>"]
Expand Down Expand Up @@ -40,6 +40,4 @@ todoist-api = "1.0.0-alpha.3"
toml = "1.0"
dirs = "6.0"
log = "0.4"
fern = "0.7"
once_cell = "1.21"
uuid = { version = "1.23", features = ["v4", "serde"] }
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Terminalist - Todoist Terminal Client

[![Rust](https://img.shields.io/badge/rust-1.78%2B-orange.svg)](https://www.rust-lang.org)
[![Rust](https://img.shields.io/badge/rust-1.80%2B-orange.svg)](https://www.rust-lang.org)
[![Build Status](https://github.com/romaintb/terminalist/workflows/CI/badge.svg)](https://github.com/romaintb/terminalist/actions)
[![Crates.io](https://img.shields.io/crates/v/terminalist.svg)](https://crates.io/crates/terminalist)
[![License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
Expand Down
2 changes: 1 addition & 1 deletion docs/DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ GitHub Actions workflow is configured in `.github/workflows/ci.yml` with:
- Format checking with rustfmt
- Linting with clippy
- Testing on multiple Rust versions and OSes
- MSRV 1.78 build job
- MSRV 1.80 build job
- Smoke tests for `--help` and `--version`
- Security auditing

Expand Down
2 changes: 1 addition & 1 deletion docs/PRD.md
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ Terminalist is a high-performance terminal user interface (TUI) application for
- **NFR-017**: Supports terminals with 80x24 minimum size
- **NFR-018**: Compatible with major terminal emulators
- **NFR-019**: Works with Todoist API v2
- **NFR-020**: Rust 1.78+ compatibility
- **NFR-020**: Rust 1.80+ compatibility

## 4. User Stories

Expand Down
22 changes: 11 additions & 11 deletions src/backend/todoist.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ use super::{
Backend, BackendError, BackendLabel, BackendProject, BackendSection, BackendTask, CreateLabelArgs,
CreateProjectArgs, CreateTaskArgs, UpdateLabelArgs, UpdateProjectArgs, UpdateTaskArgs,
};
use crate::todoist::{TodoistError, TodoistWrapper};
use async_trait::async_trait;
use todoist_api::{TodoistError, TodoistWrapper};

fn map_err(e: TodoistError) -> BackendError {
match e {
Expand Down Expand Up @@ -38,7 +38,7 @@ impl TodoistBackend {
}

// Helper: Transform Todoist API project → Backend project
fn project_to_backend(api_project: &crate::todoist::Project) -> BackendProject {
fn project_to_backend(api_project: &todoist_api::Project) -> BackendProject {
BackendProject {
remote_id: api_project.id.clone(),
name: api_project.name.clone(),
Expand All @@ -50,7 +50,7 @@ impl TodoistBackend {
}

// Helper: Transform Todoist API task → Backend task
fn task_to_backend(api_task: &crate::todoist::Task) -> BackendTask {
fn task_to_backend(api_task: &todoist_api::Task) -> BackendTask {
BackendTask {
remote_id: api_task.id.clone(),
content: api_task.content.clone(),
Expand All @@ -71,7 +71,7 @@ impl TodoistBackend {
}

// Helper: Transform Todoist API label → Backend label
fn label_to_backend(api_label: &crate::todoist::Label) -> BackendLabel {
fn label_to_backend(api_label: &todoist_api::Label) -> BackendLabel {
BackendLabel {
remote_id: api_label.id.clone(),
name: api_label.name.clone(),
Expand All @@ -81,7 +81,7 @@ impl TodoistBackend {
}

// Helper: Transform Todoist API section → Backend section
fn section_to_backend(api_section: &crate::todoist::Section) -> BackendSection {
fn section_to_backend(api_section: &todoist_api::Section) -> BackendSection {
BackendSection {
remote_id: api_section.id.clone(),
name: api_section.name.clone(),
Expand Down Expand Up @@ -174,7 +174,7 @@ impl Backend for TodoistBackend {
}

async fn create_project(&self, args: CreateProjectArgs) -> Result<BackendProject, BackendError> {
let todoist_args = crate::todoist::CreateProjectArgs {
let todoist_args = todoist_api::CreateProjectArgs {
name: args.name,
color: None,
is_favorite: args.is_favorite,
Expand All @@ -187,7 +187,7 @@ impl Backend for TodoistBackend {
}

async fn update_project(&self, remote_id: &str, args: UpdateProjectArgs) -> Result<BackendProject, BackendError> {
let todoist_args = crate::todoist::UpdateProjectArgs {
let todoist_args = todoist_api::UpdateProjectArgs {
name: args.name,
color: None,
is_favorite: args.is_favorite,
Expand All @@ -203,7 +203,7 @@ impl Backend for TodoistBackend {
}

async fn create_task(&self, args: CreateTaskArgs) -> Result<BackendTask, BackendError> {
let todoist_args = crate::todoist::CreateTaskArgs {
let todoist_args = todoist_api::CreateTaskArgs {
content: args.content,
description: args.description,
project_id: Some(args.project_remote_id),
Expand All @@ -230,7 +230,7 @@ impl Backend for TodoistBackend {
}

async fn update_task(&self, remote_id: &str, args: UpdateTaskArgs) -> Result<BackendTask, BackendError> {
let todoist_args = crate::todoist::UpdateTaskArgs {
let todoist_args = todoist_api::UpdateTaskArgs {
content: args.content,
description: args.description,
priority: args.priority,
Expand Down Expand Up @@ -266,7 +266,7 @@ impl Backend for TodoistBackend {
}

async fn create_label(&self, args: CreateLabelArgs) -> Result<BackendLabel, BackendError> {
let todoist_args = crate::todoist::CreateLabelArgs {
let todoist_args = todoist_api::CreateLabelArgs {
name: args.name,
color: None,
is_favorite: args.is_favorite,
Expand All @@ -278,7 +278,7 @@ impl Backend for TodoistBackend {
}

async fn update_label(&self, remote_id: &str, args: UpdateLabelArgs) -> Result<BackendLabel, BackendError> {
let todoist_args = crate::todoist::UpdateLabelArgs {
let todoist_args = todoist_api::UpdateLabelArgs {
name: args.name,
color: None,
is_favorite: args.is_favorite,
Expand Down
24 changes: 2 additions & 22 deletions src/backend_registry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,20 +81,13 @@ impl BackendRegistry {
/// * `backend_type` - Backend type (e.g., "todoist")
/// * `name` - Human-readable name
/// * `credentials` - JSON-encoded credentials
/// * `settings` - JSON-encoded settings
///
/// # Returns
/// UUID of the created backend
///
/// # Errors
/// Returns error if backend creation fails or database insert fails
pub async fn add_backend(
&self,
backend_type: String,
name: String,
credentials: String,
settings: String,
) -> Result<Uuid> {
pub async fn add_backend(&self, backend_type: String, name: String, credentials: String) -> Result<Uuid> {
// Validate by creating instance first
let backend_instance = factory::create_backend(&backend_type, &credentials)?;

Expand All @@ -104,9 +97,7 @@ impl BackendRegistry {
uuid: ActiveValue::Set(uuid),
backend_type: ActiveValue::Set(backend_type.clone()),
name: ActiveValue::Set(name.clone()),
is_enabled: ActiveValue::Set(true),
credentials: ActiveValue::Set(credentials),
settings: ActiveValue::Set(settings),
};

let storage = self.storage.lock().await;
Expand All @@ -126,17 +117,10 @@ impl BackendRegistry {
/// * `uuid` - Backend UUID
/// * `name` - Optional new name
/// * `credentials` - Optional new credentials
/// * `settings` - Optional new settings
///
/// # Errors
/// Returns error if backend not found or update fails
pub async fn update_backend(
&self,
uuid: &Uuid,
name: Option<String>,
credentials: Option<String>,
settings: Option<String>,
) -> Result<()> {
pub async fn update_backend(&self, uuid: &Uuid, name: Option<String>, credentials: Option<String>) -> Result<()> {
let storage = self.storage.lock().await;

let backend_model = BackendRepository::get_by_uuid(&storage.conn, uuid)
Expand All @@ -160,10 +144,6 @@ impl BackendRegistry {
backends.insert(*uuid, Arc::new(backend_instance));
}

if let Some(settings) = settings {
active_model.settings = ActiveValue::Set(settings);
}

BackendRepository::update(&storage.conn, active_model).await?;

info!("✅ Updated backend: {}", uuid);
Expand Down
2 changes: 0 additions & 2 deletions src/entities/backend.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@ pub struct Model {
pub uuid: Uuid,
pub backend_type: String,
pub name: String,
pub is_enabled: bool,
pub credentials: String, // JSON-encoded credentials (to be encrypted in future)
pub settings: String, // JSON-encoded backend-specific settings
}

#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
Expand Down
4 changes: 0 additions & 4 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
//! * [`config`] - Application configuration management
//! * [`storage`] - Local database and data persistence
//! * [`sync`] - Synchronization with Todoist API
//! * [`todoist`] - Todoist API client and data structures
//! * [`ui`] - Terminal user interface components
//! * [`utils`] - Utility functions and helpers

Expand Down Expand Up @@ -49,9 +48,6 @@ pub mod sync;
/// Theme configuration (semantic color palette) for the TUI
pub mod theme;

/// Todoist API client and data models
pub(crate) mod todoist;

/// Terminal user interface components and rendering
pub mod ui;

Expand Down
Loading