Skip to content

feat(desktop): remove automations-access feature flag#4213

Merged
saddlepaddle merged 2 commits intomainfrom
remove-automations-flag
May 8, 2026
Merged

feat(desktop): remove automations-access feature flag#4213
saddlepaddle merged 2 commits intomainfrom
remove-automations-flag

Conversation

@saddlepaddle
Copy link
Copy Markdown
Collaborator

@saddlepaddle saddlepaddle commented May 7, 2026

Summary

  • Drops the automations-access PostHog flag — Automations is now visible in the sidebar for everyone
  • Paid-plan paywall (GATED_FEATURES.AUTOMATIONS) still gates actual access via the route + click handler

Test plan

  • Sidebar shows Automations entry for users without the flag set
  • Clicking Automations on a free plan triggers the paywall
  • Clicking Automations on a paid plan navigates to /automations

Note: the automations-access flag in PostHog (Production) is left in place for now and can be deleted separately.


Summary by cubic

Makes Automations visible in the desktop sidebar for all users by removing the automations-access feature flag; access is still enforced by GATED_FEATURES.AUTOMATIONS (free plans see the paywall; paid plans go to /automations). Also aligns the collapsed sidebar order with the expanded view (Automations before Tasks).

  • Refactors

    • Removed FEATURE_FLAGS.AUTOMATIONS_ACCESS from @superset/shared/constants.
    • Dropped useFeatureFlagEnabled gating in DashboardSidebarHeader; the Automations button always renders and the click handler enforces paywall/navigation.
  • Bug Fixes

    • Collapsed sidebar order now matches expanded: Automations appears before Tasks.

Written for commit 7f39fbf. Summary will update on new commits.

Summary by CodeRabbit

  • Refactor
    • Automations sidebar entry is now always visible in both collapsed and expanded layouts; users can see the Automations option at all times. Access to Automations functionality remains restricted and is enforced when attempting to navigate to it, so only permitted users can enter the feature.

Automations is now available to everyone (paid-plan paywall still
enforces actual access via GATED_FEATURES.AUTOMATIONS).
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 7, 2026

Review Change Stack
No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: f38fe29f-eac6-4d79-b10c-a95859541839

📥 Commits

Reviewing files that changed from the base of the PR and between 40596e2 and 7f39fbf.

📒 Files selected for processing (1)
  • apps/desktop/src/renderer/routes/_authenticated/_dashboard/components/DashboardSidebar/components/DashboardSidebarHeader/DashboardSidebarHeader.tsx
🚧 Files skipped from review as they are similar to previous changes (1)
  • apps/desktop/src/renderer/routes/_authenticated/_dashboard/components/DashboardSidebar/components/DashboardSidebarHeader/DashboardSidebarHeader.tsx

📝 Walkthrough

Walkthrough

This PR removes the AUTOMATIONS_ACCESS feature flag and refactors the dashboard sidebar to always render the Automations entry; route-match booleans control active styling and access checks are performed in the click handler via gateFeature.

Changes

Automations Feature Flag Consolidation

Layer / File(s) Summary
Feature Flag Removal
packages/shared/src/constants.ts
Removes the AUTOMATIONS_ACCESS entry from the exported FEATURE_FLAGS constant.
Sidebar Component Refactoring
apps/desktop/src/renderer/routes/_authenticated/_dashboard/components/DashboardSidebar/components/DashboardSidebarHeader/DashboardSidebarHeader.tsx
Removes FEATURE_FLAGS and useFeatureFlagEnabled imports, drops conditional showAutomations rendering, computes isAutomationsOpen from route, and renders the Automations button/row unconditionally (collapsed and expanded views). Access gating remains inside the Automations click handler.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 A flag fell off the log today,
Automations hops out to play.
The button's shown, the click will check,
Routes mark when it earns respect.
Hooray for simpler paths to sway!

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Description check ❓ Inconclusive The description includes a summary, test plan, and additional notes; however, it lacks the required template sections like 'Related Issues', 'Type of Change', 'Testing', and 'Screenshots'. Add the missing template sections (Related Issues, Type of Change, Testing, Screenshots) to complete the pull request description.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely summarizes the main change: removing the automations-access feature flag from the desktop app.
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch remove-automations-flag

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.

@greptile-apps
Copy link
Copy Markdown

greptile-apps Bot commented May 7, 2026

Greptile Summary

This PR removes the automations-access PostHog feature flag, making the Automations sidebar entry visible to all users. The paid-plan paywall (GATED_FEATURES.AUTOMATIONS) is preserved so free-plan users are still blocked from accessing the route.

  • FEATURE_FLAGS.AUTOMATIONS_ACCESS is deleted from packages/shared/src/constants.ts and all call sites (useFeatureFlagEnabled, conditional rendering) are removed from DashboardSidebarHeader.tsx — no dangling references remain.
  • Both the collapsed and expanded sidebar variants now unconditionally render the Automations button, with handleAutomationsClick still delegating to gateFeature for plan enforcement.

Confidence Score: 3/5

Safe to merge from a gating perspective, but the collapsed and expanded sidebar render Automations and Tasks in opposite orders, which will be visible to every user now that the flag guard is gone.

The paywall is intact and the flag removal itself is clean with no dangling references. The concern is the item-order mismatch between the collapsed sidebar (Tasks → Automations) and the expanded sidebar (Automations → Tasks): previously hidden by the flag for most users, it is now universally observable and will cause the two nav items to swap positions whenever the sidebar is toggled.

DashboardSidebarHeader.tsx — the collapsed and expanded branches need their item ordering aligned.

Important Files Changed

Filename Overview
apps/desktop/src/renderer/routes/_authenticated/_dashboard/components/DashboardSidebar/components/DashboardSidebarHeader/DashboardSidebarHeader.tsx Removes the PostHog flag guard for Automations; both collapsed and expanded sidebar now always render the button. Introduces a visible ordering inconsistency: Tasks precedes Automations in the collapsed view but follows it in the expanded view.
packages/shared/src/constants.ts Removes the AUTOMATIONS_ACCESS entry from FEATURE_FLAGS; no remaining references to the key exist in the codebase.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[User clicks Automations in sidebar] --> B[handleAutomationsClick]
    B --> C[gateFeature GATED_FEATURES.AUTOMATIONS]
    C --> D{Paid plan?}
    D -- Yes --> E[navigate to /automations]
    D -- No --> F[Show paywall modal]

    subgraph "Before PR"
        G[PostHog automations-access flag] -->|enabled| H[Show sidebar button]
        G -->|disabled| I[Hide sidebar button]
    end

    subgraph "After PR"
        J[Sidebar button always visible] --> B
    end
Loading
Prompt To Fix All With AI
Fix the following 1 code review issue. Work through them one at a time, proposing concise fixes.

---

### Issue 1 of 1
apps/desktop/src/renderer/routes/_authenticated/_dashboard/components/DashboardSidebar/components/DashboardSidebarHeader/DashboardSidebarHeader.tsx:140-156
**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.

Reviews (1): Last reviewed commit: "feat(desktop): remove automations-access..." | Re-trigger Greptile

Comment on lines +140 to +156
<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>
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.

Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

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

1 issue found across 2 files

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="apps/desktop/src/renderer/routes/_authenticated/_dashboard/components/DashboardSidebar/components/DashboardSidebarHeader/DashboardSidebarHeader.tsx">

<violation number="1" location="apps/desktop/src/renderer/routes/_authenticated/_dashboard/components/DashboardSidebar/components/DashboardSidebarHeader/DashboardSidebarHeader.tsx:245">
P2: Automations/Tasks ordering is inconsistent between collapsed and expanded sidebar states. In the collapsed view the order is Tasks → Automations, but here in the expanded view Automations comes before Tasks. Now that Automations is unconditionally shown, toggling the sidebar will cause users to see these items swap positions. Move this Automations button below the Tasks button to match the collapsed view ordering.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 7, 2026

🚀 Preview Deployment

🔗 Preview Links

Service Status Link
Neon Database (Neon) View Branch
Vercel API (Vercel) Open Preview
Vercel Web (Vercel) Open Preview
Vercel Marketing (Vercel) Open Preview
Vercel Admin (Vercel) Open Preview
Vercel Docs (Vercel) Open Preview

Preview updates automatically with new commits

@saddlepaddle saddlepaddle merged commit 26b847b into main May 8, 2026
16 checks passed
MocA-Love pushed a commit to MocA-Love/superset that referenced this pull request May 8, 2026
Recorded as integrated via -s ours after batch PRs #455-#464.

Taken via individual PRs:
- PR  1 (#455): v2 polish 前半 safe set (9 commits)
- PR  2 (#456): v2/host-service polish 中盤 (12 commits)
- PR  3 (#457): sidebar polish + jwt API (5 commits)
- PR  4 (#458): host-service tRPC retry/cache/timeout (3 commits)
- PR  5 (#459): v2 diff pane / file pane polish (2 commits)
- PR  7 (#462): host-service v2 canonical workspace.create + attachment store (PR1 superset-sh#3893 + PR2 superset-sh#3916)
- PR 11 (#463): agents API + onboarding (7 commits + 1 cleanup)
- PR 12 (#464): v1→v2 import flow rewrite (11 commits + 2 follow-ups)
- PR 13 (#460): host-service shell env probe + typo (2 commits)
- PR 16 (#461): marketplace 19 themes (1 commit)

Skipped / deferred (recorded as integrated for behind=0):
- PR  6: CLI v1 launch (superset-sh#3898 + 30+ CLI/SDK followups) — defer to dedicated migration
- PR  9: v2 PR3 (superset-sh#3940) + revert (superset-sh#4017) — net-zero pair
- PR 10: pty-daemon (superset-sh#3896, superset-sh#3971, superset-sh#4054) — fork keeps its terminal-host
- PR 14: Slack MCP-v2 (superset-sh#4197, superset-sh#4208) — depends on mcp-v2/sdk divergence
- PR 15: onboarding remaining (superset-sh#4115, superset-sh#4125, superset-sh#4214, superset-sh#4213, superset-sh#4222, superset-sh#4225) — depends on fork's deleted setup pages

Behind: 0 after this merge.
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