78 lines
2.1 KiB
Markdown
78 lines
2.1 KiB
Markdown
---
|
|
phase: 04-notifications-et-i3bar
|
|
plan: 02
|
|
subsystem: cli
|
|
tags: [i3bar, i3status, json-protocol]
|
|
|
|
requires:
|
|
- phase: 04-01
|
|
provides: shortName function, Notifier, FocusTimer
|
|
provides:
|
|
- i3bar JSON widget with session status
|
|
- i3status wrapping for combined output
|
|
- CLI vmux i3bar subcommand
|
|
affects: []
|
|
|
|
tech-stack:
|
|
added: []
|
|
patterns: [i3bar JSON protocol, i3status wrapper, TTY detection for mode selection]
|
|
|
|
key-files:
|
|
created: [i3bar.go, i3bar_test.go]
|
|
modified: [main.go]
|
|
|
|
key-decisions:
|
|
- "TTY detection: standalone mode in terminal, wrapped mode when called by i3bar"
|
|
- "Format: vmux: auth[!] portal[W] neia[I] with shortName from notify.go"
|
|
|
|
patterns-established:
|
|
- "i3bar JSON protocol: header + infinite array of block arrays"
|
|
|
|
requirements-completed: [I3-03]
|
|
|
|
duration: 5min
|
|
completed: 2026-03-23
|
|
---
|
|
|
|
# Plan 04-02 Summary
|
|
|
|
**Widget i3bar avec liste courte des sessions, wrapping i3status, détection TTY pour mode standalone/wrapped**
|
|
|
|
## Performance
|
|
|
|
- **Duration:** 5 min
|
|
- **Tasks:** 3 (2 code + 1 human-verify)
|
|
- **Files modified:** 3
|
|
|
|
## Accomplishments
|
|
- formatI3BarBlocks : format compact `vmux: auth[!] portal[W]`
|
|
- runI3Bar : standalone (TTY) ou wrapped (pipe/i3bar)
|
|
- 10 tests unitaires pour le formatage
|
|
- TTY detection pour éviter le fallback i3status texte brut
|
|
|
|
## Task Commits
|
|
|
|
1. **Task 1: Formatage i3bar + tests** - `a28e8d6`
|
|
2. **Task 2: Boucle i3bar + CLI** - `221a444`
|
|
3. **Task 3: Human verification** - approved
|
|
4. **Fix TTY detection** - uncommitted (sera commité avec la validation globale)
|
|
|
|
## Files Created/Modified
|
|
- `i3bar.go` — I3BarBlock, formatI3BarBlocks, queryVmuxBlock, runI3Bar (standalone + wrapped)
|
|
- `i3bar_test.go` — 10 tests unitaires
|
|
- `main.go` — case "i3bar" + isTerminal()
|
|
|
|
## Decisions Made
|
|
- Mode standalone quand stdout est un TTY, wrapped quand c'est un pipe
|
|
- Pas de dépendance externe pour la détection TTY (os.ModeCharDevice)
|
|
|
|
## Deviations from Plan
|
|
- Ajout de isTerminal() pour fixer le bug i3status plain text
|
|
|
|
## Next Phase Readiness
|
|
- Dernière phase. Projet v1 complet.
|
|
|
|
---
|
|
*Phase: 04-notifications-et-i3bar*
|
|
*Completed: 2026-03-23*
|