From 2c52c90b6e4bdc4c1b91c5f92bae6c75420ba258 Mon Sep 17 00:00:00 2001 From: Paulo Castellano Date: Sat, 18 Jul 2026 10:58:07 -0300 Subject: [PATCH] fix(mobile): polish automations, dialogs, workspaces and post views - automations: minimal back-only header on mobile for the workflow builder and detail tabs (extracted AutomationMobileBackHeader); open live automations on the metrics tab (drafts still open on workflow); full-width status filter + refresh on the invocations toolbar; use IconMenu2 for the mobile sidebar trigger - dialogs: stack DialogFooter primary-on-top / cancel-at-bottom on mobile - workspaces: bring the workspace picker cards into the neo-brutalist design - posts: left-align the label filter content; wrap the post-view date/status header so a long status badge no longer squeezes the date; add hamburger clearance to the editor's mobile tab bar --- CLAUDE.md | 2 +- .../Controllers/App/AutomationController.php | 7 +- .../automations/AutomationHeader.vue | 5 +- .../AutomationMobileBackHeader.vue | 21 ++++ .../js/components/labels/LabelFilter.vue | 36 +++--- .../posts/editor/PostEditorMobileNav.vue | 2 +- .../js/components/ui/dialog/DialogFooter.vue | 2 +- .../components/ui/sidebar/SidebarTrigger.vue | 5 +- resources/js/pages/automations/Form.vue | 5 +- resources/js/pages/automations/Index.vue | 10 +- .../js/pages/automations/Invocations.vue | 105 +++++++++--------- resources/js/pages/posts/Show.vue | 2 +- resources/js/pages/workspaces/Index.vue | 6 +- tests/Browser/MobileAutomationsTest.php | 21 ++++ tests/Feature/Automation/DetailTabsTest.php | 16 ++- 15 files changed, 163 insertions(+), 82 deletions(-) create mode 100644 resources/js/components/automations/AutomationMobileBackHeader.vue diff --git a/CLAUDE.md b/CLAUDE.md index a250825a..47f0196f 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -231,7 +231,7 @@ ## Frontend (Vue/TypeScript) ## Dialogs -- In ``, put the **primary action button first** in the markup, then secondary/cancel (e.g. Save → Cancel). `DialogFooter` uses `flex-col-reverse` on mobile and `sm:flex-row sm:justify-start` on desktop, so the first child is the leftmost action on larger screens. +- In ``, put the **primary action button first** in the markup, then secondary/cancel (e.g. Save → Cancel). `DialogFooter` uses `flex-col` on mobile (primary on top, cancel at the bottom) and `sm:flex-row sm:justify-start` on desktop, so the first child is the leftmost action on larger screens. - Match sibling dialogs in the same feature area before inventing a new footer layout. ## AI agents (`app/Ai/Agents`) diff --git a/app/Http/Controllers/App/AutomationController.php b/app/Http/Controllers/App/AutomationController.php index 474cc140..ee1a9e60 100644 --- a/app/Http/Controllers/App/AutomationController.php +++ b/app/Http/Controllers/App/AutomationController.php @@ -15,6 +15,7 @@ use App\Actions\Automation\Automation\UpdateAutomation; use App\Actions\Automation\Run\RetryRunFromNode; use App\Actions\Automation\Run\TestAutomation; +use App\Enums\Automation\Status; use App\Http\Controllers\Controller; use App\Http\Requests\App\Automations\ActivateAutomationRequest; use App\Http\Requests\App\Automations\InspectFeedRequest; @@ -77,7 +78,11 @@ public function show(Automation $automation): RedirectResponse { $this->authorize('view', $automation); - return redirect()->route('app.automations.workflow', $automation->id); + // A draft opens on the builder to be set up; a live automation (active + // or paused) opens on its metrics, where the user watches it run. + $tab = $automation->status === Status::Draft ? 'workflow' : 'metrics'; + + return redirect()->route("app.automations.{$tab}", $automation->id); } public function workflow(Automation $automation, GetAutomationEditorData $editorData): Response diff --git a/resources/js/components/automations/AutomationHeader.vue b/resources/js/components/automations/AutomationHeader.vue index 4b287a8c..303e36fa 100644 --- a/resources/js/components/automations/AutomationHeader.vue +++ b/resources/js/components/automations/AutomationHeader.vue @@ -3,6 +3,7 @@ import { Link } from '@inertiajs/vue3'; import { IconArrowLeft, IconCircleCheck, IconCircleDot, IconCircleX } from '@tabler/icons-vue'; import { trans } from 'laravel-vue-i18n'; +import AutomationMobileBackHeader from '@/components/automations/AutomationMobileBackHeader.vue'; import AutomationTabsNav from '@/components/automations/AutomationTabsNav.vue'; import { Badge } from '@/components/ui/badge'; import { Button } from '@/components/ui/button'; @@ -26,7 +27,9 @@ const statusConfig = (status: string) => {