Skip to content

Latest commit

 

History

History
66 lines (49 loc) · 2.43 KB

File metadata and controls

66 lines (49 loc) · 2.43 KB

PR Review Fixes Summary

All required issues from the ObsidianReviewBot review have been fixed.

Fixed Issues

1. ✅ Promise Handling

Issue: Promises must be awaited, end with .catch, .then with rejection handler, or be explicitly marked as ignored with the void operator.

Fixes Applied:

  • Line 58: Added void operator for toggleFocusCheckin() in ribbon callback
  • Line 65, 71, 77: Added void operators for command callbacks
  • Line 95: Added void operator for auto-start
  • Line 100: Added void operator in onunload()
  • Line 118: Added await for saveSettings() in startFocusCheckin()
  • Line 134: Added await for saveSettings() in stopFocusCheckin()
  • Line 168-172: Wrapped async callback in setTimeout with void (async () => { ... })()
  • Line 320-321, 373: Added proper promise handling in settings callbacks

2. ✅ Command IDs (removed plugin ID prefix)

Issue: Command ID should not include the plugin ID.

Fixes Applied:

  • Line 63: start-focus-checkinstart-checkin
  • Line 69: stop-focus-checkinstop-checkin
  • Line 75: toggle-focus-checkintoggle-checkin
  • Line 82: test-system-notificationtest-notification

3. ✅ Command Names (removed plugin name and ensured sentence case)

Issue: Command name should not include the plugin name, and should use sentence case.

Fixes Applied:

  • Line 64: "Start focus check-in" → "Start check-in"
  • Line 70: "Stop focus check-in" → "Stop check-in"
  • Line 76: "Toggle focus check-in" → "Toggle check-in"
  • Line 83: "Test system notification" (already correct)

4. ✅ Made Functions Async

To properly handle promises, the following functions were made async:

  • toggleFocusCheckin() (line 103)
  • startFocusCheckin() (line 111)
  • stopFocusCheckin() (line 127)

Verification

All fixes verified with grep:

# Command IDs and names
grep -n "id:\|name:" main.ts | head -10

# Await statements
grep -n "await.*save" main.ts

# Void operators
grep -n "void this\." main.ts

Next Steps

  1. Push changes to GitHub
  2. The ObsidianReviewBot will automatically re-scan within 6 hours
  3. Once approved, the plugin will be ready for manual review

Note on Eslint

There are some dependency resolution issues with eslint-plugin-obsidianmd in this pnpm workspace. The fixes were verified manually and match all the requirements from the review comments. The bot's automated scan should pass once the changes are pushed.