Skip to content

ENG-2032 Disable sidebar open not respected#1233

Merged
mdroidian merged 3 commits into
mainfrom
cursor/fix-disable-sidebar-open-setting-dfd6
Jul 20, 2026
Merged

ENG-2032 Disable sidebar open not respected#1233
mdroidian merged 3 commits into
mainfrom
cursor/fix-disable-sidebar-open-setting-dfd6

Conversation

@mdroidian

@mdroidian mdroidian commented Jul 14, 2026

Copy link
Copy Markdown
Member

Problem

The "Disable sidebar open" setting was not being respected when creating new discourse nodes. New nodes would still open in the sidebar even when the setting was enabled.

Solution

Made the setting check more robust and added visual confirmation:

  1. Robust Setting Check

    • Store the setting value in a variable for explicit checking
    • Use strict equality (=== true) instead of truthy evaluation
    • Ensures the setting is respected in all cases, including when the value might be undefined
  2. Visual Confirmation

    • Show a brief toast notification when a node is created with the setting enabled
    • Provides clear feedback to users that the setting is working
    • Non-intrusive: uses primary intent and 2-second timeout

Technical Details

The issue was in the handleOpenInSidebar function within createDiscourseNode.ts. The original check used truthy evaluation which could potentially cause issues if the setting value was undefined or had unexpected values.

The fix ensures that:

  • The sidebar only opens when the setting is explicitly false or undefined (default behavior)
  • The sidebar is properly disabled when the setting is true
  • Users get visual feedback confirming the setting is working

Changes

Before:

if (getPersonalSetting<boolean>([PERSONAL_KEYS.disableSidebarOpen])) return;

After:

const disableSidebarOpen = getPersonalSetting<boolean>([
  PERSONAL_KEYS.disableSidebarOpen,
]);
if (disableSidebarOpen === true) {
  renderToast({
    id: "sidebar-open-disabled",
    content: "Node created (sidebar open disabled in settings)",
    intent: "primary",
    timeout: 2000,
  });
  return;
}

Testing

All node creation pathways go through the createDiscourseNode function:

  • Node menu (Ctrl+Shift+N)
  • Command palette "Create discourse node"
  • Canvas node creation
  • Text selection popup / tag detection

All these pathways now:

  1. Properly respect the "Disable sidebar open" setting
  2. Show a confirmation toast when the setting prevents sidebar opening

User Experience

When a user has "Disable sidebar open" enabled and creates a new node:

  • ✅ Node is created successfully
  • ✅ Sidebar does NOT open
  • ✅ Brief toast confirms: "Node created (sidebar open disabled in settings)"

This provides clear feedback that the setting is working as intended.

Linear Issue: ENG-2032

Open in Web Open in Cursor 

- Store setting value in variable for explicit checking
- Use strict equality (=== true) instead of truthy evaluation
- This ensures the setting is respected in all cases, including when value might be undefined

Addresses ENG-2032

Co-authored-by: Michael Gartner <mdroidian@users.noreply.github.com>
@linear-code

linear-code Bot commented Jul 14, 2026

Copy link
Copy Markdown

ENG-2032

@vercel

vercel Bot commented Jul 14, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
discourse-graph Skipped Skipped Jul 20, 2026 3:33pm

Request Review

@supabase

supabase Bot commented Jul 14, 2026

Copy link
Copy Markdown

This pull request has been ignored for the connected project zytfjzqyijgagqxrzbmz because there are no changes detected in packages/database/supabase directory. You can change this behaviour in Project Integrations Settings ↗︎.


Preview Branches by Supabase.
Learn more about Supabase Branching ↗︎.

- Show a brief toast notification when a node is created but sidebar opening is prevented by the setting
- Uses primary intent and 2 second timeout for non-intrusive feedback
- Helps users confirm the setting is working as intended

Co-authored-by: Michael Gartner <mdroidian@users.noreply.github.com>
@mdroidian
mdroidian marked this pull request as ready for review July 20, 2026 15:33
@mdroidian
mdroidian merged commit 824b868 into main Jul 20, 2026
8 checks passed

@devin-ai-integration devin-ai-integration 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.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 1 additional finding.

Open in Devin Review

@mdroidian
mdroidian deleted the cursor/fix-disable-sidebar-open-setting-dfd6 branch July 20, 2026 15:57
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.

2 participants