v1.2.3 20251003 verbesserungen #24

Merged
kofi1990 merged 15 commits from 20251003-Verbesserungen into main 2025-10-08 08:44:39 +02:00
kofi1990 commented 2025-10-08 07:59:44 +02:00 (Migrated from github.com)
    CalendarLogic.ts
    app/(kfz)/kfz-calendar/_hooks/useKfzCalendarLogic.ts
Vollständig überarbeitetes Tagebuch-Subsystem:
    Viele neue Komponenten in app/(df)/diary/_components (DiaryCardHeader, DiaryCardContent, DiaryCardActions, ActionButtons, ConfirmationsDisplay, ReactionMenu/Display, DiaryCommentsModal/Sidebar, VirtualizedDiaryList, RichTextarea, DiarySkeletons, DiaryErrorBoundary, u.v.m.)
    Neue Hooks: app/(df)/diary/_hooks/{useComments,useNewComment,useCommentEditing,useDiaryData,useDiaryActions,useDiaryRetryableFetch}.ts
Utilities und Hilfsdateien (z. B. diaryUtils, zusätzliche UI-Utilities).
Verbesserte mobile Toolbars, Dialog-Layouts und UX-Feedback (Toasts).
Virtualisierte Diary-Liste für Performance.

Changed

Logik aus Page-Komponenten ausgelagert in Custom Hooks (z. B. df-calendar/page.tsx und kfz-calendar/page.tsx greifen jetzt auf use*CalendarLogic zu).
Event-Rendering: verbesserte Farb-/Kontrastberechnung, Highlighting via URL-Parameter (highlight).
Dialog-Layouts wurden angepasst (z. B. sm:max-w-2xl, Sidebar-Dialoge für Diary-Comments).
Viele Komponenten-Props wurden überarbeitet oder umbenannt (z. B. DiaryContent, DFCalendarActions, EventDialog-Props).
Fehlerbehandlung verbessert (DiaryErrorBoundary + Retry-Möglichkeiten).
Performance-Optimierungen: Memoization, Virtualisierung, fewer inline handlers.

Fixed

Detailliertere Konflikt-Feedback bei Drag/Drop/Resize/Create in Kalendern (z. B. Fahrzeug-Konflikte).
Stabilität/Fehleranzeigen in Tagebuch-Bereich (Error-Boundary + Skeletons).

Removed

app/(df)/diary/_components/DiaryHeader.tsx (gelöscht; Funktionalität integriert/ersetzt).
Einige Inline-Logik-Stücke in Pages entfernt — ersetzt durch Hooks/Komponenten.
Möglicherweise weitere alte Utility- oder UI-Implementierungen, die durch neue Komponenten ersetzt wurden.

Breaking Changes / Wichtige Hinweise

Viele Komponenten-Signaturen (Props) haben sich geändert. Nach dem Merge unbedingt alle Importe und Aufrufe überprüfen.
    Beispiel: Diary-Komponenten erwarten jetzt andere Props (z. B. showComments / setShowComments), VirtualizedDiaryList ersetzt direkte Grid-Render-Pfade.
    DF/KFZ Calendar-Komponenten nutzen jetzt useDFCalendarLogic / useKfzCalendarLogic; Page-Komponenten geben weniger direkte Handler-Props weiter.
Entfernte Dateien (z. B. DiaryHeader) erfordern Anpassungen, falls andere Dateien noch darauf referenzieren.
Kommentar-System-API intern geändert (neue Hooks useComments, useNewComment, useCommentEditing) — externe Integrationen prüfen.
EventDialog: Änderungen an Datum/Timezone-Handling und an übergebenen Props — API-Shape prüfen.
Server-/API-Contracts: Einige Fetch- und Request/Response-Shapes könnten angepasst worden sein; Endpunkte wie /api/diary, /api/calendar sollten validiert werden.

Empfohlene Upgrade- / Merge-Checkliste (unbedingt durchgehen)

Lokaler Build & Typscript-Check:
    npm/yarn install
    tsc (oder next build) ausführen und alle Typfehler beheben.
Lint & Tests ausführen (falls vorhanden).
Suchen und aktualisieren:
    Alle Importe von gelöschten/verschobenen Komponenten (z. B. DiaryHeader).
    Stellen, die direkte Komponenten-Props aufrufen, die jetzt Hooks erwarten.
API-Kompatibilität prüfen:
    /api/diary, /api/df-calendar, /api/kfz-calendar — Request/Response-Shape testen.
Funktionaler Smoke-Test:
    DF-Calendar: Laden, Drag/Drop, Create, Edit, Delete, URL-Highlight.
    KFZ-Calendar: Laden, Konflikt-Szenarien simulieren (Fahrzeug-Konflikte), Dialog-Interaktionen.
    Diary: Einträge listen, erstellen, editieren, kommentieren, Reactions, Archiv-Funktionen, Fehlerfälle (ErrorBoundary).
UI/Design-Checks:
    Mobile-Breakpoints (Toolbar, Dialog-Layouts).
    Dialog-Breiten (sm:max-w-2xl) prüfen.
Performance-Checks:
    VirtualizedDiaryList Verhalten bei großen Datenmengen.
Review-Bereiche:
    Stellen, die zuvor Inline-Logik hatten, jetzt auf Hooks umgestellt — sicherstellen, dass Abhängigkeiten korrekt sind.
Update Dokumentation (README / Komponenten-Docs), besonders zu neuen Hooks und Prop-Änderungen.

Wichtige Dateien (Auswahl)

Neu hinzugefügt:

app/(df)/df-calendar/_components/DFCalendarHeader.tsx
app/(df)/df-calendar/_components/DFCalendarContent.tsx
app/(df)/df-calendar/_hooks/useDFCalendarLogic.ts
app/(df)/diary/_components/* (große Menge, siehe Release-Branch)
app/(df)/diary/_hooks/{useComments,useNewComment,useDiaryActions,useDiaryData,useRetryableFetch}.ts
app/(kfz)/kfz-calendar/_hooks/useKfzCalendarLogic.ts
app/(kfz)/kfz-calendar/_components/*

Wesentlich geändert:

app/(df)/df-calendar/page.tsx
app/(kfz)/kfz-calendar/page.tsx
Mehrere EventDialog-Komponenten (DF / KFZ)

Entfernt:

app/(df)/diary/_components/DiaryHeader.tsx
Weitere kleinere Dateien ersetzt/entfernt durch neue Implementierungen

Kurzer Release-Note-Text (für Release-Post / interne Ankündigung)

Großes Refactor: Kalender- und Tagebuch-Subsysteme wurden modularisiert und auf Custom Hooks umgestellt. Das Tagebuch erhielt ein komplett neues Kommentar- und Reactions-System, eine virtualisierte Liste für Performance sowie bessere Fehlerbehandlung. Viele UI-Komponenten sind neu strukturiert — beim Upgrade sind manuelle Anpassungen nötig (Props & Imports). Bitte vor Release lokal bauen, testen und die API-Verträge prüfen.

CalendarLogic.ts app/(kfz)/kfz-calendar/_hooks/useKfzCalendarLogic.ts Vollständig überarbeitetes Tagebuch-Subsystem: Viele neue Komponenten in app/(df)/diary/_components (DiaryCardHeader, DiaryCardContent, DiaryCardActions, ActionButtons, ConfirmationsDisplay, ReactionMenu/Display, DiaryCommentsModal/Sidebar, VirtualizedDiaryList, RichTextarea, DiarySkeletons, DiaryErrorBoundary, u.v.m.) Neue Hooks: app/(df)/diary/_hooks/{useComments,useNewComment,useCommentEditing,useDiaryData,useDiaryActions,useDiaryRetryableFetch}.ts Utilities und Hilfsdateien (z. B. diaryUtils, zusätzliche UI-Utilities). Verbesserte mobile Toolbars, Dialog-Layouts und UX-Feedback (Toasts). Virtualisierte Diary-Liste für Performance. Changed Logik aus Page-Komponenten ausgelagert in Custom Hooks (z. B. df-calendar/page.tsx und kfz-calendar/page.tsx greifen jetzt auf use*CalendarLogic zu). Event-Rendering: verbesserte Farb-/Kontrastberechnung, Highlighting via URL-Parameter (highlight). Dialog-Layouts wurden angepasst (z. B. sm:max-w-2xl, Sidebar-Dialoge für Diary-Comments). Viele Komponenten-Props wurden überarbeitet oder umbenannt (z. B. DiaryContent, DFCalendarActions, EventDialog-Props). Fehlerbehandlung verbessert (DiaryErrorBoundary + Retry-Möglichkeiten). Performance-Optimierungen: Memoization, Virtualisierung, fewer inline handlers. Fixed Detailliertere Konflikt-Feedback bei Drag/Drop/Resize/Create in Kalendern (z. B. Fahrzeug-Konflikte). Stabilität/Fehleranzeigen in Tagebuch-Bereich (Error-Boundary + Skeletons). Removed app/(df)/diary/_components/DiaryHeader.tsx (gelöscht; Funktionalität integriert/ersetzt). Einige Inline-Logik-Stücke in Pages entfernt — ersetzt durch Hooks/Komponenten. Möglicherweise weitere alte Utility- oder UI-Implementierungen, die durch neue Komponenten ersetzt wurden. Breaking Changes / Wichtige Hinweise Viele Komponenten-Signaturen (Props) haben sich geändert. Nach dem Merge unbedingt alle Importe und Aufrufe überprüfen. Beispiel: Diary-Komponenten erwarten jetzt andere Props (z. B. showComments / setShowComments), VirtualizedDiaryList ersetzt direkte Grid-Render-Pfade. DF/KFZ Calendar-Komponenten nutzen jetzt useDFCalendarLogic / useKfzCalendarLogic; Page-Komponenten geben weniger direkte Handler-Props weiter. Entfernte Dateien (z. B. DiaryHeader) erfordern Anpassungen, falls andere Dateien noch darauf referenzieren. Kommentar-System-API intern geändert (neue Hooks useComments, useNewComment, useCommentEditing) — externe Integrationen prüfen. EventDialog: Änderungen an Datum/Timezone-Handling und an übergebenen Props — API-Shape prüfen. Server-/API-Contracts: Einige Fetch- und Request/Response-Shapes könnten angepasst worden sein; Endpunkte wie /api/diary, /api/calendar sollten validiert werden. Empfohlene Upgrade- / Merge-Checkliste (unbedingt durchgehen) Lokaler Build & Typscript-Check: npm/yarn install tsc (oder next build) ausführen und alle Typfehler beheben. Lint & Tests ausführen (falls vorhanden). Suchen und aktualisieren: Alle Importe von gelöschten/verschobenen Komponenten (z. B. DiaryHeader). Stellen, die direkte Komponenten-Props aufrufen, die jetzt Hooks erwarten. API-Kompatibilität prüfen: /api/diary, /api/df-calendar, /api/kfz-calendar — Request/Response-Shape testen. Funktionaler Smoke-Test: DF-Calendar: Laden, Drag/Drop, Create, Edit, Delete, URL-Highlight. KFZ-Calendar: Laden, Konflikt-Szenarien simulieren (Fahrzeug-Konflikte), Dialog-Interaktionen. Diary: Einträge listen, erstellen, editieren, kommentieren, Reactions, Archiv-Funktionen, Fehlerfälle (ErrorBoundary). UI/Design-Checks: Mobile-Breakpoints (Toolbar, Dialog-Layouts). Dialog-Breiten (sm:max-w-2xl) prüfen. Performance-Checks: VirtualizedDiaryList Verhalten bei großen Datenmengen. Review-Bereiche: Stellen, die zuvor Inline-Logik hatten, jetzt auf Hooks umgestellt — sicherstellen, dass Abhängigkeiten korrekt sind. Update Dokumentation (README / Komponenten-Docs), besonders zu neuen Hooks und Prop-Änderungen. Wichtige Dateien (Auswahl) Neu hinzugefügt: app/(df)/df-calendar/_components/DFCalendarHeader.tsx app/(df)/df-calendar/_components/DFCalendarContent.tsx app/(df)/df-calendar/_hooks/useDFCalendarLogic.ts app/(df)/diary/_components/* (große Menge, siehe Release-Branch) app/(df)/diary/_hooks/{useComments,useNewComment,useDiaryActions,useDiaryData,useRetryableFetch}.ts app/(kfz)/kfz-calendar/_hooks/useKfzCalendarLogic.ts app/(kfz)/kfz-calendar/_components/* Wesentlich geändert: app/(df)/df-calendar/page.tsx app/(kfz)/kfz-calendar/page.tsx Mehrere EventDialog-Komponenten (DF / KFZ) Entfernt: app/(df)/diary/_components/DiaryHeader.tsx Weitere kleinere Dateien ersetzt/entfernt durch neue Implementierungen Kurzer Release-Note-Text (für Release-Post / interne Ankündigung) Großes Refactor: Kalender- und Tagebuch-Subsysteme wurden modularisiert und auf Custom Hooks umgestellt. Das Tagebuch erhielt ein komplett neues Kommentar- und Reactions-System, eine virtualisierte Liste für Performance sowie bessere Fehlerbehandlung. Viele UI-Komponenten sind neu strukturiert — beim Upgrade sind manuelle Anpassungen nötig (Props & Imports). Bitte vor Release lokal bauen, testen und die API-Verträge prüfen.
cursor[bot] (Migrated from github.com) reviewed 2025-10-08 08:03:09 +02:00
cursor[bot] (Migrated from github.com) left a comment

This PR is being reviewed by Cursor Bugbot

Details

You are on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle.

To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.

### This PR is being reviewed by Cursor Bugbot <details> <summary>Details</summary> You are on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle. To receive Bugbot reviews on all of your PRs, visit the [Cursor dashboard](https://www.cursor.com/dashboard?tab=bugbot) to activate Pro and start your 14-day free trial. </details>
@ -438,139 +246,311 @@ export function DiaryEntryDialog({
</DialogDescription>
cursor[bot] (Migrated from github.com) commented 2025-10-08 08:03:09 +02:00

Bug: Diary Entry Dialog Fails to Handle Multiple Mentions

The mention handling logic in DiaryEntryDialog incorrectly merges mentions. It deduplicates by userId and updates existing entries, which can lead to losing specific mention instances or their positional data when a user is mentioned multiple times in the text.

Fix in Cursor Fix in Web

### Bug: Diary Entry Dialog Fails to Handle Multiple Mentions <!-- **Medium Severity** --> <!-- DESCRIPTION START --> The mention handling logic in `DiaryEntryDialog` incorrectly merges mentions. It deduplicates by `userId` and updates existing entries, which can lead to losing specific mention instances or their positional data when a user is mentioned multiple times in the text. <!-- DESCRIPTION END --> <!-- LOCATIONS START app/(df)/diary/_components/DiaryEntryDialog.tsx#L310-L337 LOCATIONS END --> <a href="https://cursor.com/open?data=eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6ImJ1Z2JvdC12MSJ9.eyJ2ZXJzaW9uIjoxLCJ0eXBlIjoiQlVHQk9UX0ZJWF9JTl9DVVJTT1IiLCJkYXRhIjp7InJlZGlzS2V5IjoiYnVnYm90OjhjNGM0MjFjLTUxNzAtNGUwZS1hMWM1LWY0OTM1ZDJmNDJhZiIsImVuY3J5cHRpb25LZXkiOiJFT0I0RVdDeHh3VEFUcWN6YnZZb3RvZVFIS3BncUYtY3kyZVNKbmhITlljIiwiYnJhbmNoIjoiMjAyNTEwMDMtVmVyYmVzc2VydW5nZW4ifSwiaWF0IjoxNzU5OTAzMzg4LCJleHAiOjE3NjA1MDgxODh9.GzgB63DeWdkEG2NLPw2rtFmTjD1fIVvQd22OewZO8zBaG4NkXqYkJg69IcZ5RfZlUk-wH6A8oTvC4MUHRIDQL9LingmXdvK_-34TneiLmKuoQwVG9JZBW3439PKgalAIM3iyQG36I9VL2uhukcQ7Yvxweow-tBBspLjxscYVwwbW-quzSEBdVia61_cY83KUskG3f9g7HVyyBRW5CLNItX-FIJPNyI_LYCXfhQ7JJlVLLDbBdnyymeAVXEcJAxwiSJ1ptgl1ZZcAzlZjnU7kS_hRaSyOJQ6HmJoNPvlMNt6--nwFBlJK5A8EswBil4K2wWNzFzV5QR8uTG51tntX-Q"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/fix-in-cursor-dark.svg"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/fix-in-cursor-light.svg"><img alt="Fix in Cursor" src="https://cursor.com/fix-in-cursor.svg"></picture></a>&nbsp;<a href="https://cursor.com/agents?data=eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6ImJ1Z2JvdC12MSJ9.eyJ2ZXJzaW9uIjoxLCJ0eXBlIjoiQlVHQk9UX0ZJWF9JTl9XRUIiLCJkYXRhIjp7InJlZGlzS2V5IjoiYnVnYm90OjhjNGM0MjFjLTUxNzAtNGUwZS1hMWM1LWY0OTM1ZDJmNDJhZiIsImVuY3J5cHRpb25LZXkiOiJFT0I0RVdDeHh3VEFUcWN6YnZZb3RvZVFIS3BncUYtY3kyZVNKbmhITlljIiwiYnJhbmNoIjoiMjAyNTEwMDMtVmVyYmVzc2VydW5nZW4iLCJyZXBvT3duZXIiOiJrb2ZpMTk5MCIsInJlcG9OYW1lIjoiREZUb29sIiwicHJOdW1iZXIiOjI0LCJjb21taXRTaGEiOiIzYTY4MDQ4YTYxZTI3ZmJlZmRhYzJiOGY2NWM5NTI0MWViOTc4NDUyIn0sImlhdCI6MTc1OTkwMzM4OCwiZXhwIjoxNzYwNTA4MTg4fQ.C-B9jmYkvx_8T1Nh8WjjGIA-eXY8RRK0XtBCg3ExPko5asq2huNiBIyO0hlouOTgXj09zYWY1ns93owUJk8nKUJJbuOkXhsH4st_VlGd9G85bOmufuZjaaS8PR-lba0LyvE2X4UcSl-qw6qYA4Cni5oBSj2aSqeO6cFvNrxC4gp7BWwKB4U4RuI-1qr_q1_Fg6DK69JuiLl936Pwm8ZQjWiIU483PGfRQAdSDUI3Uby1cUiaPN5FKogFd140g7jH6JLjNB2qLqOTsARDQI64vUajVuySjq6KxwKioXVkotej5ijlsVTfrclIPPgcFtvNEo-6BOjZ7nlBWbCnw6KEBQ"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/fix-in-web-dark.svg"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/fix-in-web-light.svg"><img alt="Fix in Web" src="https://cursor.com/fix-in-web.svg"></picture></a>
@ -71,3 +70,4 @@
const mentionStart = before.length + 1;
const mentionEnd = mentionStart + mentionText.length;
const nextMentions = [
cursor[bot] (Migrated from github.com) commented 2025-10-08 08:03:08 +02:00

Bug: Mention Insertion Causes Inconsistent Spacing

The mention insertion logic adds a space after the mention, which contradicts the comment and can lead to inconsistent spacing. This occurs because leading whitespace from the subsequent text is removed, but a space is always re-added. The caret position after insertion may also be incorrect.

Fix in Cursor Fix in Web

### Bug: Mention Insertion Causes Inconsistent Spacing <!-- **Medium Severity** --> <!-- DESCRIPTION START --> The mention insertion logic adds a space after the mention, which contradicts the comment and can lead to inconsistent spacing. This occurs because leading whitespace from the subsequent text is removed, but a space is always re-added. The caret position after insertion may also be incorrect. <!-- DESCRIPTION END --> <!-- LOCATIONS START app/(df)/diary/_components/RichTextarea.tsx#L67-L71 LOCATIONS END --> <a href="https://cursor.com/open?data=eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6ImJ1Z2JvdC12MSJ9.eyJ2ZXJzaW9uIjoxLCJ0eXBlIjoiQlVHQk9UX0ZJWF9JTl9DVVJTT1IiLCJkYXRhIjp7InJlZGlzS2V5IjoiYnVnYm90Ojc4NWI3ODkwLWY2NjMtNDNiMC1iYmUxLTVhOGE5NTVkNjljNyIsImVuY3J5cHRpb25LZXkiOiJDU3VobElQelRpbTRmS1cxTENnTUJyNHZBWFBkLUNFekJjN1dnTGV0UVkwIiwiYnJhbmNoIjoiMjAyNTEwMDMtVmVyYmVzc2VydW5nZW4ifSwiaWF0IjoxNzU5OTAzMzg4LCJleHAiOjE3NjA1MDgxODh9.YzcK5KdDqOzIThfEHElVaOruN7dWxh5EPJtRM9BZQAusxQqi5gISXNg3YTNeVz814oh2Rz5OjmcFYtldu1uvIAeT9a86q6IYOzIdjF1aX4eQlsm-qm7eemypPukPMaQdgGUzWoEfqSc261V5ZzC0MTXblWDnXQtvvZi_6Bb9R4oC8QLscSxjeK9LMKFt2kNcKSvr2UQwHHsXpc81FYCE1rEHSc-s5mDcr6IE8yIIbOj71phrkG4YXc-a1KIQpMI06n2fHRYrD4sf7AYHcXn_C5Sy70TRG3xYGCVrjKB_6cjaMLjXmHCY0H_ECKfmNPNYwiBm_PjtVWT-Q1tnTBSCxw"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/fix-in-cursor-dark.svg"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/fix-in-cursor-light.svg"><img alt="Fix in Cursor" src="https://cursor.com/fix-in-cursor.svg"></picture></a>&nbsp;<a href="https://cursor.com/agents?data=eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6ImJ1Z2JvdC12MSJ9.eyJ2ZXJzaW9uIjoxLCJ0eXBlIjoiQlVHQk9UX0ZJWF9JTl9XRUIiLCJkYXRhIjp7InJlZGlzS2V5IjoiYnVnYm90Ojc4NWI3ODkwLWY2NjMtNDNiMC1iYmUxLTVhOGE5NTVkNjljNyIsImVuY3J5cHRpb25LZXkiOiJDU3VobElQelRpbTRmS1cxTENnTUJyNHZBWFBkLUNFekJjN1dnTGV0UVkwIiwiYnJhbmNoIjoiMjAyNTEwMDMtVmVyYmVzc2VydW5nZW4iLCJyZXBvT3duZXIiOiJrb2ZpMTk5MCIsInJlcG9OYW1lIjoiREZUb29sIiwicHJOdW1iZXIiOjI0LCJjb21taXRTaGEiOiIzYTY4MDQ4YTYxZTI3ZmJlZmRhYzJiOGY2NWM5NTI0MWViOTc4NDUyIn0sImlhdCI6MTc1OTkwMzM4OCwiZXhwIjoxNzYwNTA4MTg4fQ.eaYrMBKxrbRvG6g2vXqfG5riEEv12JC_BGdidAWE9sJVp8CpFNCprJSpx7xgOdHgDuFfz6RxFtn3tiPReJJt3Un--UV-qJs_I_cyz78z4igHtddGj1G_32I0o9Ev_5jlrIOlbX074HDGyXnFgQ05YITMSMXEJLI7aZ_TM3A10d_LfO5mXr8z7gunvqOarIkHCEdWExYbWcnIdOF8HeONKlp7RHFDgpvqjIDoTBbkumi9EL7O7V5RzG8tzf1eHxuxFmA8fimDQHHm6GyPkU0o-AMsTEHKObzldYjA1lktGpYpEZyOuq9-ajE7-QJqHmfk5oNidVICEtO8VOoB03V1QQ"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/fix-in-web-dark.svg"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/fix-in-web-light.svg"><img alt="Fix in Web" src="https://cursor.com/fix-in-web.svg"></picture></a>
cursor[bot] (Migrated from github.com) commented 2025-10-08 08:03:08 +02:00

Bug: Event Timezone Handling Regression

New event creation in EventDialog.tsx initializes start and end dates without timezone awareness. This change removes previous timezone handling, potentially leading to incorrect event times, especially around daylight saving or for users in different timezones.

Fix in Cursor Fix in Web

### Bug: Event Timezone Handling Regression <!-- **High Severity** --> <!-- DESCRIPTION START --> New event creation in `EventDialog.tsx` initializes `start` and `end` dates without timezone awareness. This change removes previous timezone handling, potentially leading to incorrect event times, especially around daylight saving or for users in different timezones. <!-- DESCRIPTION END --> <!-- LOCATIONS START app/(kfz)/kfz-calendar/_components/EventDialog.tsx#L581-L590 LOCATIONS END --> <a href="https://cursor.com/open?data=eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6ImJ1Z2JvdC12MSJ9.eyJ2ZXJzaW9uIjoxLCJ0eXBlIjoiQlVHQk9UX0ZJWF9JTl9DVVJTT1IiLCJkYXRhIjp7InJlZGlzS2V5IjoiYnVnYm90OmRiNDM2M2IzLWE3ZWQtNGUzNi04NTY4LWU0YmE2OGM0NTk5MSIsImVuY3J5cHRpb25LZXkiOiJwTWZyY3ppdVlEZm5KbzZUZWVLVU9XdElYaEFBZzl2cEtYa2hOR2hTaGNFIiwiYnJhbmNoIjoiMjAyNTEwMDMtVmVyYmVzc2VydW5nZW4ifSwiaWF0IjoxNzU5OTAzMzg4LCJleHAiOjE3NjA1MDgxODh9.PdKUUHfntTn01Ov6ESkgfhzLxdBMQ7o1Rg2dI5qmU5Je0rDkLA06snN1LMBCL7TollGjRKNIiNNLMMXh5wQsAHutoZlkY-rXh-pRMPl20nSTPjn9zwqMNtKP_ClmDFK6reL4ASVmdikBgZYJBEg50cJnoS4SKOEVl5YWQjMGPp8ynfflQQMCD1Kg5j1aqWm96cw7HDmiidCbf3CItsLB9SZzX5bUU37Ya1NghsoZLw2ZujfMtUZDcmeTc8AVK7-vUiebqGAdCuUE7xIi4x_kxgPYY2AZfy2zbt8_8KxH0NwbZpwdvg2xyr49dlLOEsjK7ru1hIyeTwP6pOymSMrdsw"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/fix-in-cursor-dark.svg"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/fix-in-cursor-light.svg"><img alt="Fix in Cursor" src="https://cursor.com/fix-in-cursor.svg"></picture></a>&nbsp;<a href="https://cursor.com/agents?data=eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6ImJ1Z2JvdC12MSJ9.eyJ2ZXJzaW9uIjoxLCJ0eXBlIjoiQlVHQk9UX0ZJWF9JTl9XRUIiLCJkYXRhIjp7InJlZGlzS2V5IjoiYnVnYm90OmRiNDM2M2IzLWE3ZWQtNGUzNi04NTY4LWU0YmE2OGM0NTk5MSIsImVuY3J5cHRpb25LZXkiOiJwTWZyY3ppdVlEZm5KbzZUZWVLVU9XdElYaEFBZzl2cEtYa2hOR2hTaGNFIiwiYnJhbmNoIjoiMjAyNTEwMDMtVmVyYmVzc2VydW5nZW4iLCJyZXBvT3duZXIiOiJrb2ZpMTk5MCIsInJlcG9OYW1lIjoiREZUb29sIiwicHJOdW1iZXIiOjI0LCJjb21taXRTaGEiOiIzYTY4MDQ4YTYxZTI3ZmJlZmRhYzJiOGY2NWM5NTI0MWViOTc4NDUyIn0sImlhdCI6MTc1OTkwMzM4OCwiZXhwIjoxNzYwNTA4MTg4fQ.bji_4NdtrXT7DQjCdwlEht12tyrCD8GWk1dSv0ZYYfushpBCSltN6nDikGFPOXNtV4SLMOWfBCj6Q937AQP7qdV7WrAAjFdGhX-WWqzqT1bELztzPAlHqZDtDH9YhwwBEVQ8siHA7RFa7qFNfztZYorL1dT7e4jGnW77JUzJsuMOkI7om7EyMgN0V1AMv_g7T4jLy1wARKjvCRroJldu-0Qiy7RifcLsvUN423BZkS-wv4Edz5BWFb1ZYiDyqP6sNKYGqYGpe13_3ETVQhxYjeIYMj5MgMGBcHC5-Ad1vBBL1ifP_9rtQ7-GodClTohI264ULJw_D1afLLiWMvG4ag"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/fix-in-web-dark.svg"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/fix-in-web-light.svg"><img alt="Fix in Web" src="https://cursor.com/fix-in-web.svg"></picture></a>
@ -0,0 +142,4 @@
const r = parseInt(normalizedHex.substring(0, 2), 16);
const g = parseInt(normalizedHex.substring(2, 4), 16);
const b = parseInt(normalizedHex.substring(4, 6), 16);
const brightness = (r * 299 + g * 587 + b * 114) / 1000;
cursor[bot] (Migrated from github.com) commented 2025-10-08 08:03:08 +02:00

Bug: Hex Color Parsing Fails for Short Codes

The hex color parsing logic for r, g, and b implicitly assumes a 6-character hex string. This causes incorrect color calculations when processing 3-character hex codes (e.g., #f00), as substring(2, 4) and substring(4, 6) will not correctly extract the green and blue components.

Fix in Cursor Fix in Web

### Bug: Hex Color Parsing Fails for Short Codes <!-- **Medium Severity** --> <!-- DESCRIPTION START --> The hex color parsing logic for `r`, `g`, and `b` implicitly assumes a 6-character hex string. This causes incorrect color calculations when processing 3-character hex codes (e.g., `#f00`), as `substring(2, 4)` and `substring(4, 6)` will not correctly extract the green and blue components. <!-- DESCRIPTION END --> <!-- LOCATIONS START app/(kfz)/kfz-calendar/_components/KfzCalendarContent.tsx#L131-L135 LOCATIONS END --> <a href="https://cursor.com/open?data=eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6ImJ1Z2JvdC12MSJ9.eyJ2ZXJzaW9uIjoxLCJ0eXBlIjoiQlVHQk9UX0ZJWF9JTl9DVVJTT1IiLCJkYXRhIjp7InJlZGlzS2V5IjoiYnVnYm90OjAxYzRjYmMzLTU0ZmItNGYyNi1hZDhmLWIwMTZmOWNhYjQ0MCIsImVuY3J5cHRpb25LZXkiOiJaWHpKdi1qWWRpeUVYY3FPZjRUX1YwWnFYeW96dU45UUQ4bEJFeEN4RC1FIiwiYnJhbmNoIjoiMjAyNTEwMDMtVmVyYmVzc2VydW5nZW4ifSwiaWF0IjoxNzU5OTAzMzg4LCJleHAiOjE3NjA1MDgxODh9.gLz0QE3sX9rzvw_Rlb4Q691nP9jtIQotRouQZFNDZEkQJqojZx5-DR-vx7cCbY2CdAsItMJB5OC_zHLldQqR4PVS2d8LotOHf_zEv1tqCVJFGkEI-c5qSbJhc4w9mjAYH6ROHzByAsXRPYYA7I6gWTqPJRgxXdX8C_YDqFlNqSvmJGc6e3luMbcwleIOiQHcWOYBm3O0cOz8H4Jz8IuaR8knDjhx2wKTt0xvygEeztXhU7BC2ZgnLoECHpXVzj6f-1aRa3Fr-E791zXLgX9IX1Om85gpESRBZOa1PHfo-w6xOS2VdG9HGTxKpiO4FjmPAjTgW2Lwc7CsmlO2EebigA"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/fix-in-cursor-dark.svg"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/fix-in-cursor-light.svg"><img alt="Fix in Cursor" src="https://cursor.com/fix-in-cursor.svg"></picture></a>&nbsp;<a href="https://cursor.com/agents?data=eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6ImJ1Z2JvdC12MSJ9.eyJ2ZXJzaW9uIjoxLCJ0eXBlIjoiQlVHQk9UX0ZJWF9JTl9XRUIiLCJkYXRhIjp7InJlZGlzS2V5IjoiYnVnYm90OjAxYzRjYmMzLTU0ZmItNGYyNi1hZDhmLWIwMTZmOWNhYjQ0MCIsImVuY3J5cHRpb25LZXkiOiJaWHpKdi1qWWRpeUVYY3FPZjRUX1YwWnFYeW96dU45UUQ4bEJFeEN4RC1FIiwiYnJhbmNoIjoiMjAyNTEwMDMtVmVyYmVzc2VydW5nZW4iLCJyZXBvT3duZXIiOiJrb2ZpMTk5MCIsInJlcG9OYW1lIjoiREZUb29sIiwicHJOdW1iZXIiOjI0LCJjb21taXRTaGEiOiIzYTY4MDQ4YTYxZTI3ZmJlZmRhYzJiOGY2NWM5NTI0MWViOTc4NDUyIn0sImlhdCI6MTc1OTkwMzM4OCwiZXhwIjoxNzYwNTA4MTg4fQ.NBGpjzx5cs9VKOBavqc_H_lER-1SSP8WZSNItYSMMMp3c3lPyUVxLXTbL68IUzEP3xLXwocEFsvVlsymvRRJToBrRnP_Mj3_ZY_eyCAwojvf3UhPNUcVwromxD2D6sCSV-Xkh1UYiqQQrmEhGPkSJXvM_BUf4rzeYoEXjHqnxr_U8b7fzjBDKIzBWKkmreZo-fQ3-ttyoHziLgbHl5W7YRj64FAITOKyLEnqmOLHud1cCedAwIuldiL27oXvyz5p_yEoy_gc4UxWoVdmTgd0j4aIrMM5D9huBJHwZFuhosURmCRw1sBJ9lpg0Ze3nRJM79w6YFoxHK7bFVCEJki5dQ"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/fix-in-web-dark.svg"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/fix-in-web-light.svg"><img alt="Fix in Web" src="https://cursor.com/fix-in-web.svg"></picture></a>
cursor[bot] (Migrated from github.com) reviewed 2025-10-08 08:17:26 +02:00
@ -178,7 +178,7 @@ export default function RichTextarea({
disabled={disabled}
cursor[bot] (Migrated from github.com) commented 2025-10-08 08:17:26 +02:00

Bug: RichTextarea Focus Indicator Missing

The RichTextarea component's focus-visible styling now only changes the border instead of showing a distinct ring. This removes the visual focus indicator, which can impact accessibility for keyboard navigation.

Fix in Cursor Fix in Web

### Bug: RichTextarea Focus Indicator Missing <!-- **Medium Severity** --> <!-- DESCRIPTION START --> The `RichTextarea` component's `focus-visible` styling now only changes the border instead of showing a distinct ring. This removes the visual focus indicator, which can impact accessibility for keyboard navigation. <!-- DESCRIPTION END --> <!-- LOCATIONS START app/(df)/diary/_components/RichTextarea.tsx#L170-L182 LOCATIONS END --> <a href="https://cursor.com/open?data=eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6ImJ1Z2JvdC12MSJ9.eyJ2ZXJzaW9uIjoxLCJ0eXBlIjoiQlVHQk9UX0ZJWF9JTl9DVVJTT1IiLCJkYXRhIjp7InJlZGlzS2V5IjoiYnVnYm90Ojc1NWNhMmJmLTY0YzMtNGY0My04Y2NhLTc5NDBlYmI4Nzk2NCIsImVuY3J5cHRpb25LZXkiOiJTVDJqOEhkNkpWOXQxSmxNNjJSTjF6ckhJOVVSUHB0XzE0UEJLbjZ6UTRnIiwiYnJhbmNoIjoiMjAyNTEwMDMtVmVyYmVzc2VydW5nZW4ifSwiaWF0IjoxNzU5OTA0MjQ2LCJleHAiOjE3NjA1MDkwNDZ9.YHywt4LFHGlBwKpCDgh--YbPmSxcNhkT7GS66obS8AypVHZJqeICs-WMkMtYVeEiJmNlNLV5y-F0tAvtl3ZuJyzB6vmK_EMxPevscx6NZLZapetCgcK-A4Tc1b-Ud_aXqK-3T_ESmclyZVoaY20C66ZRvPJwdKW2Fd9dFrfH7GJwr4IO9C6eI7NAi0yeN9bqBRS6opwzN_EfMbV_kcjA6X6DHre5sf9xwjiphp0_ARoldmWMmXA3UBsWxFgLCQo6gwgUDpQweN05YArr0TmlrhM9WT05sQ1S_LnmkEqqfXxQMHx01DqZHI2BwX6UwSH1BfUjc8bwNPamE0Mr__SuhA"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/fix-in-cursor-dark.svg"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/fix-in-cursor-light.svg"><img alt="Fix in Cursor" src="https://cursor.com/fix-in-cursor.svg"></picture></a>&nbsp;<a href="https://cursor.com/agents?data=eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6ImJ1Z2JvdC12MSJ9.eyJ2ZXJzaW9uIjoxLCJ0eXBlIjoiQlVHQk9UX0ZJWF9JTl9XRUIiLCJkYXRhIjp7InJlZGlzS2V5IjoiYnVnYm90Ojc1NWNhMmJmLTY0YzMtNGY0My04Y2NhLTc5NDBlYmI4Nzk2NCIsImVuY3J5cHRpb25LZXkiOiJTVDJqOEhkNkpWOXQxSmxNNjJSTjF6ckhJOVVSUHB0XzE0UEJLbjZ6UTRnIiwiYnJhbmNoIjoiMjAyNTEwMDMtVmVyYmVzc2VydW5nZW4iLCJyZXBvT3duZXIiOiJrb2ZpMTk5MCIsInJlcG9OYW1lIjoiREZUb29sIiwicHJOdW1iZXIiOjI0LCJjb21taXRTaGEiOiI3M2RjZjgxNGQwNTczMDMwZmFjM2MxYmQ3NzA4NTcyNzYxYjEyYTU1In0sImlhdCI6MTc1OTkwNDI0NiwiZXhwIjoxNzYwNTA5MDQ2fQ.REZhmwkAXU701dBjjIuJX0Y6g4ywMb2K1rt066i5qNjsf-WLJJmrH_1o3ZWgKSmY_tDCGoX9goMtVqqEAEBdiDm5kv3lwqgyIlI9QTVUPrf3hsYOeH3v2nxrPRSzpjQ7RIDakPZGY52pf8K2L6PFwbMqUfiJULsacbZ-cuyMRrvX5OPZsckJorNpxtarylhqYgcb582LRRP_lc3cWEqij3mAswEpZjZeCOWGGRR9s0aUITIWr9_oYeeLg1kVTST6ls9G_eA8cVCwcsjXrM7wOaNcYUWeod6-yRW6lptSx-yC-wly6q27NqRZHS9ioxU78UvsAUD7axpfQOl3t4Ogtg"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/fix-in-web-dark.svg"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/fix-in-web-light.svg"><img alt="Fix in Web" src="https://cursor.com/fix-in-web.svg"></picture></a>
cursor[bot] (Migrated from github.com) reviewed 2025-10-08 08:25:54 +02:00
cursor[bot] (Migrated from github.com) left a comment

Bug: Permission Prop Misuse Causes Button Disablement

The canCreate prop, which expects a permission string, is being called without its argument in the "New Entry" button's disabled prop. It's also passed incorrectly to DiaryEmptyState for both "today" and "archive" tabs. This causes permission checks to fail, leading to the create entry buttons being unexpectedly disabled.

app/(df)/diary/_components/DiaryContent.tsx#L108-L109

5f09921d6c/app/(df)/diary/_components/DiaryContent.tsx#L108-L109

app/(df)/diary/_components/DiaryContent.tsx#L121-L122

5f09921d6c/app/(df)/diary/_components/DiaryContent.tsx#L121-L122

app/(df)/diary/_components/DiaryContent.tsx#L144-L145

5f09921d6c/app/(df)/diary/_components/DiaryContent.tsx#L144-L145

app/(df)/diary/_components/DiaryEmptyState.tsx#L121-L146

5f09921d6c/app/(df)/diary/_components/DiaryEmptyState.tsx#L121-L146

Fix in Cursor Fix in Web


<details open> <summary><h3>Bug: Permission Prop Misuse Causes Button Disablement</h3></summary> The `canCreate` prop, which expects a permission string, is being called without its argument in the "New Entry" button's `disabled` prop. It's also passed incorrectly to `DiaryEmptyState` for both "today" and "archive" tabs. This causes permission checks to fail, leading to the create entry buttons being unexpectedly disabled. <p></p> <details> <summary><code>app/(df)/diary/_components/DiaryContent.tsx#L108-L109</code></summary> https://github.com/kofi1990/DFTool/blob/5f09921d6c770fccf6c5d91e92cf52d22c603f2d/app/(df)/diary/_components/DiaryContent.tsx#L108-L109 </details> <details> <summary><code>app/(df)/diary/_components/DiaryContent.tsx#L121-L122</code></summary> https://github.com/kofi1990/DFTool/blob/5f09921d6c770fccf6c5d91e92cf52d22c603f2d/app/(df)/diary/_components/DiaryContent.tsx#L121-L122 </details> <details> <summary><code>app/(df)/diary/_components/DiaryContent.tsx#L144-L145</code></summary> https://github.com/kofi1990/DFTool/blob/5f09921d6c770fccf6c5d91e92cf52d22c603f2d/app/(df)/diary/_components/DiaryContent.tsx#L144-L145 </details> <details> <summary><code>app/(df)/diary/_components/DiaryEmptyState.tsx#L121-L146</code></summary> https://github.com/kofi1990/DFTool/blob/5f09921d6c770fccf6c5d91e92cf52d22c603f2d/app/(df)/diary/_components/DiaryEmptyState.tsx#L121-L146 </details> <a href="https://cursor.com/open?data=eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6ImJ1Z2JvdC12MSJ9.eyJ2ZXJzaW9uIjoxLCJ0eXBlIjoiQlVHQk9UX0ZJWF9JTl9DVVJTT1IiLCJkYXRhIjp7InJlZGlzS2V5IjoiYnVnYm90OmExYmQ2ZmMyLTA0NTUtNDljZC1hNTQ1LTQxOWE0MWNjMzhjZCIsImVuY3J5cHRpb25LZXkiOiJoOGFtbDFDb0ZuMVpZZWVQVHd2U2I2cGU5cTNRektIRGJmZmUxaVZENTJjIiwiYnJhbmNoIjoiMjAyNTEwMDMtVmVyYmVzc2VydW5nZW4ifSwiaWF0IjoxNzU5OTA0NzUzLCJleHAiOjE3NjA1MDk1NTN9.XZer7hZ8XzZvmYiNKEXtGMCA8m176nkXDMRP49t4AtDfOL3fqhvMUf9v_R9LUBYhSfdLQnWksWQXyoy_1uL6k46WSCrQmeVJmzDlF2enC1p1Kuj3jLIQ3B0a8ptkndMTNHS7LpsxQ_ht7kOIFT3BPXbgwaNd9tOrHawwq2w_ktgXIE9Xq1wd6xN1M15fLf5SLSyb_-dmS7IXA6fhUvW0ipAXIvDs7d3PlobEngJ8ynsZMbnJ973HWukllSZFVcZCm-vSl4mGOYAbEXKATUrxm6vS-JR_qtmmWA1vIhr_pB-XDpGheRpFtk9mAys04Uktl8H2-baVgZxN0LWF8_H6MA"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/fix-in-cursor-dark.svg"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/fix-in-cursor-light.svg"><img alt="Fix in Cursor" src="https://cursor.com/fix-in-cursor.svg"></picture></a>&nbsp;<a href="https://cursor.com/agents?data=eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6ImJ1Z2JvdC12MSJ9.eyJ2ZXJzaW9uIjoxLCJ0eXBlIjoiQlVHQk9UX0ZJWF9JTl9XRUIiLCJkYXRhIjp7InJlZGlzS2V5IjoiYnVnYm90OmExYmQ2ZmMyLTA0NTUtNDljZC1hNTQ1LTQxOWE0MWNjMzhjZCIsImVuY3J5cHRpb25LZXkiOiJoOGFtbDFDb0ZuMVpZZWVQVHd2U2I2cGU5cTNRektIRGJmZmUxaVZENTJjIiwiYnJhbmNoIjoiMjAyNTEwMDMtVmVyYmVzc2VydW5nZW4iLCJyZXBvT3duZXIiOiJrb2ZpMTk5MCIsInJlcG9OYW1lIjoiREZUb29sIiwicHJOdW1iZXIiOjI0LCJjb21taXRTaGEiOiI1ZjA5OTIxZDZjNzcwZmNjZjZjNWQ5MWU5MmNmNTJkMjJjNjAzZjJkIn0sImlhdCI6MTc1OTkwNDc1MywiZXhwIjoxNzYwNTA5NTUzfQ.EZNBURColKZIby51y0z8qBqXWSyHbdRJzgGxoP3WC1-JSTts5YOjqmLqBPb8T7fuy0rCb8v5wIMUenjXdn0K-c0jv1lvqwi20F3R7JZLFzm5CfNM9MymQshybisvhAUmY5qXIczppiZZM5KE0VqzGoiugdbZeziJ7jHXesoF0wlYAnTWB2aJNPKlGl6rjDCzYl7ejIcvP5ogkDkx9nFATPCs4RpjqZxkepcfACqZzDWGeFIX-Kz9WqQctaJC0BkJyYoSOJpH1cy9WDPClDv27xVH9uz8u6IEHIsQBT8KF0ACssQfPOysZqcF5tX0B45cuUUue4HKLxPELYqB-C5tUA"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/fix-in-web-dark.svg"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/fix-in-web-light.svg"><img alt="Fix in Web" src="https://cursor.com/fix-in-web.svg"></picture></a> </details> ---
cursor[bot] (Migrated from github.com) commented 2025-10-08 08:25:54 +02:00

Bug: Mention Deduplication Logic Causes Errors

The mention deduplication logic is overly complex and may lead to incorrect behavior or performance issues. Specifically, using undefined for startIndex/endIndex in manual mentions can cause comparison and deduplication errors.

Additional Locations (1)

Fix in Cursor Fix in Web

### Bug: Mention Deduplication Logic Causes Errors <!-- **Medium Severity** --> <!-- DESCRIPTION START --> The mention deduplication logic is overly complex and may lead to incorrect behavior or performance issues. Specifically, using `undefined` for `startIndex`/`endIndex` in manual mentions can cause comparison and deduplication errors. <!-- DESCRIPTION END --> <!-- LOCATIONS START app/(df)/diary/_components/DiaryEntryDialog.tsx#L324-L410 app/(df)/diary/_components/DiaryEntryDialog.tsx#L510-L512 LOCATIONS END --> <details> <summary>Additional Locations (1)</summary> - [`app/(df)/diary/_components/DiaryEntryDialog.tsx#L510-L512`](https://github.com/kofi1990/DFTool/blob/5f09921d6c770fccf6c5d91e92cf52d22c603f2d/app/(df)/diary/_components/DiaryEntryDialog.tsx#L510-L512) </details> <a href="https://cursor.com/open?data=eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6ImJ1Z2JvdC12MSJ9.eyJ2ZXJzaW9uIjoxLCJ0eXBlIjoiQlVHQk9UX0ZJWF9JTl9DVVJTT1IiLCJkYXRhIjp7InJlZGlzS2V5IjoiYnVnYm90OjRjMWNiOTFlLTUwZGUtNGRiZC1iYzAyLWI1NmJjYzNiYTE1YiIsImVuY3J5cHRpb25LZXkiOiJnR3ZDMVVUaEJNOWpMaDhsa1dsczFNenNOb2syS1dDTHpyakdaVERMZ01vIiwiYnJhbmNoIjoiMjAyNTEwMDMtVmVyYmVzc2VydW5nZW4ifSwiaWF0IjoxNzU5OTA0NzUzLCJleHAiOjE3NjA1MDk1NTN9.Kw3aSeR0uvHwYnlF9FguylltWuQKhUTLJl_zFjnkTqU2BBXLse-5xUrmgw7U5kkczUDFVIE4GE4Qmx_n62Z0Pmk1dAY-RjdhLwIPGef6XRBKdzsJUOBicXXn4xa-1GLrMzw4nuvLyjYx3AdX6mEjGwKs6ZObeepCslpL0aJjGTdRw4WHB7P-uyXQ3DW6vPGDvofDKpgEkmeKNhVit9PWVs7Fts-aYFfBXPzjh0WYsv7UchpbOBbswooiOVxM5wTPKVRb3rcTDfp9pD20QYq6djPFYVJ06EIGmLEdSUfobP8vrapIgNXf3KxoFpm5GjhSZanjuMocdt9Q-lBXTe_TWQ"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/fix-in-cursor-dark.svg"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/fix-in-cursor-light.svg"><img alt="Fix in Cursor" src="https://cursor.com/fix-in-cursor.svg"></picture></a>&nbsp;<a href="https://cursor.com/agents?data=eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6ImJ1Z2JvdC12MSJ9.eyJ2ZXJzaW9uIjoxLCJ0eXBlIjoiQlVHQk9UX0ZJWF9JTl9XRUIiLCJkYXRhIjp7InJlZGlzS2V5IjoiYnVnYm90OjRjMWNiOTFlLTUwZGUtNGRiZC1iYzAyLWI1NmJjYzNiYTE1YiIsImVuY3J5cHRpb25LZXkiOiJnR3ZDMVVUaEJNOWpMaDhsa1dsczFNenNOb2syS1dDTHpyakdaVERMZ01vIiwiYnJhbmNoIjoiMjAyNTEwMDMtVmVyYmVzc2VydW5nZW4iLCJyZXBvT3duZXIiOiJrb2ZpMTk5MCIsInJlcG9OYW1lIjoiREZUb29sIiwicHJOdW1iZXIiOjI0LCJjb21taXRTaGEiOiI1ZjA5OTIxZDZjNzcwZmNjZjZjNWQ5MWU5MmNmNTJkMjJjNjAzZjJkIn0sImlhdCI6MTc1OTkwNDc1MywiZXhwIjoxNzYwNTA5NTUzfQ.XP75OPLVccnnwxx3e1tgnNPFuN91_ikXI_5tfPgUvOrKg-bwdJBeYf3kvVXf3Oe7dE4OUzd2mJn2INp6TQ8ktK_4jNyst5US1oalqsDanp-TxX8Hz-LmrxXqjum3gWHZ2ckqcVmVD-lcH0Z0Cf2RZu4ZzG1PnM8YHihd2og4JGWjlrw_C0SmbbJm_8fO1v_9INmJvQK9UDIPJo_zOsKT4Xt009yJBBZ9UxwY9cZVFYrkHJ1FodlHAR7XDX4HF3NdxRnC86NDX0D1TJ2A52HW3WBHLxsP4yyt5vwUTenFbW5yKrQrCRXkvE6DOe0EZ1X0m4CS8R_FhShAjWTO-jxaVw"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/fix-in-web-dark.svg"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/fix-in-web-light.svg"><img alt="Fix in Web" src="https://cursor.com/fix-in-web.svg"></picture></a>
cursor[bot] (Migrated from github.com) commented 2025-10-08 08:25:53 +02:00

Bug: Event Date Calculation Ignores Timezones

When initializing a new event, date calculations no longer account for timezones, which can lead to incorrect start/end times and server misinterpretation of datetimes. Additionally, start and end can inadvertently reference the same Date object, causing changes to one to affect the other.

Fix in Cursor Fix in Web

### Bug: Event Date Calculation Ignores Timezones <!-- **High Severity** --> <!-- DESCRIPTION START --> When initializing a new event, date calculations no longer account for timezones, which can lead to incorrect start/end times and server misinterpretation of datetimes. Additionally, `start` and `end` can inadvertently reference the same `Date` object, causing changes to one to affect the other. <!-- DESCRIPTION END --> <!-- LOCATIONS START app/(kfz)/kfz-calendar/_components/EventDialog.tsx#L581-L591 LOCATIONS END --> <a href="https://cursor.com/open?data=eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6ImJ1Z2JvdC12MSJ9.eyJ2ZXJzaW9uIjoxLCJ0eXBlIjoiQlVHQk9UX0ZJWF9JTl9DVVJTT1IiLCJkYXRhIjp7InJlZGlzS2V5IjoiYnVnYm90OjhlYmIxNzE4LTcwMmUtNDY5YS1hN2QzLWMzYTlmYzE4NWMwMiIsImVuY3J5cHRpb25LZXkiOiJXeVN1M2V4ODU2dFpUSUhVT2N4VHdmNG12Mkhoc0JIeEc1RWR1Q1BsLWwwIiwiYnJhbmNoIjoiMjAyNTEwMDMtVmVyYmVzc2VydW5nZW4ifSwiaWF0IjoxNzU5OTA0NzUzLCJleHAiOjE3NjA1MDk1NTN9.Qj_NRa6T32rPrPHU4LRl2AMtLVsrUKI8AZi5yLWhW1WzZN5daq8QlOY_TPwujE7OaDDEzc479a6adct9THubiSNQOY9OWYDrKgzPqnt--b8FyyxbiYtw35Z014GdRUQcKnyMF314B_DKuPfBb1dzYM8PkfUty9Qzr7w0kkDERfHwchYjT-uuWkXnnns9G-ryWOt4l1oHEXo-bQ2zPVhgE_Hb2YTuFvgfrPX-Q1idhA0b1ReL8-KGvaBIhOFwwLg5o4c2AwDLsAJv5zhG_poY4btlTU7LgnJn2JiarNUn1PKcFGsFxQ7a-Jn9KptkAK2H2gXctWIc49pQm5cRgGK2ZA"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/fix-in-cursor-dark.svg"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/fix-in-cursor-light.svg"><img alt="Fix in Cursor" src="https://cursor.com/fix-in-cursor.svg"></picture></a>&nbsp;<a href="https://cursor.com/agents?data=eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6ImJ1Z2JvdC12MSJ9.eyJ2ZXJzaW9uIjoxLCJ0eXBlIjoiQlVHQk9UX0ZJWF9JTl9XRUIiLCJkYXRhIjp7InJlZGlzS2V5IjoiYnVnYm90OjhlYmIxNzE4LTcwMmUtNDY5YS1hN2QzLWMzYTlmYzE4NWMwMiIsImVuY3J5cHRpb25LZXkiOiJXeVN1M2V4ODU2dFpUSUhVT2N4VHdmNG12Mkhoc0JIeEc1RWR1Q1BsLWwwIiwiYnJhbmNoIjoiMjAyNTEwMDMtVmVyYmVzc2VydW5nZW4iLCJyZXBvT3duZXIiOiJrb2ZpMTk5MCIsInJlcG9OYW1lIjoiREZUb29sIiwicHJOdW1iZXIiOjI0LCJjb21taXRTaGEiOiI1ZjA5OTIxZDZjNzcwZmNjZjZjNWQ5MWU5MmNmNTJkMjJjNjAzZjJkIn0sImlhdCI6MTc1OTkwNDc1MywiZXhwIjoxNzYwNTA5NTUzfQ.fsbCHyqd65vGuuyxkMaLpbfHN6KpzfYe9fRtH0HkXyX7r8OKZF2CvOe9F-50xOwPrb3sv8zjB1-7BqWXFiV0Il2PK_n0nab3IJwu4diSbgYwKFsQumbfue31p2g12juqE1vm6HOmDgjdhDW98x04TMxLCOod8bCops5AbkTzarRCO1APH0ozMMCBaMoUIQDnkdNQkm5nqcok5Q6csfKL3VledFZU-IIcGYbUcPzwZ8AUVsK8YSDeefXJQHLFLiTnXsF8FGGX3H0fRuNxI6mOoRwRawZCyFVqb0UZHcyq4kmrjOYHeX9YeJLu8Kjl_Qwv9XP7b2GODKepkQstWkKIeQ"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/fix-in-web-dark.svg"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/fix-in-web-light.svg"><img alt="Fix in Web" src="https://cursor.com/fix-in-web.svg"></picture></a>
@ -133,3 +161,3 @@
onChange?.(value, localValid);
// onChange wird über useEffect aufgerufen
};
cursor[bot] (Migrated from github.com) commented 2025-10-08 08:25:54 +02:00

Bug: Captcha State Race Condition

The onChange callback may receive stale or incorrect captcha state. The initial captcha generation useEffect directly calls onChange with a stale prop and reset state. Additionally, generateCaptcha's state resets can create a race condition with the dedicated onChange useEffect, causing it to report outdated values.

Additional Locations (1)

Fix in Cursor Fix in Web

### Bug: Captcha State Race Condition <!-- **Medium Severity** --> <!-- DESCRIPTION START --> The `onChange` callback may receive stale or incorrect captcha state. The initial captcha generation `useEffect` directly calls `onChange` with a stale prop and reset state. Additionally, `generateCaptcha`'s state resets can create a race condition with the dedicated `onChange` `useEffect`, causing it to report outdated values. <!-- DESCRIPTION END --> <!-- LOCATIONS START app/login/_components/captcha.tsx#L113-L141 app/login/_components/captcha.tsx#L39-L42 LOCATIONS END --> <details> <summary>Additional Locations (1)</summary> - [`app/login/_components/captcha.tsx#L39-L42`](https://github.com/kofi1990/DFTool/blob/5f09921d6c770fccf6c5d91e92cf52d22c603f2d/app/login/_components/captcha.tsx#L39-L42) </details> <a href="https://cursor.com/open?data=eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6ImJ1Z2JvdC12MSJ9.eyJ2ZXJzaW9uIjoxLCJ0eXBlIjoiQlVHQk9UX0ZJWF9JTl9DVVJTT1IiLCJkYXRhIjp7InJlZGlzS2V5IjoiYnVnYm90OmJkOGRmM2E0LTVjZmUtNGIyMC04MThlLTJiMDk2Y2NmMDEwNyIsImVuY3J5cHRpb25LZXkiOiJQb1NYTjdZLTNGSGRHUzlOWmhmaU5Rd0s5cFVWOWFjOWh0UW96REp5YXFBIiwiYnJhbmNoIjoiMjAyNTEwMDMtVmVyYmVzc2VydW5nZW4ifSwiaWF0IjoxNzU5OTA0NzUzLCJleHAiOjE3NjA1MDk1NTN9.IZXRDrsAm5ksNnNe_i8qn_RE6uFhXeHPfAyJfvn55r6djT_eGXpkYP1n_jgXqHM2_wd01dYbSIrEtfrKnLvmgqwGmQXwvy3cwgRyZsNf9maZ7tfJzvE4ICQXjJYNrdyitDeRmBptODzCN7WwJuH4JK3sntE5m5UWuGNu7SwZ2fATlNUSehDQCdmRQXB5rnZ2TzwJj1uWoJRY4Zyls0Mlk_3XpGjjlnZvXgpofsaCVJGqe14rwVvzanuiM61JgjkN18QIu5KcmV2Xzj9TB7IGMrp8I2z7kMBSw6Fq8N3flJgpwNWsD-g4aRs-u3IfSzhshEpV1FNwYbXKk5ZYcCweNw"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/fix-in-cursor-dark.svg"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/fix-in-cursor-light.svg"><img alt="Fix in Cursor" src="https://cursor.com/fix-in-cursor.svg"></picture></a>&nbsp;<a href="https://cursor.com/agents?data=eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6ImJ1Z2JvdC12MSJ9.eyJ2ZXJzaW9uIjoxLCJ0eXBlIjoiQlVHQk9UX0ZJWF9JTl9XRUIiLCJkYXRhIjp7InJlZGlzS2V5IjoiYnVnYm90OmJkOGRmM2E0LTVjZmUtNGIyMC04MThlLTJiMDk2Y2NmMDEwNyIsImVuY3J5cHRpb25LZXkiOiJQb1NYTjdZLTNGSGRHUzlOWmhmaU5Rd0s5cFVWOWFjOWh0UW96REp5YXFBIiwiYnJhbmNoIjoiMjAyNTEwMDMtVmVyYmVzc2VydW5nZW4iLCJyZXBvT3duZXIiOiJrb2ZpMTk5MCIsInJlcG9OYW1lIjoiREZUb29sIiwicHJOdW1iZXIiOjI0LCJjb21taXRTaGEiOiI1ZjA5OTIxZDZjNzcwZmNjZjZjNWQ5MWU5MmNmNTJkMjJjNjAzZjJkIn0sImlhdCI6MTc1OTkwNDc1MywiZXhwIjoxNzYwNTA5NTUzfQ.mSW2KFR5gc7YXgfM87DoWZ9LMX1ib-riUpCSEtQmpI4UVeyAkoIEMY3wXhQhSTb_jwgP6I9dzTmtnMO6I5tYsFetvLVPVkDRzpK-Ou_sCLafyCO_mAM5RQl9bKQdskSav50YHZrEkYQVoKpv4JbpVcIbklLAucSlXu5Un9YT5YPaUmf4QwT7VQyJKKqjTezAJNFs4jix4pYiadIGBcVLLEUh4_twz0s_5iJtwwSo5J4KqxuicM4JtvTYh1n-TygJdzTrr4wgCuKmquNXo6AEcysaMrSw2M8yXSamt7G6f9HMljdWdOW3dSCuxxheull_XCmVYKCuH8BjciVnzMXLyA"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/fix-in-web-dark.svg"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/fix-in-web-light.svg"><img alt="Fix in Web" src="https://cursor.com/fix-in-web.svg"></picture></a>
@ -0,0 +72,4 @@
expect(result.current.content).toBe("Test content");
expect(result.current.mentions).toBeUndefined();
});
cursor[bot] (Migrated from github.com) commented 2025-10-08 08:25:54 +02:00

Bug: Undefined Mentions Normalized to Empty Array

The test for handling undefined mentions expects result.current.mentions to be undefined. This likely conflicts with the hook's implementation, which probably normalizes undefined mentions to an empty array, leading to an incorrect assertion.

Fix in Cursor Fix in Web

### Bug: Undefined Mentions Normalized to Empty Array <!-- **Low Severity** --> <!-- DESCRIPTION START --> The test for handling undefined mentions expects `result.current.mentions` to be `undefined`. This likely conflicts with the hook's implementation, which probably normalizes undefined mentions to an empty array, leading to an incorrect assertion. <!-- DESCRIPTION END --> <!-- LOCATIONS START test/hooks/diary/useNewComment.test.ts#L68-L75 LOCATIONS END --> <a href="https://cursor.com/open?data=eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6ImJ1Z2JvdC12MSJ9.eyJ2ZXJzaW9uIjoxLCJ0eXBlIjoiQlVHQk9UX0ZJWF9JTl9DVVJTT1IiLCJkYXRhIjp7InJlZGlzS2V5IjoiYnVnYm90OmVlZTc1Y2MwLTY1ZWEtNDI3MC1hMjExLWUxMTdkMWEwOWFlNCIsImVuY3J5cHRpb25LZXkiOiJFb2JzeHB4UWNrWWl6anpVR3gwNWY2ODF3Vldfc2JJUGlQMV9PVHNna3pvIiwiYnJhbmNoIjoiMjAyNTEwMDMtVmVyYmVzc2VydW5nZW4ifSwiaWF0IjoxNzU5OTA0NzUzLCJleHAiOjE3NjA1MDk1NTN9.UbxBcmC_iFzP6Adly1_GSfaNeQs1ZVKwTw419yD9gtGOPgcAOue6ycYdPVHGSqQzzebp0g5wTQJ5mGM2EkIg7jXJ098lk1xT7a5sdj79TxZDj1OgMWoBa3gaJUREJyjdJkcH5eblEmK52g9ANdYnZAv4tKOzJYPM12XVJ4OVvu5R8yb77D8dGZM-tpXQ5tCsx4JVaLA79q8oLOms-K6u1Oxbkp0uzZM2mhPkpjUDQfmN2-uYy1mNJBFQjy_WaZ6MmybcaN2tAeRGs-A4lQbIFD9dQhmWU0GZ3YKqnptv6SG0MI98LRtQF0KrpfeZ7Diwxm5SrE5EEIBwv2L4BVSeTw"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/fix-in-cursor-dark.svg"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/fix-in-cursor-light.svg"><img alt="Fix in Cursor" src="https://cursor.com/fix-in-cursor.svg"></picture></a>&nbsp;<a href="https://cursor.com/agents?data=eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6ImJ1Z2JvdC12MSJ9.eyJ2ZXJzaW9uIjoxLCJ0eXBlIjoiQlVHQk9UX0ZJWF9JTl9XRUIiLCJkYXRhIjp7InJlZGlzS2V5IjoiYnVnYm90OmVlZTc1Y2MwLTY1ZWEtNDI3MC1hMjExLWUxMTdkMWEwOWFlNCIsImVuY3J5cHRpb25LZXkiOiJFb2JzeHB4UWNrWWl6anpVR3gwNWY2ODF3Vldfc2JJUGlQMV9PVHNna3pvIiwiYnJhbmNoIjoiMjAyNTEwMDMtVmVyYmVzc2VydW5nZW4iLCJyZXBvT3duZXIiOiJrb2ZpMTk5MCIsInJlcG9OYW1lIjoiREZUb29sIiwicHJOdW1iZXIiOjI0LCJjb21taXRTaGEiOiI1ZjA5OTIxZDZjNzcwZmNjZjZjNWQ5MWU5MmNmNTJkMjJjNjAzZjJkIn0sImlhdCI6MTc1OTkwNDc1MywiZXhwIjoxNzYwNTA5NTUzfQ.WKaw-YhS3Uu6ZMjj1peTCmhMoQZpD2_QaY8a77eGTDxzoGlsLzjLLSsxkR6yuAcZOTFrk2CjzvLbMvsYdrTaeN9uqoy9ncB5XG9aWOg9K4gOJ2LGNcs-9QtvAxTGC88XbmngjgSrowR32Klm_T_vnnAlwSKq5y43nDM4_vEqLYdSeDGFBLoIfTJaNbIwkGZLabs41_x9iXqHiVlQnOvoVNBvQGEtOmFWOZ8qnAQw5hb6Q2IKRkhgLZQjVN2zMfQ5NdE8TdyUHjrHBn4MTztJGPmklY60JoMSQOxsUGlVOy2iUgM0t_T6m-Z2ovYgBO6NagR0YePlIakJXure0OJWdg"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/fix-in-web-dark.svg"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/fix-in-web-light.svg"><img alt="Fix in Web" src="https://cursor.com/fix-in-web.svg"></picture></a>
cursor[bot] (Migrated from github.com) reviewed 2025-10-08 08:35:32 +02:00
@ -565,0 +505,4 @@
})
.map((candidate) => (
<CommandItem
key={candidate.id}
cursor[bot] (Migrated from github.com) commented 2025-10-08 08:35:32 +02:00

Bug: Duplicate User Selection in Manual Mentions

The manual mention selection dropdown allows adding the same person multiple times. The list of candidates in the dropdown isn't filtered to exclude users already selected for the entry, leading to duplicate mentions.

Fix in Cursor Fix in Web

### Bug: Duplicate User Selection in Manual Mentions <!-- **Medium Severity** --> <!-- DESCRIPTION START --> The manual mention selection dropdown allows adding the same person multiple times. The list of candidates in the dropdown isn't filtered to exclude users already selected for the entry, leading to duplicate mentions. <!-- DESCRIPTION END --> <!-- LOCATIONS START app/(df)/diary/_components/DiaryEntryDialog.tsx#L510-L512 LOCATIONS END --> <a href="https://cursor.com/open?data=eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6ImJ1Z2JvdC12MSJ9.eyJ2ZXJzaW9uIjoxLCJ0eXBlIjoiQlVHQk9UX0ZJWF9JTl9DVVJTT1IiLCJkYXRhIjp7InJlZGlzS2V5IjoiYnVnYm90OjlhOGY1MGEyLTQzYmMtNGMxOC05MWQyLTA4ZWVjNTI3ZjU0MyIsImVuY3J5cHRpb25LZXkiOiJxNVlvNzB2bl9CWHdyMFdVZEdLbUdLRnJxc1NzTE9kdEF3cFZTTzkyaU5NIiwiYnJhbmNoIjoiMjAyNTEwMDMtVmVyYmVzc2VydW5nZW4ifSwiaWF0IjoxNzU5OTA1MzMxLCJleHAiOjE3NjA1MTAxMzF9.BEJ3UM9AbLvLFikMCjpF4yXGKMfMskBJt64hJNg4qAYvFSdraML_bTH4F0-qt0hpICFF1FkM-lZsTxI_ZGjbBi2I9_eHU0ZVcf48L-ZuPZLl1K6tUXoOq8Z4dMi3Ooa2Czc4LHZD99HloQOeBICdoPJhflextWojmzT1QBiXMFgubFl4QTd7z3cuUzkbBM7qLv_PxbEiCZPpGGLn3EOAxGNzbSWbjGUudZB_NxZqQSRpdAlrLVFjmmqzxvAr_A3sAUoARiaPK5uTB8Y_SG_QQp7GBR_EecLkDB7SVcHoiEgPlERo_rbJmBttrWQRvaCnnC8fXjXn6LMCAT8QSUadEw"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/fix-in-cursor-dark.svg"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/fix-in-cursor-light.svg"><img alt="Fix in Cursor" src="https://cursor.com/fix-in-cursor.svg"></picture></a>&nbsp;<a href="https://cursor.com/agents?data=eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6ImJ1Z2JvdC12MSJ9.eyJ2ZXJzaW9uIjoxLCJ0eXBlIjoiQlVHQk9UX0ZJWF9JTl9XRUIiLCJkYXRhIjp7InJlZGlzS2V5IjoiYnVnYm90OjlhOGY1MGEyLTQzYmMtNGMxOC05MWQyLTA4ZWVjNTI3ZjU0MyIsImVuY3J5cHRpb25LZXkiOiJxNVlvNzB2bl9CWHdyMFdVZEdLbUdLRnJxc1NzTE9kdEF3cFZTTzkyaU5NIiwiYnJhbmNoIjoiMjAyNTEwMDMtVmVyYmVzc2VydW5nZW4iLCJyZXBvT3duZXIiOiJrb2ZpMTk5MCIsInJlcG9OYW1lIjoiREZUb29sIiwicHJOdW1iZXIiOjI0LCJjb21taXRTaGEiOiJmOWE3YjhhYWM1MjU3Y2UyZmE3YmM1OGM5NjY1ZGRkNDkwOTQ5YWQ2In0sImlhdCI6MTc1OTkwNTMzMSwiZXhwIjoxNzYwNTEwMTMxfQ.aLA9JGbKg02OyQQ63lD8a33ROSZx-yMgBIXEIDbo2HItDesxaKwBeqV7AvIzQ_hUOeTMxJsP2IzZB6WafS680Sd0dvJ9Cl6OZHhdPCWsBIWzy1dB-k73ElbD9PR2hXzfzEdqlG3XTUGGFagmKkzZ1y3yxGaeTjspuxLCqpjs9kSEgkZ_DJxU9lYtUKlZ0qc7-ec-qGWntMeFMeWYEQ6WdKkaPQSCDeaF5iNNQb344JHzP1o1lKWUsRXXJtoS-SBjCyqLXACba6zr_3BTYgJXCkCB97DThV9WIywm8ClZjeeuPyDvMwkXWo3Z2hWErU1o5EGrAQVCdLZb5YBTQjpyxw"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/fix-in-web-dark.svg"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/fix-in-web-light.svg"><img alt="Fix in Web" src="https://cursor.com/fix-in-web.svg"></picture></a>
@ -586,6 +586,8 @@ async function archiveInfo(entryId: string, session: Record<string, unknown>) {
confirmedAt: new Date(),
cursor[bot] (Migrated from github.com) commented 2025-10-08 08:35:32 +02:00

Bug: Task Status Overwriting During Archiving

When archiving a TASK entry, the status is set to "DONE" without checking its current value. This can lead to redundant database updates if the task is already in the "DONE" state.

Fix in Cursor Fix in Web

### Bug: Task Status Overwriting During Archiving <!-- **Low Severity** --> <!-- DESCRIPTION START --> When archiving a `TASK` entry, the `status` is set to `"DONE"` without checking its current value. This can lead to redundant database updates if the task is already in the `"DONE"` state. <!-- DESCRIPTION END --> <!-- LOCATIONS START app/api/diary/[id]/route.ts#L588-L591 LOCATIONS END --> <a href="https://cursor.com/open?data=eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6ImJ1Z2JvdC12MSJ9.eyJ2ZXJzaW9uIjoxLCJ0eXBlIjoiQlVHQk9UX0ZJWF9JTl9DVVJTT1IiLCJkYXRhIjp7InJlZGlzS2V5IjoiYnVnYm90OjU4MmYyMGExLTA1YzctNGUwNy04OThiLTQwM2Y5MGM4NDQ2ZCIsImVuY3J5cHRpb25LZXkiOiJnMlg5U2FrMm01Ml9fTjR3bjlXNktTOVNDR0M1Sk9EZFdSQnJtUFpzdGdJIiwiYnJhbmNoIjoiMjAyNTEwMDMtVmVyYmVzc2VydW5nZW4ifSwiaWF0IjoxNzU5OTA1MzMxLCJleHAiOjE3NjA1MTAxMzF9.MAiRL9r3acSHDUG-z2i2tccHrZ_gPm09OOlvAKNgTGwV13KAnCfSXqqavy64lt6EP-VQVXxPyJfxZL9xTx4ZM3MHdtVUd5r4bOvCCMHoNkq3l82kwFtAzxprrhIZnuWpQ4oabvZ-CYlLZo5ccl2Xo9VJ2X0Nvp_Q_HAHTzhwn5TOqT0JsbnkT_1jD0yCMkJtkjC6O6PQtGkKJggfMdDLOKFwI9z3DOhtxuHNeSijZ8Ba7EPjM8EzPFFJugDNfT1N-6VSmHB4bYCAI-Di_7DFBV2NiLj6arFcx7084EOWQyH-BjTzt0T7tRuq8ziTM8Cr_JlHJTCI4RkvKHGmUvc52Q"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/fix-in-cursor-dark.svg"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/fix-in-cursor-light.svg"><img alt="Fix in Cursor" src="https://cursor.com/fix-in-cursor.svg"></picture></a>&nbsp;<a href="https://cursor.com/agents?data=eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6ImJ1Z2JvdC12MSJ9.eyJ2ZXJzaW9uIjoxLCJ0eXBlIjoiQlVHQk9UX0ZJWF9JTl9XRUIiLCJkYXRhIjp7InJlZGlzS2V5IjoiYnVnYm90OjU4MmYyMGExLTA1YzctNGUwNy04OThiLTQwM2Y5MGM4NDQ2ZCIsImVuY3J5cHRpb25LZXkiOiJnMlg5U2FrMm01Ml9fTjR3bjlXNktTOVNDR0M1Sk9EZFdSQnJtUFpzdGdJIiwiYnJhbmNoIjoiMjAyNTEwMDMtVmVyYmVzc2VydW5nZW4iLCJyZXBvT3duZXIiOiJrb2ZpMTk5MCIsInJlcG9OYW1lIjoiREZUb29sIiwicHJOdW1iZXIiOjI0LCJjb21taXRTaGEiOiJmOWE3YjhhYWM1MjU3Y2UyZmE3YmM1OGM5NjY1ZGRkNDkwOTQ5YWQ2In0sImlhdCI6MTc1OTkwNTMzMSwiZXhwIjoxNzYwNTEwMTMxfQ.RMjBLbV5kAdPsXypZ1ThkzdzlFMPImjO4WYw718jXgtH3UV6V1DLPXsKcJxNeW95OA-kEgy6MAJoED1IJl-7VMzV-5F1w_iV_q-mq_r2e5ikQp44bjH-JqFqE16f8J47lSc_5fiSpdq3yz-gYGsl5rtteewHkG-4LnXzyQYdwseEOElTmgX_5OfmM3mmxIDwVmY58yNFi44M2V4hOHgeWXAjn-lynAuUHHBk-z3k5OafJH6UIeb_h6P6R9-N4pje6eO5Qoph3__GzSwTDD7PcYoeUHPDqe5SoPHvMz62TOfBnnOmISYEfelfPSiFEi17m5OJh3VDIRd5ycgcvMgTLg"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/fix-in-web-dark.svg"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/fix-in-web-light.svg"><img alt="Fix in Web" src="https://cursor.com/fix-in-web.svg"></picture></a>
cursor[bot] (Migrated from github.com) reviewed 2025-10-08 08:42:09 +02:00
@ -71,3 +70,4 @@
const mentionStart = before.length + 1;
const mentionEnd = mentionStart + mentionText.length;
const nextMentions = [
cursor[bot] (Migrated from github.com) commented 2025-10-08 08:42:09 +02:00

Bug: Mention Range Calculation Excludes Trigger

The mention insertion logic incorrectly calculates the startIndex for mentions. It currently points to the start of the display name, excluding the @ trigger, which means the @ symbol won't be considered part of the mention range. This affects how mentions are stored and potentially highlighted.

Fix in Cursor Fix in Web

### Bug: Mention Range Calculation Excludes Trigger <!-- **Medium Severity** --> <!-- DESCRIPTION START --> The mention insertion logic incorrectly calculates the `startIndex` for mentions. It currently points to the start of the display name, excluding the `@` trigger, which means the `@` symbol won't be considered part of the mention range. This affects how mentions are stored and potentially highlighted. <!-- DESCRIPTION END --> <!-- LOCATIONS START app/(df)/diary/_components/RichTextarea.tsx#L67-L71 LOCATIONS END --> <a href="https://cursor.com/open?data=eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6ImJ1Z2JvdC12MSJ9.eyJ2ZXJzaW9uIjoxLCJ0eXBlIjoiQlVHQk9UX0ZJWF9JTl9DVVJTT1IiLCJkYXRhIjp7InJlZGlzS2V5IjoiYnVnYm90OmFhNmY3MTdjLThiMjYtNDY5ZC1iY2YwLTFlMmViYmY2YWZkNSIsImVuY3J5cHRpb25LZXkiOiJ4Q28yakZ5MTVnTmoyRlBkajVNTnljTnZpak84SmhEazRnUFozLXJ3T1prIiwiYnJhbmNoIjoiMjAyNTEwMDMtVmVyYmVzc2VydW5nZW4ifSwiaWF0IjoxNzU5OTA1NzI5LCJleHAiOjE3NjA1MTA1Mjl9.R_Da5K1DBCNj2FnpIiaISxhHL8Y1kINqccHq9HmtuvpuyqTbszArvJPWpIcJn4HI5jW4Z_m5_ylkFfkusJThBvvTjHViYsNfiZ99YPbtuXw6SelC_hzqeQN_iytc-dxGcvNnxg37uBsbeAeOXG_3454gn4neqbf2fjoNUInd0xuu0q89SKMsH9iH73fbOPNExSSFQrYahsuId-iZasfW7THW1-HNfyKr1IRM0fiqsp0iA1cF9248UTCEiNoTdJlz9pz8nvn9xyEUpRj73MnKeb6K6VPGTgbVDrjBRz84SASL_-uE26ex7jPQdJ9zjjWL-QZuZHe9il2Ssnr4OlRIaA"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/fix-in-cursor-dark.svg"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/fix-in-cursor-light.svg"><img alt="Fix in Cursor" src="https://cursor.com/fix-in-cursor.svg"></picture></a>&nbsp;<a href="https://cursor.com/agents?data=eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6ImJ1Z2JvdC12MSJ9.eyJ2ZXJzaW9uIjoxLCJ0eXBlIjoiQlVHQk9UX0ZJWF9JTl9XRUIiLCJkYXRhIjp7InJlZGlzS2V5IjoiYnVnYm90OmFhNmY3MTdjLThiMjYtNDY5ZC1iY2YwLTFlMmViYmY2YWZkNSIsImVuY3J5cHRpb25LZXkiOiJ4Q28yakZ5MTVnTmoyRlBkajVNTnljTnZpak84SmhEazRnUFozLXJ3T1prIiwiYnJhbmNoIjoiMjAyNTEwMDMtVmVyYmVzc2VydW5nZW4iLCJyZXBvT3duZXIiOiJrb2ZpMTk5MCIsInJlcG9OYW1lIjoiREZUb29sIiwicHJOdW1iZXIiOjI0LCJjb21taXRTaGEiOiI5NDc5NjVlNjY5NjM3YTM2MWY1ZTNmMmIwOGE5MmI2MzRjODIxY2VlIn0sImlhdCI6MTc1OTkwNTcyOSwiZXhwIjoxNzYwNTEwNTI5fQ.YVY5s1gEyTFzyxdULuVhqpxZauvqW0XTducnQnufKuLUfvOLvHeUplJ62u29MNRscwVCQIZBRXcj1iSivRTY8J3EX3wYVWnfKbFMJ5XXEIFgNgXyRsTtJ5uv3Cm7Hkep3uIpp8AliXyVY9Viv8cyHHl4T7nLOLUiFnS9ROri9MZ0k71VYXTQgIZyJtCCVSQZZMyDehQh2k-z9XFWw7NABJIN4qW_LYO7h1A0XdQIWxR4b9r9AYLx_eAlHTNh7splQKltC_3vHBl9-xdU_eM5AeA1yn_oaq_28sUWBgeRaMQnTZVGXHLh7r4jOU36ykchxV1SjtEMdIhqupJF9i_tMA"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/fix-in-web-dark.svg"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/fix-in-web-light.svg"><img alt="Fix in Web" src="https://cursor.com/fix-in-web.svg"></picture></a>
Sign in to join this conversation.
No description provided.