Back to .md Directory

Prompts Log

This file logs all prompts used during the KitchenAI project development with GitHub Copilot.

May 2, 2026
0 downloads
0 views
ai llm prompt copilot workflow
View source

Prompts Log

This file logs all prompts used during the KitchenAI project development with GitHub Copilot.

Prompts

#PromptDescription
1Create PROMPTS.MD file to log all my prompts.Create a markdown file to track all GitHub Copilot prompts used in this project.
2Add a new feature specification document to the repository at doc/feature-specifications.md.Create the KitchenAI mid-level feature specification document covering executive summary, MVP scope, personas, data model, REST API outline, user stories with acceptance criteria, developer notes (React + ASP.NET Core), AI recipe generation design, GDPR/privacy, localization, and roadmap.
3Split specification on issuesSplit the monolithic feature specification document into separate issue files (one per user story / technical task) under doc/issues/.
4Split the issues into frontend and backend tasks where it makes senseFor each issue that contains both frontend and backend work, create -BE and -FE sub-issue files. Update parent issue files to reference the sub-issues. Update doc/issues/README.md to show the full hierarchy. TECH-002 (data model) is backend-only and is not split.
5/create-issue Create all missed issues based on *.md files from doc/issues folder.Create a GitHub Actions workflow (.github/workflows/create-issues.yml) that reads each doc/issues/*.md file, extracts the issue title from the H1 heading, and creates a GitHub issue for any file that does not already have a corresponding issue.
6TECH-001-FE — Project setup & architecture — FrontendScaffold the React SPA under /frontend using Vite 6 + React 19 + TypeScript. Install and configure React Router v7, Tailwind CSS v4, TanStack Query v5, and react-i18next. Set up Jest 30 + React Testing Library for unit tests. Create placeholder pages (Dashboard, Inventory, Recipes, ShoppingList, Settings, Admin/ApiKeys, Admin/Metrics), MainLayout and AdminLayout components, EN/PL translation files, and a GitHub Actions CI workflow (frontend-ci.yml) running lint → test → build on every PR.
7implement issues form https://github.com/AlMiZa/KitchenAI/issues according to implementation plan.Implement all 20 open GitHub issues on branch feature/implement-all-issues. Backend: Application layer with MediatR handlers for Auth (register/login/me with BCrypt + JWT), Items (CRUD + merge + filters), Recipes (generate via LLM stub + save + availability check), Notifications (nightly expiry job + subscribe), Households (list/create/join), Analytics (summary), GDPR (export/delete), Admin (config). Infrastructure: TokenService, LlmService stub, ExpiryNotificationService. API controllers for all endpoints. 18 xUnit tests. Frontend: Auth context + Login/Register pages, full Inventory page (add/edit modal, filters, expiry badges), Recipes page (generate + cards), RecipeDetail page (availability check), NotificationBell, Settings page (profile/notifications/household/privacy), Dashboard (analytics cards), ShoppingList, Admin pages, CookieBanner, LanguageSwitcher. 16 Jest+RTL tests. Build, lint, and all tests pass.
8@copilot open a new pull request to apply changes based on this feedback — ExpiryNotificationJob does not check whether a notification for the same item already exists before inserting a new one.Fix duplicate expiry notifications: add a duplicate-check in ExpiryNotificationJob.RunAsync that loads pending undelivered Expiring notifications, extracts item IDs via a TryGetItemIdFromPayload helper, and skips items already notified. Add two new tests (second run produces no duplicates; delivered notification allows fresh notification on next run). All 20 tests pass.
9@copilot open a new pull request to apply changes based on feedback about ApiKeys.tsx shape mismatch with backend AdminConfigDto.Fix ApiKeys.tsx to use the correct AdminConfigDto shape (geminiApiKeyConfigured, llmModel, version) returned by GET /api/admin/config, and align the update mutation to send UpdateAdminConfigCommand (geminiApiKeyPresent?, llmModel?) instead of a generic key/value pair.
10@copilot open a new pull request to apply changes based on review feedback: fix householdId nullable type mismatch.Fix AuthResult.householdId and UserProfile.householdId in frontend/src/services/auth.ts from string to `string
11@copilot open a new pull request to apply changes based on the comments in the PR review thread (pullrequestreview-3873489689).Fix several backend/frontend mismatches from the second PR review: add GET /admin/metrics endpoint with AdminMetricsDto; add PUT /users/me endpoint for profile updates; add GET /households/{id} endpoint; fix analytics.ts URL path to /analytics/summary and map PascalCase backend DTO to camelCase frontend interface; fix Metrics.tsx to use /admin/metrics; fix auth.ts updateProfile URL to /users/me; fix recipes.ts checkRecipeAvailability to map backend AvailabilityItemDto to frontend RecipeIngredient with computed status; fix GenerateRecipeHandlerTests to seed a User row satisfying the FK constraint.
12fix problems on run CI workflowsFix Frontend CI failure (add ts-node devDependency for jest.config.ts parsing) and Backend CI failure (dotnet format whitespace errors in multiple files: GenerateRecipeHandlerTests.cs, GetItemsHandlerTests.cs, ExpiryNotificationServiceTests.cs, CheckRecipeAvailabilityHandlerTests.cs, ExportUserDataHandler.cs).
13US-001-FE — Account creation — FrontendImplement frontend for US-001: fix post-auth redirect to /dashboard (Register + Login pages), add /dashboard route alias in AppRoutes, add passwordless "Send me a magic link" option on Login page with "Check your email" confirmation screen, add sendMagicLink service function in auth.ts, add EN/PL translation keys for magic-link flow, and add the missing unit test "navigates to /dashboard on successful registration".
14US-001-BE — Account creation — BackendImplement passwordless magic-link flow: add MagicLinkToken domain entity, IEmailService/EmailService stub, PasswordlessRequestCommand/PasswordlessRequestHandler, POST /api/auth/passwordless/request controller endpoint, EF migration, and two unit tests. All other auth endpoints (register, login, me) and their tests were already in place.
15US-002-BE — Add inventory item — BackendStrengthen CreateItemHandlerTests.ValidItem_PersistedCorrectly to assert all fields (AllowFraction, PurchaseDate, ExpiryDate, BestByOrUseBy, Brand, Notes). Add FractionalQuantity_StoredWithoutRounding test. Create MergeItemsHandlerTests.cs with tests for combining quantities, single-item guard, and not-found guard.
16US-002-FE — Add inventory item — FrontendAdd missing Jest/RTL test: unit dropdown in Add/Edit Item modal only shows the five metric options (g, kg, ml, L, pcs), completing the three required frontend tests for the inventory feature (expiry-date sort, fractional qty, metric units).
17US-003-FE — Generate recipe from stored products — FrontendAdd error handling with retry to RecipesPage (generateMut.isError banner), add generateError/retry i18n keys (EN + PL), and add 4 new Jest/RTL tests: generate button renders and is clickable, loading spinner while pending, error banner with retry, rationale collapsible via <details>.
18US-004-BE — Check recipe availability & gaps — BackendAdd missing unit test IngredientEntirelyAbsent_ReturnsMissingWithFullDeficit to CheckRecipeAvailabilityHandlerTests.cs, covering the case where no inventory item exists for a required ingredient (available=0, deficit=requiredQty). Core handler, query, controller endpoint, and the other two tests were already implemented.
19US-004-FE — Check recipe availability & gaps — FrontendAdd missing frontend tests: available ingredient shows success indicator (green ✓) after check, missing ingredient shows missing indicator (red ✗) after check (both added to RecipeView.test.tsx), and a new ShoppingList.test.tsx covering: missing items from recipe detail render with checkboxes, manual item addition, and checkbox toggling.
20TECH-005-FE — Localization & accessibility — FrontendImplement frontend localization using react-i18next (Polish and English) and WCAG AA accessibility across all main flows. Added missing i18n keys (inventory.expired, inventory.status, inventory.expiresInDays), configured i18n missingKeyHandler (dev-only), created locale-aware dateFormat utility (dd.MM.yyyy / MM/dd/yyyy), fixed hardcoded strings in ExpiryBadge and table headers, locale-aware date/time formatting in Inventory/Dashboard/NotificationBell, immediate language switching in Settings with i18n.changeLanguage, WAI-ARIA tab pattern in Settings, aria-live page transition announcements in MainLayout, aria-modal on NotificationBell dropdown, and new dateFormat unit tests.
22US-005-FE — Notifications for expiring items — FrontendAdd notification click-navigation in NotificationBell (clicking any notification navigates to /inventory?expiringSoon=true and closes the panel), initialize expiringSoonFilter in Inventory.tsx from the expiringSoon URL search parameter, and add two new Jest/RTL tests: clicking a notification navigates to the inventory with the expiringSoon filter, and the notification preferences form (Settings Notifications tab) renders the threshold input and email/push toggles.
23US-006-BE — Persisted household & sharing — BackendVerify and confirm the existing Household/HouseholdMember domain entities, RegisterHandler auto-creating a household with role "owner", GetHouseholdsHandler, CreateHouseholdHandler, JoinHouseholdHandler, and HouseholdsController endpoints (GET /api/households, POST /api/households, POST /api/households/{id}/join) are all correctly implemented. Add missing unit test ItemsQuery_ReturnsOnlyItemsBelongingToRequestedHousehold to GetItemsHandlerTests.cs verifying that GET /api/households/{hid}/items is scoped to the requesting household only. All 35 tests pass.
28TECH-004-FE — GDPR, privacy & security — FrontendImplement GDPR/privacy/security frontend: (1) CookieBanner gets a "Decline" button and aria-modal="true" so users can explicitly accept or decline analytics/tracking cookies; (2) Settings Privacy tab gets an analytics consent checkbox (persisted to localStorage) and a data retention policy notice ("24 months for inactive households"); (3) Delete-account confirmation panel gets role="dialog" aria-modal="true" for screen-reader accessibility; (4) Backend UserDto and GetCurrentUserHandler expose the user's Role field; (5) UserProfile in auth.ts includes role; (6) MainLayout shows an Admin nav link only when user.role === 'admin'; (7) EN/PL i18n keys added (cookie.decline, cookie.bannerLabel, settings.analyticsConsent, settings.analyticsConsentNote, settings.dataRetentionPolicy); (8) CookieBanner.test.tsx added with 6 tests (render, accept, decline, persistence, aria-modal). All 47 frontend and 47 backend tests pass.
24US-006-FE — Persisted household & sharing — FrontendImplement household selector and member management UI. Extended services/households.ts with HouseholdMember type and getHouseholdMembers, getInviteLink, leaveHousehold endpoints. Extended useAuth hook to support activeHouseholdId + setActiveHouseholdId for switching households. Created HouseholdSelector dropdown component shown in the Dashboard header. Updated Settings household tab with full member list (name + role badge), "Invite Member" button opening a shareable link dialog, and "Leave Household" option for non-owner members. Added EN/PL i18n keys. Added 5 new Jest/RTL tests (all 37 tests pass).
25TECH-003-BE — Analytics & dashboard — BackendAdd missing recipe_cooked analytics event: created CookRecipeCommand and CookRecipeHandler (records event, throws KeyNotFoundException for unknown recipe), added POST /api/households/{hid}/recipes/{rid}/cook endpoint returning 204. Added GetAnalyticsSummaryHandlerTests (4 tests: zero summary, recipe count, top ingredients, money saved) and CookRecipeHandlerTests (2 tests: happy path + not-found). All 41 tests pass.
26TECH-003-FE — Analytics & dashboard — FrontendImplement dashboard analytics UI: add error state banner with retry when analytics/items fetch fails, add quick-add item inline form (uses createItem mutation, invalidates items query), change top-ingredients card to render an ordered list (up to 5) instead of comma-separated text, add EN/PL i18n keys (analyticsError, quickAddPlaceholder, quickAddButton), add Dashboard.test.tsx with 4 tests (loading skeletons, correct data rendering, error banner, quick-add form submit). All 41 tests pass.
27TECH-004-BE — GDPR, privacy & security — BackendAdd structured sensitive event logging (ILogger) to LoginHandler (failed/successful login), DeleteUserHandler (account deletion initiated/completed), and PasswordlessRequestHandler (magic link created). Add data retention background service (InactiveHouseholdRetentionJob + InactiveHouseholdRetentionService) that deletes households inactive for more than the configured period (default 24 months). Add DataRetention:InactiveHouseholdMonths config key to appsettings.json. Add 6 new unit tests: DeleteUserHandlerTests (cascade delete + unknown user), ExportUserDataHandlerTests (export JSON contains email + unknown user), InactiveHouseholdRetentionJobTests (inactive households deleted + active households kept). All 47 tests pass.
29TECH-005-BE — Localization — BackendImplement server-side localization: create Resources/Messages.resx (Polish default) and Resources/Messages.en.resx (English) in Application project with all user-visible strings (auth errors, item/recipe/household/user not-found messages, notification text, unit labels). Add static Messages helper using ResourceManager that reads CultureInfo.CurrentUICulture. Add UserLocaleRequestCultureProvider that extracts locale from the JWT locale claim. Add locale claim to JWT tokens in TokenService. Configure UseRequestLocalization middleware in Program.cs (user locale claim → Accept-Language header → pl-PL default). Replace all hardcoded user-visible strings in 16 handlers with Messages.Get(...) calls. Add 2 new localization tests verifying English and Polish messages. All 49 tests pass.
30US-007-BE — Unit tests & CI — BackendVerify that all backend acceptance criteria for US-007-BE are already fully met: 49 xUnit tests covering every required handler (registration, item creation, recipe generation, availability check, expiry notifications, household membership); CI pipeline (backend-ci.yml) runs dotnet test --no-build --configuration Release --verbosity normal and dotnet format --verify-no-changes on every PR targeting main; all tests pass and formatting is clean.
31US-007-FE — Unit tests & CI — FrontendAdd Playwright E2E test for the happy path (register → add item → generate recipes → recipe list displayed). The test uses page.route() to mock all backend API calls so no real server is needed. Added playwright.config.ts with webServer (Vite dev server) and Chromium project. Added test:e2e npm script. Updated frontend-ci.yml to install Playwright browsers and run npm run test:e2e before the build step. All 47 Jest+RTL unit tests continue to pass; the single Playwright E2E test passes.

Related Documents