add-screen
/add-screen
Dodaje ekran, nakładkę lub tryb do aplikacji terminalowej Ratatui, z akcjami, klawiszami, rysowaniem, zrzutem i testami.
- Autor
- steamfield ↗
- Repozytorium
- stacks ↗
- Licencja
- Apache-2.0
- Ostatnia zmiana repozytorium
- 08.11.2026
Ocena i bezpieczeństwo
- Pliki w paczce
- 1
- Skrypty
- 0
- Komentarze HTML
- 0
- Adresy URL w SKILL.md
- 0
Brak sygnałów. Repozytorium zmienione 08.11.2026, bez odwołań do wycofanych modeli i API.
Apache-2.0, otwarta: można używać i zmieniać, z zachowaniem licencji i informacji o zmianach.
Co robi i kiedy
Dodaje ekran, nakładkę lub tryb do aplikacji terminalowej Ratatui, z akcjami, klawiszami, rysowaniem, zrzutem i testami.
Oryginalny opis (EN)
Add a screen, overlay or mode to this Ratatui app with its actions, keys, drawing, snapshot and tests. Use when the user asks for a new view, page, panel, popup or mode in the terminal UI.
Jak działa
SKILL.md bez nagłówków drugiego poziomu · 12 linii, 210 słów
Podgląd SKILL.md
---
name: add-screen
description: Add a screen, overlay or mode to this Ratatui app with its actions, keys, drawing, snapshot and tests. Use when the user asks for a new view, page, panel, popup or mode in the terminal UI.
---
# Add a screen
The detail screen is the one to copy: `Mode::Detail` in `src/app.rs`, its rows in `keys::BINDINGS`, `detail` in `src/ui.rs`, and the `detail` snapshot.
1. **State.** Add a variant to `Mode` in `src/app.rs`, any state the screen needs to `App`, and the `Action` variants that enter and leave it. Handle them in `App::update`'s `match (self.mode, action)`. Data the screen shows is loaded before the UI starts, never in `update`.
2. **Keys.** Add rows to `BINDINGS` in `src/keys.rs` for the new mode: a way back (`Action::Back`), `?` for help and `q` to quit if the mode allows them. `no_key_is_bound_twice_in_one_mode` catches a clash.
3. **Draw.** Add a `<name>(frame, area, app)` function in `src/ui.rs`, called from `draw`'s `match app.screen()`. It reads only `&App` and takes styles from `Theme`. The footer and help overlay pick up the new rows on their own.
4. **Test.** In `app.rs`, a test that sends the actions in and out of the mode. In `ui.rs`, a `#[test]` calling `assert_frame("<name>", &[...actions...], SIZE)`.
5. Run `cargo test ui::` (the new snapshot fails and writes `src/snapshots/<name>.snap.new`), then `make snapshots`, and read the new `.snap` file with the user. Then `make lint test`.
6. If the screen shows data that printed output lacks, extend `output.rs` and add a case to `tests/binary.rs`.
Wersje
| Repozytorium | Wynik | Licencja |
|---|---|---|
| Ta strona · steamfield/stacks | 86 | Apache-2.0 |
| steamfield/stacks | 86 | Apache-2.0 |
Migawka bazy z 13.11.2026 · wersja paczki f65e9931bf0c (skrót SHA-256 całej paczki)
Pobrania w ostatnich 30 dniach: 0 · ranking
Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.
Podobne skille
- 100ratatui-ruby
Pomaga tworzyć interfejsy terminalowe TUI w Ruby z ratatui-ruby: widgety, pętla zdarzeń, widoki inline i pełnoekranowe oraz architektura Tea MVU. - 100tui-screen
Tworzy ekrany, komponenty i widoki ratatui dla terminalowego UI agents-in-a-box, z paletą kolorów, wzorcami komponentów i listą kontrolną jakości. - 100ratatui-themes
Stosuje spójne motywy kolorystyczne w terminalowych interfejsach Rust z ratatui, przełącza motywy w czasie działania i dodaje kolory semantyczne błędów, ostrzeżeń i sukcesu. - 96tui-tests
Pisze testy dla interfejsów terminalowych TUI opartych na Ratatui w repozytorium GitButler. - 86add-page
Dodaje stronę do aplikacji Nuxt wraz z trasą serwera, schematem zod i testami, czytającą lub zapisującą dane. - 86add-page
Dodaje stronę do aplikacji React SPA, która czyta dane z zewnętrznego API, wraz z trasą, zapytaniem i testami.