Add section-aware 'Create' item to sidebar link context menus#2766
Add section-aware 'Create' item to sidebar link context menus#2766
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughSummary by CodeRabbitNew Features
WalkthroughThe 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
🚥 Pre-merge checks | ✅ 3 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (3 passed)
✏️ 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. Comment |
Motivation
Description
runCreateActionfrom@app/component/Launcherand keep the existingcreateMenuOpenusage injs/app/packages/app/component/app-sidebar/sidebar.tsx.createActionhelper that mapsprops.id(sidebar section ids likedocuments,tasks,mail,folders,agents,channels) to an action object withtextandonClickwhich callsrunCreateActionwith the appropriate block type.MenuItem(via<Show when={createAction()}>) appended to the existing context menu entriesOpen in new split,Open fullscreen, andOpen in current split.New document,New task,New email,New folder,New agent,New message) and wires it to existing launcher handlers.Testing
bun run checkinjs/app, which failed in this environment due to missing type definition packages (examples:@types/facebook-pixel,vite/client,wicg-file-system-access).Codex Task