Skip to content

Conversation

@mdroidian
Copy link
Collaborator

@mdroidian mdroidian commented Dec 15, 2025

https://www.loom.com/share/70f0edaaf9be4dc4884b8cefd2bd30b8

Summary by CodeRabbit

  • Chores
    • Version bumped to 1.7.3
    • Updated shortcut command label in Jump menu for clarity

✏️ Tip: You can customize this high-level summary in your review settings.

… current page shortcuts. Update command label for clarity.
@coderabbitai
Copy link

coderabbitai bot commented Dec 15, 2025

Walkthrough

Version number incremented from 1.7.2 to 1.7.3. The Jump Navigation feature's shortcut functionality was refactored from DOM-based manipulation to a direct API call using roamAlphaAPI.data.page.addShortcut(), with the menu label updated accordingly.

Changes

Cohort / File(s) Summary
Version bump
package.json
Version field updated from 1.7.2 to 1.7.3
Jump navigation refactoring
src/features/jumpNav.tsx
Replaced DOM-based addShortcutToLeftSidebar implementation with API-based approach using roamAlphaAPI.data.page.addShortcut(uid, 0); updated menu label from "Add shortcut to page to left sidebar" to "Add current page to shortcuts"

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • Verify the API call syntax and parameters are correct
  • Confirm the new label accurately reflects the updated behavior
  • Ensure the uid resolution for the current page is reliable

Poem

🐰 A hop toward cleaner code today,
From DOM-wrestling to API's way,
The shortcut now finds its proper place,
With labels true and a swifter pace! 🎯

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Fix addShortcutToLeftSidebar, use new API (Closes #509)' clearly and specifically describes the main change: replacing the DOM-based implementation with a new API-based approach for the addShortcutToLeftSidebar function.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix-jumpnav-addshortcuttoleftsidebar

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.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
src/features/jumpNav.tsx (1)

481-486: Confirm addShortcut behavior when focused on a block

This now passes the result of getCurrentPageUid() directly into window.roamAlphaAPI.data.page.addShortcut(uid, 0). Since getOpenPageOrBlockUid() may return a block UID when zoomed into a block, please double‑check that addShortcut accepts both page and block UIDs, or else consider resolving the containing page UID before calling it to avoid subtle misbehavior in that state. The @ts-expect-error usage is fine as a temporary bridge until the types catch up.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 32fbada and c83b30f.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (2)
  • package.json (1 hunks)
  • src/features/jumpNav.tsx (2 hunks)
🔇 Additional comments (2)
src/features/jumpNav.tsx (1)

623-625: Label change matches new shortcut behavior

The new label “Add current page to shortcuts” is clearer and aligns with calling the official shortcut API instead of DOM interaction. No issues from a UX or wiring perspective.

package.json (1)

26-26: Patch version bump is appropriate

Incrementing the version to 1.7.3 for this behavioral fix is consistent with semantic versioning; no further changes needed here.

@mdroidian mdroidian merged commit 93e5548 into main Dec 15, 2025
2 checks passed
@mdroidian mdroidian deleted the fix-jumpnav-addshortcuttoleftsidebar branch December 15, 2025 06:21
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