Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions .github/instructions/FRONTEND.instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,31 @@ applyTo: "frontend/**/*"
"We use the @sveltejs/adapter-static for deployment to GitHub Pages".
"Prioritize the new Svelte 5 runes syntax for state management and effects".

## API Usage Rules

**CRITICAL**: Never guess at API client patterns or imports. Always check existing code first.

When working with API clients:
1. **Always check** `frontend/src/lib/server/api-client.ts` to see what APIs are already imported and available
2. **Never assume** API methods exist - use `grep_search` or `file_search` to verify
3. **Follow existing patterns exactly** - if other pages use `api.core.methodName({})`, use the same pattern
4. **Before adding new API imports**, check if the OpenAPI client has been regenerated to include new endpoints
5. **If an API class is missing**, tell the user the OpenAPI client needs to be regenerated first, don't just add the import

Common mistakes to avoid:
- Making up `api(cookies)` or other non-existent patterns
- Adding imports like `DeadlinesApi` before confirming it exists in the generated client
- Creating try/catch wrappers that don't exist in other similar files
- Inventing new authentication patterns

Always look at existing similar pages (FAQ, guestlist, etc.) for the correct pattern.

CRITICAL: When using throw redirect() in SvelteKit form actions:

NEVER place throw redirect() inside a try-catch block
ALWAYS move redirects outside the try-catch to prevent them from being caught as errors
If you need data from the API call for the redirect URL, store it in a variable declared before the try block. The redirect is a Response object that should propagate naturally through SvelteKit's request handling - catching it breaks the flow.


When connected to the svelte-llm MCP server, you have access to comprehensive Svelte 5 and SvelteKit documentation. Here's how to use the available tools effectively:

Expand Down
12 changes: 9 additions & 3 deletions .github/workflows/auto_pr.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
name: Generate Development Pull Request
name: Generate Pull Requests

on:
push:
branches-ignore:
- main
- develop

permissions:
contents: write
Expand All @@ -26,7 +25,14 @@ jobs:
id: branch_info
run: |
BRANCH_NAME="${GITHUB_REF#refs/heads/}"
BASE_BRANCH="develop"

# Determine base branch based on current branch
if [ "$BRANCH_NAME" = "develop" ]; then
BASE_BRANCH="main"
else
BASE_BRANCH="develop"
fi

echo "branch_name=$BRANCH_NAME" >> $GITHUB_OUTPUT
echo "base_branch=$BASE_BRANCH" >> $GITHUB_OUTPUT

Expand Down
1 change: 1 addition & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ jobs:
PR_NUMBER=$(gh pr list --head sync-release-${{ needs.release.outputs.version }} --json number --jq '.[0].number')
if [ -n "$PR_NUMBER" ]; then
gh pr merge $PR_NUMBER --auto --squash
fi

- name: checkout develop branch again
uses: actions/checkout@v5
Expand Down
5 changes: 2 additions & 3 deletions backend/core/management/commands/send_update_email.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
from django.contrib.auth import get_user_model
from django.db.models import Sum, DecimalField
from django.utils import timezone
from django.urls import reverse
from django.template.loader import render_to_string

from core.models import WeddingSettings
Expand Down Expand Up @@ -187,7 +186,7 @@ def _build_html_email_body(self, base_url, **data):
overdue_deadlines = []
for deadline in data["overdue_deadlines"]:
days_overdue = (timezone.now().date() - deadline.due_date).days
deadline_url = f"{base_url}{reverse('deadline:deadline_detail', kwargs={'deadline_slug': deadline.slug})}"
deadline_url = f"{base_url}/settings/deadline/deadline/{deadline.id}"
overdue_deadlines.append(
{
"name": deadline.name,
Expand All @@ -201,7 +200,7 @@ def _build_html_email_body(self, base_url, **data):
upcoming_deadlines = []
for deadline in data["upcoming_deadlines"]:
days_until = (deadline.due_date - timezone.now().date()).days
deadline_url = f"{base_url}{reverse('deadline:deadline_detail', kwargs={'deadline_slug': deadline.slug})}"
deadline_url = f"{base_url}/settings/deadline/deadline/{deadline.id}"
upcoming_deadlines.append(
{
"name": deadline.name,
Expand Down
4 changes: 2 additions & 2 deletions backend/core/static/core/css/input.css
Original file line number Diff line number Diff line change
Expand Up @@ -87,11 +87,11 @@

/* start table listing items from associated models */
.associated-card {
@apply card bg-base-100 shadow-xl hover:shadow-2xl transition-shadow duration-300 text-base-content;
@apply card bg-neutral shadow-xl hover:shadow-2xl transition-shadow duration-300 text-neutral-content;
}

.associated-card-title {
@apply card-title text-base-content lg:text-xl text-lg;
@apply card-title text-neutral-content lg:text-xl text-lg;
}

.associated-card-body {
Expand Down
Loading