Add live calendar state to Quickshell
This commit is contained in:
@@ -284,7 +284,7 @@ git commit -m "Add the EDS calendar bridge"
|
||||
- Produces: functions `selectDate(date)`, `selectIsoDate(dateString)`, `setVisibleMonth(year, month)`, `eventsForDate(date)`, `markersForDate(date)`, `openEvent(event)`, `openCalendar(date)`, `join(event)`, `refresh()`, `applyFixture(name)`, and `clearFixture()`.
|
||||
- Produces IPC target `calendar-agenda` with `fixture`, `reset`, `open`, `select`, `refresh`, and `status`.
|
||||
|
||||
- [ ] **Step 1: Write the failing live service contract**
|
||||
- [x] **Step 1: Write the failing live service contract**
|
||||
|
||||
Create `tests/quickshell/calendar-agenda-contract.sh` that first asserts the IPC target, loads fixture `daybook`, and validates only synthetic state:
|
||||
|
||||
@@ -315,13 +315,13 @@ jq -e '.fixture == false' <<<"$(qs ipc call calendar-agenda status)" >/dev/null
|
||||
printf 'calendar agenda contract: PASS\n'
|
||||
```
|
||||
|
||||
- [ ] **Step 2: Run the contract and verify RED**
|
||||
- [x] **Step 2: Run the contract and verify RED**
|
||||
|
||||
Run `tests/quickshell/calendar-agenda-contract.sh`.
|
||||
|
||||
Expected: FAIL with `calendar IPC target is missing`.
|
||||
|
||||
- [ ] **Step 3: Implement `CalendarAgenda.qml` stream supervision**
|
||||
- [x] **Step 3: Implement `CalendarAgenda.qml` stream supervision**
|
||||
|
||||
Create the singleton with `pragma Singleton`, `Quickshell`, `Quickshell.Io`, and `QtQuick` imports. Use a streaming parser, not `StdioCollector`:
|
||||
|
||||
@@ -350,7 +350,7 @@ Implement date keys in local time with `Qt.formatDate(new Date(epoch * 1000), "y
|
||||
|
||||
`applyFixture("daybook")` must install three synthetic sources and five synthetic events spanning August 17–18, 2026. Use clearly synthetic labels (`Fixture standup`, `Fixture planning`, `Fixture focus`, `Fixture dinner`, `Fixture tomorrow`) and no real account or event data.
|
||||
|
||||
- [ ] **Step 4: Add calendar IPC without exposing live content**
|
||||
- [x] **Step 4: Add calendar IPC without exposing live content**
|
||||
|
||||
Add to `shell.qml`:
|
||||
|
||||
@@ -380,7 +380,7 @@ IpcHandler {
|
||||
|
||||
Do not include titles, source names, locations, identifiers, or URLs in status output.
|
||||
|
||||
- [ ] **Step 5: Run service contracts and verify GREEN**
|
||||
- [x] **Step 5: Run service contracts and verify GREEN**
|
||||
|
||||
Allow Quickshell to hot reload, then run:
|
||||
|
||||
@@ -392,7 +392,7 @@ qs log -n 80 | rg -i 'calendar|error|warn'
|
||||
|
||||
Expected: both contracts PASS; no calendar QML error or bridge restart loop.
|
||||
|
||||
- [ ] **Step 6: Commit the service**
|
||||
- [x] **Step 6: Commit the service**
|
||||
|
||||
```bash
|
||||
git add config/dot/quickshell/services/CalendarAgenda.qml \
|
||||
|
||||
Reference in New Issue
Block a user