64 Commits

Author SHA1 Message Date
7bafa1a305 📝 docs: add ASCII art previews for each available tmux layout in README 2026-03-01 05:07:03 -03:00
04b440ddd9 🐛 fix: ask for layout in interactive wizard when window has multiple panes
Add `render_layout_prompt` and `parse_layout_input` to ui.rs so that
the first-run wizard asks the user to choose a tmux layout (1–5 or by
name) for each window that has 2 or more panes. Previously, layout was
always silently set to None.

Also update `render_config_created` to display the chosen layout in the
post-setup summary.

Closes: layout never being set during interactive setup
2026-03-01 05:07:00 -03:00
d0e17b93a3 📝 docs: update install URL to GitHub and fix default session description
All checks were successful
continuous-integration/drone/push Build is passing
2026-03-01 05:01:04 -03:00
21a7406f91 🐛 fix: consolidate publish-github into single shell block
All checks were successful
continuous-integration/drone/tag Build is passing
continuous-integration/drone/push Build is passing
Multiple command blocks caused $RELEASE_ID to be lost between shells.
Using ${ARCH} with braces triggered Drone variable substitution before
the shell ran, resulting in an empty arch name. Fix: single | block
with all logic, iterate over full filenames (same pattern as publish),
and use ENVIRON["DRONE_TAG"] in awk to bypass Drone substitution.
2026-03-01 04:56:36 -03:00
c073a7c6f9 feat: publish releases to GitHub and update install source
Some checks failed
continuous-integration/drone/tag Build is failing
continuous-integration/drone/push Build is passing
- Self-update now queries the GitHub Releases API (parse_latest_tag extracted for testability)
- install.sh now fetches and downloads from GitHub Releases
- Drone CI release pipeline publishes to both Gitea and GitHub via GITHUB_TOKEN secret
- Bump version to 0.7.0
2026-03-01 04:50:52 -03:00
4caca0b26b 🔖 chore: bump version to 0.6.0 and update CHANGELOG
All checks were successful
continuous-integration/drone/tag Build is passing
continuous-integration/drone/push Build is passing
2026-03-01 04:07:41 -03:00
3644f02b21 feat: periodic update check on startup
On startup, if `update_check_interval_hours` have elapsed since the last
check, fetches the latest release tag from the Gitea API and prints a
notice when a newer version is available. Silent on network failure or
no update found.

- New `update_check` module with injected fetcher for full testability
- Cache at ~/.cache/tmuxido/update_check.json tracks timestamp + version
- `fetch_latest_tag` and `version_compare` promoted to `pub(crate)`
- 6 unit tests covering disabled, interval not elapsed, fetch triggered,
  equal versions, update available, and current-newer edge case
2026-03-01 04:07:38 -03:00
d1b1b4ef49 feat: add update_check_interval_hours config field
Adds `update_check_interval_hours: u64` (serde default 24, 0 = disabled)
to Config struct, enabling periodic update check control via config file.
2026-03-01 04:07:31 -03:00
ae5ef47877 🐛 fix: add test for asset name format and bump to 0.5.2
All checks were successful
continuous-integration/drone/tag Build is passing
continuous-integration/drone/push Build is passing
Adds a unit test that asserts detect_arch returns names prefixed
with 'tmuxido-' and suffixed with '-linux', matching what CI uploads.
2026-03-01 03:43:10 -03:00
319e8349db 📝 docs: add changelog entry for 0.5.1
All checks were successful
continuous-integration/drone/tag Build is passing
continuous-integration/drone/push Build is passing
2026-03-01 03:38:04 -03:00
c6a642326b 🔧 ci: delete existing release before recreating on retag
All checks were successful
continuous-integration/drone/tag Build is passing
continuous-integration/drone/push Build is passing
When a tag is deleted and recreated, the CI tried to POST a new
release that already existed, getting 409 and leaving RELEASE_ID
null, which caused asset uploads to fail with 405. Now checks for
an existing release by tag and deletes it before creating a new one.
2026-03-01 03:34:27 -03:00
67979c88dd 🐛 fix: correct asset name and bump version to 0.5.1
Some checks failed
continuous-integration/drone/tag Build is failing
continuous-integration/drone/push Build is passing
detect_arch was returning "x86_64-linux" but CI uploads assets as
"tmuxido-x86_64-linux", causing 404 on self-update. Also bumps
Cargo.toml to 0.5.1 which was missing from the hotfix tag.
2026-03-01 03:31:10 -03:00
e883835ae3 🐛 fix: target tmux windows by name instead of numeric index
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing
Removes base-index detection which was unreliable and defaulted to 0
when tmux's actual base-index was 1, causing "index in use" and
"can't find window" errors on session creation.
2026-03-01 03:17:28 -03:00
5f587c96b5 test: add comprehensive tests for interactive configuration wizard
Some checks failed
continuous-integration/drone/tag Build is failing
continuous-integration/drone/push Build is passing
Add unit tests for the UI parsing functions and configuration logic
to restore test coverage after adding the interactive setup wizard.

- Add parse_max_depth_input, parse_cache_enabled_input, parse_cache_ttl_input
- Add parse_comma_separated_list helper function with tests
- Add tests for all parsing functions covering valid/invalid/empty inputs
- Add tests for color functions and UI render functions
- Add integration test for config with windows and panes
- Refactor config.rs to use shared parsing functions from ui module
2026-03-01 02:35:50 -03:00
a43de92ab8 🔧 chore: update Cargo.lock for version 0.5.0
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing
Add missing Cargo.lock update with lipgloss and its dependencies.
2026-03-01 02:25:01 -03:00
2a3d1ffdbc 🔖 chore: bump version to 0.5.0
All checks were successful
continuous-integration/drone/push Build is passing
Update version in Cargo.toml and add CHANGELOG entry for the new
interactive configuration wizard feature.
2026-03-01 02:23:52 -03:00
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