Skip to content

Fix SmartBlock button rendering, vim keybindings, and hotkey overflow#150

Open
salmonumbrella wants to merge 16 commits intoRoamJS:mainfrom
salmonumbrella:issue/126-118-80-71-triage
Open

Fix SmartBlock button rendering, vim keybindings, and hotkey overflow#150
salmonumbrella wants to merge 16 commits intoRoamJS:mainfrom
salmonumbrella:issue/126-118-80-71-triage

Conversation

@salmonumbrella
Copy link
Contributor

@salmonumbrella salmonumbrella commented Feb 15, 2026

Summary

Code Review Remediation

  • Restored README.md and package version reverted by rebase
  • Removed migration guide re-added by rebase (was explicitly deleted on main)
  • Added runtime guard for moveBlock API availability
  • Added missing buttonElementsByBlockUid.clear() on extension unload
  • Added comments explaining dual cleanup paths in button observer

Test Plan

  • All 17 tests pass (button parsing edge cases, extension e2e, core)
  • Build compiles with 0 TypeScript errors
  • Manual verification of SmartBlock button re-render in Roam
  • Manual verification of vim keybindings in SmartBlocks menu

🤖 Generated with Claude Code

Summary by CodeRabbit

Release Notes

New Features

  • Added MOVEBLOCK command to reposition blocks within your graph
  • SmartBlock buttons now work in table cells
  • Enhanced keyboard navigation in SmartBlocks menu with additional shortcuts (Ctrl+N/P, Ctrl+J/K)
  • Improved clipboard paste handling for structured text

Documentation

  • Updated README with expanded feature descriptions and table of contents
  • Removed outdated migration documentation

Chores

  • Version bump to 1.14.0

salmonumbrella and others added 16 commits December 24, 2025 05:04
Add occurrence tracking to correctly identify which button was clicked
when multiple buttons share the same label. Uses matchAll() to find
all button patterns and returns the Nth match based on position.

Fixes RoamJS#136
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…w from rebase

Rebase silently dropped these changes. Restores:
- popoverProps with overflow CSS for hotkey dropdown (RoamJS#147)
- Ctrl+n/j/p/k vim-style navigation in SmartBlocks menu (RoamJS#146)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 15, 2026

Walkthrough

This PR introduces SmartBlock button enhancements, clipboard parsing utilities, and expanded keyboard navigation. Key changes include table-context resolution for SmartBlock buttons with multi-occurrence tracking within blocks, new utility functions for parsing hierarchical clipboard text, a MOVEBLOCK command for block relocation, keyboard navigation extensions (Ctrl+N/P and Ctrl+J/K shortcuts), and a dropdown menu height constraint. Documentation is reorganized with a revised README structure, and the migration guide is removed. Package version is bumped to 1.14.0 with comprehensive test coverage for button parsing scenarios.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Possibly related PRs

Suggested labels

codex

🚥 Pre-merge checks | ✅ 3 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Merge Conflict Detection ⚠️ Warning ❌ Merge conflicts detected (6 files):

⚔️ package-lock.json (content)
⚔️ package.json (content)
⚔️ src/index.ts (content)
⚔️ src/utils/core.ts (content)
⚔️ src/utils/parseSmartBlockButton.ts (content)
⚔️ tests/buttonParsing.test.ts (content)

These conflicts must be resolved before merging into main.
Resolve conflicts locally and push changes to this branch.
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The pull request title accurately summarizes the three main fixes: SmartBlock button rendering, vim keybindings, and hotkey overflow. It is specific, concise, and directly reflects the primary changes.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
⚔️ Resolve merge conflicts (beta)
  • Auto-commit resolved conflicts to branch issue/126-118-80-71-triage
  • Post resolved changes as copyable diffs in a comment

No actionable comments were generated in the recent review. 🎉


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.

@mdroidian
Copy link
Collaborator

Hi — thank you for putting this together. I appreciate the effort here.

We just added a formal contributing guide, so this likely wasn’t visible when you started the PR. Going forward, we’re trying to standardize reviews around it to keep things manageable:

https://github.com/RoamJS/contributing/blob/main/contributing.md

A couple adjustments are needed before this can move forward:

  • One PR = One Issue — this PR currently spans multiple issues. Please split it into separate PRs (one per issue).
  • Keep PRs small and tightly scoped per the size guidelines.
  • Include a short (2–3 min) Loom walkthrough showing what changed and how you verified it.

PRs that touch multiple concerns are significantly harder to review, and I have limited bandwidth right now. Following the guide helps ensure contributions can be reviewed and merged much more quickly.

Once this is split up and the Loom is added, I’ll be happy to take a look.

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