Skip to content

Add section-aware 'Create' item to sidebar link context menus#2766

Open
jbecke wants to merge 1 commit intomainfrom
codex/add-new-document,-task,-email,-folder,-call,-agent
Open

Add section-aware 'Create' item to sidebar link context menus#2766
jbecke wants to merge 1 commit intomainfrom
codex/add-new-document,-task,-email,-folder,-call,-agent

Conversation

@jbecke
Copy link
Copy Markdown
Contributor

@jbecke jbecke commented Apr 22, 2026

Motivation

  • Provide quick "New ..." actions in the sidebar link context menu so users can create a new document, task, email, folder, agent, or message scoped to the selected sidebar section.
  • Reuse existing launcher create flows rather than implementing new creation logic.

Description

  • Import runCreateAction from @app/component/Launcher and keep the existing createMenuOpen usage in js/app/packages/app/component/app-sidebar/sidebar.tsx.
  • Add a createAction helper that maps props.id (sidebar section ids like documents, tasks, mail, folders, agents, channels) to an action object with text and onClick which calls runCreateAction with the appropriate block type.
  • Render a conditional create MenuItem (via <Show when={createAction()}>) appended to the existing context menu entries Open in new split, Open fullscreen, and Open in current split.
  • The change adds a contextual menu label (e.g., New document, New task, New email, New folder, New agent, New message) and wires it to existing launcher handlers.

Testing

  • Ran type check with bun run check in js/app, which failed in this environment due to missing type definition packages (examples: @types/facebook-pixel, vite/client, wicg-file-system-access).
  • No other automated tests were executed in this environment.

Codex Task

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 22, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: d9225d82-89f6-4f3b-9565-a714a2c9e0da

📥 Commits

Reviewing files that changed from the base of the PR and between de2c248 and 841ad11.

📒 Files selected for processing (1)
  • js/app/packages/app/component/app-sidebar/sidebar.tsx

📝 Walkthrough

Summary by CodeRabbit

New Features

  • Sidebar context menu now includes a "create new..." option for supported item types
  • Users can quickly create documents, tasks, emails, projects, chats, or channels directly from the sidebar
  • Menu option intelligently appears only for compatible link types to streamline navigation

Walkthrough

The sidebar link context menu adds conditional "create new..." menu items based on the clicked link's props.id. A createAction mapping determines appropriate menu labels and routes selections through runCreateAction with specific action types (md, task, email, project, chat, channel). The menu item is only rendered for supported props.id values.

Changes

Cohort / File(s) Summary
Sidebar Context Menu Enhancement
js/app/packages/app/component/app-sidebar/sidebar.tsx
Added conditional "create new..." menu item to sidebar link context menu with createAction mapping for supported action types (md, task, email, project, chat, channel). Menu renders only for matching props.id values via Solid Show guard. Launcher module import updated.
🚥 Pre-merge checks | ✅ 3 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Title check ⚠️ Warning The title does not follow the required conventional commits format (feat:, fix:, chore:, etc.). Rewrite the title to follow conventional commits format, such as 'feat: Add section-aware Create item to sidebar link context menus' (keeping under 72 characters).
✅ Passed checks (3 passed)
Check name Status Explanation
Description check ✅ Passed The description is directly related to the changeset, providing clear motivation, implementation details, and testing information.
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.


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.

@github-actions
Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant