|
| 1 | +# Contributing |
| 2 | + |
| 3 | +Thanks for helping improve `tailscale-tray`. |
| 4 | + |
| 5 | +## Scope and goals |
| 6 | + |
| 7 | +This project is intentionally small. |
| 8 | + |
| 9 | +Please prefer: |
| 10 | +- focused fixes |
| 11 | +- small, reviewable pull requests |
| 12 | +- targeted UX improvements |
| 13 | +- tests for behavior changes when practical |
| 14 | + |
| 15 | +Please avoid unrelated refactors or dependency churn unless there is a clear reason. |
| 16 | + |
| 17 | +## Development setup |
| 18 | + |
| 19 | +### Run tests |
| 20 | + |
| 21 | +```bash |
| 22 | +make test |
| 23 | +``` |
| 24 | + |
| 25 | +### Run from source |
| 26 | + |
| 27 | +```bash |
| 28 | +python3 -m pip install --user -r requirements.txt |
| 29 | +python3 app.py |
| 30 | +``` |
| 31 | + |
| 32 | +### Build an RPM in Docker |
| 33 | + |
| 34 | +```bash |
| 35 | +make build-rpm-container VERSION=0.1.0 |
| 36 | +``` |
| 37 | + |
| 38 | +## Repo structure |
| 39 | + |
| 40 | +- `app.py` - Qt wiring and tray app entrypoint |
| 41 | +- `tray_controller.py` - controller/process lifecycle logic |
| 42 | +- `tray_view.py` - pure presentation rules for tray state |
| 43 | +- `diagnostics_view.py` - pure diagnostics presenter |
| 44 | +- `tailscale_status.py` - parses `tailscale status --json` |
| 45 | +- `tailscale_command.py` - interprets command outcomes/failures |
| 46 | +- `tailscale_cli.py` - CLI path detection helpers |
| 47 | +- `tray_icon.py` - branded icon rendering |
| 48 | +- `tests/` - unit tests |
| 49 | +- `packaging/` - desktop entry, spec file, Docker builder |
| 50 | +- `scripts/` - build helpers |
| 51 | + |
| 52 | +## Contribution guidelines |
| 53 | + |
| 54 | +- Keep changes narrow and purposeful |
| 55 | +- Add or update tests when behavior changes |
| 56 | +- Preserve headless testability for pure logic where possible |
| 57 | +- Prefer pure helpers/presenters/controllers over pushing more logic into Qt widgets |
| 58 | +- Keep Linux/KDE-first assumptions explicit in docs |
| 59 | +- Do not add a hard runtime dependency on a specific Tailscale package if a working CLI is enough |
| 60 | + |
| 61 | +## Pull requests |
| 62 | + |
| 63 | +Before opening a PR: |
| 64 | +- run `make test` |
| 65 | +- update README/docs if behavior changed |
| 66 | +- mention packaging or desktop-environment assumptions |
| 67 | +- include screenshots if the UI changed visibly |
| 68 | + |
| 69 | +Good PRs usually include: |
| 70 | +- what changed |
| 71 | +- why it changed |
| 72 | +- how it was tested |
| 73 | +- any limitations or follow-up ideas |
| 74 | + |
| 75 | +## Release/versioning notes |
| 76 | + |
| 77 | +Releases are tag-driven. |
| 78 | + |
| 79 | +Examples: |
| 80 | + |
| 81 | +```bash |
| 82 | +git tag v0.1.1 |
| 83 | +git push origin v0.1.1 |
| 84 | +``` |
| 85 | + |
| 86 | +That triggers the GitHub release workflow and publishes the RPM artifact. |
| 87 | + |
| 88 | +For maintainers, see `RELEASE_CHECKLIST.md`. |
0 commit comments