v1.2.3 20251003 verbesserungen #24
No reviewers
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: dkofler/DFTool#24
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "20251003-Verbesserungen"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Changed
Fixed
Removed
Breaking Changes / Wichtige Hinweise
Empfohlene Upgrade- / Merge-Checkliste (unbedingt durchgehen)
Wichtige Dateien (Auswahl)
Neu hinzugefügt:
Wesentlich geändert:
Entfernt:
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.
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.
@ -438,139 +246,311 @@ export function DiaryEntryDialog({</DialogDescription>Bug: Diary Entry Dialog Fails to Handle Multiple Mentions
The mention handling logic in
DiaryEntryDialogincorrectly merges mentions. It deduplicates byuserIdand 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.@ -71,3 +70,4 @@const mentionStart = before.length + 1;const mentionEnd = mentionStart + mentionText.length;const nextMentions = [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.
Bug: Event Timezone Handling Regression
New event creation in
EventDialog.tsxinitializesstartandenddates 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.@ -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;Bug: Hex Color Parsing Fails for Short Codes
The hex color parsing logic for
r,g, andbimplicitly assumes a 6-character hex string. This causes incorrect color calculations when processing 3-character hex codes (e.g.,#f00), assubstring(2, 4)andsubstring(4, 6)will not correctly extract the green and blue components.@ -178,7 +178,7 @@ export default function RichTextarea({disabled={disabled}Bug: RichTextarea Focus Indicator Missing
The
RichTextareacomponent'sfocus-visiblestyling now only changes the border instead of showing a distinct ring. This removes the visual focus indicator, which can impact accessibility for keyboard navigation.Bug: Permission Prop Misuse Causes Button Disablement
The
canCreateprop, which expects a permission string, is being called without its argument in the "New Entry" button'sdisabledprop. It's also passed incorrectly toDiaryEmptyStatefor 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-L1095f09921d6c/app/(df)/diary/_components/DiaryContent.tsx#L108-L109app/(df)/diary/_components/DiaryContent.tsx#L121-L1225f09921d6c/app/(df)/diary/_components/DiaryContent.tsx#L121-L122app/(df)/diary/_components/DiaryContent.tsx#L144-L1455f09921d6c/app/(df)/diary/_components/DiaryContent.tsx#L144-L145app/(df)/diary/_components/DiaryEmptyState.tsx#L121-L1465f09921d6c/app/(df)/diary/_components/DiaryEmptyState.tsx#L121-L146Bug: Mention Deduplication Logic Causes Errors
The mention deduplication logic is overly complex and may lead to incorrect behavior or performance issues. Specifically, using
undefinedforstartIndex/endIndexin manual mentions can cause comparison and deduplication errors.Additional Locations (1)
app/(df)/diary/_components/DiaryEntryDialog.tsx#L510-L512Bug: 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,
startandendcan inadvertently reference the sameDateobject, causing changes to one to affect the other.@ -133,3 +161,3 @@onChange?.(value, localValid);// onChange wird über useEffect aufgerufen};Bug: Captcha State Race Condition
The
onChangecallback may receive stale or incorrect captcha state. The initial captcha generationuseEffectdirectly callsonChangewith a stale prop and reset state. Additionally,generateCaptcha's state resets can create a race condition with the dedicatedonChangeuseEffect, causing it to report outdated values.Additional Locations (1)
app/login/_components/captcha.tsx#L39-L42@ -0,0 +72,4 @@expect(result.current.content).toBe("Test content");expect(result.current.mentions).toBeUndefined();});Bug: Undefined Mentions Normalized to Empty Array
The test for handling undefined mentions expects
result.current.mentionsto beundefined. This likely conflicts with the hook's implementation, which probably normalizes undefined mentions to an empty array, leading to an incorrect assertion.@ -565,0 +505,4 @@}).map((candidate) => (<CommandItemkey={candidate.id}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.
@ -586,6 +586,8 @@ async function archiveInfo(entryId: string, session: Record<string, unknown>) {confirmedAt: new Date(),Bug: Task Status Overwriting During Archiving
When archiving a
TASKentry, thestatusis set to"DONE"without checking its current value. This can lead to redundant database updates if the task is already in the"DONE"state.@ -71,3 +70,4 @@const mentionStart = before.length + 1;const mentionEnd = mentionStart + mentionText.length;const nextMentions = [Bug: Mention Range Calculation Excludes Trigger
The mention insertion logic incorrectly calculates the
startIndexfor 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.