Conversation
…and palette and sbBomb. Updated logic to retrieve window ID from focused block or construct it as a fallback. Improved code clarity and robustness in block focus and selection handling.
|
Caution Review failedThe pull request is closed. WalkthroughThe PR centralizes focused-block access and adds windowId propagation across SmartBlock execution paths. In src/index.ts the code captures the focused block into a variable, derives both targetUid and windowId from it, and passes windowId in sbBomb target payloads for command-palette, hotkey, textarea, blank-target fallback, and multi-run flows. In src/utils/core.ts setBlockFocusAndSelection now resolves a windowId defensively (from the provided value, focused block, or page UID-derived window) and only calls setBlockFocusAndSelection when a windowId is available. package.json version updated and a devDependency removed. Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested labels
Pre-merge checks and finishing touches❌ Failed checks (1 inconclusive)
✅ Passed checks (2 passed)
📜 Recent review detailsConfiguration used: Organization UI Review profile: CHILL Plan: Pro ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (1)
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 |
There was a problem hiding this comment.
Actionable comments posted: 2
📜 Review details
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
src/index.tssrc/utils/core.ts
🧰 Additional context used
🧬 Code graph analysis (1)
src/index.ts (1)
src/utils/core.ts (1)
sbBomb(2740-2924)
🔇 Additional comments (3)
src/index.ts (3)
139-152: LGTM!Good refactoring to capture the focused block once and derive both
targetUidandwindowIdfrom it. The use of optional chaining ensures safe handling of null/undefined cases.
167-167: LGTM!Correctly passes
windowIdin the fallback path for consistency. The defensive logic insbBombwill handle the case wherewindowIdis undefined.
514-530: LGTM!Consistent with the command palette changes - captures the focused block once and derives both
focusedUidandwindowIdfrom it. The optional chaining provides safe null/undefined handling.
https://www.loom.com/share/5db4f32d01c24231bbb925c416ae828b
Summary by CodeRabbit
Improvements
Chores
✏️ Tip: You can customize this high-level summary in your review settings.