Skip to content

Conversation

@SIMULATAN
Copy link
Member

No description provided.

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented May 31, 2025

Deploying snoty with  Cloudflare Pages  Cloudflare Pages

Latest commit: c7998b2
Status: ✅  Deploy successful!
Preview URL: https://9ae44ed6.snoty.pages.dev
Branch Preview URL: https://staging.snoty.pages.dev

View logs

@SIMULATAN SIMULATAN changed the title Update from Staging branch Notifications May 31, 2025
@SIMULATAN SIMULATAN force-pushed the staging branch 2 times, most recently from 4071eb5 to ecb0a4f Compare May 31, 2025 18:51
@SIMULATAN SIMULATAN requested a review from Copilot May 31, 2025 20:52
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces a notifications feature, including a new notifications page, server‐side loading, UI components, and API integrations for fetching, resolving, and deleting notifications.

  • Adds a /notifications page with async loading and error handling.
  • Extends the user menu and layout to display a notification badge with live count.
  • Implements notification model, store, API calls, and reusable components (badge, list, go‐to links, etc.).

Reviewed Changes

Copilot reviewed 15 out of 15 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/routes/notifications/+page.svelte New notifications page UI with promise handling, list, and error
src/routes/notifications/+page.server.ts Server‐side load function to fetch notifications
src/routes/UserMenu.svelte Injects notification count badge and bell icon
src/routes/+layout.svelte Passes apiProps/user into <UserMenu>
src/lib/utils/type_utils.ts Introduces ReplaceDateWithString utility type
src/lib/model/notification.ts Defines Notification interface
src/lib/components/notification/notification_store.ts Adds Svelte store for count
src/lib/components/notification/NotificationGoTo.svelte Popover links by notification attributes
src/lib/components/notification/NotificationBadge.svelte Badge displaying count
src/lib/components/notification/Notification.svelte List item for single notification with actions
src/lib/components/node/Node.svelte Highlights a node based on URL query
src/lib/components/list/ListItem.svelte Class‐merging wrapper for list items
src/lib/components/list/List.svelte Class‐merging wrapper for lists
src/lib/api/notification_api.ts API functions for count, list, resolve, delete
src/api.css Defines keyframes and CSS variables for highlight animation
Comments suppressed due to low confidence (4)

src/routes/notifications/+page.svelte:30

  • [nitpick] The name element is ambiguous in the {:then} block. Renaming to something like errorOrNull or result would make its purpose clearer.
{:then element}

src/routes/notifications/+page.svelte:1

  • There’s no accompanying test for the notifications page. Consider adding a test for the loading logic and list rendering (including empty state and error handling).
<script lang="ts">

src/lib/api/notification_api.ts:22

  • ReplaceDateWithString is declared in type_utils.ts but not imported here. Add import type { ReplaceDateWithString } from '../utils/type_utils'.
const notifications = e as ReplaceDateWithString<Notification>[];

src/lib/components/node/Node.svelte:67

  • The animate-highlight class is toggled but no corresponding CSS class is defined—only a CSS variable and keyframes exist. You may need to define .animate-highlight { animation: highlight var(--animate-highlight); } or use your tailwind plugin.
<div bind:clientWidth={widths[node._id]} bind:clientHeight={heights[node._id]} class="h-full" class:animate-highlight={isHighlighted}>

@SIMULATAN SIMULATAN changed the title Notifications Notifications & Svelte Flow update Jun 23, 2025
@SIMULATAN SIMULATAN force-pushed the staging branch 2 times, most recently from 9246aa0 to 3e27901 Compare July 3, 2025 22:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants