From a3ad6a8905eb8877d60d5a702a9247bd1261ae28 Mon Sep 17 00:00:00 2001 From: Grayson Adams <51373669+GraysonCAdams@users.noreply.github.com> Date: Sun, 1 Mar 2026 15:38:29 -0600 Subject: [PATCH 1/2] docs: update api, architecture, and notifications for v1.6.0 - Update share endpoint to document single phone string (not array) - Add new components to architecture directory tree - Document push notification payload structure with badgeCount field --- docs/api.md | 2 +- docs/architecture.md | 5 ++++- docs/notifications.md | 16 ++++++++++++++++ 3 files changed, 21 insertions(+), 2 deletions(-) diff --git a/docs/api.md b/docs/api.md index bfac278..5a4c0c0 100644 --- a/docs/api.md +++ b/docs/api.md @@ -83,7 +83,7 @@ Triggers the download pipeline via the active provider. Requires a download prov ### POST /api/clips/share Authenticated via `?token=` query parameter (iOS Shortcut token). Allows sharing clips without a session cookie. ``` -Request: { "url": "https://tiktok.com/...", "phones": ["+1234567890"] } +Request: { "url": "https://tiktok.com/...", "phone": "+1234567890" } Response: { "ok": true, "clipId": "...", "status": "downloading" } (201 Created) ``` diff --git a/docs/architecture.md b/docs/architecture.md index 0b682f8..38fb380 100644 --- a/docs/architecture.md +++ b/docs/architecture.md @@ -90,12 +90,15 @@ scrolly/ │ │ │ ├── ProgressBar.svelte │ │ │ ├── InlineError.svelte │ │ │ ├── FilterBar.svelte # Feed filter tabs +│ │ │ ├── ShortcutGuideSheet.svelte # iOS Shortcut setup guide │ │ │ └── settings/ │ │ │ ├── GroupNameEdit.svelte │ │ │ ├── InviteLink.svelte │ │ │ ├── MemberList.svelte │ │ │ ├── RetentionPicker.svelte -│ │ │ └── ClipsManager.svelte +│ │ │ ├── ClipsManager.svelte +│ │ │ ├── GettingStartedChecklist.svelte +│ │ │ └── SetupDoneState.svelte │ │ ├── stores/ │ │ │ ├── notifications.ts # Notification polling + unread count │ │ │ ├── mute.ts # Global mute state diff --git a/docs/notifications.md b/docs/notifications.md index 4832e8b..71ab9be 100644 --- a/docs/notifications.md +++ b/docs/notifications.md @@ -35,6 +35,22 @@ Real-time push notifications via the Web Push Protocol (VAPID). **Timing rationale:** New clip notifications are deferred until the download pipeline finishes successfully. This avoids notifying users about clips that may fail to download. If a download fails, no notification is sent. Reactions and comments notify immediately since the action is already complete. +### Push Notification Payload + +All push notifications include these fields: + +| Field | Type | Description | +|-------|------|-------------| +| title | string | Notification title | +| body | string | Notification body text | +| icon | string? | Icon URL | +| url | string? | Deep link target (defaults to '/') | +| tag | string? | Notification grouping tag | +| image | string? | Image URL for rich notifications | +| badgeCount | number? | Unwatched clip count for app badge | + +The `badgeCount` is computed server-side per user/group and used by the service worker to call `navigator.setAppBadge()` on supported platforms. + ### Customization Users can toggle each notification type on/off in Settings. Preferences are stored in the `notification_preferences` table (created automatically on onboarding). From 2d383f20a6b5e2c6e30e1c34ad346a0dfa3bc696 Mon Sep 17 00:00:00 2001 From: Grayson Adams <51373669+GraysonCAdams@users.noreply.github.com> Date: Sun, 1 Mar 2026 15:42:58 -0600 Subject: [PATCH 2/2] chore: trigger security checks for docs PR --- src/lib/utils.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lib/utils.ts b/src/lib/utils.ts index 4f6f1ec..a03a972 100644 --- a/src/lib/utils.ts +++ b/src/lib/utils.ts @@ -1,3 +1,4 @@ +/** Extract the filename from a file path. */ export function basename(filepath: string): string { return filepath.split('/').pop() || filepath; }