Skip to content

Commit ff824a3

Browse files
wpfleger96npub1mn7jgtj4w2pd0g0zeuhxsa6jy6p0rewxz4kujt98my82ahfmp72sxjexk7
andauthored
feat(desktop): add NIP-ER reminder UI — create, view, and manage encrypted reminders (#963)
Signed-off-by: Will Pfleger <[email protected]> Signed-off-by: Will Pfleger <[email protected]> Signed-off-by: Will Pfleger <[email protected]> Co-authored-by: npub1mn7jgtj4w2pd0g0zeuhxsa6jy6p0rewxz4kujt98my82ahfmp72sxjexk7 <dcfd242e557282d7a1e2cf2e6877522682f1e5c6156dc92ca7d90eaedd3b0f95@sprout-oss.stage.blox.sqprod.co>
1 parent 2656396 commit ff824a3

25 files changed

Lines changed: 1670 additions & 236 deletions

‎.github/workflows/ci.yml‎

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ jobs:
3434
filters: |
3535
rust:
3636
- 'crates/**'
37+
- 'migrations/**'
38+
- 'schema/**'
3739
- 'Cargo.toml'
3840
- 'Cargo.lock'
3941
- 'rust-toolchain.toml'
@@ -357,21 +359,6 @@ jobs:
357359
wait_healthy "Redis" "buzz-redis"
358360
wait_healthy "Typesense" "buzz-typesense"
359361
wait_healthy "MinIO" "buzz-minio"
360-
- name: Apply database schema
361-
run: ./bin/pgschema apply --file schema/schema.sql --auto-approve
362-
env:
363-
PGHOST: localhost
364-
PGPORT: "5432"
365-
PGUSER: buzz
366-
PGPASSWORD: buzz_dev
367-
PGDATABASE: buzz
368-
# Use the already-running docker postgres for desired-state planning instead of
369-
# downloading an embedded Postgres from Maven Central (transient-fetch flake source).
370-
PGSCHEMA_PLAN_HOST: localhost
371-
PGSCHEMA_PLAN_PORT: "5432"
372-
PGSCHEMA_PLAN_DB: buzz
373-
PGSCHEMA_PLAN_USER: buzz
374-
PGSCHEMA_PLAN_PASSWORD: buzz_dev
375362
- name: Download relay binary
376363
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
377364
with:
@@ -382,6 +369,7 @@ jobs:
382369
chmod +x ./target/ci/buzz-relay
383370
nohup env \
384371
DATABASE_URL=postgres://buzz:buzz_dev@localhost:5432/buzz \
372+
BUZZ_AUTO_MIGRATE=true \
385373
REDIS_URL=redis://localhost:6379 \
386374
TYPESENSE_URL=http://localhost:8108 \
387375
TYPESENSE_API_KEY=buzz_dev_key \
@@ -390,6 +378,7 @@ jobs:
390378
BUZZ_REQUIRE_AUTH_TOKEN=false \
391379
BUZZ_RECONCILE_CHANNELS=true \
392380
BUZZ_GIT_PROBE_WRITERS=8 \
381+
SPROUT_REMINDER_SCHEDULER_INTERVAL_SECS=1 \
393382
./target/ci/buzz-relay > /tmp/buzz-relay.log 2>&1 &
394383
echo $! > /tmp/buzz-relay.pid
395384
for attempt in $(seq 1 60); do
@@ -407,6 +396,15 @@ jobs:
407396
exit 1
408397
- name: Seed desktop e2e data
409398
run: bash scripts/setup-desktop-test-data.sh
399+
- name: Reminder runtime e2e (proves migrations provisioned the schema)
400+
# Runs the NIP-ER reminder e2e against the migration-provisioned relay.
401+
# If migrations/0003 is missing or wrong, every reminder INSERT/query
402+
# 500s and these tests fail — the guard that the snapshot and the sqlx
403+
# migration runner can never silently diverge again. One shard suffices.
404+
if: matrix.shard == 1
405+
run: cargo test --profile ci -p buzz-test-client --test e2e_event_reminder -- --ignored
406+
env:
407+
RELAY_URL: ws://localhost:3000
410408
- name: Desktop relay-backed e2e
411409
run: cd desktop && pnpm exec playwright test --project=integration --shard=${{ matrix.shard }}/2
412410
- name: Upload desktop integration artifacts

‎AGENTS.md‎

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,22 @@ subscription. Navigate to the channel first (triggers subscription), then away
355355
(so unread indicators appear), then inject.
356356

357357
**Animation timing:** Radix components animate in via CSS. `toBeVisible()`
358-
resolves mid-animation — wait for completion before screenshotting:
358+
resolves mid-animation — wait for completion before screenshotting. Use the
359+
shared helper (mandatory before any `page.screenshot()` or
360+
`locator.screenshot()` in specs):
361+
362+
```ts
363+
import { waitForAnimations } from "../helpers/animations";
364+
365+
// ... after the element is visible but before capturing:
366+
await waitForAnimations(page);
367+
await page.screenshot({ path: "...", clip: { ... } });
368+
```
369+
370+
The `just desktop-screenshot` path (`screenshot.mjs`) calls
371+
`waitForAnimations` automatically — no manual step needed there.
372+
373+
For per-element waits (rare — prefer the page-level helper above):
359374

360375
```ts
361376
await menuItem.evaluate((el) =>

‎desktop/playwright.config.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ export default defineConfig({
4747
"**/unread-pill-screenshots.spec.ts",
4848
"**/thread-unread-screenshots.spec.ts",
4949
"**/animated-avatar-screenshots.spec.ts",
50+
"**/reminders-screenshots.spec.ts",
5051
],
5152
use: {
5253
...devices["Desktop Chrome"],

‎desktop/src/app/AppShell.helpers.ts‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ export type AppView =
55
| "home"
66
| "channel"
77
| "agents"
8+
| "reminders"
89
| "workflows"
910
| "pulse"
1011
| "projects";
@@ -85,6 +86,13 @@ export function deriveShellRoute(pathname: string): {
8586
};
8687
}
8788

89+
if (pathname === "/reminders") {
90+
return {
91+
selectedChannelId: null,
92+
selectedView: "reminders",
93+
};
94+
}
95+
8896
return {
8997
selectedChannelId: null,
9098
selectedView: "home",

0 commit comments

Comments
 (0)