35 Commits

Author SHA1 Message Date
66a1035fcf feat: verificar dependências fzf e tmux ao iniciar
All checks were successful
continuous-integration/drone/push Build is passing
Adiciona módulo `deps` que, antes de qualquer operação, verifica se
fzf e tmux estão instalados no sistema. Caso faltem, detecta o
gerenciador de pacotes da distro (apt, pacman, dnf, yum, zypper,
emerge, xbps, apk), informa ao usuário e oferece instalar com o
comando adequado.

- `src/deps.rs`: Dep, PackageManager, BinaryChecker (trait injetável),
  check_missing(), detect_package_manager(), ensure_dependencies()
- `src/main.rs`: chama ensure_dependencies() antes do fluxo principal
- `tests/deps.rs`: 11 testes de integração com SystemBinaryChecker real
- `tests/docker/`: Dockerfile multi-stage + suite de 15 testes em
  container Ubuntu 24.04 simulando novo usuário (sem fzf/tmux)
- `.dockerignore`: exclui target/, .git/, .claude/ do contexto Docker
2026-02-28 23:58:09 -03:00
d75383e375 ci: migrate coverage badge to orphan badges branch
All checks were successful
continuous-integration/drone/push Build is passing
Replace Gitea packages (served as octet-stream) with a dedicated
orphan branch. Raw branch URL serves SVG with correct content-type.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-28 23:25:10 -03:00
556379a806 fix(ci): delete existing package before PUT to avoid 409
All checks were successful
continuous-integration/drone/push Build is passing
Gitea generic packages returns 409 if file already exists at same
version. Delete the version first, then re-upload.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-28 23:17:56 -03:00
32b8b37a5e ci: migrate coverage badge to Gitea Packages
Some checks failed
continuous-integration/drone/push Build is failing
Replace commit-based badge update with a single PUT to the Gitea
generic packages API. Removes the badges/ directory from the repo
and eliminates CI commits on every push.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-28 23:16:03 -03:00
99032d5bcb ci: update coverage badge [CI SKIP] 2026-03-01 01:57:30 +00:00
d06335cd4f ci: renomear branch master para main
All checks were successful
continuous-integration/drone/push Build is passing
Atualiza referências de master para main em .drone.yml e README.md.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-28 22:56:07 -03:00
cbde7ac211 🎨 docs: adicionar logo ao README
All checks were successful
continuous-integration/drone/push Build is passing
2026-02-28 22:51:48 -03:00
b1b0063f5b ci: update coverage badge [CI SKIP] 2026-03-01 01:33:39 +00:00
251e5766f4 🐛 fix(ci): gerar badge SVG inline e remover tr com octais
All checks were successful
continuous-integration/drone/push Build is passing
2026-02-28 22:32:19 -03:00
2de294a828 🐛 fix(ci): unificar blocks e sanitizar JSON do Gitea antes do jq
Some checks failed
continuous-integration/drone/push Build is failing
2026-02-28 22:27:08 -03:00
eaee355f55 ci: add coverage badge [CI SKIP] 2026-03-01 01:22:12 +00:00
c1fd0c8d7d 🔖 chore: atualizar Cargo.lock para versão 0.2.4
Some checks failed
continuous-integration/drone/push Build is failing
2026-02-28 22:20:45 -03:00
b194cf84e5 🔧 chore: adicionar drone-ci-mcp e corrigir formato do hook PostToolUse 2026-02-28 22:20:42 -03:00
5b5f6a3020 🐛 fix(ci): usar base64 -w 0 e POST/PUT correto no upload do badge 2026-02-28 22:20:40 -03:00
3325f0945d ci: debug base64 and SHA GET response
Some checks failed
continuous-integration/drone/push Build is failing
2026-02-28 21:48:39 -03:00
31d36bd183 ci: add debug output to coverage upload step
Some checks failed
continuous-integration/drone/push Build is failing
2026-02-28 21:44:08 -03:00
752bb1d751 ci: use awk to parse coverage percentage
Some checks failed
continuous-integration/drone/push Build is failing
2026-02-28 21:38:28 -03:00
41523ce6a1 ci: fix coverage parsing and JSON payload construction
Some checks failed
continuous-integration/drone/push Build is failing
2026-02-28 21:34:01 -03:00
801a2c08fb ci: store coverage badge via repo contents API
Some checks failed
continuous-integration/drone/push Build is failing
2026-02-28 21:29:29 -03:00
f1b5b4e304 chore: bump version to 0.2.4
All checks were successful
continuous-integration/drone/tag Build is passing
continuous-integration/drone/push Build is passing
2026-02-28 21:23:31 -03:00
ff0a44081a ci: fix tarpaulin JSON field for coverage percentage
All checks were successful
continuous-integration/drone/push Build is passing
2026-02-28 21:19:56 -03:00
6353ca8f52 ci: restrict release pipeline to version tags only
Some checks failed
continuous-integration/drone/push Build is failing
2026-02-28 21:14:14 -03:00
72acea3dfc docs: update CI badge label in README.md
Some checks reported errors
continuous-integration/drone/push Build was killed
continuous-integration/drone/tag Build is passing
Changed the CI badge label from "CI" to "Build Status" for better clarity and consistency with common badge naming conventions.
2026-02-28 21:10:45 -03:00
d1446730b9 ci: use Gitea generic package registry for coverage badge 2026-02-28 21:08:39 -03:00
a6666dced9 chore: bump version to 0.2.2
Some checks failed
continuous-integration/drone/push Build is failing
continuous-integration/drone/tag Build is passing
2026-02-28 21:04:39 -03:00
71971c7b1b ci: add coverage badge pipeline and README badges
Some checks failed
continuous-integration/drone/push Build is failing
2026-02-28 21:04:05 -03:00
7c02b9f55d docs: add CHANGELOG and use it as release description in CI
All checks were successful
continuous-integration/drone/push Build is passing
2026-02-28 20:26:29 -03:00
2bf1dc3ff4 ci: add test pipeline and bump version to 0.2.1
All checks were successful
continuous-integration/drone/tag Build is passing
continuous-integration/drone/push Build is passing
Adds a Drone CI pipeline that runs on push and pull_request events,
executing cargo fmt --check, cargo clippy, and cargo test in sequence.
2026-02-28 20:23:09 -03:00
daad6a84f3 chore: bump version to 0.2.0
All checks were successful
continuous-integration/drone/tag Build is passing
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-28 20:17:05 -03:00
8582e19730 test: add integration tests for scan, session config and cache lifecycle
tests/scan.rs: 3 tests exercising scan_from_root via the public API —
finds git repos, skips hidden directories, and respects max_depth.
Note: tempfile::tempdir() generates hidden paths (.tmpXXXXXX) on this
system, so each test creates a visible scan_root/ subdirectory to avoid
filter_entry silently skipping the walk root.

tests/session_config.rs: 2 tests for SessionConfig::load_from_project —
loads a .tmuxido.toml written into a temp dir and returns None when the
file is absent.

tests/cache_lifecycle.rs: round-trip test that saves a ProjectCache and
reloads it, verifying the projects list survives serialisation.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-28 20:16:09 -03:00
cf575daa69 test: add unit tests for cache, session and config modules
cache.rs: make minimal_roots pub(crate); add 8 tests covering the
minimal_roots helper (empty input, single root, nested vs sibling dirs)
and validate_and_update (stale project removal, no-change short-circuit,
mtime-triggered rescan, legacy empty dir_mtimes).

session.rs: make session_name pub(crate); add 5 tests covering session
name sanitisation (dots→underscores, spaces→dashes, fallback for root
path) and TOML parsing for Window and SessionConfig with layout.

config.rs: add 3 tests covering serde defaults when optional fields are
absent, full config parsing and invalid TOML rejection.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-28 20:15:42 -03:00
9422f01749 refactor: extract business logic into lib.rs
Move scan_from_root, scan_all_roots, get_projects, show_cache_status
and launch_tmux_session from main.rs into a new src/lib.rs, making
them pub so they are testable independently of the binary entrypoint.

main.rs is now a thin entrypoint that imports from tmuxido:: and keeps
only select_project_with_fzf (interactive subprocess, not unit-testable).

Add tempfile = "3" to [dev-dependencies] in preparation for tests.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-28 20:15:27 -03:00
f6b0c0da4f chore: install Claude scaffold
Add CLAUDE.md with project-specific rules (test structure, naming
conventions, MCP tools reference). Add .mcp.json for rust-mcp and
crates-io MCP servers. Add rust-toolchain.toml pinning stable with
rustfmt and clippy. Add .claude/settings.json with PostToolUse hook
that runs cargo test automatically after every file edit.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-28 20:15:08 -03:00
8ab3c15983 Remove personal path references from defaults and examples
All checks were successful
continuous-integration/drone/tag Build is passing
Replace machine-specific paths with generic examples.
2026-02-28 19:22:06 -03:00
9c7823475c Initial release of tmuxido
All checks were successful
continuous-integration/drone/tag Build is passing
Rust-based tmux project launcher with fzf selection, incremental
mtime-based cache, per-project .tmuxido.toml session config, and
Drone CI pipeline for automated binary releases.
2026-02-28 19:06:43 -03:00