Skip to content

Develop#581

Merged
dspangenberg merged 3 commits into
mainfrom
develop
Jul 11, 2026
Merged

Develop#581
dspangenberg merged 3 commits into
mainfrom
develop

Conversation

@dspangenberg

@dspangenberg dspangenberg commented Jul 11, 2026

Copy link
Copy Markdown
Owner

Summary by CodeRabbit

  • Neue Funktionen

    • Dropboxen können zusätzlich eine „Reale E-Mail-Adresse“ speichern und validieren.
    • Importierte E-Mails erhalten verbesserte Kennzeichnungen für eingehende Nachrichten und die Aktivitätsanzeige.
    • Seitenlayouts unterstützen Inhalte auf der linken Seite des Kopfbereichs.
  • Verbesserungen

    • Anhänge werden übersichtlicher mit Überschrift und verbessertem Hover-Effekt dargestellt.
    • Statussymbole unterstützen eine bessere Interaktion und Barrierefreiheit.
    • Die Darstellung von E-Mail- und Rechnungsinformationen wurde verfeinert.

@coderabbitai

coderabbitai Bot commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

@dspangenberg, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 50 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: a2edae48-6b1f-46cf-9006-56dbf6d48b43

📥 Commits

Reviewing files that changed from the base of the PR and between 41dd395 and 2e58517.

📒 Files selected for processing (3)
  • app/Models/DropboxMail.php
  • resources/js/Pages/Admin/Dropbox/DropboxEdit.tsx
  • resources/js/Pages/App/Email/EmailAttachments.tsx

Walkthrough

Der Pull Request ergänzt real_email und Mailstatusfelder im Dropbox-Datenfluss, aktualisiert Import und Bearbeitungsformular, erweitert mehrere React-Komponenten und entfernt GeneralChannel.

Changes

Dropbox-Datenfluss

Layer / File(s) Summary
Dropbox-Datenvertrag und Persistenz
database/migrations/tenant/*, app/Data/DropboxData.php, app/Http/Requests/DropboxRequest.php, app/Models/Dropbox.php, resources/js/Types/generated.d.ts
real_email wird als nullable Datenbankspalte, DTO-Feld, validiertes Formularfeld, massenzuweisbares Model-Feld und Frontend-Typ ergänzt.
Dropbox-Mailstatus beim Import
database/migrations/tenant/2026_07_11_160340_add_fields_to_dropbox_mails.php, app/Models/DropboxMail.php, app/Services/DropboxService.php
is_inbound und is_visible_in_activity werden persistiert und beim Mailimport gesetzt.
Bearbeitungsformular für reale E-Mail-Adressen
resources/js/Pages/Admin/Dropbox/DropboxEdit.tsx
Das Formular verwendet real_email für das Pflichtfeld „Reale E-Mail-Adresse“.

Frontend-Darstellung

Layer / File(s) Summary
Linker Seitenkopf und Anhangsdarstellung
resources/js/Components/PageContainerWithSideOnLeft.tsx, resources/js/Pages/App/Email/EmailIndex.tsx, resources/js/Pages/App/Email/EmailAttachments.tsx, resources/js/Pages/App/Email/EmailAttachment.tsx
Ein separater linker Header, eine strukturierte Anhangsüberschrift und ein Hover-Zustand werden ergänzt.
Statusicon-Interaktion
resources/js/Components/twc-ui/status-icon.tsx, resources/js/Pages/App/Invoice/InvoiceIndexColumns.tsx
StatusIcon wird ref-fähig und nimmt zusätzliche Props entgegen; Rechnungsstatusicons erhalten role="button".

Broadcasting-Bereinigung

Layer / File(s) Summary
Entfernung der GeneralChannel-Struktur
app/Broadcasting/GeneralChannel.php, app/Events/GeneralNotificationEvent.php
GeneralChannel wird entfernt; im Notification-Event wird nur Whitespace angepasst.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Possibly related PRs

Poem

Hoppelnd kommt die echte Mail,
durchs Dropbox-Tor im Daten-Seil.
Zwei Statusfelder, fein und klein,
tragen neue Mails hinein.
Header, Icons leuchten sacht—
der Hase hat’s vollbracht! 🐇

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 9.09% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Title check ❓ Inconclusive Der Titel ist zu generisch und beschreibt die Änderungen nicht hinreichend; er vermittelt keine konkrete Hauptänderung. Nutze einen spezifischen Titel wie „Dropbox um real_email und Mail-Flags erweitern“, damit der Hauptzweck sofort erkennbar ist.
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch develop

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 4

🧹 Nitpick comments (3)
resources/js/Pages/App/Email/EmailAttachments.tsx (1)

10-10: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

gap-0 und space-y-0 sind redundant.

Beide setzen denselben Abstand auf 0. Eines reicht aus.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@resources/js/Pages/App/Email/EmailAttachments.tsx` at line 10, Remove either
the gap-0 or space-y-0 utility from the div in the EmailAttachments component,
keeping only one zero-spacing class while preserving the existing layout
behavior.
resources/js/Components/PageContainerWithSideOnLeft.tsx (1)

82-83: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

left-0 ist ohne positionierten Parent wirkungslos.

Das Parent-<div className="flex flex-1"> ist statisch positioniert, sodass left-0 auf dem leftHeader-Container keinen Effekt hat. Entfernen, falls nicht für ein künftiges relative vorgesehen.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@resources/js/Components/PageContainerWithSideOnLeft.tsx` around lines 82 -
83, Entferne die wirkungslose Tailwind-Klasse left-0 vom leftHeader-Container
innerhalb von PageContainerWithSideOnLeft; belasse die übrigen Klassen und das
Rendering von leftHeader unverändert.
resources/js/Components/twc-ui/status-icon.tsx (1)

56-90: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

forwardRef funktioniert, ist aber in React 19 nicht mehr erforderlich.

In React 19 kann ref als reguläre Prop übergeben werden, sodass forwardRef entfallen kann. Dies reduziert die Indirektion und verbessert die Lesbarkeit. Die aktuelle Implementierung ist jedoch funktional korrekt.

♻️ Optional: ref als reguläre Prop in React 19
-const StatusIcon = React.forwardRef<HTMLSpanElement, AlertProps>(
-  ({ icon, variant, size, ...props }, ref) => {
-    const styles = alertStyles({ variant, size })
-    let realIcon: IconType
-
-    if (icon) {
-      realIcon = icon
-    } else {
-      switch (variant) {
-        case 'destructive':
-          realIcon = CancelCircleIcon
-          break
-        case 'info':
-          realIcon = InformationCircleIcon
-          break
-        case 'warning':
-          realIcon = AlertCircleIcon
-          break
-        case 'success':
-          realIcon = CheckmarkCircle01Icon
-          break
-        default:
-          realIcon = AlertCircleIcon
-          break
-      }
-    }
-
-    return (
-      <span ref={ref} {...props}>
-        <Icon icon={realIcon} className={cn(styles.icon())} />
-      </span>
-    )
-  }
-)
-StatusIcon.displayName = 'StatusIcon'
+function StatusIcon({ icon, variant, size, ref, ...props }: AlertProps & { ref?: React.Ref<HTMLSpanElement> }) {
+  const styles = alertStyles({ variant, size })
+  let realIcon: IconType
+
+  if (icon) {
+    realIcon = icon
+  } else {
+    switch (variant) {
+      case 'destructive':
+        realIcon = CancelCircleIcon
+        break
+      case 'info':
+        realIcon = InformationCircleIcon
+        break
+      case 'warning':
+        realIcon = AlertCircleIcon
+        break
+      case 'success':
+        realIcon = CheckmarkCircle01Icon
+        break
+      default:
+        realIcon = AlertCircleIcon
+        break
+    }
+  }
+
+  return (
+    <span ref={ref} {...props}>
+      <Icon icon={realIcon} className={cn(styles.icon())} />
+    </span>
+  )
+}
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@resources/js/Components/twc-ui/status-icon.tsx` around lines 56 - 90,
Optional: Update StatusIcon to a regular React 19 function component that
accepts ref through its props, removing React.forwardRef and the associated
displayName assignment while preserving the existing icon selection, styling,
and rendered span behavior.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@app/Models/DropboxMail.php`:
- Around line 28-29: Update the casts() method in the DropboxMail model to cast
both is_inbound and is_visible_in_activity as boolean values, preserving the
existing model attributes and cast definitions.

In `@app/Services/DropboxService.php`:
- Around line 35-36: Update the inbound classification in DropboxService around
the is_inbound assignment to handle a missing dropbox->real_email before
comparing it with mail->from, so null does not automatically mark imported mail
as inbound. Preserve the existing comparison behavior when real_email is
present.

In `@resources/js/Pages/Admin/Dropbox/DropboxEdit.tsx`:
- Around line 88-95: Remove the autoFocus prop from the real_email FormTextField
in DropboxEdit, leaving autoFocus only on the existing email_address field.
Preserve the field’s label, required state, and form registration.

In `@resources/js/Pages/App/Email/EmailAttachments.tsx`:
- Around line 13-14: Update the attachments map in EmailAttachments to use each
attachment’s stable id as the React key instead of the array index, while
leaving the EmailAttachment props and rendering flow unchanged.

---

Nitpick comments:
In `@resources/js/Components/PageContainerWithSideOnLeft.tsx`:
- Around line 82-83: Entferne die wirkungslose Tailwind-Klasse left-0 vom
leftHeader-Container innerhalb von PageContainerWithSideOnLeft; belasse die
übrigen Klassen und das Rendering von leftHeader unverändert.

In `@resources/js/Components/twc-ui/status-icon.tsx`:
- Around line 56-90: Optional: Update StatusIcon to a regular React 19 function
component that accepts ref through its props, removing React.forwardRef and the
associated displayName assignment while preserving the existing icon selection,
styling, and rendered span behavior.

In `@resources/js/Pages/App/Email/EmailAttachments.tsx`:
- Line 10: Remove either the gap-0 or space-y-0 utility from the div in the
EmailAttachments component, keeping only one zero-spacing class while preserving
the existing layout behavior.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 479503e6-e017-47ee-9111-08fc5ab69828

📥 Commits

Reviewing files that changed from the base of the PR and between 53c3e00 and 41dd395.

⛔ Files ignored due to path filters (1)
  • database/.DS_Store is excluded by !**/.DS_Store
📒 Files selected for processing (18)
  • app/Broadcasting/GeneralChannel.php
  • app/Data/DropboxData.php
  • app/Events/GeneralNotificationEvent.php
  • app/Http/Requests/DropboxRequest.php
  • app/Models/Dropbox.php
  • app/Models/DropboxMail.php
  • app/Services/DropboxService.php
  • database/migrations/tenant/2026_07_11_155124_add_real_email_to_dropboxes.php
  • database/migrations/tenant/2026_07_11_160340_add_fields_to_dropbox_mails.php
  • resources/js/Components/PageContainerWithSideOnLeft.tsx
  • resources/js/Components/twc-ui/status-icon.tsx
  • resources/js/Pages/Admin/Dropbox/DropboxEdit.tsx
  • resources/js/Pages/App/Email/EmailAttachment.tsx
  • resources/js/Pages/App/Email/EmailAttachments.tsx
  • resources/js/Pages/App/Email/EmailIndex.tsx
  • resources/js/Pages/App/Invoice/InvoiceIndexColumns.tsx
  • resources/js/Types/generated.d.ts
  • resources/typescript-transformer-manifest.json
💤 Files with no reviewable changes (1)
  • app/Broadcasting/GeneralChannel.php

Comment thread app/Models/DropboxMail.php
Comment on lines +35 to +36
'is_inbound' => $mail->dropbox->real_email !== $mail->from,
'is_visible_in_activity' => false,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '\n== DropboxService outline ==\n'
ast-grep outline app/Services/DropboxService.php --view expanded || true

printf '\n== Search real_email and is_inbound ==\n'
rg -n "real_email|is_inbound" app database routes resources tests --glob '!vendor' || true

printf '\n== Relevant file list ==\n'
git ls-files | rg 'DropboxService\.php|migration|dropbox|mail' || true

Repository: dspangenberg/opsc

Length of output: 22427


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo '== DropboxService =='
cat -n app/Services/DropboxService.php | sed -n '1,220p'

echo
echo '== DropboxRequest =='
cat -n app/Http/Requests/DropboxRequest.php | sed -n '1,120p'

echo
echo '== Dropbox model =='
cat -n app/Models/Dropbox.php | sed -n '1,160p'

echo
echo '== DropboxData =='
cat -n app/Data/DropboxData.php | sed -n '1,120p'

echo
echo '== real_email migration =='
cat -n database/migrations/tenant/2026_07_11_155124_add_real_email_to_dropboxes.php | sed -n '1,120p'

Repository: dspangenberg/opsc

Length of output: 8079


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo '== real_email usages =='
rg -n "real_email" app database resources tests --glob '!vendor' || true

echo
echo '== dropbox-related migrations =='
cat -n database/migrations/tenant/2026_03_09_180707? 2>/dev/null || true

echo
echo '== recent dropbox table migrations =='
for f in \
  database/migrations/tenant/2026_03_09_180707_create_dropboxes_table.php \
  database/migrations/tenant/2026_03_27_171901_add_user_to_dropboxes.php \
  database/migrations/tenant/2026_07_11_155124_add_real_email_to_dropboxes.php \
  database/migrations/tenant/2026_07_11_160340_add_fields_to_dropbox_mails.php
do
  if [ -f "$f" ]; then
    echo "--- $f ---"
    cat -n "$f" | sed -n '1,220p'
  fi
done

Repository: dspangenberg/opsc

Length of output: 3731


real_email bei vorhandenen Dropboxen separat behandeln.
Bei Dropboxen ohne gesetztes real_email wird null !== $mail->from immer true, wodurch importierte Mails als eingehend gespeichert werden. null vor dem Vergleich abfangen oder den Wert vor dem Import nachziehen.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@app/Services/DropboxService.php` around lines 35 - 36, Update the inbound
classification in DropboxService around the is_inbound assignment to handle a
missing dropbox->real_email before comparing it with mail->from, so null does
not automatically mark imported mail as inbound. Preserve the existing
comparison behavior when real_email is present.

Comment thread resources/js/Pages/Admin/Dropbox/DropboxEdit.tsx
Comment thread resources/js/Pages/App/Email/EmailAttachments.tsx Outdated
@dspangenberg
dspangenberg merged commit 8792934 into main Jul 11, 2026
3 checks passed
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.

1 participant