Skip to content

Commit 3e0d7b0

Browse files
Add contributor docs and issue templates (#1)
* Add contributor docs and issue templates * Fix clippy warning in event loop
1 parent 0b5fa50 commit 3e0d7b0

7 files changed

Lines changed: 190 additions & 9 deletions

File tree

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: Bug report
2+
description: Report a reproducible problem in nettui.
3+
title: "bug: "
4+
labels:
5+
- bug
6+
body:
7+
- type: markdown
8+
attributes:
9+
value: |
10+
Please include enough detail to reproduce the problem.
11+
- type: input
12+
id: version
13+
attributes:
14+
label: nettui version
15+
placeholder: 0.4.2
16+
validations:
17+
required: true
18+
- type: input
19+
id: distro
20+
attributes:
21+
label: Linux distribution
22+
placeholder: Omarchy / Arch Linux / other
23+
validations:
24+
required: true
25+
- type: textarea
26+
id: environment
27+
attributes:
28+
label: Network stack
29+
description: Include anything relevant such as iwd, systemd-networkd, networkctl, adapter model, or conflicting managers.
30+
placeholder: iwd 3.x, systemd-networkd enabled, Realtek USB adapter, no NetworkManager
31+
validations:
32+
required: true
33+
- type: textarea
34+
id: steps
35+
attributes:
36+
label: Steps to reproduce
37+
placeholder: |
38+
1. Open nettui
39+
2. Go to Wi-Fi > New Networks
40+
3. Press Enter on ...
41+
validations:
42+
required: true
43+
- type: textarea
44+
id: expected
45+
attributes:
46+
label: Expected behavior
47+
validations:
48+
required: true
49+
- type: textarea
50+
id: actual
51+
attributes:
52+
label: Actual behavior
53+
validations:
54+
required: true
55+
- type: textarea
56+
id: logs
57+
attributes:
58+
label: Logs or screenshots
59+
description: Paste terminal output, journal lines, or screenshots if they help.

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
blank_issues_enabled: true
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Feature request
2+
description: Suggest a focused improvement to nettui.
3+
title: "feature: "
4+
labels:
5+
- enhancement
6+
body:
7+
- type: textarea
8+
id: problem
9+
attributes:
10+
label: Problem
11+
description: What is missing or frustrating today?
12+
validations:
13+
required: true
14+
- type: textarea
15+
id: proposal
16+
attributes:
17+
label: Proposed change
18+
description: Describe the behavior you want.
19+
validations:
20+
required: true
21+
- type: textarea
22+
id: context
23+
attributes:
24+
label: Context
25+
description: Note whether this is about Omarchy, general Linux use, Wi-Fi, Ethernet, enterprise auth, AP mode, or packaging.

.github/workflows/rust.yml

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,33 @@ env:
1010
CARGO_TERM_COLOR: always
1111

1212
jobs:
13-
build:
13+
fmt:
1414
runs-on: ubuntu-latest
1515
steps:
1616
- uses: actions/checkout@v4
17+
- name: Setup Rust
18+
uses: dtolnay/rust-toolchain@stable
19+
- name: Check formatting
20+
run: cargo fmt --all --check
1721

22+
clippy:
23+
runs-on: ubuntu-latest
24+
steps:
25+
- uses: actions/checkout@v4
1826
- name: Setup Rust
1927
uses: dtolnay/rust-toolchain@stable
28+
- name: Run clippy
29+
run: cargo clippy --all-targets --all-features --locked -- -D warnings
2030

31+
test:
32+
runs-on: ubuntu-latest
33+
steps:
34+
- uses: actions/checkout@v4
35+
- name: Setup Rust
36+
uses: dtolnay/rust-toolchain@stable
2137
- name: Build
22-
run: cargo build --verbose --locked
23-
38+
run: cargo build --locked
2439
- name: Run tests
25-
run: cargo test --verbose --locked
26-
40+
run: cargo test --locked
2741
- name: Validate release asset layout
2842
run: ./scripts/build-release-asset.sh

CONTRIBUTING.md

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
# Contributing
2+
3+
## Scope
4+
5+
`nettui` is an `iwd`-first network TUI built primarily for `Omarchy`.
6+
Keep changes aligned with that scope:
7+
8+
- prefer `iwd` over adding another Wi-Fi backend
9+
- keep the Wi-Fi flow close to `impala`
10+
- keep Ethernet support integrated, not bolted on
11+
- prefer small, reviewable changes
12+
13+
## Development Setup
14+
15+
Requirements:
16+
17+
- Rust stable
18+
- `iwd`
19+
- `systemd-networkd`
20+
- `networkctl`
21+
- Nerd Fonts recommended for the full UI
22+
23+
Clone and run:
24+
25+
```bash
26+
git clone https://github.com/skibidiandulka/nettui.git
27+
cd nettui
28+
cargo run --release
29+
```
30+
31+
## Required Checks
32+
33+
Run these before opening a pull request:
34+
35+
```bash
36+
cargo fmt --all
37+
cargo test --locked
38+
cargo clippy --all-targets --all-features --locked -- -D warnings
39+
```
40+
41+
## Code Style
42+
43+
- use `rustfmt`; do not hand-format around it
44+
- prefer explicit, descriptive names
45+
- keep modules small when a file starts mixing unrelated concerns
46+
- keep user-facing text short and plain
47+
- add comments only when they explain intent, not mechanics
48+
- do not introduce a second Wi-Fi manager backend
49+
50+
## Repo Notes
51+
52+
- `README.md`: user-facing overview and setup
53+
- `config/keybinds.toml.example`: default keybind reference
54+
- `scripts/build-release-asset.sh`: release archive layout check
55+
- `.github/workflows/rust.yml`: CI checks
56+
57+
## Pull Requests
58+
59+
A good pull request should include:
60+
61+
- a short summary of the change
62+
- why the change is needed
63+
- how it was tested
64+
- screenshots or terminal output for visible UI changes when relevant
65+
66+
## Releases
67+
68+
Release work should keep these paths in sync:
69+
70+
- `Cargo.toml`
71+
- `Cargo.lock`
72+
- Git tag and GitHub release
73+
- `crates.io`
74+
- AUR `nettui`
75+
- AUR `nettui-bin`
76+
77+
Do not publish a release unless the GitHub release asset, `crates.io`, and AUR packages all match the same version.

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<div align="center">
22
<h2>🖧 nettui</h2>
33
<p>TUI for Wi-Fi and Ethernet</p>
4+
<p><img alt="CI" src="https://github.com/skibidiandulka/nettui/actions/workflows/rust.yml/badge.svg" /></p>
45
</div>
56

67
![nettui-showcase](https://github.com/user-attachments/assets/3603f7eb-433a-4641-bc38-700d93c67e9f)
@@ -61,6 +62,10 @@ yay -S nettui
6162
yay -S nettui-bin
6263
```
6364

65+
## 🤝 Contributing
66+
67+
See `CONTRIBUTING.md` for development setup, required checks, and pull request expectations.
68+
6469
## 🪄 Usage
6570

6671
```bash

src/event.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,10 @@ impl EventHandler {
3737
Ok(true) => {
3838
if let Ok(evt) = crossterm::event::read() {
3939
match evt {
40-
CrosstermEvent::Key(key) => {
41-
if key.kind == crossterm::event::KeyEventKind::Press {
42-
let _ = sender_cloned.send(Event::Key(key));
43-
}
40+
CrosstermEvent::Key(key)
41+
if key.kind == crossterm::event::KeyEventKind::Press =>
42+
{
43+
let _ = sender_cloned.send(Event::Key(key));
4444
}
4545
CrosstermEvent::Resize(x, y) => {
4646
let _ = sender_cloned.send(Event::Resize(x, y));

0 commit comments

Comments
 (0)