48 Commits

Author SHA1 Message Date
80142fa83b feat: add interactive pane and command configuration to setup wizard
Expand the configuration wizard to allow users to define panes within
each window and specify startup commands for each pane. This provides
a complete tmux session setup during initial configuration.

- Add prompts for configuring panes in each window
- Add prompts for startup commands per pane
- Show full window/pane structure in summary
- Display pane commands in the final configuration review
2026-03-01 02:21:12 -03:00
980d432ff6 feat: add interactive setup prompt with lipgloss styling and emojis
Add styled first-time setup UI using lipgloss with Tokyo Night theme
colors. The prompt now includes emojis and better visual feedback when
creating the initial configuration file.

- Add new ui module with styled render functions
- Prompt user for project paths interactively on first run
- Parse comma-separated paths with whitespace trimming
- Show styled success message with configured directories
- Add lipgloss dependency for terminal styling
2026-03-01 02:08:49 -03:00
bbd3dc8ff1 test: add comprehensive tests for get_projects function
All checks were successful
continuous-integration/drone/tag Build is passing
continuous-integration/drone/push Build is passing
Add 6 new unit tests covering all execution paths:
- Cache disabled → full scan
- Force refresh → full scan
- No cache → initial scan
- Old cache format → upgrade
- Cache with changes → incremental update
- Cache loaded flow

Refactor get_projects to use dependency injection for testability,
allowing mocks for cache operations and filesystem scanning.

Bump version to 0.4.3
2026-03-01 01:46:22 -03:00
856d1ba698 📝 docs: update README with improved layout and Rust edition badge
All checks were successful
continuous-integration/drone/push Build is passing
- Move project title below badges for better visual hierarchy
- Update Rust edition badge from 2024 to 2026
- Maintain all existing badges and links
2026-03-01 01:25:24 -03:00
29a9f7b246 📚 docs: center badges in README
All checks were successful
continuous-integration/drone/push Build is passing
2026-03-01 01:20:55 -03:00
72795205b6 📚 docs: add avatar to author section
All checks were successful
continuous-integration/drone/push Build is passing
Use GitHub avatar image in the author section.
2026-03-01 01:19:45 -03:00
8b02b7b06d 📚 docs: add author section to README
Add GitHub profile link and badge for @cinco.
2026-03-01 01:18:49 -03:00
79f1551f33 🐛 fix: bump version to 0.4.2 to fix self-update version mismatch
All checks were successful
continuous-integration/drone/tag Build is passing
continuous-integration/drone/push Build is passing
The Cargo.toml was still at 0.4.0 while the release was tagged as 0.4.1,
causing the --update command to always think there's a new version available.

Bumping to 0.4.2 ensures the binary version matches the release tag.
2026-03-01 01:13:21 -03:00
eacd41c2db force update
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing
2026-03-01 01:04:15 -03:00
86d8a44aa7 🔧 ci: update release trigger to match tags without v prefix
All checks were successful
continuous-integration/drone/tag Build is passing
2026-03-01 00:58:53 -03:00
66c2343851 feat: add self-update capability
Add `tmuxido --update` command to update binary from latest release.
- New `self_update` module with version comparison
- Atomic binary replacement with backup/rollback
- Fetches latest release from Gitea API
- Downloads correct binary for system architecture
2026-03-01 00:34:42 -03:00
d77d17a7ea 🐛 fix(ci): read DRONE_TAG via awk ENVIRON to fix empty release body
All checks were successful
continuous-integration/drone/tag Build is passing
continuous-integration/drone/push Build is passing
Drone CI substitutes ${VAR} in commands before the shell runs.
Since TAG is a local shell variable (not a Drone var), ${TAG} was
replaced with an empty string, causing the awk pattern to match
nothing and the release body to be empty.

Fix: read DRONE_TAG directly inside awk via ENVIRON["DRONE_TAG"]
and strip the v-prefix with gsub — no intermediate shell variable needed.

Also translate CHANGELOG.md to English.
2026-03-01 00:19:10 -03:00
579916bbf1 🐛 fix(ci): corrigir pipeline release para tags v*
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing
- Filtro de ref corrigido: [0-9]* → v* para bater em tags "v0.3.0"
- awk agora strip o prefixo 'v' de DRONE_TAG antes de buscar no CHANGELOG
- Adiciona entrada 0.3.0 no CHANGELOG.md
2026-03-01 00:01:29 -03:00
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