Conversation
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. WalkthroughAdds an optional Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 6 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (6 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches🧪 Generate unit tests (beta)
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: 1
🤖 Fix all issues with AI agents
In `@src/index.ts`:
- Around line 345-347: The unconditional params["silent-mode"] = "YES" disables
the intended behavior of open actions; change the logic that sets silent-mode so
it is omitted for the Ulysses actions that should reveal content (specifically
"open", "open-all", "open-recent", "open-favorites"): instead of always adding
params["silent-mode"] = "YES", only add it when the action name is not one of
those open* actions (or when the action does not startWith "open"), so open*
commands are sent without the silent-mode parameter.
Adds optional silent parameter to executeUlyssesCommand with two effects: - silent-mode=YES: Prevents Ulysses from revealing the affected item in UI - open -g flag: Prevents bringing Ulysses app to foreground Navigation actions (open, open-all, etc.) explicitly disable silent mode to reveal content as intended. Co-authored-by: Cursor <cursoragent@cursor.com>
7ee3a02 to
82ae747
Compare
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (2)
src/index.ts (2)
326-334: 🧹 Nitpick | 🔵 TrivialJSDoc missing
@param silentdocumentation.The coding guidelines require complex functions to have JSDoc comments. The new
silentparameter and the-gbackground behavior it controls are not documented.Suggested fix
/** * Executes a Ulysses x-callback-url command * Uses execFile to prevent command injection vulnerabilities * For callback actions, waits for Ulysses to respond with data + * `@param` action - The Ulysses x-callback-url action to execute + * `@param` params - Key-value parameters to include in the URL + * `@param` silent - When true, adds silent-mode=YES and opens Ulysses in background (-g flag). Defaults to true. */As per coding guidelines:
src/**/*.ts: "Document complex functions with JSDoc comments."
1032-1043:⚠️ Potential issue | 🟠 Major
authorizeshould not use-gbackground flag — the user must see the authorization dialog.The
authorizeaction requires explicit user interaction (permission prompt). Whensilent=true(default), the code passes the-gflag toopen, launching Ulysses in the background. This can hide the authorization dialog behind the current app, blocking the user from completing the flow.Unlike
open,open-all, etc., which are passive read operations,authorizeneeds the window in the foreground.Suggested fix
- const result = await executeUlyssesCommand("authorize", params); + const result = await executeUlyssesCommand("authorize", params, false);
Co-authored-by: Cursor <cursoragent@cursor.com>
Adds
silent-mode=YESparameter andopen -gflag toexecuteUlyssesCommandfunction to prevent Ulysses from opening sheets and moving to the foreground when commands are executed. This improves the user experience by keeping Ulysses in the state the user left it in and not switching focus.Documentation for the silent flag can be found here.
Thanks for building this project in the first place!