48 Commits

Author SHA1 Message Date
61f6a9fee3 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
e0da58d114 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
437584aac7 test: add comprehensive tests for get_projects function
Some checks failed
continuous-integration/drone/tag Build is failing
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
0.4.3
2026-03-01 01:46:22 -03:00
960724685c 📝 docs: update README with improved layout and Rust edition badge
- 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
639bcdf643 📚 docs: center badges in README 2026-03-01 01:20:55 -03:00
ddb4b70234 📚 docs: add avatar to author section
Use GitHub avatar image in the author section.
2026-03-01 01:19:45 -03:00
32155bc1d2 📚 docs: add author section to README
Add GitHub profile link and badge for @cinco.
2026-03-01 01:18:49 -03:00
e4cc280f28 🐛 fix: bump version to 0.4.2 to fix self-update version mismatch
Some checks failed
continuous-integration/drone/tag Build is failing
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.
0.4.2
2026-03-01 01:13:21 -03:00
868540b92a force update
Some checks failed
continuous-integration/drone/tag Build is failing
0.4.1
2026-03-01 01:04:15 -03:00
0af46bd6a5 🔧 ci: update release trigger to match tags without v prefix
Some checks failed
continuous-integration/drone/tag Build is failing
0.4.0
2026-03-01 00:58:53 -03:00
ba3f923781 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
fcb7c7f6a6 🐛 fix(ci): read DRONE_TAG via awk ENVIRON to fix empty release body
Some checks failed
continuous-integration/drone/tag Build is failing
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.
v0.3.0
2026-03-01 00:19:10 -03:00
3c78a5afe3 🐛 fix(ci): corrigir pipeline release para tags v*
- 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
4dcac9a6aa feat: verificar dependências fzf e tmux ao iniciar
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
32c40b7226 ci: migrate coverage badge to orphan badges branch
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
c1adc92c1c fix(ci): delete existing package before PUT to avoid 409
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
e6180b57c3 ci: migrate coverage badge to Gitea Packages
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
90e3b65820 ci: update coverage badge [CI SKIP] 2026-03-01 01:57:30 +00:00
fc2f503886 ci: renomear branch master para main
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
b29baee9c4 🎨 docs: adicionar logo ao README 2026-02-28 22:51:48 -03:00
6d842b83ba ci: update coverage badge [CI SKIP] 2026-03-01 01:33:39 +00:00
b4877007f2 🐛 fix(ci): gerar badge SVG inline e remover tr com octais 2026-02-28 22:32:19 -03:00
29ff9535a7 🐛 fix(ci): unificar blocks e sanitizar JSON do Gitea antes do jq 2026-02-28 22:27:08 -03:00
dec566320f ci: add coverage badge [CI SKIP] 2026-03-01 01:22:12 +00:00
6275c638d9 🔖 chore: atualizar Cargo.lock para versão 0.2.4 2026-02-28 22:20:45 -03:00
4d6af13134 🔧 chore: adicionar drone-ci-mcp e corrigir formato do hook PostToolUse 2026-02-28 22:20:42 -03:00
b2a0ee5e08 🐛 fix(ci): usar base64 -w 0 e POST/PUT correto no upload do badge 2026-02-28 22:20:40 -03:00
2bc516ed6d ci: debug base64 and SHA GET response 2026-02-28 21:48:39 -03:00
7e70157097 ci: add debug output to coverage upload step 2026-02-28 21:44:08 -03:00
ef13e884ba ci: use awk to parse coverage percentage 2026-02-28 21:38:28 -03:00
b6e33c37ac ci: fix coverage parsing and JSON payload construction 2026-02-28 21:34:01 -03:00
20f516cffb ci: store coverage badge via repo contents API 2026-02-28 21:29:29 -03:00
a5429c3543 chore: bump version to 0.2.4
Some checks failed
continuous-integration/drone/tag Build is failing
0.2.4
2026-02-28 21:23:31 -03:00
8a7df892e8 ci: fix tarpaulin JSON field for coverage percentage 2026-02-28 21:19:56 -03:00
f0949e08c5 ci: restrict release pipeline to version tags only 2026-02-28 21:14:14 -03:00
d80857090e docs: update CI badge label in README.md
Some checks failed
continuous-integration/drone/tag Build is failing
Changed the CI badge label from "CI" to "Build Status" for better clarity and consistency with common badge naming conventions.
0.2.3
2026-02-28 21:10:45 -03:00
19f36060a0 ci: use Gitea generic package registry for coverage badge 2026-02-28 21:08:39 -03:00
2dc12e37c9 chore: bump version to 0.2.2
Some checks failed
continuous-integration/drone/tag Build is failing
0.2.2
2026-02-28 21:04:39 -03:00
280a180d3e ci: add coverage badge pipeline and README badges 2026-02-28 21:04:05 -03:00
5f281b1f9e docs: add CHANGELOG and use it as release description in CI 2026-02-28 20:26:29 -03:00
9150f93f6a ci: add test pipeline and bump version to 0.2.1
Some checks failed
continuous-integration/drone/tag Build is failing
Adds a Drone CI pipeline that runs on push and pull_request events,
executing cargo fmt --check, cargo clippy, and cargo test in sequence.
0.2.1
2026-02-28 20:23:09 -03:00
a076cf2543 chore: bump version to 0.2.0
Some checks failed
continuous-integration/drone/tag Build is failing
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
v0.2.0
2026-02-28 20:17:05 -03:00
9198c481c0 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
bfdc1e2093 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
d35acdeb55 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
30d6c3d1c5 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
562febaafe Remove personal path references from defaults and examples
Some checks failed
continuous-integration/drone/tag Build is failing
Replace machine-specific paths with generic examples.
v0.1.1
2026-02-28 19:22:06 -03:00
71da4149b8 Initial release of tmuxido
Some checks failed
continuous-integration/drone/tag Build is failing
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.
v0.1.0
2026-02-28 19:06:43 -03:00