Files
lilygo-t-deck/AGENTS.md
T
Dejvino ce668a8005 Refactor: replace hardcoded unit array size 7 with nd::MAX_UNITS
- Replace hardcoded  with  in NetDeck.ino (8 occurrences)
- Add  to nd_layout.h
- Update test expectations in unit_tests.h and integration_tests.h from units[6] to units[7] to match the new reinforcement slot indexing

This enables supporting more than 7 units in the future.
2026-11-15 09:30:37 +01:00

43 lines
1.4 KiB
Markdown

# T-Deck workspace — agent notes
## Common pitfalls
- never run searches across the whole disk; `find /` commands are forbidden because they take ages
## Toolchain
- platformio `pio` is in `~/.platformio/` (`~/.platformio/penv/bin/pio`), or
on `PATH` if available.
```
alias pio=~/.platformio/penv/bin/pio
```
## Build & test — one command each, from the repo root
- `make netdeck` — builds BOTH targets of the app: ESP32-S3 firmware
(pio) and SDL2 emulator. Both must stay green.
- `make netdeck-test` — full headless test suite: unit + integration
(fast, deterministic) + E2E journeys (separate build, ~1-2 min).
- `make netdeck-test-unit` — fast layer only (unit + integration, seconds).
- `emulator/tests/README.md` — how the test layers work and how to add
tests (unit/integration headers, E2E journeys).
## Git hooks
A pre-commit hook runs the fast test layer (`make netdeck-test-unit`)
before every commit. Hooks are not versioned inside `.git/hooks`; this
repo ships them under `.githooks/`. Enable with:
make hooks # = git config core.hooksPath .githooks
- Bypass once with `git commit --no-verify` (use sparingly, say why).
- Disable: `git config --unset core.hooksPath`.
## Commit discipline
- Feature/increment commits: `make netdeck` (dual build) + the relevant
test layer must pass before committing.
- Milestone commits: run `make netdeck-test` (full suite) and update
`src/netdeck/STATUS.md` in the same commit.