Skip to content

Conversation

@notAreYouScared
Copy link
Member

Move Run Now to edit the page, as it's the first page when a schedule is editable.
Fixed the delete action icon missing.

the edit view is the first view and view requires a url edit to see the run now button..
@coderabbitai
Copy link

coderabbitai bot commented Dec 12, 2025

Caution

Review failed

The pull request is closed.

📝 Walkthrough

Walkthrough

Centralizes the DeleteAction icon in FilamentServiceProvider, removes explicit tabler-trash icon usage from log pages, adds a new run_now header action to EditSchedule with authorization and runtime execution, and removes the run_now action from ViewSchedule.

Changes

Cohort / File(s) Summary
Log page icon cleanup
app/Filament/Admin/Pages/ListLogs.php, app/Filament/Admin/Pages/ViewLogs.php
Removed explicit tabler-trash icon calls on DeleteAction; left iconSize/iconButton where present so DeleteAction uses the provider default.
Schedule: add runtime action
app/Filament/Server/Resources/Schedules/Pages/EditSchedule.php
Added run_now header action (icon button) with tenant-scoped authorization (SubuserPermission::ScheduleUpdate), dynamic tooltip/color/disabled states based on schedule/task status, execution calling ProcessScheduleService::handle($schedule, true), activity logging, and form refresh via fillForm(). Added related imports. Minor formatting change to DeleteAction chaining only.
Schedule: remove runtime action
app/Filament/Server/Resources/Schedules/Pages/ViewSchedule.php
Removed the run_now header action and its now-unused imports (ScheduleStatus, SubuserPermission, Activity, Filament facade, ProcessScheduleService).
Centralized icon configuration
app/Providers/Filament/FilamentServiceProvider.php
Added DeleteAction::configureUsing(...) in the provider boot to set a global default icon (tabler-trash) for delete actions.
Action icon swap
app/Filament/Components/Actions/ExportEggAction.php
Changed action icon from tabler-file-export to tabler-download (behavior unchanged).

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant FilamentUI as Filament (UI)
    participant Auth as Authorization
    participant TenantCtx as Filament Facade (tenant)
    participant ProcessSvc as ProcessScheduleService
    participant ActivityLog as Activity
    participant Form as Schedule Form

    User->>FilamentUI: Click "Run Now" (run_now action)
    FilamentUI->>TenantCtx: resolve current tenant & schedule
    FilamentUI->>Auth: check SubuserPermission::ScheduleUpdate for tenant
    Auth-->>FilamentUI: authorized / denied
    alt authorized
        FilamentUI->>ProcessSvc: ProcessScheduleService::handle(schedule, true)
        ProcessSvc-->>FilamentUI: success / failure
        FilamentUI->>ActivityLog: record "server:schedule.execute" with schedule name
        FilamentUI->>Form: fillForm() (refresh)
        FilamentUI-->>User: update UI (toast/state)
    else denied
        FilamentUI-->>User: show authorization error
    end
Loading

Possibly related PRs

Pre-merge checks

❌ Failed checks (1 warning, 1 inconclusive)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
Title check ❓ Inconclusive The title 'Fix schedule actions' is vague and generic, using non-specific terminology that doesn't convey the meaningful details of the changeset. Consider a more descriptive title such as 'Move Run Now action to EditSchedule page and restore delete action icon' that clearly communicates the main changes.
✅ Passed checks (1 passed)
Check name Status Explanation
Description check ✅ Passed The description clearly relates to the changeset, specifically mentioning the two main objectives: moving Run Now to the edit page and fixing the delete action icon.

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 038cafb and ecb86db.

📒 Files selected for processing (2)
  • app/Filament/Components/Actions/ExportEggAction.php (1 hunks)
  • app/Filament/Server/Resources/Schedules/Pages/EditSchedule.php (2 hunks)

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 and usage tips.

No reason to have it, acts like a back button...
@notAreYouScared notAreYouScared merged commit fdd9faa into main Dec 12, 2025
25 checks passed
@notAreYouScared notAreYouScared deleted the charles/fix-schedule-view branch December 12, 2025 23:31
@github-actions github-actions bot locked and limited conversation to collaborators Dec 12, 2025
@Boy132 Boy132 linked an issue Dec 17, 2025 that may be closed by this pull request
3 tasks
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cannot delete Nodes. Missing button

3 participants