Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { FEATURE_FLAGS } from "@superset/shared/constants";
import {
DropdownMenu,
DropdownMenuContent,
Expand All @@ -9,7 +8,6 @@ import { toast } from "@superset/ui/sonner";
import { Tooltip, TooltipContent, TooltipTrigger } from "@superset/ui/tooltip";
import { cn } from "@superset/ui/utils";
import { useMatchRoute, useNavigate } from "@tanstack/react-router";
import { useFeatureFlagEnabled } from "posthog-js/react";
import { HiMiniPlus, HiOutlineClipboardDocumentList } from "react-icons/hi2";
import {
LuClock,
Expand Down Expand Up @@ -72,10 +70,6 @@ export function DashboardSidebarHeader({
const isTasksOpen = !!matchRoute({ to: "/tasks", fuzzy: true });
const isAutomationsOpen = !!matchRoute({ to: "/automations", fuzzy: true });

const showAutomations = useFeatureFlagEnabled(
FEATURE_FLAGS.AUTOMATIONS_ACCESS,
);

const {
tab: lastTab,
assignee: lastAssignee,
Expand Down Expand Up @@ -125,6 +119,24 @@ export function DashboardSidebarHeader({
<TooltipContent side="right">Workspaces</TooltipContent>
</Tooltip>

<Tooltip delayDuration={300}>
<TooltipTrigger asChild>
<button
type="button"
onClick={handleAutomationsClick}
className={cn(
"flex size-8 items-center justify-center rounded-md transition-colors",
isAutomationsOpen
? "bg-accent text-foreground"
: "text-muted-foreground hover:bg-accent/50 hover:text-foreground",
)}
>
<LuClock className="size-4" />
</button>
</TooltipTrigger>
<TooltipContent side="right">Automations</TooltipContent>
</Tooltip>

<Tooltip delayDuration={300}>
<TooltipTrigger asChild>
<button
Expand All @@ -143,26 +155,6 @@ export function DashboardSidebarHeader({
<TooltipContent side="right">Tasks</TooltipContent>
</Tooltip>
Comment on lines +140 to +156
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Automations/Tasks order flips between collapsed and expanded views

In the collapsed sidebar the order is Workspaces → Tasks → Automations (lines 122 → 140), but in the expanded sidebar it is Workspaces → Automations → Tasks (lines 234 → 248). Since the flag guard previously hid Automations for most users this mismatch was invisible, but now that Automations is always shown every user who toggles the sidebar will see the two items swap positions. Consistent ordering between the two states is expected behavior for this kind of collapsible nav pattern.

Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/desktop/src/renderer/routes/_authenticated/_dashboard/components/DashboardSidebar/components/DashboardSidebarHeader/DashboardSidebarHeader.tsx
Line: 140-156

Comment:
**Automations/Tasks order flips between collapsed and expanded views**

In the collapsed sidebar the order is Workspaces → Tasks → Automations (lines 122 → 140), but in the expanded sidebar it is Workspaces → Automations → Tasks (lines 234 → 248). Since the flag guard previously hid Automations for most users this mismatch was invisible, but now that Automations is always shown every user who toggles the sidebar will see the two items swap positions. Consistent ordering between the two states is expected behavior for this kind of collapsible nav pattern.

How can I resolve this? If you propose a fix, please make it concise.


{showAutomations && (
<Tooltip delayDuration={300}>
<TooltipTrigger asChild>
<button
type="button"
onClick={handleAutomationsClick}
className={cn(
"flex size-8 items-center justify-center rounded-md transition-colors",
isAutomationsOpen
? "bg-accent text-foreground"
: "text-muted-foreground hover:bg-accent/50 hover:text-foreground",
)}
>
<LuClock className="size-4" />
</button>
</TooltipTrigger>
<TooltipContent side="right">Automations</TooltipContent>
</Tooltip>
)}

<Tooltip delayDuration={300}>
<TooltipTrigger asChild>
<button
Expand Down Expand Up @@ -239,21 +231,19 @@ export function DashboardSidebarHeader({
<span className="flex-1 text-left">Workspaces</span>
</button>

{showAutomations && (
<button
type="button"
onClick={handleAutomationsClick}
className={cn(
"flex w-full items-center gap-2 rounded-md px-2 py-1.5 text-sm font-medium transition-colors",
isAutomationsOpen
? "bg-accent text-foreground"
: "text-muted-foreground hover:bg-accent/50 hover:text-foreground",
)}
>
<LuClock className="size-4 shrink-0" />
<span className="flex-1 text-left">Automations</span>
</button>
)}
<button
type="button"
onClick={handleAutomationsClick}
className={cn(
"flex w-full items-center gap-2 rounded-md px-2 py-1.5 text-sm font-medium transition-colors",
isAutomationsOpen
? "bg-accent text-foreground"
: "text-muted-foreground hover:bg-accent/50 hover:text-foreground",
)}
>
<LuClock className="size-4 shrink-0" />
<span className="flex-1 text-left">Automations</span>
Comment thread
cubic-dev-ai[bot] marked this conversation as resolved.
</button>

<button
type="button"
Expand Down
7 changes: 0 additions & 7 deletions packages/shared/src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,6 @@ export const FEATURE_FLAGS = {
CLOUD_ACCESS: "cloud-access",
/** When enabled, blocks remote agent execution on the desktop (e.g., for enterprise orgs). */
DISABLE_REMOTE_AGENT: "disable-remote-agent",
/**
* Gates the Automations feature in the UI (sidebar entry, routes, create
* flow). Complementary to the subscriptions.plan paid-tier check —
* server-side procedures still enforce paid plan; this flag controls
* UI visibility and staged rollout.
*/
AUTOMATIONS_ACCESS: "automations-access",
/**
* Routes the Slack agent to the v2 MCP server (`@superset/mcp-v2`)
* instead of v1 (`@superset/mcp`). Evaluated against the linking
Expand Down
Loading