Skip to content

feat(note-map): open node in split on cmd/ctrl+click#8677

Open
JeremieAlcaraz wants to merge 2 commits intoTriliumNext:mainfrom
JeremieAlcaraz:feat/note-map-mod-click-split
Open

feat(note-map): open node in split on cmd/ctrl+click#8677
JeremieAlcaraz wants to merge 2 commits intoTriliumNext:mainfrom
JeremieAlcaraz:feat/note-map-mod-click-split

Conversation

@JeremieAlcaraz
Copy link

@JeremieAlcaraz JeremieAlcaraz commented Feb 11, 2026

Summary

  • add Cmd/Ctrl + click handling on Note Map nodes
  • keep normal click behavior unchanged

Why

  • improve navigation speed from graph view by opening a target note directly in a right split

Scope

  • apps/client/src/widgets/note_map/NoteMap.tsx

Testing

  • local manual test: normal click still opens in current split
  • local manual test: Cmd (macOS) / Ctrl (Windows/Linux) + click opens a new split
  • build check: pnpm run --filter client build

@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Feb 11, 2026
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @JeremieAlcaraz, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly enhances user navigation within the Note Map by introducing a Cmd/Ctrl + click interaction that allows users to open notes directly into a new split view. This change aims to streamline the workflow for users who frequently navigate between related notes, providing a more efficient way to manage their workspace. Additionally, it lays the groundwork for future feature development by documenting a comprehensive plan for advanced graph search and filtering capabilities.

Highlights

  • Enhanced Navigation: Implemented Cmd/Ctrl + click functionality on Note Map nodes, allowing users to open the target note directly in a new split view for improved navigation speed.
  • Preserved Existing Behavior: Ensured that the standard click behavior for Note Map nodes remains unchanged, maintaining consistency for users.
  • Future Feature Planning: Introduced two new planning documents (PLAN.md and TASKS_PLAN.md) that outline a comprehensive roadmap for upcoming graph search, filtering, and further split-view enhancements.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Changelog
  • PLAN.md
    • Added a new document outlining the plan for implementing graph search, filtering, and Mod+Click split view features, including objectives, scope, architecture, phasing, risks, and success criteria.
  • TASKS_PLAN.md
    • Added a detailed task plan for the graph search, filter, and split view features, breaking down the work into epics with priorities, estimations, and recommended PR sequencing.
  • apps/client/src/widgets/note_map/NoteMap.tsx
    • Modified the onNodeClick event handler to detect metaKey (Cmd on macOS) or ctrlKey (Ctrl on Windows/Linux) to trigger openNewNoteSplit.
    • Introduced a new helper function isSplitModifierClick to encapsulate the logic for checking modifier key presses.
Activity
  • No specific activity (comments, reviews, etc.) has been recorded for this pull request yet.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@dosubot dosubot bot added size:S This PR changes 10-29 lines, ignoring generated files. and removed size:L This PR changes 100-499 lines, ignoring generated files. labels Feb 11, 2026
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a valuable enhancement for navigating the note map by allowing users to open notes in a new split with a modifier key plus click. The inclusion of detailed planning documents for future features is also a great addition, providing a clear roadmap.

The code changes are well-implemented. I have one suggestion to add a defensive check for the active context ID to improve the robustness of the new functionality. Overall, this is a solid contribution.

Comment on lines +82 to +83
const ntxId = appContext.tabManager.getActiveContext()?.ntxId;
appContext.triggerCommand("openNewNoteSplit", { ntxId, notePath: node.id });
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

It's possible for appContext.tabManager.getActiveContext() to return null, which would result in ntxId being undefined. The openNewNoteSplit command might require a valid ntxId to function correctly. Other parts of the codebase, such as link_context_menu.ts, include a guard to ensure ntxId is present before triggering a similar command.

To improve robustness and prevent potential silent failures, it would be best to add a check for ntxId before triggering the command. While TASKS_PLAN.md indicates that a fallback behavior is planned for a future task (T1.2), an explicit guard is a good practice for now.

                        const ntxId = appContext.tabManager.getActiveContext()?.ntxId;
                        if (ntxId) {
                            appContext.triggerCommand("openNewNoteSplit", { ntxId, notePath: node.id });
                        }

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

Labels

size:S This PR changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant