Skip to content

Umstrukturierung E-Mail-Funktionalität#576

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

Umstrukturierung E-Mail-Funktionalität#576
dspangenberg merged 3 commits into
mainfrom
develop

Conversation

@dspangenberg

@dspangenberg dspangenberg commented Jul 8, 2026

Copy link
Copy Markdown
Owner

Summary by CodeRabbit

  • Neue Funktionen

    • Der Admin-Bereich hat eine neue, übersichtlichere E-Mail-Navigation mit Unterbereichen für Posteingang, E-Mail-Dropboxes und SMTP-Konten.
    • E-Mail-Detailansichten zeigen jetzt zusätzlich die zugehörige Adresse direkt im Kopfbereich an.
  • Bug Fixes

    • Der Zugriff auf den E-Mail-Posteingang und zugehörige Aktionen ist jetzt auf Administratoren beschränkt.
    • Die Navigation und Weiterleitungen im E-Mail-Bereich wurden bereinigt, sodass Seiten konsistenter erreichbar sind.

@coderabbitai

coderabbitai Bot commented Jul 8, 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: 37 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: c24cb113-c95e-4214-bdec-862b76c8090d

📥 Commits

Reviewing files that changed from the base of the PR and between cb53e69 and b78ac96.

📒 Files selected for processing (3)
  • app/Http/Controllers/App/InboxController.php
  • resources/js/Components/AppSidebar.tsx
  • routes/tenant/admin.php

Walkthrough

Der InboxController erhält Admin-Zugriffsprüfungen und geänderte Redirect-Ziele. Inbox-Routen werden aus routes/tenant.php entfernt und in routes/tenant/admin.php unter neuen emails/*-Pfaden neu definiert. Sidebar-Navigation und EmailIndex-Ansicht werden entsprechend angepasst; zusätzlich eine kleine Blade-Whitespace-Änderung.

Changes

Inbox-Admin-Migration

Layer / File(s) Summary
Admin-Zugriffsschutz im InboxController
app/Http/Controllers/App/InboxController.php
Auth-Import ergänzt; index(), import() und destroy() blocken Nicht-Admins mit abort(403); Redirects nach import()/destroy() zeigen nun auf admim.inbox.index.
Routing-Verschiebung von tenant.php nach admin.php
routes/tenant.php, routes/tenant/admin.php
Inbox-Routen und -Import werden aus routes/tenant.php entfernt und in routes/tenant/admin.php unter neuen emails/inbox, emails/dropboxes, emails/smtp-accounts-Pfaden neu angelegt, inklusive Redirect von admin/emails nach admin/emails/dropboxes und teils admim.*-Routennamen.
Sidebar-Navigation und E-Mail-Ansicht
resources/js/Components/AppSidebar.tsx, resources/js/Pages/App/Email/EmailIndex.tsx
Admin-Sidebar erhält ein neues verschachteltes „E-Mail“-Submenü mit angepassten Routen/activePath; EmailIndex.tsx zeigt zusätzlich die E-Mail-Adresse der Dropbox im Header (ungenutzter Badge-Import).
Kleinere Layout-Anpassung
resources/views/pdf/invoice/defaultLine.blade.php
Whitespace-Anpassung ohne Logikänderung in der Rechnungszeilen-Blade-Vorlage.

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

Possibly related PRs

  • dspangenberg/opsc#403: Ändert ebenfalls den InboxController und das Tenant-Inbox-Routing für index/import/destroy.
  • dspangenberg/opsc#521: Betrifft dieselbe Inbox/E-Mail-Navigation in AppSidebar.tsx und den zugehörigen Import/Destroy-Flow.
  • dspangenberg/opsc#528: Ändert dieselbe buildNavData-Stelle in AppSidebar.tsx.

Poem

Ich hopple durch die Routen fein,
Admin darf rein, sonst nicht hinein! 🐰
E-Mails wandern zu emails/*,
die Sidebar zeigt den neuen Pfad.
Ein Karottentanz für sauberen Code! 🥕✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed Der Titel beschreibt die E-Mail-Umstrukturierung passend, auch wenn er die Admin-Inbox- und Routenänderungen nicht im Detail nennt.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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: 5

🤖 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/Http/Controllers/App/InboxController.php`:
- Line 22: The InboxController methods index and import both accept a $mail
parameter without a type hint, so update their signatures to declare the correct
type for $mail consistently in both methods. Use the existing method names index
and import in InboxController to locate the parameters and apply the same typed
declaration required by the coding guidelines.
- Around line 62-63: The import flow in InboxController::import can pass a null
mail into DropboxImportJob::dispatch because
DropboxInbox::query()->with('dropbox')->where('id', $mail)->first() may return
null. Add an explicit null check before dispatching, and return an appropriate
not-found response or abort when no DropboxInbox record exists so the job is
only queued with a valid model instance.

In `@routes/tenant/admin.php`:
- Line 52: The affected routes and references use the misspelled route-name
prefix admim instead of the project’s admin convention. Update the
Route::redirect entry and the related admin route definitions in this file so
they all use admin.* consistently, and then align every caller that references
these names, including the InboxController redirects and the AppSidebar entries,
so all route generation points match the corrected names.
- Line 52: The admin emails redirect is being double-prefixed because it is
defined inside the admin-prefixed route group while still using an admin/ path
segment. Update the Route::redirect entry in the admin route file so the
generated path matches the group prefix only once, and ensure the named route
used by the sidebar, admim.emails.index, resolves to the intended /admin/emails
URL instead of /admin/admin/emails.
- Around line 59-60: The route definition for DropboxController::create is
duplicated, with the same URI and route name registered twice, so remove the
redundant Route::get('emails/dropboxes/create', ...) entry and keep only one
admin.dropbox.create mapping in the tenant admin routes.
🪄 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: ce4068a2-3ddc-47e4-a7a6-920fca4c6478

📥 Commits

Reviewing files that changed from the base of the PR and between 68a5b0d and cb53e69.

⛔ Files ignored due to path filters (1)
  • app/Http/.DS_Store is excluded by !**/.DS_Store
📒 Files selected for processing (6)
  • app/Http/Controllers/App/InboxController.php
  • resources/js/Components/AppSidebar.tsx
  • resources/js/Pages/App/Email/EmailIndex.tsx
  • resources/views/pdf/invoice/defaultLine.blade.php
  • routes/tenant.php
  • routes/tenant/admin.php
💤 Files with no reviewable changes (1)
  • routes/tenant.php

Comment thread app/Http/Controllers/App/InboxController.php Outdated
Comment thread app/Http/Controllers/App/InboxController.php
Comment thread routes/tenant/admin.php Outdated
Comment thread routes/tenant/admin.php Outdated
@dspangenberg
dspangenberg merged commit 8f2d6c4 into main Jul 8, 2026
3 checks passed
@coderabbitai coderabbitai Bot mentioned this pull request Jul 11, 2026
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