Files
board-viewer/.tasks/done/2026-05-22-00209-board-viewer-ux-owner-conditional.md

30 lines
2.2 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# board-viewer-ux-owner-conditional
## Goal
User: «`OpeItcLoc03` — почему везде один и тот же owner? Зачем он вообще?» Owner-pill добавлен `board-viewer-card-meta-fix` как differentiator для cross-owner whitelist'а, но в текущем VDS-конфиге все 5 репо в одном namespace (`OpeItcLoc03/*`) → pill дублируется на каждой карточке, visual noise.
Рендерить owner **условно**: если на текущем рендере все видимые карточки имеют один и тот же owner — pill скрыть, owner один раз показать в шапке доски (например «Owner: OpeItcLoc03 (5 repos)»). При ≥2 distinct owners — pill вернуть на карточки.
## TDD posture
**Mode = TDD**. Failing test: render с фикстурой single-owner → cards без `.owner-pill`, шапка содержит owner-summary. Render с фикстурой multi-owner → cards содержат `.owner-pill`, шапка без owner-summary (или с list). Затем impl.
## Key files
- `src/render.ts` — pre-render scan distinct owners, conditional output
- `static/board.css` — стиль для header owner-summary
- `tests/render.test.ts` — два теста (single-owner / multi-owner fixtures)
## Acceptance
- При single-owner whitelist карточки чище (без duplicate pill); owner один раз в шапке
- При multi-owner — pill возвращается, шапка не дублирует
- Тесты pass
## Notes
- Связанная ops-проверка (см. `.admin/[board-viewer-redeploy-ux-round1]`): верифицировать что `board_viewer_repos` в `/opt/stacks/board-viewer/auth.toml` корректно — `books` по memory `Gitea owner namespace` должен быть `victor/books`, не `OpeItcLoc03/books`. Если auth.toml корректен и whitelist single-owner — UI conditional работает как задумано.
<!-- created-by: OpeItcLoc03@DESKTOP-NSEF0UK / from: .workshop / 2026-05-22 / trigger: user-ux-feedback-round1 -->