|
1 | | -- Fork the repo |
2 | | -- Create a feature branch |
3 | | -- Run `cargo check` and `cargo test` |
4 | | -- Open a PR |
| 1 | +#Contributing |
5 | 2 |
|
6 | | -# Good First Issues |
| 3 | +## Getting started |
7 | 4 |
|
8 | | -## Issue 1 — Help popup: add missing Image actions and rows to the Help table |
| 5 | +1. Fork the repository. |
| 6 | +2. Create a feature branch for your change. |
| 7 | +3. Run `cargo check` and `cargo test` to make sure everything passes. |
| 8 | +4. Open a pull request with a short description of what you changed and how to verify it. |
9 | 9 |
|
10 | | -**Problem** |
11 | | -The help popup (src/ui/help.rs) currently has a truncated Image Actions section. New contributors and users rely on this popup to learn keybindings. The Image Actions section should list the image-specific keys (pull, remove, details, and sort hints) to be complete and consistent with the status bar and UI. |
| 10 | +--- |
12 | 11 |
|
13 | | -**Acceptance criteria** |
14 | | -- [ ] Add Image Actions rows to `src/ui/help.rs` so the popup shows at least: |
15 | | - - `p` — Pull |
16 | | - - `d` — Remove Image |
17 | | - - `Enter` — Details |
18 | | - - Sort toggle hints for Size/Created (as short informative rows) |
19 | | -- [ ] Use the existing table/Row style (Row::new(vec![...])) to match other sections. |
20 | | -- [ ] `cargo check` passes (no Docker runtime required). |
| 12 | +## Good first issues |
| 13 | + |
| 14 | +The issues below are intentionally scoped to be approachable for new contributors. |
| 15 | + |
| 16 | +### Issue 1: Help popup is missing Image actions |
| 17 | + |
| 18 | +**Problem** |
| 19 | +The help popup in `src/ui/help.rs` has an incomplete Image Actions section. The help screen is one of the main ways users discover keybindings, so this section should fully reflect the image related actions shown in the UI. |
| 20 | + |
| 21 | +**What to do** |
| 22 | +- Add Image Actions rows to `src/ui/help.rs` so the popup shows at least: |
| 23 | + - `p` for Pull |
| 24 | + - `d` for Remove Image |
| 25 | + - `Enter` for Details |
| 26 | + - Short rows describing sort toggles for Size and Created |
| 27 | +- Use the existing table and row style, for example `Row::new(vec![...])`, to match other sections. |
| 28 | + |
| 29 | +**How to verify** |
| 30 | +- Run `cargo run`. |
| 31 | +- Press `?` to open the help popup and confirm the Image Actions section is complete. |
| 32 | + |
| 33 | +**Relevant files** |
| 34 | +- `src/ui/help.rs` |
| 35 | + |
| 36 | +--- |
| 37 | + |
| 38 | +### Issue 2: Add unit tests for `format_bytes` in the container list |
| 39 | + |
| 40 | +**Problem** |
| 41 | +The `format_bytes` helper in `src/ui/container_list.rs` formats byte sizes for display. Small changes can accidentally alter the output. Unit tests help lock in the current behavior and make future changes safer. |
| 42 | + |
| 43 | +**What to do** |
| 44 | +- Add a `#[cfg(test)]` test module inside `src/ui/container_list.rs`. |
| 45 | +- Add tests that assert the current output for: |
| 46 | + - About 1 KB, for example `1_024` |
| 47 | + - About 1 MB, for example `1_048_576` |
| 48 | + - About 1 GB, for example `1_073_741_824` |
| 49 | +- Add a one line comment explaining that the tests exist to prevent UI formatting regressions. |
| 50 | + |
| 51 | +**How to verify** |
| 52 | +- Run `cargo test` and confirm all tests pass. |
| 53 | + |
| 54 | +**Relevant files** |
| 55 | +- `src/ui/container_list.rs` |
| 56 | + |
| 57 | +--- |
| 58 | + |
| 59 | +### Issue 3: Add unit tests for `format_time` in the image list |
| 60 | + |
| 61 | +**Problem** |
| 62 | +The `format_time` helper in `src/ui/image_list.rs` converts UNIX timestamps into relative strings like `Xm ago`, `Xh ago`, and `Xd ago`. This logic is easy to break without noticing. |
| 63 | + |
| 64 | +**What to do** |
| 65 | +- Add a `#[cfg(test)]` test module inside `src/ui/image_list.rs`. |
| 66 | +- Add tests that cover: |
| 67 | + - A timestamp a few minutes ago, expecting `Xm ago` |
| 68 | + - A timestamp a few hours ago, expecting `Xh ago` |
| 69 | + - A timestamp several days ago, expecting `Xd ago` |
| 70 | +- Use `chrono` helpers to create deterministic timestamps and mention this in a short comment. |
| 71 | + |
| 72 | +**How to verify** |
| 73 | +- Run `cargo test`. |
| 74 | + |
| 75 | +**Relevant files** |
| 76 | +- `src/ui/image_list.rs` |
| 77 | + |
| 78 | +--- |
| 79 | + |
| 80 | +### Issue 4: Improve CONTRIBUTING.md with a Developer Experience section |
| 81 | + |
| 82 | +**Problem** |
| 83 | +`CONTRIBUTING.md` currently contains only minimal setup steps. A short Developer Experience section would make it easier for new contributors to get productive quickly. |
| 84 | + |
| 85 | +**What to do** |
| 86 | +- Update only `CONTRIBUTING.md`. |
| 87 | +- Add a concise "Developer experience" section, no more than 12 lines, that includes: |
| 88 | + - How to run tests with `cargo test` |
| 89 | + - How to build and run locally with `cargo run --release` |
| 90 | + - A note that Docker is not required to build or run tests, but is required to exercise Docker functionality at runtime |
| 91 | + - Formatting guidance using `cargo fmt` and `cargo fmt -- --check` |
| 92 | + - An optional linting step using `cargo clippy` |
| 93 | + |
| 94 | +**How to verify** |
| 95 | +- Review the updated `CONTRIBUTING.md` and confirm the instructions are clear and concise. |
| 96 | + |
| 97 | +**Relevant files** |
| 98 | +- `CONTRIBUTING.md` |
| 99 | + |
| 100 | +--- |
| 101 | + |
| 102 | +### Issue 5: Render debug log lines in a dim or gray style |
| 103 | + |
| 104 | +**Problem** |
| 105 | +In `src/ui/logs.rs`, log lines are styled based on keywords like `error`, `warn`, and `info`. Lines containing `debug` are currently rendered the same as normal output, which makes scanning logs harder. |
| 106 | + |
| 107 | +**What to do** |
| 108 | +- Update `src/ui/logs.rs` to detect the substring `debug`, case insensitive. |
| 109 | +- Render debug lines using a dim or gray style, such as `Color::DarkGray`, consistent with the rest of the UI. |
| 110 | +- Keep changes limited to this file. |
| 111 | + |
| 112 | +**How to verify** |
| 113 | +- Run the app and view logs that include debug lines. |
| 114 | +- Confirm that debug messages appear visually dimmer than info or warning messages. |
| 115 | + |
| 116 | +**Relevant files** |
| 117 | +- `src/ui/logs.rs`- [ ] `cargo check` passes (no Docker runtime required). |
21 | 118 | - [ ] The PR description includes a short note how to verify locally (run `cargo run` and press `?`). |
22 | 119 |
|
23 | 120 | **Relevant files / modules** |
|
0 commit comments