Add the quiet calendar capsule

This commit is contained in:
Gabriel Brown
2026-08-17 11:41:58 -04:00
parent 03914e23af
commit f27a1dca11
5 changed files with 98 additions and 6 deletions
@@ -660,7 +660,7 @@ git commit -m "Build the Prism calendar Daybook"
- Produces: a right-side Pill showing calendar glyph plus `12m` or `Now`.
- Produces: `applyFixture("upcoming")` and `applyFixture("outside-window")` for boundary tests.
- [ ] **Step 1: Add failing capsule boundary assertions**
- [x] **Step 1: Add failing capsule boundary assertions**
Append:
@@ -676,13 +676,13 @@ jq -e '.capsuleVisible == false' <<<"$(qs ipc call calendar-agenda status)" >/de
Run and expect RED because those fixtures do not exist.
- [ ] **Step 2: Implement deterministic timing fixtures and capsule state**
- [x] **Step 2: Implement deterministic timing fixtures and capsule state**
Add `fixtureNow` to CalendarAgenda. Production uses `Date.now() / 1000`; fixture modes use their explicit clock. `upcoming` creates one timed event exactly 12 minutes ahead. `outside-window` creates one 20 minutes ahead plus an all-day event. Verify all-day never wins `nextEvent`.
Use a one-minute `Timer` only while events are loaded to update relative time. Midnight refresh remains separate. There is no sub-minute repaint.
- [ ] **Step 3: Build CalendarIndicator and mount it in Bar**
- [x] **Step 3: Build CalendarIndicator and mount it in Bar**
Use `Pill` with `visible: CalendarAgenda.capsuleVisible`, horizontal padding 8, a calendar Nerd Font glyph, and tabular relative text. `onActivated` opens Agenda. Import `QtQuick.Controls` and use `ToolTip.visible: root.hovered && root.visible` with the next event's title; the title must not otherwise appear in the bar.
@@ -690,7 +690,7 @@ Mount the indicator at the beginning of Bar's right row, before ActivityIndicato
Use a single 120 ms opacity/width entrance tied to visibility. No looping animation.
- [ ] **Step 4: Run capsule and full shell contracts**
- [x] **Step 4: Run capsule and full shell contracts**
```bash
tests/quickshell/calendar-agenda-contract.sh
@@ -699,7 +699,7 @@ for test in tests/quickshell/*.sh; do "$test"; done
Expected: calendar fixture boundaries PASS and every existing Quickshell contract remains green.
- [ ] **Step 5: Commit the capsule**
- [x] **Step 5: Commit the capsule**
```bash
git add config/dot/quickshell/modules/bar/CalendarIndicator.qml \