Skip to content

ENG-2032 Disable sidebar open not respected#1233

Draft
mdroidian wants to merge 1 commit into
mainfrom
cursor/fix-disable-sidebar-open-setting-dfd6
Draft

ENG-2032 Disable sidebar open not respected#1233
mdroidian wants to merge 1 commit into
mainfrom
cursor/fix-disable-sidebar-open-setting-dfd6

Conversation

@mdroidian

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 by:

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

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), and is properly disabled when the setting is true.

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 properly respect the "Disable sidebar open" setting.

Notes

The fix is defensive and handles edge cases where the setting might not be properly initialized or might have unexpected values.

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 14, 2026 9:10pm

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 ↗︎.

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